libiodbc-3.52.16/0000775000175000017500000000000014424171430010442 500000000000000libiodbc-3.52.16/man/0000775000175000017500000000000014424171427011223 500000000000000libiodbc-3.52.16/man/iodbc-config.1.in0000664000175000017500000000506214424170750014156 00000000000000.nh .TH iodbc\-config 1 "16 June 2004" "@VERSION@" "@PACKAGE_NAME@" .SH NAME iodbc-config - script to get information about the installed version of iODBC .SH SYNOPSIS .B iodbc-config .RB [ \-\-prefix\fI[=DIR]\fR ] .RB [ \-\-exec\-prefix\fI[=DIR]\fR ] .RB [ \-\-version ] .RB [ \-\-cflags ] .RB [ \-\-libs ] .RB [ \-\-static\-libs ] .RB [ \-\-libtool\-libs ] .RB [ \-\-odbcini ] .RB [ \-\-odbcinstini ] .SH DESCRIPTION \fBiodbc-config\fR is a tool that is used to configure to determine the compiler and linker flags that should be used to compile and link programs that use \fRiODBC\fR. . .SH OPTIONS \fBiodbc-config\fR accepts the following options: .TP 8 .B \-\-version Print the currently installed version of \fBiODBC\fR on the standard output. .TP 8 .B \-\-cflags Print the compiler flags that are necessary to compile an \fBiODBC\fR program. .TP 8 .B \-\-libs Print the linker flags that are necessary to link an \fBiODBC\fR program using dynamic libraries (if supported). .TP 8 .B \-\-static\-libs Print the linker flags that are necessary to link an \fBiODBC\fR program using static libraries. .TP 8 .B \-\-libtool\-libs Print the linker flags that are necessary to link an \fBiODBC\fR program in a libtool environment. .TP 8 .B \-\-odbcini Print the path of the system wide odbc.ini file. .TP 8 .B \-\-odbcinstini Print the path of the system wide odbcinst.ini file. .TP 8 .B \-\-prefix\fI[=PREFIX]\fR If specified, use PREFIX instead of the installation prefix that \fBiODBC\fR was built with when computing the output for the \-\-cflags and \-\-libs options. This option is also used for the exec prefix if \-\-exec\-prefix was not specified. This option must be specified before any \-\-libs or \-\-cflags options. If PREFIX is not specified, the \fB\-\-prefix\fR flag shows where \fBiODBC\fR is currently installed. .TP 8 .B \-\-exec\-prefix=PREFIX If specified, use PREFIX instead of the installation exec prefix that \fBiODBC\fR was built with when computing the output for the \-\-cflags and \-\-libs options. This option must be specified before any \-\-libs or \-\-cflags options. .SH EXAMPLES To compile a program that calls the \fBiODBC\fR API, make sure the \fBiodbc\-config\fR program can be found in the \fBPATH\fR environment variable, before using the following Makefile fragment: .nf CFLAGS=\`iodbc-config \-\-cflags\` LDLIBS=\`iodbc-config \-\-libs\` iodbctest: iodbctest.c cc $(CFLAGS) \-o iodbctest iodbctest.c $(LDLIBS) .fi .SH COPYRIGHT Copyright \(co 1996-2023 OpenLink Software .SH AUTHOR iODBC Administrator libiodbc-3.52.16/man/iodbctestw.1.in0000664000175000017500000000002514013216212013760 00000000000000.so man1/iodbctest.1 libiodbc-3.52.16/man/Makefile.am0000664000175000017500000000652114424170750013201 00000000000000# # Makefile.am # # The iODBC driver manager. # # Copyright (C) 1996-2023 OpenLink Software # All Rights Reserved. # # This software is released under the terms of either of the following # licenses: # # - GNU Library General Public License (see LICENSE.LGPL) # - The BSD License (see LICENSE.BSD). # # Note that the only valid version of the LGPL license as far as this # project is concerned is the original GNU Library General Public License # Version 2, dated June 1991. # # While not mandated by the BSD license, any patches you make to the # iODBC source code may be contributed back into the iODBC project # at your discretion. Contributions will benefit the Open Source and # Data Access community as a whole. Submissions may be made at: # # http://www.iodbc.org # # # GNU Library Generic Public License Version 2 # ============================================ # 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; only # Version 2 of the License dated June 1991. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # The BSD License # =============== # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. Neither the name of OpenLink Software Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # if GUI MAN_GUI = iodbcadm-gtk.1 endif man_MANS = iodbc-config.1 iodbctest.1 iodbctestw.1 $(MAN_GUI) EXTRA_DIST = \ $(srcdir)/iodbc-config.1.in \ $(srcdir)/iodbctest.1.in \ $(srcdir)/iodbctestw.1.in \ $(srcdir)/iodbcadm-gtk.1.in libiodbc-3.52.16/man/Makefile.in0000664000175000017500000004631414424171020013205 00000000000000# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 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@ # # Makefile.am # # The iODBC driver manager. # # Copyright (C) 1996-2023 OpenLink Software # All Rights Reserved. # # This software is released under the terms of either of the following # licenses: # # - GNU Library General Public License (see LICENSE.LGPL) # - The BSD License (see LICENSE.BSD). # # Note that the only valid version of the LGPL license as far as this # project is concerned is the original GNU Library General Public License # Version 2, dated June 1991. # # While not mandated by the BSD license, any patches you make to the # iODBC source code may be contributed back into the iODBC project # at your discretion. Contributions will benefit the Open Source and # Data Access community as a whole. Submissions may be made at: # # http://www.iodbc.org # # # GNU Library Generic Public License Version 2 # ============================================ # 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; only # Version 2 of the License dated June 1991. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # The BSD License # =============== # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. Neither the name of OpenLink Software Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = man ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/admin/gtk-2.0.m4 \ $(top_srcdir)/admin/gtk.m4 $(top_srcdir)/admin/libtool.m4 \ $(top_srcdir)/admin/ltoptions.m4 \ $(top_srcdir)/admin/ltsugar.m4 \ $(top_srcdir)/admin/ltversion.m4 \ $(top_srcdir)/admin/lt~obsolete.m4 \ $(top_srcdir)/admin/openlink.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = iodbc-config.1 iodbctest.1 iodbctestw.1 \ iodbcadm-gtk.1 CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" NROFF = nroff MANS = $(man_MANS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/iodbc-config.1.in \ $(srcdir)/iodbcadm-gtk.1.in $(srcdir)/iodbctest.1.in \ $(srcdir)/iodbctestw.1.in $(top_srcdir)/admin/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_CONFIG = @GTK_CONFIG@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBADD_DL = @LIBADD_DL@ LIBADD_OS = @LIBADD_OS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ filedsnpath = @filedsnpath@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ inidir = @inidir@ install_sh = @install_sh@ lib_version = @lib_version@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ odbcmode = @odbcmode@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @GUI_TRUE@MAN_GUI = iodbcadm-gtk.1 man_MANS = iodbc-config.1 iodbctest.1 iodbctestw.1 $(MAN_GUI) EXTRA_DIST = \ $(srcdir)/iodbc-config.1.in \ $(srcdir)/iodbctest.1.in \ $(srcdir)/iodbctestw.1.in \ $(srcdir)/iodbcadm-gtk.1.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu man/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu man/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): iodbc-config.1: $(top_builddir)/config.status $(srcdir)/iodbc-config.1.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ iodbctest.1: $(top_builddir)/config.status $(srcdir)/iodbctest.1.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ iodbctestw.1: $(top_builddir)/config.status $(srcdir)/iodbctestw.1.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ iodbcadm-gtk.1: $(top_builddir)/config.status $(srcdir)/iodbcadm-gtk.1.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-man1: $(man_MANS) @$(NORMAL_INSTALL) @list1=''; \ list2='$(man_MANS)'; \ test -n "$(man1dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.1[a-z]*$$/p'; \ fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(MANS) installdirs: for dir in "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man1 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-man uninstall-man: uninstall-man1 .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-man1 install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags-am uninstall uninstall-am uninstall-man \ uninstall-man1 .PRECIOUS: Makefile # 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: libiodbc-3.52.16/man/iodbcadm-gtk.1.in0000664000175000017500000000055314424170750014160 00000000000000.nh .TH iodbcadm-gtk 1 "16 June 2004" "@VERSION@" "@PACKAGE_NAME@" .SH NAME iodbcadm-gtk \- iODBC administration program. .SH SYNOPSIS iodbcadm-gtk .SH DESCRIPTION This program is a graphical ODBC administration program using the GTK+ widget set. .SH COPYRIGHT Copyright \(co 1996-2023 OpenLink Software .SH AUTHOR iODBC Administrator libiodbc-3.52.16/man/iodbctest.1.in0000664000175000017500000001010014424170750013600 00000000000000.nh .TH iodbctest 1 "3 August 2005" "@VERSION@" "@PACKAGE_NAME@" .SH NAME iodbctest, iodbctestw \- iODBC Demonstration programs .SH SYNOPSIS .B iodbctest .RB [ \(dqDSN=xxxx[;UID=xxxx][;PWD=xxxx][;OPT=value]\(dq ] .br .B iodbctestw .RB [ \(dqDSN=xxxx[;UID=xxxx][;PWD=xxxx][;OPT=value]\(dq ] .SH DESCRIPTION The \fBiodbctest\fR program and \fBiodbtestw\fR programs are simple ODBC sample programs, showing the strength of the ODBC API to connect to any ODBC enabled database, issue SQL commands and retrieve the query results. The \fBiodbctest\fR program uses the standard ODBC API calls to connect using any DSN, but retrieves all results in ASCII mode. The \fBiodbctestw\fR program uses the ODBC Unicode API calls to connect using any DSN, and retrieves all results in Unicode mode. .SH OPTIONS The \fBiodbctest\fR program uses the SQLDriverConnect function to make a connection using any available ODBC compliant driver. This allows the user to override any ODBC connect attribute in the DSN string. Connect strings should start with either a \fIDSN=xxx\fR or a \fIDRIVER=xxxx\fR attribute optionally followed by other DSN attributes separated by a semicolon e.g: .nf DSN=ora9;UID=scott;PWD=tiger;DATABASE=ora9u .fi Any attributes required for a proper connection that are not entered in the DSN connect string, must be present in the odbc.ini file. If the connect string is passed as an argument to the \fBiodbctest\fR program, the string should be quoted as most shells use the semicolon as their command separator. If the connect string is entered on the interactive prompt, no quotes should be used. After a successful connection has been established, the user is prompted for a SQL command to be send to the database. A SQL command cannot span multiple lines. If the SQL command returns one or more result sets, each result set is fetched using character buffers and displayed in a table. Additionally, the \fBiodbctest\fR program understands a few special commands: .TP 8 .B qualifiers .br Show a list of qualifiers using the SQLTables catalog call. .TP 8 .B owners .br Show a list of owners using the SQLTables catalog call. .TP 8 .B tables .br Show a list of tables using the SQLTables catalog call. .TP 8 .B types .br Show a list of tables types using the SQLTables catalog call. .TP 8 .B datatypes .br Show a list of data types using the SQLGetTypeInfo catalog call. .TP 8 .B reconnect .br Perform a disconnect/reconnect with the information saved during the first SQLDriverConnect. .TP 8 .B quit (or exit) .br Exit the program and return to the shell. .SH EXAMPLES Start the iodbctest program and get a list of DSNs before making a connection: .nf $ iodbctest OpenLink ODBC Demonstration program This program shows an interactive SQL processor Enter ODBC connect string (? shows list): ? DSN | Driver ----------------------------------------------------------------- ora9 | OpenLink Generic ODBC Driver mysql | OpenLink Generic ODBC Driver mysqllite | OpenLink Lite for MySQL myodbc | MyODBC Driver pgsql | OpenLink Generic ODBC Driver tds | OpenLink Generic ODBC Driver Enter ODBC connect string (? shows list): DSN=ora9;PWD=tiger Driver: 05.20.0316 OpenLink Generic ODBC Driver (oplodbc.so) SQL> .fi Connect to an Oracle 9 instance which has been previously setup in the odbc.ini file: .nf $ iodbctest "DSN=ora9;UID=scott;PWD=tiger" iODBC Demonstration program This program shows an interactive SQL processor Driver: 05.20.0316 OpenLink Generic ODBC Driver (oplodbc.so) SQL>select * from emp ID |NAME -----------------+------------------------------------------- 1 |Record 1 2 |Record 2 2 |Record 3 result set 1 returned 3 rows. SQL> quit .fi .SH COPYRIGHT Copyright \(co 1996-2023 OpenLink Software .SH AUTHOR iODBC Administrator libiodbc-3.52.16/README_GIT0000664000175000017500000000751614424170750011762 00000000000000# Using the iODBC git tree Copyright (C) 1996-2023 OpenLink Software ## Introduction This document describes how to check out a copy of the git tree for development purposes. It also lists the packages that need to be installed prior to generating the necessary scripts and makefiles to build the project. Git access is only needed by developers who want to actively track progress of the iODBC source code and contribute bugfixes or enhancements to the project. It requires basic knowledge of git itself, the general layout of open source and GNU projects, the use of `autoconf` and `automake`, etc., which are beyond the scope of this document. If you have any questions, please email us at . ## Git Archive Server Access For main development, OpenLink Software publishes the iODBC tree to GitHub, and we encourage everyone who is interested in tracking the project to make an account there. Users who mainly just want to track the code can use the following command to get a copy of the tree: $ git clone git://github.com/openlink/iODBC At this point, you can create your own work branch based on any of the branches available, create bugfixes and commit them to your own branch, and then use the `git format-patch` command to generate the appropriate diffs to send to . Developers are encouraged to fork the project using GitHub, create their own branches to make enhancements/bugfixes, and then send pull requests using the excellent GitHub interface, for the OpenLink team to examine and incorporate into the master tree for an upcoming release. Github has [excellent documentation](http://help.github.com/) on how to fork a project, send pull requests, track a project, etc. OpenLink Software will continue to use [sourceforge.net](https://sourceforge.net/projects/iodbc/) for the source tarball releases and certain binary releases, and for completeness will also provide read-only Git Archive access there. For more information, check the [iODBC SourceForge pages](https://sourceforge.net/projects/iodbc/) ## Package Dependencies To generate the `configure` script and all other build files necessary, please make sure the following packages (and any GNU packages required by them) and recommended versions are installed on your system. *Note -- these are minimum versions; later versions should work just fine. Older versions of these packages can sometimes be used, but could cause build problems.* Package Minimum Version Source ---------- ----------------- ------------------------------------ autoconf 2.59 ftp://ftp.gnu.org/pub/gnu/autoconf automake 1.9.6 ftp://ftp.gnu.org/pub/gnu/automake libtool 1.5.22 ftp://ftp.gnu.org/pub/gnu/libtool make 3.79.1 http://www.gnu.org/software/make gtk+ 1.2.10 ftp://ftp.gtk.org/pub/gtk/v1.2 The `autogen.sh` and `configure` scripts check for the presence and version of some of the required components. To check the version numbers of the tools installed on your system, you can use the following commands: $ autoconf --version $ automake --version $ libtoolize --version $ make --version $ gtk-config --version ## Generate build files To generate the `configure` script and all related build files, use the following command: $ autoreconf --install Alternatively, use the supplied script in your check-out directory: $ ./autogen.sh If the above commands succeed without any error messages, you can use the following command to see all the options you can use: $ ./configure --help Certain build targets are only enabled when the `--enable-maintainer-mode` flag is added to `configure`. Please read the `INSTALL` and `README` files in this directory for further information on how to configure the package and install it on your system. libiodbc-3.52.16/LICENSE.BSD0000664000175000017500000000306414424170750012005 00000000000000iODBC Driver Manager Copyright (C) 1995 Ke Jin Copyright (C) 1996-2023 OpenLink Software All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of OpenLink Software nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. libiodbc-3.52.16/LICENSE0000664000175000017500000000133114424170750011371 00000000000000iODBC Driver Manager Copyright (C) 1995 Ke Jin Copyright (C) 1996-2023 OpenLink Software All Rights Reserved. This software is released under either the GNU Library General Public License (see LICENSE.LGPL) or the BSD License (see LICENSE.BSD). Note that the only valid version of the LGPL license as far as this project is concerned is the original GNU Library General Public License Version 2, dated June 1991. While not mandated by the BSD license, any patches you make to the iODBC may be contributed back into the iODBC project at your discretion. Contributions will benefit the Open Source and Data Access community as a whole. Submissions may be made at http://www.iodbc.org. libiodbc-3.52.16/configure.ac0000664000175000017500000005233614424170750012665 00000000000000AC_PREREQ(2.59) AC_REVISION($Id$) # # configure.ac # # The iODBC driver manager. # # Copyright (C) 1995 Ke Jin # Copyright (C) 1996-2023 OpenLink Software # All Rights Reserved. # # This software is released under the terms of either of the following # licenses: # # - GNU Library General Public License (see LICENSE.LGPL) # - The BSD License (see LICENSE.BSD). # # Note that the only valid version of the LGPL license as far as this # project is concerned is the original GNU Library General Public License # Version 2, dated June 1991. # # While not mandated by the BSD license, any patches you make to the # iODBC source code may be contributed back into the iODBC project # at your discretion. Contributions will benefit the Open Source and # Data Access community as a whole. Submissions may be made at: # # http://www.iodbc.org # # # GNU Library Generic Public License Version 2 # ============================================ # 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; only # Version 2 of the License dated June 1991. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # The BSD License # =============== # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. Neither the name of OpenLink Software Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ########################################################################## ## ## ## Version info ## ## ## ########################################################################## m4_define(V_iodbc_major, [3]) # ODBC Major version m4_define(V_iodbc_minor, [52]) # ODBC Minor version m4_define(V_iodbc_patch, [16]) # Increase every release m4_define(V_iodbc_devel, []) # -dev, -rc1 or empty for stable m4_define(V_iodbc_date, [230502]) # YYMMDD of release m4_define(V_iodbc_shlib, [31]) # Increase every change ########################################################################## ## ## ## Initialization ## ## ## ########################################################################## AC_INIT([iODBC Driver Manager], V_iodbc_major.V_iodbc_minor.V_iodbc_patch[]V_iodbc_devel, [iodbc@openlinksw.com], [libiodbc]) AC_CONFIG_SRCDIR([include/isql.h]) AC_CONFIG_AUX_DIR(admin) AC_CONFIG_MACRO_DIR(admin) AC_CONFIG_HEADERS(include/config.h) AM_INIT_AUTOMAKE AC_CANONICAL_HOST AM_MAINTAINER_MODE ########################################################################## ## ## ## Version information ## ## ## ######################################################################### # # Version information for SQLGetInfo(SQL_DM_VER) call # BUILD_MAJOR="V_iodbc_patch" # last digit of version number BUILD_MINOR="V_iodbc_date" # year/month/day of release BUILD_VER="${BUILD_MAJOR}${BUILD_MINOR}" # # Library version numbers # lib3_version=3:V_iodbc_shlib:1 # ODBC 3.x mode lib2_version=2:55:0 # ODBC 2.x mode (do not change) ########################################################################## ## ## ## Check whether config.cache belongs to this machine ## ## ## ########################################################################## AC_MSG_CHECKING(cached information) hostcheck="$host" AC_CACHE_VAL(ac_cv_hostcheck, [ ac_cv_hostcheck="$hostcheck" ]) if test "$ac_cv_hostcheck" != "$hostcheck"; then AC_MSG_RESULT(changed) AC_MSG_WARN([Running on a different architecture.]) AC_MSG_WARN([Can't use cached values.]) AC_MSG_ERROR([Please remove the invalid config.cache file, then try again.]) else AC_MSG_RESULT(ok) fi ########################################################################## ## ## ## Save configuration for later reuse ## ## ## ########################################################################## OPL_CONFIG_NICE([config.nice]) ########################################################################## ## ## ## Set Layout for iODBC ## ## ## ########################################################################## AC_PREFIX_DEFAULT(/usr/local) AC_MSG_CHECKING(for iODBC installation layout) AC_ARG_WITH(layout, [dnl AS_HELP_STRING([--with-layout=LAYOUT], [Choose installation layout])dnl ], [ case "${withval}" in yes|no) IODBC_LAYOUT=unset ;; *) IODBC_LAYOUT=${withval} ;; esac ], [IODBC_LAYOUT=unset]) # # Defaults for Layout # install_libodbc=true case ${IODBC_LAYOUT} in unset) # No Layout set iodbc_layout="default" inidir=/etc ;; [[Gg]][[Nn]][[Uu]]) # GNU iodbc_layout="GNU" test "x$prefix" = xNONE && prefix=/usr/local inidir=${prefix}/etc/iodbc ;; [[Dd]][[Ee]][[Bb]][[Ii]][[Aa]][[Nn]]) # Debian iodbc_layout="Debian" test "x$prefix" = xNONE && prefix=/usr inidir=/etc install_libodbc=false ;; [[Gg]][[Ee]][[Nn]][[Tt]][[Oo]][[Oo]]) # Gentoo iodbc_layout="Gentoo" test "x$prefix" = xNONE && prefix=/usr includedir='${prefix}/include/iodbc' inidir=/etc/iodbc install_libodbc=false ;; [[Rr]][[Ee]][[Dd]][[Hh]][[Aa]][[Tt]]) # RedHat iodbc_layout=RedHat test "x$prefix" = xNONE && prefix=/usr inidir=/etc ;; [[Ff]][[Rr]][[Ee]][[Ee]][[Bb]][[Ss]][[Dd]]) # FreeBSD iodbc_layout=FreeBSD test "x$prefix" = xNONE && prefix=/usr inidir=/etc ;; [[Oo]][[Pp]][[Tt]]) # /opt iodbc_layout=opt test "x$prefix" = xNONE && prefix=/opt/iodbc inidir=/etc ;; [[Oo]][[Pp]][[Ee]][[Nn]][[Ll]][[Ii]][[Nn]][[Kk]]) # OpenLink iodbc_layout=openlink prefix=/usr/local/iODBC inidir=/etc ;; *) # UNKNOWN AC_MSG_RESULT(unknown) echo "" echo "Supported layouts: Debian FreeBSD GNU OpenLink opt RedHat" echo "" AC_MSG_ERROR([unable to continue]) ;; esac AC_MSG_RESULT([${iodbc_layout}]) ########################################################################## ## ## ## Check for C compiler ## ## ## ########################################################################## AC_PROG_CC AM_PROG_CC_C_O AC_PROG_CC_STDC AC_PROG_CPP AC_LANG([C]) AC_C_CONST ########################################################################## ## ## ## Check for standard programs ## ## ## ########################################################################## AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_MAKE_SET LT_INIT ########################################################################## ## ## ## Check for standard header files ## ## ## ########################################################################## AC_HEADER_STDC AC_HEADER_TIME AC_CHECK_HEADERS(wchar.h) ########################################################################## ## ## ## Check for specific library functions ## ## ## ########################################################################## AC_CHECK_FUNCS(strerror setenv asprintf snprintf gettimeofday localtime_r) dnl Unicode AC_CHECK_FUNCS(wcslen wcscpy wcsncpy wcschr wcscat wcscmp towlower wcsncasecmp) ########################################################################## ## ## ## Check if we want to build the GUI applications and libraries ## ## ## ########################################################################## AC_ARG_ENABLE(gui, [dnl AS_HELP_STRING([--enable-gui], [build GUI applications (default)]) AS_HELP_STRING([--disable-gui], [build GUI applications])dnl ], [ case "${enableval}" in yes) USE_GUI=true ;; no) USE_GUI=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-gui) ;; esac ],[USE_GUI=true]) ########################################################################## ## ## ## Check for GTK library functions ## ## ## ########################################################################## USE_GTK=false if test x$USE_GUI = xtrue then no_gtk="" # Check for GTK+ 2.x AM_PATH_GTK_2_0(2.0.0) if test x$no_gtk != x then # Try GTK 1.2.x instead no_gtk="" AM_PATH_GTK(1.2.3) fi if test x$no_gtk = x then USE_GTK=true fi fi ########################################################################## ## ## ## Now make the final checks whether we can use GUI extensions ## ## ## ########################################################################## if test x$USE_GTK = xfalse then USE_GUI=false fi if test x$USE_GUI = xtrue then AC_DEFINE(GUI, 1, [Define if we detected a GUI library we can use]) fi AM_CONDITIONAL(GUI, [test x$USE_GUI = xtrue]) AM_CONDITIONAL(GTK, [test x$USE_GTK = xtrue]) ########################################################################## ## ## ## Check for dynamic load module ## ## ## ########################################################################## AC_CHECK_HEADERS(dlfcn.h dl.h dld.h) save_LIBS="$LIBS" LIBADD_DL="" AC_CHECK_LIB(dl, dlopen, [ AC_DEFINE(HAVE_LIBDL, 1, [Define if you have the -ldl library]) LIBADD_DL="-ldl" LIBS="$LIBS -ldl" ] ) AC_CHECK_FUNCS(dlopen _dlopen dlsym dladdr) AC_MSG_CHECKING([whether dlsym() requires a leading underscore in symbol names]) _LT_TRY_DLOPEN_SELF([ AC_MSG_RESULT(no) ], [ AC_MSG_RESULT(yes) AC_DEFINE(NEED_USCORE, 1, [Define if dlsym() requires a leading underscore in symbol names. ]) ], [ AC_MSG_RESULT(no) ], []) ########################################################################## ## Check if the dl library has the Dl_info structure ## ########################################################################## AC_MSG_CHECKING([for Dl_info]) AC_TRY_COMPILE([ #ifndef _GNU_SOURCE #define _GNU_SOURCE 1 #endif #include ],[ Dl_info* info = 0; dladdr(0, info); ],[ AC_DEFINE(HAVE_DL_INFO, 1, [Define to 1 if you have the Dl_info structure]) AC_MSG_RESULT(yes) ],[ AC_MSG_RESULT(no) ]) ########################################################################## ## Check for dynamic load module (hpux) ## ########################################################################## 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="-ldld"])] ) ########################################################################## ## Check for dynamic load module (hpux) ## ########################################################################## AC_CHECK_LIB(dld, dld_link, [AC_DEFINE(HAVE_DLD, 1, [Define if you have the -ldld library])dnl test "x$ac_cv_lib_dld_shl_load" = yes || LIBADD_DL="-ldld"]) ########################################################################## ## Check for dynamic load module (macos) ## ########################################################################## AC_CHECK_FUNC(NSCreateObjectFileImageFromFile, [AC_DEFINE(HAVE_DYLD, 1, [Define if you have the DYLD library])]) AC_SUBST(LIBADD_DL) LIBS="$save_LIBS" ########################################################################## ## ## ## Set version information ## ## ## ########################################################################## AC_MSG_CHECKING(for iODBC mode) AC_ARG_ENABLE(odbc3, [dnl AS_HELP_STRING([--enable-odbc3], [build ODBC 3.x compatible driver manager (default)]) AS_HELP_STRING([--disable-odbc3], [build ODBC 2.x compatible driver manager])dnl ], [ case "${enableval}" in yes) odbcmode=3 ;; no) odbcmode=2 AC_MSG_ERROR(--disable-odbc3 temporarily disabled) ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-odbc3) ;; esac ], [ odbcmode=3 # set default to ODBC 3.x mode ]) if test "x$odbcmode" = "x3" then lib_version=$lib3_version CFLAGS="$CFLAGS -DODBCVER=0x0350 -DIODBC_BUILD=$BUILD_VER" AC_MSG_RESULT(ODBC 3.x compatible mode) else lib_version=$lib2_version CFLAGS="$CFLAGS -DODBCVER=0x0250 -DIODBC_BUILD=$BUILD_VER" AC_MSG_RESULT(ODBC 2.x compatible mode) fi AC_SUBST(odbcmode) AC_SUBST(lib_version) ########################################################################## ## ## ## Where to find the system odbc.ini file ** ## ## ########################################################################## # # First determine the systemwide default directory according # to GNU specifications # AC_MSG_CHECKING(system config directory) sysinidir=`eval echo $sysconfdir` case "$sysinidir" in NONE*) sysinidir=$ac_default_prefix/etc ;; /usr/etc) sysinidir=/etc ;; *) sysinidir=`eval echo $sysconfdir` ;; esac AC_MSG_RESULT($sysinidir) # # Now allow to overrule this directory with a custom setting # AC_MSG_CHECKING(for iODBC ini directory) AC_ARG_WITH(iodbc-inidir, [dnl AS_HELP_STRING([--with-iodbc-inidir=DIR], [where the system odbc.ini file should be located]) AS_HELP_STRING([ ], [(default is /etc)])dnl ], [ case "$withval" in yes|no) inidir=$sysinidir ;; *) inidir=$withval ;; esac ]) AC_MSG_RESULT($inidir) AC_SUBST(inidir) AC_DEFINE_UNQUOTED(SYS_ODBC_INI, "$inidir/odbc.ini", [Define path to systemwide odbc.ini file]) AC_DEFINE_UNQUOTED(SYS_ODBCINST_INI, "$inidir/odbcinst.ini", [Define path to systemwide odbcinst.ini file]) # # Now allow to override default FileDSN directory with a custom setting # filedsnpath=$inidir/ODBCDataSources AC_MSG_CHECKING(for FILEDSN default directory) AC_ARG_WITH(iodbc-filedsnpath, [dnl AS_HELP_STRING([--with-iodbc-filedsnpath=DIR], [default location for FILEDSN data sources]) AS_HELP_STRING([ ], [(default is $inidir/ODBCDataSources)])dnl ], [ case "$withval" in yes|no) filedsnpath=$inidir/ODBCDataSources ;; *) filedsnpath=$withval ;; esac ]) AC_MSG_RESULT($filedsnpath) AC_SUBST(filedsnpath) AC_DEFINE_UNQUOTED(DEFAULT_FILEDSNPATH, "$filedsnpath", [Default location for FILEDSN data sources]) ########################################################################## ## ## ## Create libodbc.so if requested ## ## ## ########################################################################## AC_MSG_CHECKING(for libodbc.so link) AC_ARG_ENABLE(libodbc, [dnl AS_HELP_STRING([--enable-libodbc], [install extra libodbc.so library (default)]) AS_HELP_STRING([--disable-libodbc], [do not install extra libodbc.so library ])dnl ], [ case "${enableval}" in yes) install_libodbc=true ;; no) install_libodbc=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-libodbc) ;; esac ],[]) AC_MSG_RESULT([$install_libodbc]) AM_CONDITIONAL(INSTALL_LIBODBC, [test x$install_libodbc = xtrue]) ########################################################################## ## ## ## Checkout pthread situation ## ## ## ########################################################################## # for backward compatibility AC_ARG_WITH(pthreads,[], [ AC_MSG_WARN([--with-pthreads flag is deprecated, use --enable-pthreads]) ],[]) AC_MSG_CHECKING(for thread model) AC_ARG_ENABLE(pthreads, [dnl AS_HELP_STRING([--enable-pthreads], [build threaded libraries and applications (default)]) AS_HELP_STRING([--disable-pthreads], [build non-threaded libraries and applications])dnl ], [ case "${enableval}" in yes) USE_PTHREADS=true ;; no) USE_PTHREADS=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-pthreads) ;; esac ],[USE_PTHREADS=true]) if test x$USE_PTHREADS = xtrue then AC_MSG_RESULT(enabled pthread support) CPPFLAGS="$CPPFLAGS -DWITH_PTHREADS -D_REENTRANT" found_lib=false AC_MSG_CHECKING(for OS dependent thread flags) case $host in *-aix*) # Unless overruled by the user, we prefer this compiler if test "x$CC" = "xcc" then CC=cc_r7 fi AC_MSG_RESULT([using $CC for AIX]) ;; *UnixWare*) CFLAGS="$CFLAGS -Kthread" AC_MSG_RESULT([use -Kthread for UnixWare]) ;; i[3456]86-dg-dgux*) CFLAGS="$CFLAGS -D_POSIX4A_DRAFT6_SOURCE" LIBS="$LIBS -lthread" AC_MSG_RESULT([use -lthread for DG/UX]) ;; *-freebsd*) CFLAGS="$CFLAGS -pthread" AC_MSG_RESULT([use -pthread for FreeBSD]) ;; *-hpux*) LIBS="$LIBS -lpthread -lcl" AC_MSG_RESULT([use -lpthread for HP/UX]) ;; *-osf3.*) CPPFLAGS="$CPPFLAGS -DOLD_PTHREADS" LIBS="$LIBS -lpthreads -lmach -lc_r" AC_MSG_RESULT([use -lpthreads for OSF 3.2]) ;; *-osf4.*) LIBS="$LIBS -lpthread" AC_MSG_RESULT([use -lpthread for OSF 4.x]) ;; *) AC_MSG_RESULT([none]) ;; esac # # Check headers # AC_CHECK_HEADER([pthread.h], , [AC_MSG_ERROR([pthreads header not found])]) # # If mutex functions are in C library, we should not need to link # with -lpthread # AC_CHECK_FUNC(pthread_mutex_lock, [found_lib=true]) # # Check out the various libraries # if test x$found_lib = xfalse then IODBC_CHECK_PTHREAD_LIB(pthreads, pthread_mutex_lock, [ LIBS="$LIBS -lpthreads" found_lib=true ]) fi if test x$found_lib = xfalse then IODBC_CHECK_PTHREAD_LIB(pthread, pthread_mutex_lock, [ LIBS="$LIBS -lpthread" found_lib=true ]) fi else AC_MSG_RESULT(no thread support) fi ########################################################################## ## ## ## OS dependent libraries ## ## ## ########################################################################## LIBADD_OS="" AC_MSG_CHECKING(for OS dependent libraries and link flags) AM_CONDITIONAL(DARWIN, false) case $host in *-hpux*) LDFLAGS="$LDFLAGS -Wl,+s" AC_MSG_RESULT([use -Wl,+s for HP/UX]) ;; *-darwin*) AM_CONDITIONAL(DARWIN, true) CFLAGS="$CFLAGS -DNO_FRAMEWORKS" LIBADD_OS="-Wl,-framework,Carbon" AC_MSG_RESULT([$LIBADD_OS]) ;; *) AC_MSG_RESULT(none) ;; esac AC_SUBST(LIBADD_OS) ########################################################################## ## ## ## Generate Makefiles etc. ## ## ## ########################################################################## AC_CONFIG_FILES([ Makefile admin/Makefile admin/libiodbc.spec admin/libiodbc.pc bin/Makefile bin/iodbc-config etc/Makefile man/Makefile man/iodbc-config.1 man/iodbctest.1 man/iodbctestw.1 man/iodbcadm-gtk.1 include/Makefile iodbc/Makefile iodbc/trace/Makefile iodbcinst/Makefile iodbcadm/Makefile iodbcadm/gtk/Makefile drvproxy/Makefile drvproxy/gtk/Makefile samples/Makefile ]) AC_CONFIG_COMMANDS([default],[ chmod 755 bin/iodbc-config ]) AC_OUTPUT ########################################################################## ## ## ## Display configuration information ## ## ## ########################################################################## # ---------------------------------------------------------------------- # Color settings # ---------------------------------------------------------------------- B=`tput bold 2>/dev/null` N=`tput sgr0 2>/dev/null` cat < # All Rights Reserved. # # This software is released under the terms of either of the following # licenses: # # - GNU Library General Public License (see LICENSE.LGPL) # - The BSD License (see LICENSE.BSD). # # Note that the only valid version of the LGPL license as far as this # project is concerned is the original GNU Library General Public License # Version 2, dated June 1991. # # While not mandated by the BSD license, any patches you make to the # iODBC source code may be contributed back into the iODBC project # at your discretion. Contributions will benefit the Open Source and # Data Access community as a whole. Submissions may be made at: # # http://www.iodbc.org # # # GNU Library Generic Public License Version 2 # ============================================ # 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; only # Version 2 of the License dated June 1991. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # The BSD License # =============== # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. Neither the name of OpenLink Software Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # ---------------------------------------------------------------------- # Globals # ---------------------------------------------------------------------- DIE=0 ELINES=3 # ---------------------------------------------------------------------- # Color settings # ---------------------------------------------------------------------- B=`tput bold 2>/dev/null` N=`tput sgr0 2>/dev/null` ERROR="${B}** ERROR **${N}" WARNING="${B}* WARNING *${N}" # ---------------------------------------------------------------------- # Functions # ---------------------------------------------------------------------- CHECK() { for PROG in $* do VERSION=`$PROG --version 2>/dev/null | head -1 | sed -e "s/$PROG //"` if test \! -z "$VERSION" then echo "Using $PROG $VERSION" USE_PROG=$PROG break fi done if test -z "$VERSION" then echo echo "${ERROR} : You must have \`${B}${PROG}${N}' installed on your system." echo DIE=1 fi } CHECK_WARN() { for PROG in $* do VERSION=`$PROG --version 2>/dev/null | head -1 | sed -e "s/$PROG //"` if test \! -z "$VERSION" then echo "Using $PROG $VERSION" USE_PROG=$PROG break fi done if test -z "$VERSION" then echo echo "${WARNING} : You may need \`${B}${PROG}${N}' installed on your system." echo fi } RUN() { PROG=$1; shift ARGS=$* echo "Running ${B}${PROG}${N} ..." $PROG $ARGS 2>> autogen.log if test $? -ne 0 then echo echo "${ERROR}" tail -$ELINES autogen.log echo echo "autogen.sh script aborting (see autogen.log for details) ..." exit 1 fi } # # Check availability of build tools # echo echo "${B}Checking build environment${N} ..." CHECK libtoolize glibtoolize; LIBTOOLIZE=$USE_PROG CHECK aclocal CHECK autoheader CHECK automake CHECK autoconf CHECK_WARN gtk-config if test "$DIE" -eq 1 then echo echo "Please read the ${B}README_GIT${N} file for a list of packages you need" echo "to install on your system before bootstrapping this project." echo echo "autogen.sh script aborting ..." exit 1 fi # # Generate the build scripts # > autogen.log echo echo "${B}Generating build scripts${N} ..." touch ChangeLog RUN $LIBTOOLIZE --force --copy RUN aclocal -I admin #--warnings=all RUN autoheader --warnings=all RUN automake --copy --add-missing --warnings=all RUN autoconf --warnings=all,no-obsolete echo echo "Please check the ${B}INSTALL${N} and ${B}README${N} files for instructions to" echo "configure, build and install iODBC on your system." echo echo "Certain build targets are only enabled in maintainer mode:" echo echo " ./configure --enable-maintainer-mode ..." echo echo "autogen.sh script completed successfully." exit 0 libiodbc-3.52.16/README_GIT.md0000664000175000017500000000767614424170750012370 00000000000000# Using the iODBC git tree Copyright (C) 1996-2023 OpenLink Software ## Introduction This document describes how to check out a copy of the git tree for development purposes. It also lists the packages that need to be installed prior to generating the necessary scripts and makefiles to build the project. Git access is only needed by developers who want to actively track progress of the iODBC source code and contribute bugfixes or enhancements to the project. It requires basic knowledge of git itself, the general layout of open source and GNU projects, the use of `autoconf` and `automake`, etc., which are beyond the scope of this document. If you have any questions, please email us at [iodbc@openlinksw.com](mailto:iodbc@openlinksw.com). ## Git Archive Server Access For main development, OpenLink Software publishes the iODBC tree to GitHub, and we encourage everyone who is interested in tracking the project to make an account there. Users who mainly just want to track the code can use the following command to get a copy of the tree: $ git clone git://github.com/openlink/iODBC At this point, you can create your own work branch based on any of the branches available, create bugfixes and commit them to your own branch, and then use the `git format-patch` command to generate the appropriate diffs to send to [iodbc@openlinksw.com](mailto:iodbc@openlinksw.com). Developers are encouraged to fork the project using GitHub, create their own branches to make enhancements/bugfixes, and then send pull requests using the excellent GitHub interface, for the OpenLink team to examine and incorporate into the master tree for an upcoming release. Github has [excellent documentation](http://help.github.com/) on how to fork a project, send pull requests, track a project, etc. OpenLink Software will continue to use [sourceforge.net](https://sourceforge.net/projects/iodbc/) for the source tarball releases and certain binary releases, and for completeness will also provide read-only Git Archive access there. For more information, check the [iODBC SourceForge pages](https://sourceforge.net/projects/iodbc/) ## Package Dependencies To generate the `configure` script and all other build files necessary, please make sure the following packages (and any GNU packages required by them) and recommended versions are installed on your system. *Note -- these are minimum versions; later versions should work just fine. Older versions of these packages can sometimes be used, but could cause build problems.* | Package | Minimum Version | Source | | -------- | ---------------- | ---------------------------------- | | autoconf | 2.59 | ftp://ftp.gnu.org/pub/gnu/autoconf | | automake | 1.9.6 | ftp://ftp.gnu.org/pub/gnu/automake | | libtool | 1.5.22 | ftp://ftp.gnu.org/pub/gnu/libtool | | make | 3.79.1 | http://www.gnu.org/software/make | | gtk+ | 1.2.10 | ftp://ftp.gtk.org/pub/gtk/v1.2 | The `autogen.sh` and `configure` scripts check for the presence and version of some of the required components. To check the version numbers of the tools installed on your system, you can use the following commands: $ autoconf --version $ automake --version $ libtoolize --version $ make --version $ gtk-config --version ## Generate build files To generate the `configure` script and all related build files, use the following command: $ autoreconf --install Alternatively, use the supplied script in your check-out directory: $ ./autogen.sh If the above commands succeed without any error messages, you can use the following command to see all the options you can use: $ ./configure --help Certain build targets are only enabled when the `--enable-maintainer-mode` flag is added to `configure`. Please read the `INSTALL` and `README` files in this directory for further information on how to configure the package and install it on your system. libiodbc-3.52.16/Makefile.in0000664000175000017500000011141514424171017012433 00000000000000# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 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@ # # Makefile.am # # The iODBC driver manager. # # Copyright (C) 1995 Ke Jin # Copyright (C) 1996-2023 OpenLink Software # All Rights Reserved. # # This software is released under the terms of either of the following # licenses: # # - GNU Library General Public License (see LICENSE.LGPL) # - The BSD License (see LICENSE.BSD). # # Note that the only valid version of the LGPL license as far as this # project is concerned is the original GNU Library General Public License # Version 2, dated June 1991. # # While not mandated by the BSD license, any patches you make to the # iODBC source code may be contributed back into the iODBC project # at your discretion. Contributions will benefit the Open Source and # Data Access community as a whole. Submissions may be made at: # # http://www.iodbc.org # # # GNU Library Generic Public License Version 2 # ============================================ # 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; only # Version 2 of the License dated June 1991. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # The BSD License # =============== # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. Neither the name of OpenLink Software Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/admin/gtk-2.0.m4 \ $(top_srcdir)/admin/gtk.m4 $(top_srcdir)/admin/libtool.m4 \ $(top_srcdir)/admin/ltoptions.m4 \ $(top_srcdir)/admin/ltsugar.m4 \ $(top_srcdir)/admin/ltversion.m4 \ $(top_srcdir)/admin/lt~obsolete.m4 \ $(top_srcdir)/admin/openlink.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/admin/compile \ $(top_srcdir)/admin/config.guess \ $(top_srcdir)/admin/config.sub $(top_srcdir)/admin/install-sh \ $(top_srcdir)/admin/ltmain.sh $(top_srcdir)/admin/missing \ $(top_srcdir)/admin/mkinstalldirs AUTHORS COPYING ChangeLog \ INSTALL NEWS README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz $(distdir).zip GZIP_ENV = --best DIST_TARGETS = dist-gzip dist-zip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_CONFIG = @GTK_CONFIG@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBADD_DL = @LIBADD_DL@ LIBADD_OS = @LIBADD_OS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ filedsnpath = @filedsnpath@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ inidir = @inidir@ install_sh = @install_sh@ lib_version = @lib_version@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ odbcmode = @odbcmode@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = gnu dist-zip 1.9.6 SUBDIRS = admin bin etc man include iodbcinst iodbc iodbcadm drvproxy samples ACLOCAL_AMFLAGS = -I admin EXTRA_DIST = \ $(srcdir)/IAFA-PACKAGE \ $(srcdir)/LICENSE \ $(srcdir)/LICENSE.LGPL \ $(srcdir)/LICENSE.BSD \ $(srcdir)/README \ $(srcdir)/README.md \ $(srcdir)/README_GIT \ $(srcdir)/README_GIT.md \ $(srcdir)/README_MACOSX \ $(srcdir)/README_MACOSX.md \ $(srcdir)/autogen.sh \ $(srcdir)/PORT.OpenLink \ $(srcdir)/acinclude.m4 \ $(srcdir)/drvproxy/*.exp \ $(srcdir)/mac/drvproxy.exp \ $(srcdir)/mac/framework-include.sh \ $(srcdir)/mac/GNUmakefile \ $(srcdir)/mac/iodbc-config.macos \ $(srcdir)/mac/iodbc.exp \ $(srcdir)/mac/iODBC/en.lproj/InfoPlist.strings \ $(srcdir)/mac/iODBC/Info-iODBC.plist \ $(srcdir)/mac/iODBC/iODBC.xcodeproj/project.pbxproj \ $(srcdir)/mac/iODBC/iODBC.xcodeproj/project.xcworkspace/contents.xcworkspacedata \ $(srcdir)/mac/iODBC/iODBC.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist \ $(srcdir)/mac/iODBC/iODBC.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings \ $(srcdir)/mac/iodbcadm.exp \ $(srcdir)/mac/iODBCadm/en.lproj/InfoPlist.strings \ $(srcdir)/mac/iODBCadm/Info-iODBCadm.plist \ $(srcdir)/mac/iODBCadm/iODBCadm.xcodeproj/project.pbxproj \ $(srcdir)/mac/iODBCadm/iODBCadm.xcodeproj/project.xcworkspace/contents.xcworkspacedata \ $(srcdir)/mac/iODBCadm/iODBCadm.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist \ $(srcdir)/mac/iODBCadm/iODBCadm.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings \ $(srcdir)/mac/iODBCadministrator/*.h \ $(srcdir)/mac/iODBCadministrator/*.m \ $(srcdir)/mac/iODBCadministrator/Base.lproj/MainMenu.xib \ $(srcdir)/mac/iODBCadministrator/en.lproj/InfoPlist.strings \ $(srcdir)/mac/iODBCadministrator/en.lproj/iODBCAdministrator.icns \ $(srcdir)/mac/iODBCadministrator/en.lproj/odbcman.tiff \ $(srcdir)/mac/iODBCadministrator/Info-iODBC_Administrator.plist \ $(srcdir)/mac/iODBCadministrator/iODBCadministrator.xcodeproj/project.pbxproj \ $(srcdir)/mac/iODBCadministrator/iODBCadministrator.xcodeproj/project.xcworkspace/contents.xcworkspacedata \ $(srcdir)/mac/iODBCadministrator/iODBCadministrator.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist \ $(srcdir)/mac/iODBCadministrator/iODBCadministrator.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings \ $(srcdir)/mac/iODBCadministrator64/*.h \ $(srcdir)/mac/iODBCadministrator64/*.m \ $(srcdir)/mac/iODBCadministrator64/Base.lproj/MainMenu.xib \ $(srcdir)/mac/iODBCadministrator64/en.lproj/InfoPlist.strings \ $(srcdir)/mac/iODBCadministrator64/en.lproj/iODBCAdministrator.icns \ $(srcdir)/mac/iODBCadministrator64/en.lproj/odbcman.tiff \ $(srcdir)/mac/iODBCadministrator64/Info-iODBC_Administrator.plist \ $(srcdir)/mac/iODBCadministrator64/iODBCadministrator64.xcodeproj/project.pbxproj \ $(srcdir)/mac/iODBCadministrator64/iODBCadministrator64.xcodeproj/project.xcworkspace/contents.xcworkspacedata \ $(srcdir)/mac/iODBCadministrator64/iODBCadministrator64.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist \ $(srcdir)/mac/iODBCadministrator64/iODBCadministrator64.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings \ $(srcdir)/mac/iODBCdemo/*.h \ $(srcdir)/mac/iODBCdemo/*.m \ $(srcdir)/mac/iODBCdemo/Base.lproj/ExecSQL.xib \ $(srcdir)/mac/iODBCdemo/Base.lproj/MainMenu.xib \ $(srcdir)/mac/iODBCdemo/DemoAnsi/DemoAnsi.xcodeproj/project.pbxproj \ $(srcdir)/mac/iODBCdemo/DemoAnsi/DemoAnsi.xcodeproj/project.xcworkspace/contents.xcworkspacedata \ $(srcdir)/mac/iODBCdemo/DemoAnsi/DemoAnsi.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist \ $(srcdir)/mac/iODBCdemo/DemoAnsi/DemoAnsi.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings \ $(srcdir)/mac/iODBCdemo/DemoAnsi/en.lproj/InfoPlist.strings \ $(srcdir)/mac/iODBCdemo/DemoAnsi/InfoAnsi.plist \ $(srcdir)/mac/iODBCdemo/DemoUnicode/DemoUnicode.xcodeproj/project.pbxproj \ $(srcdir)/mac/iODBCdemo/DemoUnicode/DemoUnicode.xcodeproj/project.xcworkspace/contents.xcworkspacedata \ $(srcdir)/mac/iODBCdemo/DemoUnicode/DemoUnicode.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist \ $(srcdir)/mac/iODBCdemo/DemoUnicode/DemoUnicode.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings \ $(srcdir)/mac/iODBCdemo/DemoUnicode/en.lproj/InfoPlist.strings \ $(srcdir)/mac/iODBCdemo/DemoUnicode/InfoUnicode.plist \ $(srcdir)/mac/iODBCdemo/DSNchooserController.xib \ $(srcdir)/mac/iODBCdemo/en.lproj/Credits.rtf \ $(srcdir)/mac/iODBCdemo/en.lproj/iODBCdemo.icns \ $(srcdir)/mac/iODBCdemo/iodbcdemo_Prefix.pch \ $(srcdir)/mac/iODBCdrvproxy/en.lproj/InfoPlist.strings \ $(srcdir)/mac/iODBCdrvproxy/Info-iODBCdrvproxy.plist \ $(srcdir)/mac/iODBCdrvproxy/iODBCdrvproxy.xcodeproj/project.pbxproj \ $(srcdir)/mac/iODBCdrvproxy/iODBCdrvproxy.xcodeproj/project.xcworkspace/contents.xcworkspacedata \ $(srcdir)/mac/iODBCdrvproxy/iODBCdrvproxy.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist \ $(srcdir)/mac/iODBCdrvproxy/iODBCdrvproxy.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings \ $(srcdir)/mac/iodbcinst.exp \ $(srcdir)/mac/iODBCinst/en.lproj/InfoPlist.strings \ $(srcdir)/mac/iODBCinst/Info-iODBCinst.plist \ $(srcdir)/mac/iODBCinst/iODBCinst.xcodeproj/project.pbxproj \ $(srcdir)/mac/iODBCinst/iODBCinst.xcodeproj/project.xcworkspace/contents.xcworkspacedata \ $(srcdir)/mac/iODBCinst/iODBCinst.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist \ $(srcdir)/mac/iODBCinst/iODBCinst.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings \ $(srcdir)/mac/iODBCtest/iODBCtest.xcodeproj/project.pbxproj \ $(srcdir)/mac/iODBCtest/iODBCtest.xcodeproj/project.xcworkspace/contents.xcworkspacedata \ $(srcdir)/mac/iODBCtest/iODBCtest.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist \ $(srcdir)/mac/iODBCtest/iODBCtest.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings \ $(srcdir)/mac/iODBCtestw/iODBCtestw.xcodeproj/project.pbxproj \ $(srcdir)/mac/iODBCtestw/iODBCtestw.xcodeproj/project.xcworkspace/contents.xcworkspacedata \ $(srcdir)/mac/iODBCtestw/iODBCtestw.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist \ $(srcdir)/mac/iODBCtestw/iODBCtestw.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings \ $(srcdir)/mac/link-inclibs.sh \ $(srcdir)/debian/changelog \ $(srcdir)/debian/compat \ $(srcdir)/debian/control \ $(srcdir)/debian/copyright \ $(srcdir)/debian/iodbc.files \ $(srcdir)/debian/iodbc.install \ $(srcdir)/debian/iodbc.lintian-overrides \ $(srcdir)/debian/iodbc.undocumented \ $(srcdir)/debian/libiodbc2-dev.examples \ $(srcdir)/debian/libiodbc2-dev.files \ $(srcdir)/debian/libiodbc2-dev.install \ $(srcdir)/debian/libiodbc2.docs \ $(srcdir)/debian/libiodbc2.examples \ $(srcdir)/debian/libiodbc2.files \ $(srcdir)/debian/libiodbc2.install \ $(srcdir)/debian/libiodbc2.lintian-overrides \ $(srcdir)/debian/libiodbc2.undocumented \ $(srcdir)/debian/README.Debian \ $(srcdir)/debian/rules \ $(srcdir)/debian/watch # ---------------------------------------------------------------------- # # Maintainers only # # ---------------------------------------------------------------------- MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure DISTCLEANFILES = config.nice # # Create Linux RPM's # @MAINTAINER_MODE_TRUE@RPMFLAGS = --define="_topdir `pwd`/distrib" all: all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt # 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. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_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*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(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: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ clean-libtool cscope cscopelist-am ctags ctags-am dist \ dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ dist-xz dist-zip distcheck distclean distclean-generic \ 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-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am .PRECIOUS: Makefile @MAINTAINER_MODE_TRUE@linux-rpm: @MAINTAINER_MODE_TRUE@ $(mkinstalldirs) distrib/SOURCES distrib/SRPMS distrib/SPECS @MAINTAINER_MODE_TRUE@ $(mkinstalldirs) distrib/BUILD distrib/RPMS/i386 @MAINTAINER_MODE_TRUE@ $(MAKE) dist @MAINTAINER_MODE_TRUE@ cp $(PACKAGE)-$(VERSION).tar.gz distrib/SOURCES @MAINTAINER_MODE_TRUE@ rpmbuild $(RPMFLAGS) -ba admin/libiodbc.spec @MAINTAINER_MODE_TRUE@ rpmbuild $(RPMFLAGS) --clean --rmsource admin/libiodbc.spec # # Create a tar file containing the library and include files # @MAINTAINER_MODE_TRUE@binary-tar: @MAINTAINER_MODE_TRUE@ -mkdir @build@ @MAINTAINER_MODE_TRUE@ $(MAKE) install prefix=`pwd`/@build@ @MAINTAINER_MODE_TRUE@ tar cvf @build@.tar @build@ @MAINTAINER_MODE_TRUE@ gzip -9vf @build@.tar @MAINTAINER_MODE_TRUE@ rm -rf @build@ # # Create a source snapshot package # @MAINTAINER_MODE_TRUE@snapshot: @MAINTAINER_MODE_TRUE@ $(MAKE) dist distdir=$(PACKAGE)-`date +"%Y%m%d"` # # Create an official release package # @MAINTAINER_MODE_TRUE@release: @MAINTAINER_MODE_TRUE@ $(MAKE) distcheck # # Generate ChangeLog # @MAINTAINER_MODE_TRUE@.PHONY: changelog @MAINTAINER_MODE_TRUE@changelog: @MAINTAINER_MODE_TRUE@ git2cl --format='%s%n%n%b%n' --strip-tab --strip-cherry-pick > ChangeLog # 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: libiodbc-3.52.16/PORT.OpenLink0000775000175000017500000002555614424170750012633 00000000000000#!/bin/sh # # PORT.OpenLink # # Script to port iODBC to various platforms and ABIs # # The iODBC driver manager. # # Copyright (C) 1996-2023 OpenLink Software # All Rights Reserved. # # This software is released under the terms of either of the following # licenses: # # - GNU Library General Public License (see LICENSE.LGPL) # - The BSD License (see LICENSE.BSD). # # Note that the only valid version of the LGPL license as far as this # project is concerned is the original GNU Library General Public License # Version 2, dated June 1991. # # While not mandated by the BSD license, any patches you make to the # iODBC source code may be contributed back into the iODBC project # at your discretion. Contributions will benefit the Open Source and # Data Access community as a whole. Submissions may be made at: # # http://www.iodbc.org # # # GNU Library Generic Public License Version 2 # ============================================ # 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; only # Version 2 of the License dated June 1991. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # The BSD License # =============== # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. Neither the name of OpenLink Software Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # # Defaults # TOP=`pwd` OS=`admin/config.guess` PREFIX=/usr/local/iODBC CC=${CC:-cc} CFLAGS=${CFLAGS:-"-O"} LDFLAGS=${LDFLAGS:-""} CONFLAGS=${CONFLAGS:-"--disable-gui --enable-maintainer-mode"} MAKE=${MAKE:-make} BUILD=run_make export TOP CC CFLAGS LDFLAGS OS PREFIX CONFLAGS BUILD MAKE # # Parse arguments # ARG=${1:-usage} case $ARG in -[Cc]|configure) BUILD=run_config;; -[Mm]|make) BUILD=run_make;; *) echo "PORT script to build OpenLink type installation packages" echo "in $PREFIX." echo "" echo "Usage: $0 [ -c | -m]" echo "" echo " -c run configure" echo " -m run make [clean|install]" exit 1 ;; esac # # Optional argument for make clean # shift MAKERULE=${*:-""} export MAKERULE # # Configure the package # run_config() { MODE=${1:-"default"} export MODE case $MODE in o32) # Irix $TOP/admin/mkinstalldirs build-o32 cd build-o32 ../configure --prefix=$PREFIX $CONFLAGS --bindir='${prefix}/bino32' --libdir='${prefix}/libo32' cd .. ;; 32) $TOP/admin/mkinstalldirs build-32 cd build-32 ../configure --prefix=$PREFIX $CONFLAGS --bindir='${prefix}/bin32' --libdir='${prefix}/lib32' cd .. ;; 64) $TOP/admin/mkinstalldirs build-64 cd build-64 ../configure --prefix=$PREFIX $CONFLAGS --bindir='${prefix}/bin64' --libdir='${prefix}/lib64' cd .. ;; universal) $TOP/admin/mkinstalldirs build-universal cd build-universal ../configure --prefix=$PREFIX $CONFLAGS cd .. ;; cur) ./configure --prefix=$PREFIX $CONFLAGS ;; *) $TOP/admin/mkinstalldirs build cd build ../configure --prefix=$PREFIX $CONFLAGS cd .. ;; esac } # # Make the package # run_make() { MODE=${1:-"default"} export MODE case $MODE in o32) cd build-o32 $MAKE $MAKERULE cd .. ;; 32) cd build-32 $MAKE $MAKERULE cd .. ;; 64) cd build-64 $MAKE $MAKERULE cd .. ;; universal) cd build-universal $MAKE $MAKERULE cd .. ;; cur) $MAKE $MAKERULE ;; *) cd build $MAKE $MAKERULE cd .. ;; esac } # # Main # case $OS in powerpc-ibm-aix4*) CC=cc_r7 CFLAGS="-O -q32" LDFLAGS="-brtl" OBJECT_MODE=64 export CC CFLAGS LDFLAGS OBJECT_MODE $BUILD 32 CC=cc_r7 CFLAGS="-O -q64" LDFLAGS="-brtl" OBJECT_MODE=64 export CC CFLAGS LDFLAGS OBJECT_MODE $BUILD 64 ;; hppa2.0w-hp-hpux11*) CFLAGS="-O -Ae +DA1.1" export CFLAGS $BUILD 32 CFLAGS="-O -Ae +DA2.0W" export CFLAGS $BUILD 64 ;; sparc-sun-solaris2.*) CFLAGS="-O" export CFLAGS $BUILD 32 CFLAGS="-O -xtarget=ultra -xarch=v9" export CFLAGS $BUILD 64 ;; i[3456]86-*-solaris2.*) CFLAGS="-O -xtarget=opteron" export CFLAGS $BUILD 32 CFLAGS="-O -xtarget=opteron -xarch=amd64" export CFLAGS $BUILD 64 ;; i[3456]86-pc-linux-*) CFLAGS="-O3" CONFLAGS="--enable-gui --enable-maintainer-mode" export CFLAGS CONFLAGS $BUILD cur ;; x86_64-suse-linux) CFLAGS="-O3" CONFLAGS="--enable-gui --enable-maintainer-mode" export CFLAGS CONFLAGS $BUILD ;; x86_64-*-linux-gnu) CONFLAGS="--enable-gui --enable-maintainer-mode --with-pic" CFLAGS="-O3 -m32" export CFLAGS CONFLAGS $BUILD 32 CFLAGS="-O3 -m64" export CFLAGS CONFLAGS $BUILD 64 ;; aarch64-apple-darwin20*) PREFIX=/usr/local/iODBC.universal CONFLAGS="--disable-shared --with-pic --disable-dependency-tracking" CFLAGS="-O -mmacosx-version-min=10.9 -arch arm64 -arch x86_64" export PREFIX CONFLAGS CFLAGS $BUILD universal ;; *-apple-darwin14*) PREFIX=/usr/local/iODBC.darwin CONFLAGS="--disable-shared --with-pic" CFLAGS="-O -m32" export CFLAGS CONFLAGS PREFIX $BUILD 32 CFLAGS="-O -m64" export CFLAGS $BUILD 64 PREFIX=/usr/local/iODBC.universal CONFLAGS="--disable-shared --with-pic --disable-dependency-tracking" CFLAGS="-O -mmacosx-version-min=10.9 -arch i386 -arch x86_64" export PREFIX CONFLAGS CFLAGS $BUILD universal ;; *-apple-darwin13*) PREFIX=/usr/local/iODBC.darwin CONFLAGS="--disable-shared --with-pic" CFLAGS="-O -m32" export CFLAGS CONFLAGS PREFIX $BUILD 32 CFLAGS="-O -m64" export CFLAGS $BUILD 64 PREFIX=/usr/local/iODBC.universal CONFLAGS="--disable-shared --with-pic --disable-dependency-tracking" CFLAGS="-O -mmacosx-version-min=10.8 -arch i386 -arch x86_64" export PREFIX CONFLAGS CFLAGS $BUILD universal ;; *-apple-darwin12*) PREFIX=/usr/local/iODBC.darwin CONFLAGS="--disable-shared --with-pic" CFLAGS="-O -m32" export CFLAGS CONFLAGS PREFIX $BUILD 32 CFLAGS="-O -m64" export CFLAGS $BUILD 64 PREFIX=/usr/local/iODBC.universal CONFLAGS="--disable-shared --with-pic --disable-dependency-tracking" CFLAGS="-O -mmacosx-version-min=10.7 -arch i386 -arch x86_64" export PREFIX CONFLAGS CFLAGS $BUILD universal ;; i[3456]86-apple-darwin11*) PREFIX=/usr/local/iODBC.darwin CONFLAGS="--disable-shared --with-pic" CFLAGS="-O -m32" export CFLAGS CONFLAGS PREFIX $BUILD 32 CFLAGS="-O -m64" export CFLAGS $BUILD 64 PREFIX=/usr/local/iODBC.universal CONFLAGS="--disable-shared --with-pic --disable-dependency-tracking" CFLAGS="-O -isysroot /Developer/SDKs/MacOSX10.7.sdk -mmacosx-version-min=10.7 -arch i386 -arch x86_64" export PREFIX CONFLAGS CFLAGS $BUILD universal ;; i[3456]86-apple-darwin10*) PREFIX=/usr/local/iODBC.darwin CONFLAGS="--disable-shared --with-pic" CFLAGS="-O -m32" export CFLAGS CONFLAGS PREFIX $BUILD 32 CFLAGS="-O -m64" export CFLAGS $BUILD 64 PREFIX=/usr/local/iODBC.universal CONFLAGS="--disable-shared --with-pic --disable-dependency-tracking" CFLAGS="-O -isysroot /Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.6 -arch ppc -arch i386 -arch x86_64" export PREFIX CONFLAGS CFLAGS $BUILD universal ;; i[3456]86-apple-darwin9*) PREFIX=/usr/local/iODBC.darwin CONFLAGS="--disable-shared --with-pic" CFLAGS="-O -m32" export CFLAGS CONFLAGS PREFIX $BUILD 32 CFLAGS="-O -m64" export CFLAGS $BUILD 64 PREFIX=/usr/local/iODBC.universal CONFLAGS="--disable-shared --with-pic --disable-dependency-tracking" CFLAGS="-O -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -arch ppc -arch ppc64 -arch i386 -arch x86_64" export PREFIX CONFLAGS CFLAGS $BUILD universal ;; powerpc-apple-darwin8*) PREFIX=/usr/local/iODBC.darwin CONFLAGS="--disable-shared --with-pic" CFLAGS="-O -m32" export CFLAGS CONFLAGS PREFIX $BUILD 32 CFLAGS="-O -m64" export CFLAGS $BUILD 64 PREFIX=/usr/local/iODBC.universal CONFLAGS="--disable-shared --with-pic --disable-dependency-tracking" CFLAGS="-O -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -arch ppc -arch ppc64 -arch i386" export PREFIX CONFLAGS CFLAGS $BUILD universal ;; powerpc-apple-darwin7*) PREFIX=/usr/local/iODBC.darwin CONFLAGS="--disable-shared --with-pic" CFLAGS="-O -DNO_FRAMEWORKS" export CFLAGS CONFLAGS PREFIX $BUILD ;; powerpc-apple-darwin6*) PREFIX=/usr/local/iODBC.darwin CONFLAGS="--disable-shared --with-pic" CFLAGS="-O -DNO_FRAMEWORKS -DMACOSX102" export CFLAGS CONFLAGS PREFIX $BUILD ;; ia64-hp-hpux11.23) CFLAGS="-O -Ae +DD32" export CFLAGS $BUILD 32 CFLAGS="-O -Ae +DD64" export CFLAGS $BUILD 64 ;; powerpc-ibm-aix5*) CC=cc_r CFLAGS="-O -q32" LDFLAGS="-brtl" OBJECT_MODE=32 export CC CFLAGS LDFLAGS OBJECT_MODE $BUILD 32 CC=cc_r CFLAGS="-O -q64" LDFLAGS="-brtl" OBJECT_MODE=64 export CC CFLAGS LDFLAGS OBJECT_MODE $BUILD 64 ;; *) CFLAGS="-O" export CFLAGS $BUILD ;; esac # End exit 0 libiodbc-3.52.16/mac/0000775000175000017500000000000014424171427011210 500000000000000libiodbc-3.52.16/mac/GNUmakefile0000664000175000017500000001612114424170750013201 00000000000000# # Makefile.mac # # The iODBC driver manager. # # Copyright (C) 1996-2023 OpenLink Software # All Rights Reserved. # # This software is released under the terms of either of the following # licenses: # # - GNU Library General Public License (see LICENSE.LGPL) # - The BSD License (see LICENSE.BSD). # # Note that the only valid version of the LGPL license as far as this # project is concerned is the original GNU Library General Public License # Version 2, dated June 1991. # # While not mandated by the BSD license, any patches you make to the # iODBC source code may be contributed back into the iODBC project # at your discretion. Contributions will benefit the Open Source and # Data Access community as a whole. Submissions may be made at: # # http://www.iodbc.org # # # GNU Library Generic Public License Version 2 # ============================================ # 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; only # Version 2 of the License dated June 1991. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # The BSD License # =============== # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. Neither the name of OpenLink Software Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # # iODBC VERSION # IODBC_VERSION=3.52.16 # # Determine build model (Deployment/Development) # ifeq (,$(MODEL)) MODEL := Deployment endif # # Determine which version of macOS we are running # macos_version := $(shell sw_vers -productVersion) macos_major := $(shell sw_vers -productVersion | cut -d . -f 1 ) # # Determine major version of the Xcode tool # xcodebuild_version := $(shell xcodebuild -version | grep -i Xcode | cut -d " " -f 2 | cut -d. -f1) # # Common build settings # PROJBUILD := /usr/bin/xcodebuild -configuration $(MODEL) IODBC_32BIT = "i386" # # macOS 10.15 (Catalina) does not have 32bit support # ifeq (10.15, $(findstring 10.15, $(macos_version))) IODBC_32BIT := "x86_64" endif # # macOS 11.x (BigSur)does not have 32bit support # ifeq (11, $(findstring 11, $(macos_major))) IODBC_32BIT := "x86_64" endif # # Pass settings to xcodebuild # export IODBC_VERSION IODBC_32BIT # # Build the libraries # all: check_supported include @echo "Building on macOS $(macos_version)" @echo "Projbuild is [$(PROJBUILD)]" cd iODBCinst; $(PROJBUILD) build cd iODBC; $(PROJBUILD) build cd iODBCtest; $(PROJBUILD) build cd iODBCtestw; $(PROJBUILD) build cd iODBCdrvproxy; $(PROJBUILD) build cd iODBCadm; $(PROJBUILD) build cd iODBCadministrator; $(PROJBUILD) build cd iODBCadministrator64; $(PROJBUILD) build cd iODBCdemo/DemoAnsi; $(PROJBUILD) build cd iODBCdemo/DemoUnicode; $(PROJBUILD) build # # Make sure the version of Xcode is 8.x or newer # check_supported: @if test 0$(xcodebuild_version) -lt 8 ; then \ echo "You are using Xcode $(xcodebuild_version) on macOS $(macos_version)"; \ echo ""; \ echo "ERROR: iODBC requires a Xcode version 8.x or newer"; \ echo ""; \ exit 1; \ fi # # Generate iODBC framework style include files # include: framework-include.sh ../include/sql.h ../include/sqlext.h ../include/sqltypes.h ../include/iodbcext.h ../include/iodbcunix.h ../include/odbcinst.h sh framework-include.sh # # Install libraries in /Library/Frameworks # install: # # Install Frameworks # -rm $(DESTDIR)/Library/Frameworks/iODBC.framework/Versions/Current -rm $(DESTDIR)/Library/Frameworks/iODBCinst.framework/Versions/Current cd iODBCinst; $(PROJBUILD) install DSTROOT=$(DESTDIR)/ cd iODBC; $(PROJBUILD) install DSTROOT=$(DESTDIR)/ # # Install /usr/local/iODBC # sh link-inclibs.sh # # Install iODBC Administrator # cd iODBCadministrator; $(PROJBUILD) install DSTROOT=$(DESTDIR)/ cd iODBCadministrator64; $(PROJBUILD) install DSTROOT=$(DESTDIR)/ # Next ones are a bit special as they need to be installed twice cd iODBCadm; $(PROJBUILD) install DSTROOT=$(DESTDIR)/Library/Frameworks/iODBC.framework/Resources/ cd iODBCadm; $(PROJBUILD) install DSTROOT=$(DESTDIR)/Library/Frameworks/iODBCinst.framework/Resources/ cd iODBCdrvproxy; $(PROJBUILD) install DSTROOT=$(DESTDIR)/Library/Frameworks/iODBC.framework/Resources/ cd iODBCdrvproxy; $(PROJBUILD) install DSTROOT=$(DESTDIR)/Library/Frameworks/iODBCinst.framework/Resources/ # # Install application # cd iODBCdemo/DemoAnsi; $(PROJBUILD) install DSTROOT=$(DESTDIR)/ cd iODBCdemo/DemoUnicode; $(PROJBUILD) install DSTROOT=$(DESTDIR)/ cd iODBCtest; $(PROJBUILD) install DSTROOT=$(DESTDIR)/ cd iODBCtestw; $(PROJBUILD) install DSTROOT=$(DESTDIR)/ # # Clean out the targets # clean: rm -rf include cd iODBC; $(PROJBUILD) clean cd iODBCinst; $(PROJBUILD) clean cd iODBCtest; $(PROJBUILD) clean cd iODBCtestw; $(PROJBUILD) clean cd iODBCdrvproxy; $(PROJBUILD) clean cd iODBCadm; $(PROJBUILD) clean cd iODBCadministrator; $(PROJBUILD) clean cd iODBCadministrator64; $(PROJBUILD) clean cd iODBCdemo/DemoAnsi; $(PROJBUILD) clean cd iODBCdemo/DemoUnicode; $(PROJBUILD) clean realclean: clean rm -rf iODBC/build rm -rf iODBCadm/build rm -rf iODBCadministrator/build rm -rf iODBCadministrator64/build rm -rf iODBCdemo/DemoAnsi/build rm -rf iODBCdemo/DemoUnicode/build rm -rf iODBCdrvproxy/build rm -rf iODBCinst/build rm -rf iODBCtest/build rm -rf iODBCtestw/build libiodbc-3.52.16/mac/iodbc.exp0000664000175000017500000000466414013216212012722 00000000000000_SQLAllocConnect _SQLAllocEnv _SQLAllocHandle _SQLAllocStmt _SQLBindCol _SQLBindParam _SQLBindParameter _SQLBrowseConnect _SQLBulkOperations _SQLCancel _SQLCloseCursor _SQLColAttribute _SQLColAttributes _SQLColumnPrivileges _SQLColumns _SQLConnect _SQLCopyDesc _SQLDataSources _SQLDescribeCol _SQLDescribeParam _SQLDisconnect _SQLDriverConnect _SQLDrivers _SQLEndTran _SQLError _SQLExecDirect _SQLExecute _SQLExtendedFetch _SQLFetch _SQLFetchScroll _SQLForeignKeys _SQLFreeConnect _SQLFreeEnv _SQLFreeHandle _SQLFreeStmt _SQLGetConnectAttr _SQLGetConnectOption _SQLGetCursorName _SQLGetData _SQLGetDescField _SQLGetDescRec _SQLGetDiagField _SQLGetDiagRec _SQLGetEnvAttr _SQLGetFunctions _SQLGetInfo _SQLGetStmtAttr _SQLGetStmtOption _SQLGetTypeInfo _SQLMoreResults _SQLNativeSql _SQLNumParams _SQLNumResultCols _SQLParamData _SQLParamOptions _SQLPrepare _SQLPrimaryKeys _SQLProcedureColumns _SQLProcedures _SQLPutData _SQLRowCount _SQLSetConnectAttr _SQLSetConnectOption _SQLSetCursorName _SQLSetDescField _SQLSetDescRec _SQLSetEnvAttr _SQLSetParam _SQLSetPos _SQLSetScrollOptions _SQLSetStmtAttr _SQLSetStmtOption _SQLSpecialColumns _SQLStatistics _SQLTablePrivileges _SQLTables _SQLTransact _SQLConnectW _SQLDriverConnectW _SQLBrowseConnectW _SQLDataSourcesW _SQLDriversW _SQLGetInfoW _SQLGetTypeInfoW _SQLSetConnectOptionW _SQLGetConnectOptionW _SQLPrepareW _SQLGetCursorNameW _SQLSetCursorNameW _SQLExecDirectW _SQLNativeSqlW _SQLDescribeColW _SQLColAttributesW _SQLErrorW _SQLColumnPrivilegesW _SQLColumnsW _SQLForeignKeysW _SQLPrimaryKeysW _SQLProcedureColumnsW _SQLProceduresW _SQLSpecialColumnsW _SQLStatisticsW _SQLTablePrivilegesW _SQLTablesW _SQLColAttributeW _SQLGetConnectAttrW _SQLGetDescFieldW _SQLGetDescRecW _SQLGetDiagFieldW _SQLGetDiagRecW _SQLGetStmtAttrW _SQLSetConnectAttrW _SQLSetDescFieldW _SQLSetStmtAttrW _SQLConnectA _SQLDriverConnectA _SQLBrowseConnectA _SQLDataSourcesA _SQLDriversA _SQLGetInfoA _SQLGetTypeInfoA _SQLSetConnectOptionA _SQLGetConnectOptionA _SQLPrepareA _SQLGetCursorNameA _SQLSetCursorNameA _SQLExecDirectA _SQLNativeSqlA _SQLDescribeColA _SQLColAttributesA _SQLErrorA _SQLColumnPrivilegesA _SQLColumnsA _SQLForeignKeysA _SQLPrimaryKeysA _SQLProcedureColumnsA _SQLProceduresA _SQLSpecialColumnsA _SQLStatisticsA _SQLTablePrivilegesA _SQLTablesA _SQLColAttributeA _SQLGetConnectAttrA _SQLGetDescFieldA _SQLGetDescRecA _SQLGetDiagFieldA _SQLGetDiagRecA _SQLGetStmtAttrA _SQLSetConnectAttrA _SQLSetDescFieldA _SQLSetStmtAttrA _iodbc_version libiodbc-3.52.16/mac/framework-include.sh0000775000175000017500000000722014424170750015104 00000000000000#!/bin/sh # # framework-include.sh # # The iODBC driver manager. # # Copyright (C) 1996-2023 OpenLink Software # All Rights Reserved. # # This software is released under the terms of either of the following # licenses: # # - GNU Library General Public License (see LICENSE.LGPL) # - The BSD License (see LICENSE.BSD). # # Note that the only valid version of the LGPL license as far as this # project is concerned is the original GNU Library General Public License # Version 2, dated June 1991. # # While not mandated by the BSD license, any patches you make to the # iODBC source code may be contributed back into the iODBC project # at your discretion. Contributions will benefit the Open Source and # Data Access community as a whole. Submissions may be made at: # # http://www.iodbc.org # # # GNU Library Generic Public License Version 2 # ============================================ # 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; only # Version 2 of the License dated June 1991. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # The BSD License # =============== # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. Neither the name of OpenLink Software Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # mkdir -p include for i in sql.h sqlext.h sqltypes.h sqlucode.h odbcinst.h iodbcinst.h isql.h isqlext.h isqltypes.h iodbcunix.h iodbcext.h iodbcinst.h do sed -e "s/ include/$i done libiodbc-3.52.16/mac/iodbcinst.exp0000664000175000017500000000253014013216212013606 00000000000000_SQLConfigDataSource _SQLConfigDriver _SQLCreateDataSource _SQLGetConfigMode _SQLGetAvailableDrivers _SQLGetInstalledDrivers _SQLGetPrivateProfileString _SQLGetTranslator _SQLInstallDriverEx _SQLInstallDriver _SQLInstallDriverManager _SQLInstallerError _SQLInstallODBC _SQLInstallTranslator _SQLInstallTranslatorEx _SQLManageDataSources _SQLPostInstallerError _SQLReadFileDSN _SQLRemoveDSNFromIni _SQLRemoveDefaultDataSource _SQLRemoveDriver _SQLRemoveDriverManager _SQLRemoveTranslator _SQLSetConfigMode _SQLValidDSN _SQLWriteDSNToIni _SQLWriteFileDSN _SQLWritePrivateProfileString _SQLGetKeywordValue _SQLSetKeywordValue _SQLInstallODBCW _SQLCreateDataSourceW _SQLGetTranslatorW _SQLInstallDriverW _SQLInstallDriverManagerW _SQLGetInstalledDriversW _SQLGetAvailableDriversW _SQLConfigDataSourceW _SQLWriteDSNToIniW _SQLRemoveDSNFromIniW _SQLValidDSNW _SQLWritePrivateProfileStringW _SQLGetPrivateProfileStringW _SQLGetKeywordValueW _SQLSetKeywordValueW _SQLInstallTranslatorW _SQLRemoveTranslatorW _SQLRemoveDriverW _SQLConfigDriverW _SQLInstallerErrorW _SQLPostInstallerErrorW _SQLReadFileDSNW _SQLWriteFileDSNW _SQLInstallDriverExW _SQLInstallTranslatorExW _iodbcinst_version __iodbcdm_cfg_done __iodbcdm_cfg_find __iodbcdm_cfg_nextentry __iodbcdm_cfg_rewind __iodbcdm_cfg_write __iodbcdm_strlcat __iodbcdm_strlcpy __iodbcdm_cfg_freeimage __iodbcdm_cfg_storeentry libiodbc-3.52.16/mac/iODBCdrvproxy/0000775000175000017500000000000014424171427013706 500000000000000libiodbc-3.52.16/mac/iODBCdrvproxy/en.lproj/0000775000175000017500000000000014424171427015435 500000000000000libiodbc-3.52.16/mac/iODBCdrvproxy/en.lproj/InfoPlist.strings0000664000175000017500000000046414424170750020701 00000000000000/* Localized versions of Info.plist keys */ CFBundleName = "iODBCdrvproxy"; CFBundleShortVersionString = "iODBCdrvproxy version 3.52.16"; CFBundleGetInfoString = "iODBCdrvproxy version 3.52.16, Copyright 1995-2023, OpenLink Software"; NSHumanReadableCopyright = "Copyright © 1995-2023, OpenLink Software"; libiodbc-3.52.16/mac/iODBCdrvproxy/Info-iODBCdrvproxy.plist0000664000175000017500000000261414424170750020273 00000000000000 CFBundleDevelopmentRegion English CFBundleExecutable iODBCdrvproxy CFBundleGetInfoString iODBCdrvproxy version $IODBC_VERSION, Copyright 1995-2023, OpenLink Software CFBundleIconFile CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName iODBC Driver Proxy CFBundlePackageType BNDL CFBundleShortVersionString $IODBC_VERSION CFBundleSignature odbc CFBundleVersion $IODBC_VERSION CFPlugInDynamicRegisterFunction CFPlugInDynamicRegistration NO CFPlugInFactories 00000000-0000-0000-0000-000000000000 MyFactoryFunction CFPlugInTypes 00000000-0000-0000-0000-000000000000 00000000-0000-0000-0000-000000000000 CFPlugInUnloadFunction libiodbc-3.52.16/mac/iODBCdrvproxy/iODBCdrvproxy.xcodeproj/0000775000175000017500000000000014424171427020400 500000000000000libiodbc-3.52.16/mac/iODBCdrvproxy/iODBCdrvproxy.xcodeproj/project.pbxproj0000664000175000017500000007043114424170750023377 00000000000000// !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 48; objects = { /* Begin PBXBuildFile section */ 8568A50E19664B3E00738ECF /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8568A50D19664B3E00738ECF /* Cocoa.framework */; }; 8568A563196A93FA00738ECF /* confirm.png in Resources */ = {isa = PBXBuildFile; fileRef = 8568A562196A93FA00738ECF /* confirm.png */; }; 8568A569196AC47700738ECF /* IODBCProxy_LoginController.h in Headers */ = {isa = PBXBuildFile; fileRef = 8568A566196AC47700738ECF /* IODBCProxy_LoginController.h */; }; 8568A56A196AC47700738ECF /* IODBCProxy_LoginController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8568A567196AC47700738ECF /* IODBCProxy_LoginController.m */; }; 8568A56F196BA12A00738ECF /* IODBCProxy_SetupController.h in Headers */ = {isa = PBXBuildFile; fileRef = 8568A56C196BA12A00738ECF /* IODBCProxy_SetupController.h */; }; 8568A570196BA12A00738ECF /* IODBCProxy_SetupController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8568A56D196BA12A00738ECF /* IODBCProxy_SetupController.m */; }; 8568A58C196D6FC600738ECF /* utils.h in Headers */ = {isa = PBXBuildFile; fileRef = 8568A58A196D6FC600738ECF /* utils.h */; }; 8568A58D196D6FC600738ECF /* utils.m in Sources */ = {isa = PBXBuildFile; fileRef = 8568A58B196D6FC600738ECF /* utils.m */; }; 8568A598196E490400738ECF /* dlf.c in Sources */ = {isa = PBXBuildFile; fileRef = 8568A596196E490400738ECF /* dlf.c */; }; 8568A599196E490400738ECF /* dlf.h in Headers */ = {isa = PBXBuildFile; fileRef = 8568A597196E490400738ECF /* dlf.h */; }; 85A3908A1B79093F00AC8862 /* IODBCProxy_LoginController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 85A3908C1B79093F00AC8862 /* IODBCProxy_LoginController.xib */; }; 85A3908D1B79094800AC8862 /* IODBCProxy_SetupController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 85A3908F1B79094800AC8862 /* IODBCProxy_SetupController.xib */; }; 85A390E41B7911B100AC8862 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 85A390E21B7911B100AC8862 /* InfoPlist.strings */; }; CDAE3BA40987D6B4003250F8 /* gui.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C124206005FB6B37F000001 /* gui.h */; }; CDAE3BA50987D6B4003250F8 /* gui.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C12420C005FB6B37F000001 /* gui.h */; }; CDAE3BA60987D6B4003250F8 /* iodbc_error.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C12421E005FB79A7F000001 /* iodbc_error.h */; }; CDAE3BA70987D6B4003250F8 /* iodbc.h in Headers */ = {isa = PBXBuildFile; fileRef = F53EDAEC029B957C01A801DE /* iodbc.h */; }; CDAE3BA80987D6B4003250F8 /* herr.h in Headers */ = {isa = PBXBuildFile; fileRef = F5C2E5AE05161F4601A801EC /* herr.h */; }; CDAE3BAA0987D6B4003250F8 /* odbcinst.h in Headers */ = {isa = PBXBuildFile; fileRef = F5C2EB360518B22E01A801EC /* odbcinst.h */; }; CDAE3BAB0987D6B4003250F8 /* iodbcadm.h in Headers */ = {isa = PBXBuildFile; fileRef = F5C2EB380518B26C01A801EC /* iodbcadm.h */; }; CDAE3BAC0987D6B4003250F8 /* sqlucode.h in Headers */ = {isa = PBXBuildFile; fileRef = F5C2EB3A0518B2C501A801EC /* sqlucode.h */; }; CDAE3BAD0987D6B4003250F8 /* sqlext.h in Headers */ = {isa = PBXBuildFile; fileRef = F5C2EB3C0518B36001A801EC /* sqlext.h */; }; CDAE3BAE0987D6B4003250F8 /* sqltypes.h in Headers */ = {isa = PBXBuildFile; fileRef = F5C2EB3D0518B36001A801EC /* sqltypes.h */; }; CDAE3BAF0987D6B4003250F8 /* iodbcinst.h in Headers */ = {isa = PBXBuildFile; fileRef = 716C452B05B6EF4D0045FADB /* iodbcinst.h */; }; CDAE3BB00987D6B4003250F8 /* sql.h in Headers */ = {isa = PBXBuildFile; fileRef = 716C452F05B6EF8B0045FADB /* sql.h */; }; CDAE3BB10987D6B4003250F8 /* iodbcext.h in Headers */ = {isa = PBXBuildFile; fileRef = 71A26EE1069D5691005AC343 /* iodbcext.h */; }; CDAE3BB20987D6B4003250F8 /* iodbcunix.h in Headers */ = {isa = PBXBuildFile; fileRef = 71A26EE2069D5691005AC343 /* iodbcunix.h */; }; CDAE3BB90987D6B4003250F8 /* ConfigDriver.c in Sources */ = {isa = PBXBuildFile; fileRef = 1C1241FC005FB6B37F000001 /* ConfigDriver.c */; }; CDAE3BBA0987D6B4003250F8 /* ConfigDSN.c in Sources */ = {isa = PBXBuildFile; fileRef = 1C1241FD005FB6B37F000001 /* ConfigDSN.c */; }; CDAE3BBB0987D6B4003250F8 /* drvconn.c in Sources */ = {isa = PBXBuildFile; fileRef = 1C1241FE005FB6B37F000001 /* drvconn.c */; }; CDAE3BBC0987D6B4003250F8 /* drvproxy.exp in Sources */ = {isa = PBXBuildFile; fileRef = 1C1241FF005FB6B37F000001 /* drvproxy.exp */; }; CDAE3BBD0987D6B4003250F8 /* Info.c in Sources */ = {isa = PBXBuildFile; fileRef = 1C124207005FB6B37F000001 /* Info.c */; }; CDAE3BBE0987D6B4003250F8 /* gensetup.c in Sources */ = {isa = PBXBuildFile; fileRef = 1C12420B005FB6B37F000001 /* gensetup.c */; }; CDAE3BBF0987D6B4003250F8 /* loginbox.c in Sources */ = {isa = PBXBuildFile; fileRef = 1C12420D005FB6B37F000001 /* loginbox.c */; }; CDAE3BC10987D6B4003250F8 /* confirm.c in Sources */ = {isa = PBXBuildFile; fileRef = 859838AB07CF6D6D0022E958 /* confirm.c */; }; CDAE3BC30987D6B4003250F8 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7B5B2F005FB5307F000001 /* CoreFoundation.framework */; }; CDAE3BC50987D6B4003250F8 /* iODBCinst.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 85D1BB9807E7D55A0070A59E /* iODBCinst.framework */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 0A7B5B2F005FB5307F000001 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = ""; }; 1C1241FC005FB6B37F000001 /* ConfigDriver.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ConfigDriver.c; sourceTree = ""; }; 1C1241FD005FB6B37F000001 /* ConfigDSN.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ConfigDSN.c; sourceTree = ""; }; 1C1241FE005FB6B37F000001 /* drvconn.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = drvconn.c; sourceTree = ""; }; 1C1241FF005FB6B37F000001 /* drvproxy.exp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.exports; path = drvproxy.exp; sourceTree = ""; }; 1C124206005FB6B37F000001 /* gui.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gui.h; sourceTree = ""; }; 1C124207005FB6B37F000001 /* Info.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Info.c; sourceTree = ""; }; 1C12420B005FB6B37F000001 /* gensetup.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = gensetup.c; sourceTree = ""; }; 1C12420C005FB6B37F000001 /* gui.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gui.h; sourceTree = ""; }; 1C12420D005FB6B37F000001 /* loginbox.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = loginbox.c; sourceTree = ""; }; 1C12421E005FB79A7F000001 /* iodbc_error.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = iodbc_error.h; path = ../../iodbcinst/iodbc_error.h; sourceTree = SOURCE_ROOT; }; 716C452B05B6EF4D0045FADB /* iodbcinst.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = iodbcinst.h; path = ../../include/iodbcinst.h; sourceTree = SOURCE_ROOT; }; 716C452F05B6EF8B0045FADB /* sql.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sql.h; path = ../../include/sql.h; sourceTree = SOURCE_ROOT; }; 71A26EE1069D5691005AC343 /* iodbcext.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = iodbcext.h; path = ../../include/iodbcext.h; sourceTree = SOURCE_ROOT; }; 71A26EE2069D5691005AC343 /* iodbcunix.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = iodbcunix.h; path = ../../include/iodbcunix.h; sourceTree = SOURCE_ROOT; }; 8568A50D19664B3E00738ECF /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; 8568A562196A93FA00738ECF /* confirm.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = confirm.png; sourceTree = ""; }; 8568A566196AC47700738ECF /* IODBCProxy_LoginController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IODBCProxy_LoginController.h; sourceTree = ""; }; 8568A567196AC47700738ECF /* IODBCProxy_LoginController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IODBCProxy_LoginController.m; sourceTree = ""; }; 8568A56C196BA12A00738ECF /* IODBCProxy_SetupController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IODBCProxy_SetupController.h; sourceTree = ""; }; 8568A56D196BA12A00738ECF /* IODBCProxy_SetupController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IODBCProxy_SetupController.m; sourceTree = ""; }; 8568A58A196D6FC600738ECF /* utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utils.h; sourceTree = ""; }; 8568A58B196D6FC600738ECF /* utils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = utils.m; sourceTree = ""; }; 8568A596196E490400738ECF /* dlf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = dlf.c; path = ../../iodbcinst/dlf.c; sourceTree = ""; }; 8568A597196E490400738ECF /* dlf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = dlf.h; path = ../../iodbcinst/dlf.h; sourceTree = ""; }; 859838AB07CF6D6D0022E958 /* confirm.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = confirm.c; sourceTree = ""; }; 85D1BB9807E7D55A0070A59E /* iODBCinst.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = iODBCinst.framework; path = ../iODBCinst/build/Development/iODBCinst.framework; sourceTree = SOURCE_ROOT; }; CD75BBFF2637009200ED5683 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = ../en.lproj/InfoPlist.strings; sourceTree = ""; }; CD75BC022637009900ED5683 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/IODBCProxy_SetupController.xib; sourceTree = ""; }; CD75BC032637009900ED5683 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/IODBCProxy_LoginController.xib; sourceTree = ""; }; CDAE3BCB0987D6B4003250F8 /* Info-iODBCdrvproxy.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Info-iODBCdrvproxy.plist"; sourceTree = ""; }; CDAE3BCC0987D6B4003250F8 /* iODBCdrvproxy.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = iODBCdrvproxy.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; F53EDAEC029B957C01A801DE /* iodbc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = iodbc.h; path = ../../include/iodbc.h; sourceTree = SOURCE_ROOT; }; F5C2E5AE05161F4601A801EC /* herr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = herr.h; path = ../../iodbc/herr.h; sourceTree = SOURCE_ROOT; }; F5C2EB360518B22E01A801EC /* odbcinst.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = odbcinst.h; path = ../../include/odbcinst.h; sourceTree = SOURCE_ROOT; }; F5C2EB380518B26C01A801EC /* iodbcadm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = iodbcadm.h; path = ../../iodbcadm/iodbcadm.h; sourceTree = SOURCE_ROOT; }; F5C2EB3A0518B2C501A801EC /* sqlucode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqlucode.h; path = ../../include/sqlucode.h; sourceTree = SOURCE_ROOT; }; F5C2EB3C0518B36001A801EC /* sqlext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqlext.h; path = ../../include/sqlext.h; sourceTree = SOURCE_ROOT; }; F5C2EB3D0518B36001A801EC /* sqltypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqltypes.h; path = ../../include/sqltypes.h; sourceTree = SOURCE_ROOT; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ CDAE3BC20987D6B4003250F8 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 8568A50E19664B3E00738ECF /* Cocoa.framework in Frameworks */, CDAE3BC30987D6B4003250F8 /* CoreFoundation.framework in Frameworks */, CDAE3BC50987D6B4003250F8 /* iODBCinst.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 089C166AFE841209C02AAC07 /* iODBCdrvproxy */ = { isa = PBXGroup; children = ( 08FB77AFFE84173DC02AAC07 /* Source */, 089C167CFE841241C02AAC07 /* Resources */, 089C1671FE841209C02AAC07 /* External Frameworks and Libraries */, 19C28FB6FE9D52B211CA2CBB /* Products */, CDAE3BCB0987D6B4003250F8 /* Info-iODBCdrvproxy.plist */, ); name = iODBCdrvproxy; sourceTree = ""; }; 089C1671FE841209C02AAC07 /* External Frameworks and Libraries */ = { isa = PBXGroup; children = ( 85D1BB9807E7D55A0070A59E /* iODBCinst.framework */, 0A7B5B2F005FB5307F000001 /* CoreFoundation.framework */, 8568A50D19664B3E00738ECF /* Cocoa.framework */, ); name = "External Frameworks and Libraries"; sourceTree = ""; }; 089C167CFE841241C02AAC07 /* Resources */ = { isa = PBXGroup; children = ( 85A390E11B7911B100AC8862 /* English.lproj */, ); name = Resources; sourceTree = ""; }; 08FB77AFFE84173DC02AAC07 /* Source */ = { isa = PBXGroup; children = ( 1C1241FB005FB6B37F000001 /* drvproxy */, 1C12421B005FB6F07F000001 /* iODBC */, ); name = Source; sourceTree = ""; }; 19C28FB6FE9D52B211CA2CBB /* Products */ = { isa = PBXGroup; children = ( CDAE3BCC0987D6B4003250F8 /* iODBCdrvproxy.bundle */, ); name = Products; sourceTree = ""; }; 1C1241FB005FB6B37F000001 /* drvproxy */ = { isa = PBXGroup; children = ( 1C1241FC005FB6B37F000001 /* ConfigDriver.c */, 1C1241FD005FB6B37F000001 /* ConfigDSN.c */, 1C1241FE005FB6B37F000001 /* drvconn.c */, 1C1241FF005FB6B37F000001 /* drvproxy.exp */, 1C124206005FB6B37F000001 /* gui.h */, 1C124207005FB6B37F000001 /* Info.c */, 1C124209005FB6B37F000001 /* mac */, ); name = drvproxy; path = ../../drvproxy; sourceTree = SOURCE_ROOT; }; 1C124209005FB6B37F000001 /* mac */ = { isa = PBXGroup; children = ( 85A390E51B7911C500AC8862 /* English.lproj */, 8568A562196A93FA00738ECF /* confirm.png */, 859838AB07CF6D6D0022E958 /* confirm.c */, 1C12420B005FB6B37F000001 /* gensetup.c */, 1C12420C005FB6B37F000001 /* gui.h */, 1C12420D005FB6B37F000001 /* loginbox.c */, 8568A56C196BA12A00738ECF /* IODBCProxy_SetupController.h */, 8568A56D196BA12A00738ECF /* IODBCProxy_SetupController.m */, 8568A58A196D6FC600738ECF /* utils.h */, 8568A58B196D6FC600738ECF /* utils.m */, 8568A566196AC47700738ECF /* IODBCProxy_LoginController.h */, 8568A567196AC47700738ECF /* IODBCProxy_LoginController.m */, ); path = mac; sourceTree = ""; }; 1C12421B005FB6F07F000001 /* iODBC */ = { isa = PBXGroup; children = ( 8568A596196E490400738ECF /* dlf.c */, 8568A597196E490400738ECF /* dlf.h */, 71A26EE1069D5691005AC343 /* iodbcext.h */, 71A26EE2069D5691005AC343 /* iodbcunix.h */, 716C452F05B6EF8B0045FADB /* sql.h */, 716C452B05B6EF4D0045FADB /* iodbcinst.h */, 1C12421E005FB79A7F000001 /* iodbc_error.h */, F53EDAEC029B957C01A801DE /* iodbc.h */, F5C2E5AE05161F4601A801EC /* herr.h */, F5C2EB360518B22E01A801EC /* odbcinst.h */, F5C2EB380518B26C01A801EC /* iodbcadm.h */, F5C2EB3A0518B2C501A801EC /* sqlucode.h */, F5C2EB3C0518B36001A801EC /* sqlext.h */, F5C2EB3D0518B36001A801EC /* sqltypes.h */, ); name = iODBC; sourceTree = ""; }; 85A390E11B7911B100AC8862 /* English.lproj */ = { isa = PBXGroup; children = ( 85A390E21B7911B100AC8862 /* InfoPlist.strings */, ); path = English.lproj; sourceTree = ""; }; 85A390E51B7911C500AC8862 /* English.lproj */ = { isa = PBXGroup; children = ( 85A3908F1B79094800AC8862 /* IODBCProxy_SetupController.xib */, 85A3908C1B79093F00AC8862 /* IODBCProxy_LoginController.xib */, ); name = English.lproj; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ CDAE3BA30987D6B4003250F8 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( CDAE3BA40987D6B4003250F8 /* gui.h in Headers */, CDAE3BA50987D6B4003250F8 /* gui.h in Headers */, CDAE3BA60987D6B4003250F8 /* iodbc_error.h in Headers */, CDAE3BA70987D6B4003250F8 /* iodbc.h in Headers */, CDAE3BA80987D6B4003250F8 /* herr.h in Headers */, CDAE3BAA0987D6B4003250F8 /* odbcinst.h in Headers */, CDAE3BAB0987D6B4003250F8 /* iodbcadm.h in Headers */, 8568A569196AC47700738ECF /* IODBCProxy_LoginController.h in Headers */, 8568A599196E490400738ECF /* dlf.h in Headers */, 8568A58C196D6FC600738ECF /* utils.h in Headers */, CDAE3BAC0987D6B4003250F8 /* sqlucode.h in Headers */, CDAE3BAD0987D6B4003250F8 /* sqlext.h in Headers */, CDAE3BAE0987D6B4003250F8 /* sqltypes.h in Headers */, CDAE3BAF0987D6B4003250F8 /* iodbcinst.h in Headers */, 8568A56F196BA12A00738ECF /* IODBCProxy_SetupController.h in Headers */, CDAE3BB00987D6B4003250F8 /* sql.h in Headers */, CDAE3BB10987D6B4003250F8 /* iodbcext.h in Headers */, CDAE3BB20987D6B4003250F8 /* iodbcunix.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ CDAE3BA20987D6B4003250F8 /* iODBCdrvproxy */ = { isa = PBXNativeTarget; buildConfigurationList = CDAE3BC70987D6B4003250F8 /* Build configuration list for PBXNativeTarget "iODBCdrvproxy" */; buildPhases = ( CDAE3BA30987D6B4003250F8 /* Headers */, CDAE3BB30987D6B4003250F8 /* Resources */, CDAE3BB80987D6B4003250F8 /* Sources */, CDAE3BC20987D6B4003250F8 /* Frameworks */, ); buildRules = ( ); dependencies = ( ); name = iODBCdrvproxy; productInstallPath = .; productName = iODBCdrvproxy; productReference = CDAE3BCC0987D6B4003250F8 /* iODBCdrvproxy.bundle */; productType = "com.apple.product-type.bundle"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 089C1669FE841209C02AAC07 /* Project object */ = { isa = PBXProject; attributes = { LastUpgradeCheck = 1130; TargetAttributes = { CDAE3BA20987D6B4003250F8 = { ProvisioningStyle = Manual; }; }; }; buildConfigurationList = CDAE3BCD0987D6B5003250F8 /* Build configuration list for PBXProject "iODBCdrvproxy" */; compatibilityVersion = "Xcode 8.0"; developmentRegion = en; hasScannedForEncodings = 1; knownRegions = ( en, Base, ); mainGroup = 089C166AFE841209C02AAC07 /* iODBCdrvproxy */; projectDirPath = ""; projectRoot = ""; targets = ( CDAE3BA20987D6B4003250F8 /* iODBCdrvproxy */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ CDAE3BB30987D6B4003250F8 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( 8568A563196A93FA00738ECF /* confirm.png in Resources */, 85A3908A1B79093F00AC8862 /* IODBCProxy_LoginController.xib in Resources */, 85A3908D1B79094800AC8862 /* IODBCProxy_SetupController.xib in Resources */, 85A390E41B7911B100AC8862 /* InfoPlist.strings in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ CDAE3BB80987D6B4003250F8 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( CDAE3BB90987D6B4003250F8 /* ConfigDriver.c in Sources */, CDAE3BBA0987D6B4003250F8 /* ConfigDSN.c in Sources */, 8568A598196E490400738ECF /* dlf.c in Sources */, CDAE3BBB0987D6B4003250F8 /* drvconn.c in Sources */, 8568A58D196D6FC600738ECF /* utils.m in Sources */, CDAE3BBC0987D6B4003250F8 /* drvproxy.exp in Sources */, CDAE3BBD0987D6B4003250F8 /* Info.c in Sources */, CDAE3BBE0987D6B4003250F8 /* gensetup.c in Sources */, CDAE3BBF0987D6B4003250F8 /* loginbox.c in Sources */, 8568A56A196AC47700738ECF /* IODBCProxy_LoginController.m in Sources */, 8568A570196BA12A00738ECF /* IODBCProxy_SetupController.m in Sources */, CDAE3BC10987D6B4003250F8 /* confirm.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ 85A3908C1B79093F00AC8862 /* IODBCProxy_LoginController.xib */ = { isa = PBXVariantGroup; children = ( CD75BC032637009900ED5683 /* Base */, ); name = IODBCProxy_LoginController.xib; sourceTree = ""; }; 85A3908F1B79094800AC8862 /* IODBCProxy_SetupController.xib */ = { isa = PBXVariantGroup; children = ( CD75BC022637009900ED5683 /* Base */, ); name = IODBCProxy_SetupController.xib; sourceTree = ""; }; 85A390E21B7911B100AC8862 /* InfoPlist.strings */ = { isa = PBXVariantGroup; children = ( CD75BBFF2637009200ED5683 /* en */, ); name = InfoPlist.strings; sourceTree = ""; }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ CDAE3BC80987D6B4003250F8 /* Development */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = ( arm64, $IODBC_32BIT, x86_64, ); CLANG_ENABLE_OBJC_WEAK = YES; COPY_PHASE_STRIP = YES; CURRENT_PROJECT_VERSION = $IODBC_VERSION; "Current project version" = $IODBC_VERSION; DEPLOYMENT_POSTPROCESSING = YES; DYLIB_COMPATIBILITY_VERSION = 1.0.0; DYLIB_CURRENT_VERSION = $IODBC_VERSION; EXPORTED_SYMBOLS_FILE = ../../mac/drvproxy.exp; FRAMEWORK_SEARCH_PATHS = ( ../../mac/iODBCinst/build/Development, ../../mac/iODBCinst/build, ); FRAMEWORK_VERSION = 3.52; GCC_DYNAMIC_NO_PIC = NO; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_OPTIMIZATION_LEVEL = 2; GCC_PREPROCESSOR_DEFINITIONS = ( "ODBCVER=0x351", _MACX, IODBC_COCOA, ); HEADER_SEARCH_PATHS = ( ../../include, ../../iodbc, ); INFOPLIST_FILE = "Info-iODBCdrvproxy.plist"; INSTALL_PATH = /; LIBRARY_SEARCH_PATHS = ""; LIBRARY_STYLE = Bundle; MACOSX_DEPLOYMENT_TARGET = 10.9; OTHER_CFLAGS = "-fno-constant-cfstrings"; OTHER_LDFLAGS = ( "-multiply_defined", suppress, ); OTHER_REZFLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = org.iodbc.drvproxy; PRODUCT_NAME = iODBCdrvproxy; RESMERGER_SOURCES_FORK = data; SECTORDER_FLAGS = ""; SKIP_INSTALL = YES; STRIPFLAGS = "-u -r -s ../../mac/drvproxy.exp"; WARNING_CFLAGS = ( "-Wmost", "-Wno-four-char-constants", "-Wno-unknown-pragmas", ); WRAPPER_EXTENSION = bundle; "Zero link" = NO; }; name = Development; }; CDAE3BC90987D6B4003250F8 /* Deployment */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = ( arm64, $IODBC_32BIT, x86_64, ); CLANG_ENABLE_OBJC_WEAK = YES; COPY_PHASE_STRIP = YES; FRAMEWORK_SEARCH_PATHS = ( ../../mac/iODBCinst/build/Deployment, ../../mac/iODBCinst/build, ); GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_OPTIMIZATION_LEVEL = 2; GCC_PREPROCESSOR_DEFINITIONS = ( "ODBCVER=0x351", _MACX, IODBC_COCOA, ); HEADER_SEARCH_PATHS = ( ../../include, ../../iodbc, ); INFOPLIST_FILE = "Info-iODBCdrvproxy.plist"; INSTALL_PATH = /; LIBRARY_SEARCH_PATHS = ""; MACOSX_DEPLOYMENT_TARGET = 10.9; OTHER_CFLAGS = "-fno-constant-cfstrings"; OTHER_LDFLAGS = ( "-multiply_defined", suppress, ); OTHER_REZFLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = org.iodbc.drvproxy; PRODUCT_NAME = iODBCdrvproxy; SECTORDER_FLAGS = ""; WARNING_CFLAGS = ( "-Wmost", "-Wno-four-char-constants", "-Wno-unknown-pragmas", ); WRAPPER_EXTENSION = bundle; ZERO_LINK = NO; }; name = Deployment; }; CDAE3BCE0987D6B5003250F8 /* Development */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = ( arm64, $IODBC_32BIT, x86_64, ); CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "-"; COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.9; ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = ""; STRIP_INSTALLED_PRODUCT = NO; }; name = Development; }; CDAE3BCF0987D6B5003250F8 /* Deployment */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = ( arm64, $IODBC_32BIT, x86_64, ); CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "-"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.9; OTHER_CFLAGS = ""; }; name = Deployment; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ CDAE3BC70987D6B4003250F8 /* Build configuration list for PBXNativeTarget "iODBCdrvproxy" */ = { isa = XCConfigurationList; buildConfigurations = ( CDAE3BC80987D6B4003250F8 /* Development */, CDAE3BC90987D6B4003250F8 /* Deployment */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Deployment; }; CDAE3BCD0987D6B5003250F8 /* Build configuration list for PBXProject "iODBCdrvproxy" */ = { isa = XCConfigurationList; buildConfigurations = ( CDAE3BCE0987D6B5003250F8 /* Development */, CDAE3BCF0987D6B5003250F8 /* Deployment */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Deployment; }; /* End XCConfigurationList section */ }; rootObject = 089C1669FE841209C02AAC07 /* Project object */; } libiodbc-3.52.16/mac/iODBCdrvproxy/iODBCdrvproxy.xcodeproj/project.xcworkspace/0000775000175000017500000000000014424171427024376 500000000000000libiodbc-3.52.16/mac/iODBCdrvproxy/iODBCdrvproxy.xcodeproj/project.xcworkspace/xcshareddata/0000775000175000017500000000000014424171427027031 500000000000000libiodbc-3.52.16/mac/iodbc-config.macos0000775000175000017500000001412614424170750014504 00000000000000#!/bin/bash # # The iODBC driver manager. # # Copyright (C) 1996-2023 OpenLink Software # All Rights Reserved. # # This software is released under the terms of either of the following # licenses: # # - GNU Library General Public License (see LICENSE.LGPL) # - The BSD License (see LICENSE.BSD). # # Note that the only valid version of the LGPL license as far as this # project is concerned is the original GNU Library General Public License # Version 2, dated June 1991. # # While not mandated by the BSD license, any patches you make to the # iODBC source code may be contributed back into the iODBC project # at your discretion. Contributions will benefit the Open Source and # Data Access community as a whole. Submissions may be made at: # # http://www.iodbc.org # # # GNU Library Generic Public License Version 2 # ============================================ # 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; only # Version 2 of the License dated June 1991. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # The BSD License # =============== # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. Neither the name of OpenLink Software Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # version=@IODBC_VERSION@ prefix=/usr/local/iODBC exec_prefix=${prefix} exec_prefix_set=no data_dir=${prefix}/share # # Framework location of system ini files # SYSODBCINI=/Library/ODBC/odbc.ini SYSODBCINSTINI=/Library/ODBC/odbcinst.ini # # macOS version # export MACOS_VERSION=$(sw_vers -productVersion) usage() { cat < Usage: iodbc-config [OPTIONS] [LIBRARIES] Options: [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--static-libs] [--libtool-libs] [--cflags] [--odbcversion] [--odbcini] [--odbcinstini] Libraries: iodbc EOF exit $1 } if test $# -eq 0; then usage 1 1>&2 fi lib_iodbc=yes while test $# -gt 0; do case "$1" in -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac case $1 in --prefix=*) prefix=$optarg if test $exec_prefix_set = no ; then exec_prefix=$optarg fi ;; --prefix) echo_prefix=yes ;; --exec-prefix=*) exec_prefix=$optarg exec_prefix_set=yes ;; --exec-prefix) echo_exec_prefix=yes ;; --version) echo $version exit 0 ;; --cflags) if test "${prefix}/include" != /usr/include ; then includes="-I${prefix}/include" fi echo_cflags=yes ;; --libs) echo_libs=yes ;; --static-libs) echo "** Warning: macOS $MACOS_VERSION framework build does not support static libraries" >&2 echo_libs=yes #echo_staticlibs=yes ;; --libtool-libs) echo "** Warning: macOS $MACOS_VERSION framework build does not support libtool libraries" >&2 echo_libs=yes #echo_libtoollibs=yes ;; --data-dir) echo_data_dir=yes ;; --odbcversion) echo 3 exit 0 ;; --odbcini) echo_odbcini=yes ;; --odbcinstini) echo_odbcinstini=yes ;; iodbc) lib_iodbc=yes ;; *) usage 1 1>&2 ;; esac shift done if test "$echo_prefix" = "yes"; then echo $prefix fi if test "$echo_exec_prefix" = "yes"; then echo $exec_prefix fi if test "$echo_data_dir" = "yes"; then echo $data_dir fi if test "$echo_odbcini" = "yes"; then echo "$SYSODBCINI" fi if test "$echo_odbcinstini" = "yes"; then echo "$SYSODBCINSTINI" fi if test "$echo_cflags" = "yes"; then echo "$includes" fi if test "$echo_libs" = "yes"; then libs="" if test "$lib_iodbc" = "yes"; then libs="$libs -liodbc -liodbcinst" fi echo "-L${exec_prefix}/lib $libs" fi if test "$echo_staticlibs" = "yes"; then libs="" if test "$lib_iodbc" = "yes"; then libs="${exec_prefix}/lib/libiodbc.a ${exec_prefix}/lib/libiodbcinst.a -ldl" fi echo "$libs" fi if test "$echo_libtoollibs" = "yes"; then libs="" if test "$lib_iodbc" = "yes"; then libs="${exec_prefix}/lib/libiodbc.la ${exec_prefix}/lib/libiodbcinst.la" fi echo "$libs" fi libiodbc-3.52.16/mac/iODBCdemo/0000775000175000017500000000000014424171427012735 500000000000000libiodbc-3.52.16/mac/iODBCdemo/DSNchooserController.h0000664000175000017500000001145514424170750017105 00000000000000/* * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import #import #import #import #import #import @interface DSNchooserController : NSWindowController { NSArrayController *_UserDSN_ArrController; NSArrayController *_SysDSN_ArrController; NSArrayController *_FileDSN_ArrController; NSTabView *_tab_view; NSTableView *_fdsn_tableView; NSPopUpButton *_popup_dir_btn; int _dialogCode; NSString* _type_dsn; NSMutableArray *_UserDSN_list; NSMutableArray *_SysDSN_list; NSMutableArray *_FileDSN_list; NSString *_cur_dir; NSString *_selected_dsn; NSTextField *_uid; NSSecureTextField *_pwd; } @property (assign) IBOutlet NSPopUpButton *popup_dir_btn; @property (assign) IBOutlet NSTableView *fdsn_tableView; @property (assign) IBOutlet NSTabView *tab_view; @property (assign) IBOutlet NSArrayController *FileDSN_ArrController; @property (assign) IBOutlet NSArrayController *SysDSN_ArrController; @property (assign) IBOutlet NSArrayController *UserDSN_ArrController; @property (nonatomic, retain) NSMutableArray *UserDSN_list; @property (nonatomic, retain) NSMutableArray *SysDSN_list; @property (nonatomic, retain) NSMutableArray *FileDSN_list; @property (nonatomic, retain) NSString *cur_dir; @property (nonatomic, retain) NSString *type_dsn; @property (nonatomic, retain) NSString *selected_dsn; @property (assign) IBOutlet NSTextField *uid; @property (assign) IBOutlet NSSecureTextField *pwd; - (IBAction)call_Dir_PopupBtn:(id)sender; - (IBAction)call_Cancel:(id)sender; - (IBAction)call_Ok:(id)sender; @end libiodbc-3.52.16/mac/iODBCdemo/NSAttributedStringAdditions.h0000664000175000017500000000651114424170750020425 00000000000000/* * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import @interface NSAttributedString (TVLAttributedStringAdditions) + (NSAttributedString *)attributedStringWithBlueLink:(NSString *)val; @endlibiodbc-3.52.16/mac/iODBCdemo/TestController.h0000664000175000017500000001032614424170750016011 00000000000000/* * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import #import #import #import #import #import @interface TestController : NSObject { IBOutlet id mMenu; IBOutlet id mWindow; IBOutlet NSTableView *RSTable; SQLHENV henv; SQLHDBC hdbc; SQLHSTMT hstmt; BOOL mConnected; NSMutableArray *mBuffer; int mRows; NSString *_fQuery; BOOL mExistsResultset; BOOL mNextResultset; BOOL mSPARQL_executed; int mMaxRows; } @property (nonatomic, retain) NSString *fQuery; - (void)disconnect; - (void)execSQL:(SQLTCHAR *)szSQL; - (void)clearGrid; - (void)loadResult; - (id)tableView:(NSTableView *)aTable objectValueForTableColumn:(NSTableColumn *)aColumn row:(int)rowIndex; - (int)numberOfRowsInTableView:(NSTableView *)aTable; - (IBAction)aCloseConnection:(id)sender; - (IBAction)aExecSQL:(id)sender; - (IBAction)aFetchNextRowset:(id)sender; - (IBAction)aOpenConnection:(id)sender; @end libiodbc-3.52.16/mac/iODBCdemo/DSNchooserController.xib0000664000175000017500000015572014424170750017444 00000000000000 NSAllRomanInputSourcesLocaleIdentifier name desc drv name desc drv name icon libiodbc-3.52.16/mac/iODBCdemo/Helpers.m0000664000175000017500000001270414424170750014437 00000000000000/* * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import "Helpers.h" #include #include #ifdef UNICODE wchar_t * NStoTEXT (NSString * str) { wchar_t *prov; unsigned int len, i; if (str == nil) return NULL; len = [str length]; prov = malloc (sizeof (wchar_t) * (len + 1)); if (prov) { for (i = 0; i < len; i++) prov[i] = [str characterAtIndex:i]; prov[i] = L'\0'; } return prov; } NSString* TEXTtoNS(wchar_t* str) { if (!str) return nil; if (NSHostByteOrder()==NS_LittleEndian) return [[[NSString alloc] initWithBytes:str length:wcslen(str)*sizeof(wchar_t) encoding:NSUTF32LittleEndianStringEncoding] autorelease]; else return [[[NSString alloc] initWithBytes:str length:wcslen(str)*sizeof(wchar_t) encoding:NSUTF32BigEndianStringEncoding] autorelease]; } #endif void _nativeerrorbox (SQLHENV _henv, SQLHDBC _hdbc, SQLHSTMT _hstmt) { SQLTCHAR buf[4096]; SQLTCHAR sqlstate[15]; /* * Get statement errors */ if (SQLError (_henv, _hdbc, _hstmt, sqlstate, NULL, buf, sizeof (buf)/sizeof(SQLTCHAR), NULL) == SQL_SUCCESS) NSRunAlertPanel(@"Native ODBC Error", [NSString stringWithFormat:@"%@ [%@]", TEXTtoNS(buf), TEXTtoNS(sqlstate)], NULL, NULL, NULL); /* * Get connection errors */ if (SQLError (_henv, _hdbc, SQL_NULL_HSTMT, sqlstate, NULL, buf, sizeof (buf)/sizeof(SQLTCHAR), NULL) == SQL_SUCCESS) NSRunAlertPanel(@"Native ODBC Error", [NSString stringWithFormat:@"%@ [%@]", TEXTtoNS(buf), TEXTtoNS(sqlstate)], NULL, NULL, NULL); /* * Get environmental errors */ if (SQLError (_henv, SQL_NULL_HDBC, SQL_NULL_HSTMT, sqlstate, NULL, buf, sizeof (buf)/sizeof(SQLTCHAR), NULL) == SQL_SUCCESS) NSRunAlertPanel(@"Native ODBC Error", [NSString stringWithFormat:@"%@ [%@]", TEXTtoNS(buf), TEXTtoNS(sqlstate)], NULL, NULL, NULL); } void create_error(const char *text, const char *errmsg) { NSString *title = [NSString stringWithUTF8String:text]; NSString *message = [NSString stringWithUTF8String:errmsg]; NSRunAlertPanel(title, message, @"OK", nil, nil); } libiodbc-3.52.16/mac/iODBCdemo/NSResWindow.m0000664000175000017500000000647714424170750015231 00000000000000/* * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import "NSResWindow.h" @implementation NSResWindow - (void)close { NSApplication *test = myApp; [super close]; [test terminate:self]; } @end libiodbc-3.52.16/mac/iODBCdemo/LinkTextFieldCell.h0000664000175000017500000000657114424170750016343 00000000000000/* * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import @interface LinkTextFieldCell : NSTextFieldCell { @private void (^_clickHandler)(NSString *uri, id sender); } @property(copy) void (^clickHandler)(NSString * uri, id sender); @end libiodbc-3.52.16/mac/iODBCdemo/ExecController.m0000664000175000017500000001127614424170750015770 00000000000000/* * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import "ExecController.h" @implementation ExecController @synthesize fSQL = _SQL; @synthesize MaxRows= _MaxRows; - (id)init { return [super initWithWindowNibName:@"ExecSQL"]; } - (void)dealloc { [_SQL release]; [super dealloc]; } - (void)windowDidLoad { [super windowDidLoad]; _dialogCode = 0; [[self window] center]; // Center the window. fSQLText.stringValue = _SQL; fMaxRowsText.stringValue = [NSString stringWithFormat:@"%d",_MaxRows]; } - (IBAction)aCancel:(id)sender { [self.window close]; [NSApp stopModalWithCode:0]; } - (IBAction)aOK:(id)sender { self.fSQL = [fSQLText stringValue]; self.MaxRows = [fMaxRowsText.stringValue integerValue]; [self.window close]; [NSApp stopModalWithCode:1]; } - (void)windowWillClose:(NSNotification*)notification { [NSApp stopModalWithCode:_dialogCode]; } - (BOOL)control:(NSControl*)control textView:(NSTextView*)textView doCommandBySelector:(SEL)commandSelector { BOOL result = NO; if (commandSelector == @selector(insertNewline:)) { // new line action: // always insert a line-break character and dont cause the receiver to end editing [textView insertNewlineIgnoringFieldEditor:self]; result = YES; } else if (commandSelector == @selector(insertTab:)) { // tab action: // always insert a tab character and dont cause the receiver to end editing [textView insertTabIgnoringFieldEditor:self]; result = YES; } return result; } @end libiodbc-3.52.16/mac/iODBCdemo/DemoUnicode/0000775000175000017500000000000014424171427015130 500000000000000libiodbc-3.52.16/mac/iODBCdemo/DemoUnicode/DemoUnicode.xcodeproj/0000775000175000017500000000000014424171427021317 500000000000000libiodbc-3.52.16/mac/iODBCdemo/DemoUnicode/DemoUnicode.xcodeproj/project.xcworkspace/0000775000175000017500000000000014424171427025315 500000000000000libiodbc-3.52.16/mac/iODBCdemo/DemoUnicode/DemoUnicode.xcodeproj/project.xcworkspace/xcshareddata/0000775000175000017500000000000014424171427027750 500000000000000libiodbc-3.52.16/mac/iODBCdemo/DemoUnicode/DemoUnicode.xcodeproj/project.pbxproj0000664000175000017500000005070514424170750024320 00000000000000// !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 48; objects = { /* Begin PBXBuildFile section */ 8518E1F71CCD004100967942 /* ExecController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8518E1EA1CCD004100967942 /* ExecController.m */; }; 8518E1F81CCD004100967942 /* Helpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 8518E1EC1CCD004100967942 /* Helpers.m */; }; 8518E1F91CCD004100967942 /* LinkTextFieldCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8518E1EF1CCD004100967942 /* LinkTextFieldCell.m */; }; 8518E1FA1CCD004100967942 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 8518E1F01CCD004100967942 /* main.m */; }; 8518E1FB1CCD004100967942 /* NSAttributedStringAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 8518E1F21CCD004100967942 /* NSAttributedStringAdditions.m */; }; 8518E1FC1CCD004100967942 /* NSResWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 8518E1F41CCD004100967942 /* NSResWindow.m */; }; 8518E1FD1CCD004100967942 /* TestController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8518E1F61CCD004100967942 /* TestController.m */; }; 8594AF361CCE4D5D00EE7ABC /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 8594AF2E1CCE4D5D00EE7ABC /* Credits.rtf */; }; 8594AF371CCE4D5D00EE7ABC /* ExecSQL.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8594AF301CCE4D5D00EE7ABC /* ExecSQL.xib */; }; 8594AF381CCE4D5D00EE7ABC /* iODBCdemo.icns in Resources */ = {isa = PBXBuildFile; fileRef = 8594AF321CCE4D5D00EE7ABC /* iODBCdemo.icns */; }; 8594AF391CCE4D5D00EE7ABC /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8594AF341CCE4D5D00EE7ABC /* MainMenu.xib */; }; 85F0784609F88DFC0007FC8F /* iODBC.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 85F0784509F88DFC0007FC8F /* iODBC.framework */; }; 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; CD7C36450A0109AA001A43B7 /* iODBCinst.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD7C36440A0109AA001A43B7 /* iODBCinst.framework */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = ""; }; 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; 8518E1E91CCD004100967942 /* ExecController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ExecController.h; path = ../ExecController.h; sourceTree = ""; }; 8518E1EA1CCD004100967942 /* ExecController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ExecController.m; path = ../ExecController.m; sourceTree = ""; }; 8518E1EB1CCD004100967942 /* Helpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Helpers.h; path = ../Helpers.h; sourceTree = ""; }; 8518E1EC1CCD004100967942 /* Helpers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Helpers.m; path = ../Helpers.m; sourceTree = ""; }; 8518E1ED1CCD004100967942 /* iodbcdemo_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = iodbcdemo_Prefix.pch; path = ../iodbcdemo_Prefix.pch; sourceTree = ""; }; 8518E1EE1CCD004100967942 /* LinkTextFieldCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LinkTextFieldCell.h; path = ../LinkTextFieldCell.h; sourceTree = ""; }; 8518E1EF1CCD004100967942 /* LinkTextFieldCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = LinkTextFieldCell.m; path = ../LinkTextFieldCell.m; sourceTree = ""; }; 8518E1F01CCD004100967942 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = ../main.m; sourceTree = ""; }; 8518E1F11CCD004100967942 /* NSAttributedStringAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NSAttributedStringAdditions.h; path = ../NSAttributedStringAdditions.h; sourceTree = ""; }; 8518E1F21CCD004100967942 /* NSAttributedStringAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NSAttributedStringAdditions.m; path = ../NSAttributedStringAdditions.m; sourceTree = ""; }; 8518E1F31CCD004100967942 /* NSResWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NSResWindow.h; path = ../NSResWindow.h; sourceTree = ""; }; 8518E1F41CCD004100967942 /* NSResWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NSResWindow.m; path = ../NSResWindow.m; sourceTree = ""; }; 8518E1F51CCD004100967942 /* TestController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestController.h; path = ../TestController.h; sourceTree = ""; }; 8518E1F61CCD004100967942 /* TestController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TestController.m; path = ../TestController.m; sourceTree = ""; }; 8518E1FE1CCD006900967942 /* InfoUnicode.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = InfoUnicode.plist; sourceTree = ""; }; 8594AF2F1CCE4D5D00EE7ABC /* English */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = English; path = ../en.lproj/Credits.rtf; sourceTree = ""; }; 8594AF311CCE4D5D00EE7ABC /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = ../Base.lproj/ExecSQL.xib; sourceTree = ""; }; 8594AF331CCE4D5D00EE7ABC /* English */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = English; path = ../en.lproj/iODBCdemo.icns; sourceTree = ""; }; 8594AF351CCE4D5D00EE7ABC /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = ../Base.lproj/MainMenu.xib; sourceTree = ""; }; 85F0784509F88DFC0007FC8F /* iODBC.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = iODBC.framework; path = /Library/Frameworks/iODBC.framework; sourceTree = ""; }; 8D1107320486CEB800E47090 /* iODBC Demo Unicode.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "iODBC Demo Unicode.app"; sourceTree = BUILT_PRODUCTS_DIR; }; CD7C36440A0109AA001A43B7 /* iODBCinst.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = iODBCinst.framework; path = /Library/Frameworks/iODBCinst.framework; sourceTree = ""; }; CDCBD5F82637087900F31A21 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ 8D11072E0486CEB800E47090 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, 85F0784609F88DFC0007FC8F /* iODBC.framework in Frameworks */, CD7C36450A0109AA001A43B7 /* iODBCinst.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { isa = PBXGroup; children = ( CD7C36440A0109AA001A43B7 /* iODBCinst.framework */, 85F0784509F88DFC0007FC8F /* iODBC.framework */, 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, ); name = "Linked Frameworks"; sourceTree = ""; }; 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { isa = PBXGroup; children = ( 29B97324FDCFA39411CA2CEA /* AppKit.framework */, 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */, 29B97325FDCFA39411CA2CEA /* Foundation.framework */, ); name = "Other Frameworks"; sourceTree = ""; }; 19C28FACFE9D520D11CA2CBB /* Products */ = { isa = PBXGroup; children = ( 8D1107320486CEB800E47090 /* iODBC Demo Unicode.app */, ); name = Products; sourceTree = ""; }; 29B97314FDCFA39411CA2CEA /* iODBC Demo Unicode */ = { isa = PBXGroup; children = ( 29B97315FDCFA39411CA2CEA /* Other Sources */, 29B97317FDCFA39411CA2CEA /* Resources */, 29B97323FDCFA39411CA2CEA /* Frameworks */, 19C28FACFE9D520D11CA2CBB /* Products */, ); name = "iODBC Demo Unicode"; sourceTree = ""; }; 29B97315FDCFA39411CA2CEA /* Other Sources */ = { isa = PBXGroup; children = ( 8518E1E91CCD004100967942 /* ExecController.h */, 8518E1EA1CCD004100967942 /* ExecController.m */, 8518E1EB1CCD004100967942 /* Helpers.h */, 8518E1EC1CCD004100967942 /* Helpers.m */, 8518E1ED1CCD004100967942 /* iodbcdemo_Prefix.pch */, 8518E1EE1CCD004100967942 /* LinkTextFieldCell.h */, 8518E1EF1CCD004100967942 /* LinkTextFieldCell.m */, 8518E1F01CCD004100967942 /* main.m */, 8518E1F11CCD004100967942 /* NSAttributedStringAdditions.h */, 8518E1F21CCD004100967942 /* NSAttributedStringAdditions.m */, 8518E1F31CCD004100967942 /* NSResWindow.h */, 8518E1F41CCD004100967942 /* NSResWindow.m */, 8518E1F51CCD004100967942 /* TestController.h */, 8518E1F61CCD004100967942 /* TestController.m */, ); name = "Other Sources"; sourceTree = ""; }; 29B97317FDCFA39411CA2CEA /* Resources */ = { isa = PBXGroup; children = ( 8594AF2E1CCE4D5D00EE7ABC /* Credits.rtf */, 8594AF301CCE4D5D00EE7ABC /* ExecSQL.xib */, 8594AF321CCE4D5D00EE7ABC /* iODBCdemo.icns */, 8594AF341CCE4D5D00EE7ABC /* MainMenu.xib */, 8518E1FE1CCD006900967942 /* InfoUnicode.plist */, 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */, ); name = Resources; sourceTree = ""; }; 29B97323FDCFA39411CA2CEA /* Frameworks */ = { isa = PBXGroup; children = ( 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, ); name = Frameworks; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ 8D1107260486CEB800E47090 /* iODBC Demo Unicode */ = { isa = PBXNativeTarget; buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "iODBC Demo Unicode" */; buildPhases = ( 8D1107290486CEB800E47090 /* Resources */, 8D11072C0486CEB800E47090 /* Sources */, 8D11072E0486CEB800E47090 /* Frameworks */, ); buildRules = ( ); dependencies = ( ); name = "iODBC Demo Unicode"; productInstallPath = /Applications/iODBC; productName = "iODBC Demo Unicode"; productReference = 8D1107320486CEB800E47090 /* iODBC Demo Unicode.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 29B97313FDCFA39411CA2CEA /* Project object */ = { isa = PBXProject; attributes = { LastUpgradeCheck = 1130; TargetAttributes = { 8D1107260486CEB800E47090 = { ProvisioningStyle = Manual; }; }; }; buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "DemoUnicode" */; compatibilityVersion = "Xcode 8.0"; developmentRegion = en; hasScannedForEncodings = 1; knownRegions = ( en, English, Base, ); mainGroup = 29B97314FDCFA39411CA2CEA /* iODBC Demo Unicode */; projectDirPath = ""; projectRoot = ""; targets = ( 8D1107260486CEB800E47090 /* iODBC Demo Unicode */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ 8D1107290486CEB800E47090 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( 8594AF381CCE4D5D00EE7ABC /* iODBCdemo.icns in Resources */, 8594AF371CCE4D5D00EE7ABC /* ExecSQL.xib in Resources */, 8594AF361CCE4D5D00EE7ABC /* Credits.rtf in Resources */, 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */, 8594AF391CCE4D5D00EE7ABC /* MainMenu.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ 8D11072C0486CEB800E47090 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 8518E1FA1CCD004100967942 /* main.m in Sources */, 8518E1FB1CCD004100967942 /* NSAttributedStringAdditions.m in Sources */, 8518E1F81CCD004100967942 /* Helpers.m in Sources */, 8518E1FC1CCD004100967942 /* NSResWindow.m in Sources */, 8518E1F91CCD004100967942 /* LinkTextFieldCell.m in Sources */, 8518E1F71CCD004100967942 /* ExecController.m in Sources */, 8518E1FD1CCD004100967942 /* TestController.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = { isa = PBXVariantGroup; children = ( CDCBD5F82637087900F31A21 /* en */, ); name = InfoPlist.strings; sourceTree = ""; }; 8594AF2E1CCE4D5D00EE7ABC /* Credits.rtf */ = { isa = PBXVariantGroup; children = ( 8594AF2F1CCE4D5D00EE7ABC /* English */, ); name = Credits.rtf; sourceTree = ""; }; 8594AF301CCE4D5D00EE7ABC /* ExecSQL.xib */ = { isa = PBXVariantGroup; children = ( 8594AF311CCE4D5D00EE7ABC /* English */, ); name = ExecSQL.xib; sourceTree = ""; }; 8594AF321CCE4D5D00EE7ABC /* iODBCdemo.icns */ = { isa = PBXVariantGroup; children = ( 8594AF331CCE4D5D00EE7ABC /* English */, ); name = iODBCdemo.icns; sourceTree = ""; }; 8594AF341CCE4D5D00EE7ABC /* MainMenu.xib */ = { isa = PBXVariantGroup; children = ( 8594AF351CCE4D5D00EE7ABC /* English */, ); name = MainMenu.xib; sourceTree = ""; }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ C01FCF4B08A954540054247B /* Development */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = ( arm64, $IODBC_32BIT, x86_64, ); CLANG_ENABLE_OBJC_WEAK = YES; CODE_SIGN_IDENTITY = "-"; COPY_PHASE_STRIP = NO; FRAMEWORK_SEARCH_PATHS = ( ../../../mac/iODBC/build/Deployment, ../../../mac/iODBC/build, ../../../mac/iODBCinst/build/Deployment, ../../../mac/iODBCinst/build, ); GCC_DYNAMIC_NO_PIC = NO; GCC_MODEL_TUNING = G5; GCC_OPTIMIZATION_LEVEL = 0; HEADER_SEARCH_PATHS = ../../include; INFOPLIST_FILE = InfoUnicode.plist; INSTALL_PATH = /Applications/iODBC; OTHER_CFLAGS = "-DUNICODE"; PRODUCT_BUNDLE_IDENTIFIER = "com.openlinksw.iodbcdemo-unicode"; PRODUCT_NAME = "iODBC Demo Unicode"; WRAPPER_EXTENSION = app; ZERO_LINK = YES; }; name = Development; }; C01FCF4C08A954540054247B /* Deployment */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = ( arm64, $IODBC_32BIT, x86_64, ); CLANG_ENABLE_OBJC_WEAK = YES; FRAMEWORK_SEARCH_PATHS = ( ../../../mac/iODBC/build/Deployment, ../../../mac/iODBC/build, ../../../mac/iODBCinst/build/Deployment, ../../../mac/iODBCinst/build, ); GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_MODEL_TUNING = G5; HEADER_SEARCH_PATHS = ../../include; INFOPLIST_FILE = InfoUnicode.plist; INSTALL_PATH = /Applications/iODBC; OTHER_CFLAGS = "-DUNICODE"; PRODUCT_BUNDLE_IDENTIFIER = "com.openlinksw.iodbcdemo-unicode"; PRODUCT_NAME = "iODBC Demo Unicode"; WRAPPER_EXTENSION = app; }; name = Deployment; }; C01FCF4F08A954540054247B /* Development */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = ( arm64, $IODBC_32BIT, x86_64, ); CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "-"; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; FRAMEWORK_SEARCH_PATHS = ( ../../../mac/iODBC/build/Deployment, ../../../mac/iODBC/build, ../../../mac/iODBCinst/build/Deployment, ../../../mac/iODBCinst/build, ); GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ../../include; MACOSX_DEPLOYMENT_TARGET = 10.9; ONLY_ACTIVE_ARCH = YES; }; name = Development; }; C01FCF5008A954540054247B /* Deployment */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = ( arm64, $IODBC_32BIT, x86_64, ); CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "-"; ENABLE_STRICT_OBJC_MSGSEND = YES; FRAMEWORK_SEARCH_PATHS = ( ../../../mac/iODBC/build/Deployment, ../../../mac/iODBC/build, ../../../mac/iODBCinst/build/Deployment, ../../../mac/iODBCinst/build, ); GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ../../include; MACOSX_DEPLOYMENT_TARGET = 10.9; }; name = Deployment; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "iODBC Demo Unicode" */ = { isa = XCConfigurationList; buildConfigurations = ( C01FCF4B08A954540054247B /* Development */, C01FCF4C08A954540054247B /* Deployment */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Deployment; }; C01FCF4E08A954540054247B /* Build configuration list for PBXProject "DemoUnicode" */ = { isa = XCConfigurationList; buildConfigurations = ( C01FCF4F08A954540054247B /* Development */, C01FCF5008A954540054247B /* Deployment */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Deployment; }; /* End XCConfigurationList section */ }; rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; } libiodbc-3.52.16/mac/iODBCdemo/DemoUnicode/InfoUnicode.plist0000664000175000017500000000171514424170750020331 00000000000000 CFBundleDevelopmentRegion English CFBundleExecutable iODBC Demo Unicode CFBundleGetInfoString iODBC Demo version 1.4, Copyright 2006-2023, OpenLink Software CFBundleIconFile iODBCdemo.icns CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName iODBC Demo Unicode CFBundlePackageType APPL CFBundleSignature odbc CFBundleVersion 1.4 NSMainNibFile MainMenu NSPrincipalClass NSApplication libiodbc-3.52.16/mac/iODBCdemo/DemoUnicode/en.lproj/0000775000175000017500000000000014424171427016657 500000000000000libiodbc-3.52.16/mac/iODBCdemo/DemoUnicode/en.lproj/InfoPlist.strings0000664000175000017500000000044014424170750022115 00000000000000/* Localized versions of Info.plist keys */ CFBundleName = "iODBC Demo Unicode"; CFBundleShortVersionString = "Version 1.4"; CFBundleGetInfoString = "iODBC Demo version 1.4, Copyright 2006-2023, OpenLink Software"; NSHumanReadableCopyright = "Copyright © 2006-2023, OpenLink Software"; libiodbc-3.52.16/mac/iODBCdemo/NSResWindow.h0000664000175000017500000000640314424170750015211 00000000000000/* * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import @interface NSResWindow : NSWindow { IBOutlet id myApp; } @end libiodbc-3.52.16/mac/iODBCdemo/LinkTextFieldCell.m0000664000175000017500000001363514424170750016347 00000000000000/* * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import "LinkTextFieldCell.h" @implementation LinkTextFieldCell @synthesize clickHandler = _clickHandler; - (id)copyWithZone:(NSZone *)zone { LinkTextFieldCell *result = [super copyWithZone:zone]; result->_clickHandler = [_clickHandler copy]; return result; } - (void)dealloc { [_clickHandler release]; [super dealloc]; } + (BOOL)prefersTrackingUntilMouseUp { return YES; } - (NSUInteger)hitTestForEvent:(NSEvent *)event inRect:(NSRect)cellFrame ofView:(NSView *)controlView { NSUInteger hitTestResult = [super hitTestForEvent:event inRect:cellFrame ofView:controlView]; if ((hitTestResult & NSCellHitContentArea) != 0) { hitTestResult |= NSCellHitTrackableArea; } return hitTestResult; } - (void)_setAttributedStringTextColor:(NSColor *)color { NSMutableAttributedString *attrValue = [[self attributedStringValue] mutableCopy]; NSRange range = NSMakeRange(0, [attrValue length]); [attrValue addAttribute:NSForegroundColorAttributeName value:color range:range]; [self setAttributedStringValue:attrValue]; } - (void)_handleLinkClick { NSAttributedString *attrValue = [self attributedStringValue]; NSString *link = [attrValue attribute:NSLinkAttributeName atIndex:0 effectiveRange:NULL]; if (link!=nil) { if (_clickHandler != nil) _clickHandler(link, self); else [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:link]]; } } - (BOOL)trackMouse:(NSEvent *)theEvent inRect:(NSRect)cellFrame ofView:(NSView *)controlView untilMouseUp:(BOOL)flag { BOOL result = YES; NSUInteger hitTestResult = [self hitTestForEvent:theEvent inRect:cellFrame ofView:controlView]; if ((hitTestResult & NSCellHitContentArea) != 0) { [self _setAttributedStringTextColor:[NSColor redColor]]; result = [super trackMouse:theEvent inRect:cellFrame ofView:controlView untilMouseUp:flag]; theEvent = [NSApp currentEvent]; hitTestResult = [self hitTestForEvent:theEvent inRect:cellFrame ofView:controlView]; if ((hitTestResult & NSCellHitContentArea) != 0) { [self _handleLinkClick]; } } return result; } - (void)setBackgroundStyle:(NSBackgroundStyle)style { [super setBackgroundStyle:style]; if (style == NSBackgroundStyleDark) { [self _setAttributedStringTextColor:[NSColor whiteColor]]; } } - (NSArray *)accessibilityActionNames { return [[super accessibilityActionNames] arrayByAddingObject:NSAccessibilityPressAction]; } - (void)accessibilityPerformAction:(NSString *)action { if ([action isEqualToString:NSAccessibilityPressAction]) { [self _handleLinkClick]; } else { [super accessibilityPerformAction:action]; } } @end libiodbc-3.52.16/mac/iODBCdemo/ExecController.h0000664000175000017500000000701514424170750015757 00000000000000/* * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import @interface ExecController : NSWindowController { IBOutlet NSTextField *fSQLText; IBOutlet NSTextField *fMaxRowsText; NSString *_SQL; int _MaxRows; int _dialogCode; } @property (nonatomic, retain) NSString *fSQL; @property (assign) int MaxRows; - (IBAction)aCancel:(id)sender; - (IBAction)aOK:(id)sender; @end libiodbc-3.52.16/mac/iODBCdemo/Base.lproj/0000775000175000017500000000000014424171426014733 500000000000000libiodbc-3.52.16/mac/iODBCdemo/Base.lproj/MainMenu.xib0000664000175000017500000004022714424170750017074 00000000000000 libiodbc-3.52.16/mac/iODBCdemo/Base.lproj/ExecSQL.xib0000664000175000017500000002237714424170750016635 00000000000000 Enter a SQL statement below: libiodbc-3.52.16/mac/iODBCdemo/en.lproj/0000775000175000017500000000000014424171427014464 500000000000000libiodbc-3.52.16/mac/iODBCdemo/en.lproj/Credits.rtf0000664000175000017500000000050314424170750016512 00000000000000{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf330 {\fonttbl\f0\fnil\fcharset77 LucidaGrande;} {\colortbl;\red255\green255\blue255;} \vieww12000\viewh15840\viewkind0 \deftab720 \pard\tx560\tx3080\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\qc \f0\fs20 \cf0 An ODBC-based \ Interactive SQL Processor\ for macOS} libiodbc-3.52.16/mac/iODBCdemo/en.lproj/iODBCdemo.icns0000664000175000017500000015240014424170750017007 00000000000000icnsics#HA!A#C??ics8VVVVVVVVVVVVV+VVV+VV++VΤ+VUNNNNUNNNNyyNNNNrrVNNxyNNyxyyNxxUNNyx΁΀N+ΝV++Vis320͸͸͐}sg]TNT]gs%͸#!''!z͸WWz}+g]TN!pM'njVWE)s#eB\[^`DiiJ@H E?9'NigsP 1*>Z ͸ +U͸PL0͸͸͐}sg]TNT]gs%͸=RTLOLNz͸9>z}Lg]TNMRpK͚MMjAͿ`ȢCe9ծNհ13,<˗ժ7gs7i=ɇtM;Z8s9͸7=U88͸=PL0͸͸͐}sg]TNT]gs%͸z͸yz}g]TNpݰjؒez˟sxgsZ͸䚒U͸PLs8mkICN#P @=xPicl8VVVVVVVVVVVVVVVVVVV+VVVVVV+VVVVVV+VVVVV+VVVUNNNNNNNTNNNNNN+VVVTNNNNN+NVV*NNNNN+xxNNNNNNNNsx*NNNxxNNNx*NNNyΪrNNxxNNrrxxNǪrrrNΝxNVΝVNxVVΝVVyǪ+VVVV+VVVV+VVVV++VVVVVil32öööö57132.+/$ xof]UNIN\P*ö#~#$%{NSSLMIEw kESLyzwU5?4KBup#W$!':;Pjtvp{ lB;:=t=lNxhL  *?=FPhdC  /74dR ö'`CW;xof]UNI:U]foo`YYVöVRöROöOLöLKIJKööööW[UZWMMJS xof]UNIN?BTPöPQM~IMOO{99:9wFӳEJ˯Gw?Ү>ǿF>Bp7Ѥ@ABDEFHJKLNOPQSTVWXY[\]3 ijklmnopqrO@a Y K.  #%(*,.0346m;;6=@ABDEFHJKLNOPQSTVWXY[\3 jklmnopqrO-PX7K-  #%(*,.034678623=@ABDEFHJKLNOPQSTVWXY[2 klmnopqrO"1a%K,  #%(*,.034:C>3239@ABDEFHJKLNOPQSTVWXY1!lmnopqrOTȀс%K+  #%(*,.06GTVJ;236@ABDEFHJKLNOPQSTVWX1!mnopqrO)tт%ǻ>*  #%(*,1BPRTVU@234@ABDEFHJKLNOPQSTVW0!nopqrO)}\%ǻ%)  #%(1?KMPRTVXA234@ABDEFHJKLNOPQSTV0"opqrO)}O%ǻ%(  #/=FHKMPRTVXA234@ABDEFHJKLNOPQST/"pqrO)}O%ǻ%' +;BDFHKMPRTVXA234@ABDEFHJKLNOPQS."qrO)}P%ǻ%& *6<>BDFHKMPRTVXA234@ABDEFHJKLNOPQ-"rO)}PKǻ%% &058<>BDFHKMPRTVXA234@ABDEFHJKLNOP,#O)}PKǻ%%',058<>BDFHKMPRTVXA234@ABDEFHJKLNO,)}QKǻ%& #""',058<>BDFHKMPRTVXA234@ABDEFHJKLN+)}QKǢ (#%## ,058<>BDFHKMPRTVXA234@ABDEFHJKL*)})KǢ * '&%%#058<>BDFHKMPRTVXA234@ABDEFHJK*)})KǢ *)('&%%58<>BDFHKMPRTVXA234@ABDEFHJ))})KǢ .,,**)('&%?!8<>BDFHKMPRTVUA234@ABDEFH(Xڀ*WǢ 0!/.-,,**)('&^i#<>BDFHKMPRTVL<235@ABDEF'9t*|Ǣ 2 )210/.-,,**)('h}k%>BDFHKMPRTO@5237@ABDE&4023=@ABD&%DXdlj  GXG(34689;<>70023=@AB%%T |+938765443210/.-,,**p}r 7FHKMPROE=1237@A$P %/:928765443210/.-,,*}t 9HKMPRTVG9235@$%k 0:918765443210/.-,,}w ;KMPRTVS?234#)} ފ/:908765443210/.-,}x =MPRTVXA23 )}݉/::9/8765443210/.-}{ ?PRTVXA2 )}܈/:9.8765443210/.;}} @RTVXA)}ڇ/908765443210, =} CTVX))}ه/90876544321- >} DV7)}؅.9087654432. ?} +)}>օ.998765443/ _} )}BՅ.9876544) l} G)}BՄ.87654*n}X)}BԄ-765+q}X)}BӃ-6+ ~}X!XB҂" }LDт) }]-Hk-\ r~|{ywvtrqonlklmnoqrsuvxyz|}~wX9)9$.95!sp~sp~spppps^YdrppppqbԀ<\rppտĀռpp[ȀԀ^hsppDzηppvuԀ^[~sppdzδppv~Ԁ^Y~sppdzαppv~Ԁ0Y~p*ȴαppv~Ԁ-Yp)ȵαppv~Ԁ-Yp(ɶαppv~Ԁ-Yp'ɶαppv~Ԁ-Yp&ʷαppv~Ԁ-Yp%ʸαppv~Ԁ-Yp$˸αppv~Ԁ-Yp#˹αppv~Ԁ-xYp"˹αppv~Ԁ-vptYp!̺αpp}YۀԀwptep!ûαppjuԀ-xppppu_vp"غαppjY~}}||{zyx-wwvuttsrqpponmlkkjihgfflppppngghhijjklmmi[sp#عαppv`YZlpppplZYgzp$׹αppsbԀ-vppppvy[}p%׸αpp[Ԁ-vppܦppwugp&׸αppvlԀ-wppܥppw[p'׷αppv~Ԁ-xppܥppxYp(ֶαppv~Ԁ-xppܤppxYp)ֶαppv~Ԁ0yppףppyY~p*ֵαppv~Ԁ^vpp͞ppyY~sppմαppv~Ԁspp͝ * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import int main(int argc, char *argv[]) { return NSApplicationMain(argc, (const char **) argv); } libiodbc-3.52.16/mac/iODBCdemo/DSNchooserController.m0000664000175000017500000003452514424170750017115 00000000000000/* * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import "DSNchooserController.h" #import "Helpers.h" #include #include #include #include #include #include #include @interface DSNchooserController () @end @implementation DSNchooserController @synthesize popup_dir_btn = _popup_dir_btn; @synthesize fdsn_tableView = _fdsn_tableView; @synthesize tab_view = _tab_view; @synthesize FileDSN_ArrController = _FileDSN_ArrController; @synthesize SysDSN_ArrController = _SysDSN_ArrController; @synthesize UserDSN_ArrController = _UserDSN_ArrController; @synthesize UserDSN_list=_UserDSN_list; @synthesize SysDSN_list=_SysDSN_list; @synthesize FileDSN_list=_FileDSN_list; @synthesize cur_dir=_cur_dir; @synthesize type_dsn = _type_dsn; @synthesize selected_dsn = _selected_dsn; @synthesize uid = _uid; @synthesize pwd = _pwd; - (id)init { SQLTCHAR tmp[1024] = {""}; self = [super initWithWindowNibName:@"DSNchooserController"]; if (self) { _UserDSN_list = [[NSMutableArray alloc] initWithCapacity:16]; _SysDSN_list = [[NSMutableArray alloc] initWithCapacity:16]; _FileDSN_list = [[NSMutableArray alloc] initWithCapacity:16]; SQLSetConfigMode (ODBC_BOTH_DSN); if (!SQLGetPrivateProfileString(TEXT("ODBC"), TEXT("FileDSNPath"), TEXT(""), tmp, sizeof(tmp)/sizeof(SQLTCHAR), TEXT("odbcinst.ini"))) _cur_dir = [NSString stringWithUTF8String:DEFAULT_FILEDSNPATH]; else _cur_dir = (NSString*)TEXTtoNS(tmp); } return self; } - (void)dealloc { [_UserDSN_list release]; [_SysDSN_list release]; [_FileDSN_list release]; [_type_dsn release]; [_selected_dsn release]; [super dealloc]; } - (id)initWithWindow:(NSWindow *)window { self = [super initWithWindow:window]; if (self) { // Initialization code here. } return self; } - (void)windowDidLoad { [super windowDidLoad]; _dialogCode = 0; [[self window] center]; // Center the window. addDSNs_to_list(FALSE, _UserDSN_ArrController); addDSNs_to_list(TRUE, _SysDSN_ArrController); [_fdsn_tableView setDoubleAction:@selector(call_FDSN_DoubleClick)]; self.type_dsn = @"userdsn"; } - (void)windowWillClose:(NSNotification*)notification { [NSApp stopModalWithCode:_dialogCode]; } - (void) call_FDSN_DoubleClick { NSInteger row = _fdsn_tableView.clickedRow; NSDictionary *dict = [_FileDSN_list objectAtIndex:row]; NSNumber *isdir = [dict valueForKey:@"isdir"]; if (isdir.boolValue==TRUE){ NSString *cliked_dir = [dict valueForKey:@"name"]; NSString *new_path = [NSString stringWithFormat:@"%@/%@", _cur_dir, cliked_dir]; self.cur_dir = new_path; const char *path = [_cur_dir UTF8String]; addFDSNs_to_list(path, FALSE, _FileDSN_ArrController); fill_dir_menu(path, _popup_dir_btn); } } /** NSTabViewDelegate **/ - (void)tabView:(NSTabView *)tabView didSelectTabViewItem:(NSTabViewItem *)tabViewItem { NSString *identifier = [tabViewItem identifier]; self.type_dsn = identifier; if ([identifier isEqualToString:@"userdsn"]){ addDSNs_to_list(FALSE, _UserDSN_ArrController); } else if ([identifier isEqualToString:@"sysdsn"]){ addDSNs_to_list(TRUE, _SysDSN_ArrController); } else if ([identifier isEqualToString:@"filedsn"]){ const char *cur_path = [_cur_dir UTF8String]; addFDSNs_to_list(cur_path, FALSE, _FileDSN_ArrController); fill_dir_menu(cur_path, _popup_dir_btn); } } /** NSTableViewDelegate **/ - (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row { // Group our "model" object, which is a dictionary if (tableView == _fdsn_tableView) { NSDictionary *dict = [_FileDSN_list objectAtIndex:row]; NSString *identifier = [tableColumn identifier]; NSTableCellView *cellView = [tableView makeViewWithIdentifier:identifier owner:self]; // Then setup properties on the cellView based on the column cellView.textField.stringValue = [dict objectForKey:@"name"]; cellView.imageView.objectValue = [dict objectForKey:@"icon"]; return cellView; } return nil; } - (IBAction)call_Ok:(id)sender { _dialogCode = 1; if ([_type_dsn isEqualToString:@"userdsn"]) { NSArray *item = [_UserDSN_ArrController selectedObjects]; if (item!=nil && item.count>0){ NSDictionary *dict = [item objectAtIndex:0]; self.selected_dsn = [dict valueForKey:@"name"]; } } else if ([_type_dsn isEqualToString:@"sysdsn"]) { NSArray *item = [_SysDSN_ArrController selectedObjects]; if (item!=nil && item.count>0){ NSDictionary *dict = [item objectAtIndex:0]; self.selected_dsn = [dict valueForKey:@"name"]; } } else if ([_type_dsn isEqualToString:@"filedsn"]) { NSArray *item = [_FileDSN_ArrController selectedObjects]; if (item!=nil && item.count>0){ NSDictionary *dict = [item objectAtIndex:0]; self.selected_dsn = [NSString stringWithFormat:@"%@/%@", _cur_dir, [dict valueForKey:@"name"]]; } } [self.window close]; } - (IBAction)call_Cancel:(id)sender { _dialogCode = 0; [self.window close]; } - (IBAction)call_Dir_PopupBtn:(id)sender { self.cur_dir = _popup_dir_btn.titleOfSelectedItem; const char *path = [_cur_dir UTF8String]; addFDSNs_to_list(path, FALSE, _FileDSN_ArrController); fill_dir_menu(path, _popup_dir_btn); } void addDSNs_to_list(BOOL systemDSN, NSArrayController* list) { SQLTCHAR dsnname[1024], dsndesc[1024]; SQLSMALLINT len; SQLRETURN ret; HENV henv; [list removeObjects:[list arrangedObjects]]; /* Create a HENV to get the list of data sources then */ ret = SQLAllocHandle (SQL_HANDLE_ENV, SQL_NULL_HANDLE, &henv); if (ret != SQL_SUCCESS && ret != SQL_SUCCESS_WITH_INFO) { _nativeerrorbox (henv, SQL_NULL_HANDLE, SQL_NULL_HANDLE); goto end; } /* Set the version ODBC API to use */ SQLSetEnvAttr (henv, SQL_ATTR_ODBC_VERSION, (SQLPOINTER) SQL_OV_ODBC3, SQL_IS_UINTEGER); # ifdef UNICODE SQLSetEnvAttr (henv, SQL_ATTR_APP_UNICODE_TYPE, (SQLPOINTER) SQL_DM_CP_DEF, SQL_IS_UINTEGER); #endif /* Get the list of datasources */ ret = SQLDataSourcesW (henv, systemDSN ? SQL_FETCH_FIRST_SYSTEM : SQL_FETCH_FIRST_USER, dsnname, sizeof (dsnname)/sizeof(SQLTCHAR), &len, dsndesc, sizeof (dsndesc)/sizeof(SQLTCHAR), NULL); if (ret != SQL_SUCCESS && ret != SQL_SUCCESS_WITH_INFO && ret != SQL_NO_DATA) { _nativeerrorbox (henv, SQL_NULL_HANDLE, SQL_NULL_HANDLE); goto error; } while (ret != SQL_NO_DATA) { NSString *name = TEXTtoNS(dsnname); if (dsndesc[0] == 0) { SQLSetConfigMode (ODBC_BOTH_DSN); SQLGetPrivateProfileString(TEXT("Default"), TEXT("Driver"), TEXT(""), dsndesc, sizeof (dsndesc)/sizeof(wchar_t), TEXT("odbc.ini")); } NSString *drv = dsndesc[0]!=0? TEXTtoNS(dsndesc): @"-"; /* Get the description */ SQLSetConfigMode (systemDSN ? ODBC_SYSTEM_DSN : ODBC_USER_DSN); SQLGetPrivateProfileString (dsnname, TEXT("Description"), TEXT(""), dsndesc, sizeof (dsndesc)/sizeof(SQLTCHAR), TEXT("odbc.ini")); NSString *desc = dsndesc[0]!=0? TEXTtoNS(dsndesc): @"-"; [list addObject:[NSMutableDictionary dictionaryWithObjectsAndKeys:name, @"name", desc, @"desc", drv, @"drv", nil]]; /* Process next one */ ret = SQLDataSources (henv, SQL_FETCH_NEXT, dsnname, sizeof (dsnname)/sizeof(SQLTCHAR), &len, dsndesc, sizeof (dsndesc)/sizeof(SQLTCHAR), NULL); if (ret != SQL_SUCCESS && ret != SQL_SUCCESS_WITH_INFO && ret != SQL_NO_DATA) { _nativeerrorbox (henv, SQL_NULL_HANDLE, SQL_NULL_HANDLE); goto error; } } error: /* Clean all that */ SQLFreeHandle (SQL_HANDLE_ENV, henv); end: return; } #define MAX_ROWS 1024 void addFDSNs_to_list(const char* path, BOOL b_reset, NSArrayController* list) { int nrows; DIR *dir; char *path_buf; struct dirent *dir_entry; struct stat fstat; [list removeObjects:[list arrangedObjects]]; nrows = 0; if ((dir = opendir (path))) { while ((dir_entry = readdir (dir)) && nrows < MAX_ROWS) { asprintf (&path_buf, "%s/%s", path, dir_entry->d_name); if (stat ((const char*) path_buf, &fstat) >= 0 && S_ISDIR (fstat.st_mode)) { if (dir_entry->d_name && dir_entry->d_name[0] != '.') { NSString *name = [NSString stringWithUTF8String:dir_entry->d_name]; NSImage *icon = [NSImage imageNamed:NSImageNameFolder]; [list addObject:[NSMutableDictionary dictionaryWithObjectsAndKeys:name, @"name", icon, @"icon", [NSNumber numberWithBool:TRUE], @"isdir", nil]]; nrows++; } } else if (stat ((const char*) path_buf, &fstat) >= 0 && !S_ISDIR (fstat.st_mode) && strstr (dir_entry->d_name, ".dsn")) { NSString *name = [NSString stringWithUTF8String:dir_entry->d_name]; NSImage *icon = [[NSWorkspace sharedWorkspace] iconForFileType:NSFileTypeForHFSTypeCode(kGenericDocumentIcon)]; [list addObject:[NSMutableDictionary dictionaryWithObjectsAndKeys:name, @"name", icon, @"icon", [NSNumber numberWithBool:FALSE], @"isdir", nil]]; nrows++; } if (path_buf) free (path_buf); } /* Close the directory entry */ closedir (dir); } else create_error ("Error during accessing directory information", strerror (errno)); //?? if (b_reset) //?? SetDataBrowserScrollPosition(widget, 0, 0); } void fill_dir_menu(const char* path, NSPopUpButton* list) { char *curr_dir, *prov, *dir; if (!path || !(prov = strdup (path))) return; if (prov[strlen(prov) - 1] == '/' && strlen(prov) > 1) prov[strlen(prov) - 1] = 0; [list removeAllItems]; /* Add the root directory */ [list addItemWithTitle:@"/"]; if (strlen(prov) > 1) for (curr_dir = prov, dir = NULL; curr_dir; curr_dir = strchr (curr_dir + 1, '/')) { if (strchr (curr_dir + 1, '/')) { dir = strchr (curr_dir + 1, '/'); *dir = 0; } [list addItemWithTitle:[NSString stringWithUTF8String:prov]]; if (dir) *dir = '/'; } free(prov); [list selectItemAtIndex:list.numberOfItems-1]; } @end libiodbc-3.52.16/mac/iODBCdemo/TestController.m0000664000175000017500000004404114424170750016017 00000000000000/* * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import "TestController.h" #import "Helpers.h" #import "ExecController.h" #import "NSAttributedStringAdditions.h" #import "LinkTextFieldCell.h" #define MIN_WIDTH 5 #define MAX_WIDTH 80 #define OpenTag 56000 #define CloseTag 56001 #define ExecSQLTag 56002 #define NextRowsetTag 56003 @implementation TestController @synthesize fQuery = _fQuery; - (id)init { [super init]; hstmt = nil; hdbc = nil; henv = nil; mConnected = NO; mExistsResultset = NO; mNextResultset = NO; mBuffer = [NSMutableArray new]; mRows = 0; self.fQuery = @"select * from orders"; //self.fQuery = @"sparql select * {?s ?p ?o} limit 10"; mMaxRows = 1000; return self; } - (void)dealloc { [self disconnect]; [mBuffer release]; [super dealloc]; } - (void)awakeFromNib { [RSTable setDataSource:self]; [RSTable setDelegate:self]; [self clearGrid]; #ifdef UNICODE [mWindow setTitle:[NSString stringWithFormat:@"iODBC Demo (Unicode) - Disconnected"]]; #else [mWindow setTitle:[NSString stringWithFormat:@"iODBC Demo (Ansi) - Disconnected"]]; #endif } - (void)disconnect { if (hstmt != nil) { #if (ODBCVER < 0x0300) SQLFreeStmt (hstmt, SQL_DROP); #else SQLCloseCursor (hstmt); SQLFreeHandle (SQL_HANDLE_STMT, hstmt); #endif hstmt = nil; } if (hdbc != nil) { if (mConnected) SQLDisconnect (hdbc); #ifdef UNICODE [mWindow setTitle:[NSString stringWithFormat:@"iODBC Demo (Unicode) - Disconnected"]]; #else [mWindow setTitle:[NSString stringWithFormat:@"iODBC Demo (Ansi) - Disconnected"]]; #endif [self clearGrid]; mConnected = NO; #if (ODBCVER < 0x300) SQLFreeConnect (hdbc); #else SQLFreeHandle (SQL_HANDLE_DBC, hdbc); #endif hdbc = nil; } if (henv != nil) { #if (ODBCVER < 0x300) SQLFreeEnv (henv); #else SQLFreeHandle (SQL_HANDLE_ENV, henv); #endif henv = nil; } } - (void)clearGrid { NSArray *arr; unsigned i, count; NSTableColumn *aColumn; arr = [RSTable tableColumns]; count = [arr count]; for(i = 0; i < count; i++) { aColumn = [arr objectAtIndex:0]; [RSTable removeTableColumn:aColumn]; } } - (void)execSQL:(SQLTCHAR *)szSQL { SQLRETURN sts; [self clearGrid]; mSPARQL_executed = false; if (mExistsResultset == YES) { #if (ODBCVER < 0x0300) SQLFreeStmt (hstmt, SQL_CLOSE); #else SQLCloseCursor (hstmt); #endif } mExistsResultset = NO; mNextResultset = NO; NSString *query = TEXTtoNS(szSQL); mSPARQL_executed = [[query.uppercaseString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] hasPrefix:@"SPARQL"]; if (!TEXTCMP(szSQL, TEXT("tables"))) { if (SQLTables (hstmt, NULL, 0, NULL, 0, NULL, 0, NULL, 0) != SQL_SUCCESS) goto error; } else if (!TEXTCMP(szSQL, TEXT("qualifiers"))) { if (SQLTables (hstmt, TEXT("%"), SQL_NTS, TEXT(""), 0, TEXT(""), 0, TEXT(""), 0) != SQL_SUCCESS) goto error; } else if (!TEXTCMP(szSQL, TEXT("owners"))) { if (SQLTables (hstmt, TEXT(""), SQL_NTS, TEXT("%"), 0, TEXT(""), 0, TEXT(""), 0) != SQL_SUCCESS) goto error; } else if (!TEXTCMP(szSQL, TEXT("types"))) { if (SQLTables (hstmt, TEXT(""), SQL_NTS, TEXT(""), 0, TEXT(""), 0, TEXT("%"), 0) != SQL_SUCCESS) goto error; } else if (!TEXTCMP(szSQL, TEXT("datatypes"))) { if (SQLGetTypeInfo (hstmt, 0) != SQL_SUCCESS) goto error; } else { if (SQLPrepare (hstmt, szSQL, SQL_NTS) != SQL_SUCCESS) goto error; if ((sts = SQLExecute (hstmt)) != SQL_SUCCESS) { _nativeerrorbox (henv, hdbc, hstmt); if (sts != SQL_SUCCESS_WITH_INFO) return; } } [self loadResult]; return; error: _nativeerrorbox (henv, hdbc, hstmt); return; } - (void)loadResult { SQLTCHAR fetchBuffer[1024]; size_t displayWidth; short numCols; unsigned colNum; SQLTCHAR colName[256]; SQLSMALLINT colType; SQLULEN colPrecision; SQLLEN colIndicator; SQLSMALLINT colScale; SQLSMALLINT colNullable; unsigned long totalRows; NSTableColumn *aColumn; NSMutableArray *row; NSFont *fnt = nil; //RSTable.font; if (!fnt) fnt = [NSFont systemFontOfSize:11.0]; [self clearGrid]; if (SQLNumResultCols (hstmt, &numCols) != SQL_SUCCESS) { _nativeerrorbox (henv, hdbc, hstmt); goto endCursor; } if (numCols == 0) { SQLLEN nrows = 0; SQLRowCount (hstmt, &nrows); NSRunAlertPanel(@"This operation completed successfully without returning data:", [NSString stringWithFormat:@"%ld rows affected", (long)nrows], NULL, NULL, NULL); goto endCursor; } mExistsResultset = YES; /* * Get the names for the columns */ for (colNum = 1; colNum <= numCols; colNum++) { /* * Get the name and other type information */ if (SQLDescribeCol (hstmt, colNum, (SQLTCHAR *) colName, sizeof(colName), NULL, &colType, &colPrecision, &colScale, &colNullable) != SQL_SUCCESS) { _nativeerrorbox (henv, hdbc, hstmt); goto endCursor; } /* * Calculate the display width for the column */ switch (colType) { case SQL_VARCHAR: case SQL_CHAR: case SQL_WVARCHAR: case SQL_WCHAR: case SQL_GUID: displayWidth = colPrecision; break; case SQL_BINARY: displayWidth = colPrecision * 2; break; case SQL_LONGVARCHAR: case SQL_WLONGVARCHAR: case SQL_LONGVARBINARY: displayWidth = 256; /* show only first 256 */ break; case SQL_BIT: displayWidth = 1; break; case SQL_TINYINT: case SQL_SMALLINT: case SQL_INTEGER: case SQL_BIGINT: displayWidth = colPrecision + 1; /* sign */ break; case SQL_DOUBLE: case SQL_DECIMAL: case SQL_NUMERIC: case SQL_FLOAT: case SQL_REAL: displayWidth = colPrecision + 2; /* sign, comma */ break; #ifdef SQL_TYPE_DATE case SQL_TYPE_DATE: #endif case SQL_DATE: displayWidth = 10; break; #ifdef SQL_TYPE_TIME case SQL_TYPE_TIME: #endif case SQL_TIME: displayWidth = 8; break; #ifdef SQL_TYPE_TIMESTAMP case SQL_TYPE_TIMESTAMP: #endif case SQL_TIMESTAMP: displayWidth = 19; if (colScale > 0) displayWidth = displayWidth + colScale + 1; break; default: displayWidth = 0; /* skip other data types */ continue; } if (displayWidth < TEXTLEN(colName)) displayWidth = TEXTLEN(colName); if (displayWidth > sizeof(fetchBuffer) - 1) displayWidth = sizeof(fetchBuffer) - 1; if (displayWidth > MAX_WIDTH) displayWidth = MAX_WIDTH; if (mSPARQL_executed && displayWidth <= 10) displayWidth = MAX_WIDTH; /* Add new column */ aColumn = [NSTableColumn new]; NSCell *cell = [[[LinkTextFieldCell alloc] init] autorelease]; [aColumn setDataCell:cell]; /* Calculate size of font */ /** float fontWidth = [fnt boundingRectForFont].size.width; if (fontWidth == 0.0) fontWidth = [fnt maximumAdvancement].width; if (fontWidth == 0.0) fontWidth = 10.0; // Default **/ float fontWidth = 10.0; /* Make sure we always have room for column label */ int colNameLen = TEXTLEN(colName); colNameLen = colNameLencolNameLen?displayWidth:colNameLen); [aColumn setMaxWidth:strWidth]; /* Fill in column information */ [aColumn setIdentifier:[NSString stringWithFormat:@"%d", colNum-1]]; [aColumn setEditable:NO]; [aColumn setResizingMask:NSTableColumnAutoresizingMask|NSTableColumnUserResizingMask]; [[aColumn headerCell] setStringValue:TEXTtoNS(colName)]; /* Add to table */ [RSTable addTableColumn:aColumn]; } [mBuffer removeAllObjects]; /* * Print all the fields */ totalRows = 0; while (totalRows < mMaxRows) { int sts = SQLFetch (hstmt); if (sts == SQL_NO_DATA_FOUND) break; if (sts != SQL_SUCCESS) { _nativeerrorbox (henv, hdbc, hstmt); break; } row = [NSMutableArray arrayWithCapacity:numCols]; for (colNum = 1; colNum <= numCols; colNum++) { /* * Fetch this column as character */ sts = SQLGetData (hstmt, colNum, SQL_C_TCHAR, fetchBuffer, sizeof(fetchBuffer), &colIndicator); if (sts != SQL_SUCCESS_WITH_INFO && sts != SQL_SUCCESS) { _nativeerrorbox (henv, hdbc, hstmt); goto endCursor; } /* * Show NULL fields as **** */ if (colIndicator == SQL_NULL_DATA) TEXTCPY(fetchBuffer, TEXT("")); NSString *val = TEXTtoNS (fetchBuffer); if (val!=nil && ([val hasPrefix:@"http://"] || [val hasPrefix:@"https://"])) [row addObject:[NSAttributedString attributedStringWithBlueLink:val]]; else [row addObject:val?val:@"??"]; } [mBuffer addObject:row]; totalRows++; } mRows = totalRows; [RSTable reloadData]; if (mSPARQL_executed) [RSTable sizeToFit]; return; endCursor: #if (ODBCVER < 0x0300) SQLFreeStmt (hstmt, SQL_CLOSE); #else SQLCloseCursor (hstmt); #endif return; error: _nativeerrorbox (henv, hdbc, hstmt); return; } - (IBAction)aCloseConnection:(id)sender { [self disconnect]; } - (IBAction)aExecSQL:(id)sender { ExecController *dlg = [[ExecController alloc] init]; dlg.fSQL = _fQuery; dlg.MaxRows = mMaxRows; NSInteger rc = [NSApp runModalForWindow:dlg.window]; self.fQuery = dlg.fSQL; mMaxRows = dlg.MaxRows; [dlg.window orderOut:mWindow]; [dlg release]; if (rc) [self execSQL:NStoTEXT(self.fQuery)]; } - (IBAction)aFetchNextRowset:(id)sender { if (mExistsResultset) { if (SQLMoreResults (hstmt) == SQL_SUCCESS) { [self loadResult]; } } } - (IBAction)aOpenConnection:(id)sender { SQLTCHAR szDSN[1024]; SQLTCHAR dataSource[1024]; SQLSMALLINT dsLen; SQLRETURN status; #if (ODBCVER < 0x300) if (SQLAllocEnv (&henv) != SQL_SUCCESS) #else if (SQLAllocHandle (SQL_HANDLE_ENV, NULL, &henv) != SQL_SUCCESS) #endif { _nativeerrorbox (henv, SQL_NULL_HDBC, SQL_NULL_HSTMT); return; } # ifdef UNICODE SQLSetEnvAttr (henv, SQL_ATTR_APP_UNICODE_TYPE, (SQLPOINTER) SQL_DM_CP_DEF, SQL_IS_UINTEGER); #endif #if (ODBCVER < 0x300) if (SQLAllocConnect (henv, &hdbc) != SQL_SUCCESS) #else SQLSetEnvAttr (henv, SQL_ATTR_ODBC_VERSION, (SQLPOINTER) SQL_OV_ODBC3, SQL_IS_UINTEGER); if (SQLAllocHandle (SQL_HANDLE_DBC, henv, &hdbc) != SQL_SUCCESS) #endif { _nativeerrorbox (henv, hdbc, SQL_NULL_HSTMT); [self disconnect]; return; } status = SQLDriverConnect (hdbc, (-1L), TEXT(""), SQL_NTS, dataSource, sizeof (dataSource), &dsLen, SQL_DRIVER_COMPLETE); if (status != SQL_SUCCESS) { _nativeerrorbox (henv, hdbc, SQL_NULL_HSTMT); if (status != SQL_SUCCESS_WITH_INFO) { [self disconnect]; return; } } mConnected = YES; SQLGetInfo (hdbc, SQL_DATA_SOURCE_NAME, szDSN, sizeof (szDSN), NULL); #ifdef UNICODE [mWindow setTitle:[NSString stringWithFormat:@"iODBC Demo (Unicode) - Connected to [%@]", TEXTtoNS(szDSN)]]; #else [mWindow setTitle:[NSString stringWithFormat:@"iODBC Demo (Ansi) - Connected to [%@]", TEXTtoNS(szDSN)]]; #endif #if (ODBCVER < 0x0300) if (SQLAllocStmt (hdbc, &hstmt) != SQL_SUCCESS) #else if (SQLAllocHandle (SQL_HANDLE_STMT, hdbc, &hstmt) != SQL_SUCCESS) #endif { _nativeerrorbox (henv, hdbc, hstmt); [self disconnect]; return; } [RSTable reloadData]; } // Show/hide menu items - (BOOL)validateMenuItem:(NSMenuItem *)item { int tag = [item tag]; if (tag == OpenTag) { return (hdbc == nil ? YES : NO); } else if (tag == CloseTag) { return (hdbc == nil ? NO : YES); } else if (tag == ExecSQLTag) { return (hstmt != nil ? YES : NO); } else if (tag == NextRowsetTag) { return mNextResultset; } else return YES; } - (id)tableView:(NSTableView *)aTable objectValueForTableColumn:(NSTableColumn *)aColumn row:(int)rowIndex { NSMutableArray *row; unsigned id; if (rowIndex < 0) return nil; id = [[aColumn identifier] intValue]; row = [mBuffer objectAtIndex:rowIndex]; return [row objectAtIndex:id]; } - (int)numberOfRowsInTableView:(NSTableView *)aTable { return mRows; } /** - (void)tableView:(NSTableView *)tableView willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row { if ([cell isKindOfClass:[LinkTextFieldCell class]]) { LinkTextFieldCell *linkCell = (LinkTextFieldCell *)cell; // Setup the work to be done when a link is clicked linkCell.clickHandler = ^(NSString *url, id sender) { }; } } **/ @end libiodbc-3.52.16/mac/iODBCdemo/DemoAnsi/0000775000175000017500000000000014424171427014434 500000000000000libiodbc-3.52.16/mac/iODBCdemo/DemoAnsi/InfoAnsi.plist0000664000175000017500000000170714424170750017142 00000000000000 CFBundleDevelopmentRegion English CFBundleExecutable iODBC Demo Ansi CFBundleGetInfoString iODBC Demo version 1.4, Copyright 2006-2023, OpenLink Software CFBundleIconFile iODBCdemo.icns CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName iODBC Demo Ansi CFBundlePackageType APPL CFBundleSignature odbc CFBundleVersion 1.4 NSMainNibFile MainMenu NSPrincipalClass NSApplication libiodbc-3.52.16/mac/iODBCdemo/DemoAnsi/DemoAnsi.xcodeproj/0000775000175000017500000000000014424171426020126 500000000000000libiodbc-3.52.16/mac/iODBCdemo/DemoAnsi/DemoAnsi.xcodeproj/project.pbxproj0000664000175000017500000004612514424170750023131 00000000000000// !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 48; objects = { /* Begin PBXBuildFile section */ 8501705B1CCD0653008AC148 /* ExecController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8501704E1CCD0653008AC148 /* ExecController.m */; }; 8501705C1CCD0653008AC148 /* Helpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 850170501CCD0653008AC148 /* Helpers.m */; }; 8501705D1CCD0653008AC148 /* LinkTextFieldCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 850170531CCD0653008AC148 /* LinkTextFieldCell.m */; }; 8501705E1CCD0653008AC148 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 850170541CCD0653008AC148 /* main.m */; }; 8501705F1CCD0653008AC148 /* NSAttributedStringAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 850170561CCD0653008AC148 /* NSAttributedStringAdditions.m */; }; 850170601CCD0653008AC148 /* NSResWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 850170581CCD0653008AC148 /* NSResWindow.m */; }; 850170611CCD0653008AC148 /* TestController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8501705A1CCD0653008AC148 /* TestController.m */; }; 8594AF2A1CCE4D2500EE7ABC /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 8594AF221CCE4D2500EE7ABC /* Credits.rtf */; }; 8594AF2B1CCE4D2500EE7ABC /* ExecSQL.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8594AF241CCE4D2500EE7ABC /* ExecSQL.xib */; }; 8594AF2C1CCE4D2500EE7ABC /* iODBCdemo.icns in Resources */ = {isa = PBXBuildFile; fileRef = 8594AF261CCE4D2500EE7ABC /* iODBCdemo.icns */; }; 8594AF2D1CCE4D2500EE7ABC /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8594AF281CCE4D2500EE7ABC /* MainMenu.xib */; }; CD7C37AA0A063F40001A43B7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; CD7C37B10A063F40001A43B7 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; CD7C37B20A063F40001A43B7 /* iODBC.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 85F0784509F88DFC0007FC8F /* iODBC.framework */; }; CD7C37B30A063F40001A43B7 /* iODBCinst.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD7C36440A0109AA001A43B7 /* iODBCinst.framework */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; 8501704D1CCD0653008AC148 /* ExecController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ExecController.h; path = ../ExecController.h; sourceTree = ""; }; 8501704E1CCD0653008AC148 /* ExecController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ExecController.m; path = ../ExecController.m; sourceTree = ""; }; 8501704F1CCD0653008AC148 /* Helpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Helpers.h; path = ../Helpers.h; sourceTree = ""; }; 850170501CCD0653008AC148 /* Helpers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Helpers.m; path = ../Helpers.m; sourceTree = ""; }; 850170511CCD0653008AC148 /* iodbcdemo_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = iodbcdemo_Prefix.pch; path = ../iodbcdemo_Prefix.pch; sourceTree = ""; }; 850170521CCD0653008AC148 /* LinkTextFieldCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LinkTextFieldCell.h; path = ../LinkTextFieldCell.h; sourceTree = ""; }; 850170531CCD0653008AC148 /* LinkTextFieldCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = LinkTextFieldCell.m; path = ../LinkTextFieldCell.m; sourceTree = ""; }; 850170541CCD0653008AC148 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = ../main.m; sourceTree = ""; }; 850170551CCD0653008AC148 /* NSAttributedStringAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NSAttributedStringAdditions.h; path = ../NSAttributedStringAdditions.h; sourceTree = ""; }; 850170561CCD0653008AC148 /* NSAttributedStringAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NSAttributedStringAdditions.m; path = ../NSAttributedStringAdditions.m; sourceTree = ""; }; 850170571CCD0653008AC148 /* NSResWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NSResWindow.h; path = ../NSResWindow.h; sourceTree = ""; }; 850170581CCD0653008AC148 /* NSResWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NSResWindow.m; path = ../NSResWindow.m; sourceTree = ""; }; 850170591CCD0653008AC148 /* TestController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestController.h; path = ../TestController.h; sourceTree = ""; }; 8501705A1CCD0653008AC148 /* TestController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TestController.m; path = ../TestController.m; sourceTree = ""; }; 8518E2151CCD025900967942 /* InfoAnsi.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = InfoAnsi.plist; sourceTree = ""; }; 85F0784509F88DFC0007FC8F /* iODBC.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = iODBC.framework; path = /Library/Frameworks/iODBC.framework; sourceTree = ""; }; CD7C36440A0109AA001A43B7 /* iODBCinst.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = iODBCinst.framework; path = /Library/Frameworks/iODBCinst.framework; sourceTree = ""; }; CD7C37B70A063F40001A43B7 /* iODBC Demo Ansi.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "iODBC Demo Ansi.app"; sourceTree = BUILT_PRODUCTS_DIR; }; CDCBD5F3263707F900F31A21 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = ../Base.lproj/ExecSQL.xib; sourceTree = ""; }; CDCBD5F4263707FA00F31A21 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = ../Base.lproj/MainMenu.xib; sourceTree = ""; }; CDCBD5F5263707FF00F31A21 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = ../en.lproj/Credits.rtf; sourceTree = ""; }; CDCBD5F6263707FF00F31A21 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; CDCBD5F7263707FF00F31A21 /* en */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = en; path = ../en.lproj/iODBCdemo.icns; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ CD7C37B00A063F40001A43B7 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( CD7C37B10A063F40001A43B7 /* Cocoa.framework in Frameworks */, CD7C37B20A063F40001A43B7 /* iODBC.framework in Frameworks */, CD7C37B30A063F40001A43B7 /* iODBCinst.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { isa = PBXGroup; children = ( CD7C36440A0109AA001A43B7 /* iODBCinst.framework */, 85F0784509F88DFC0007FC8F /* iODBC.framework */, 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, ); name = "Linked Frameworks"; sourceTree = ""; }; 19C28FACFE9D520D11CA2CBB /* Products */ = { isa = PBXGroup; children = ( CD7C37B70A063F40001A43B7 /* iODBC Demo Ansi.app */, ); name = Products; sourceTree = ""; }; 29B97314FDCFA39411CA2CEA /* iODBC Demo Unicode */ = { isa = PBXGroup; children = ( 29B97315FDCFA39411CA2CEA /* Other Sources */, 29B97317FDCFA39411CA2CEA /* Resources */, 29B97323FDCFA39411CA2CEA /* Frameworks */, 19C28FACFE9D520D11CA2CBB /* Products */, ); name = "iODBC Demo Unicode"; sourceTree = ""; }; 29B97315FDCFA39411CA2CEA /* Other Sources */ = { isa = PBXGroup; children = ( 8501704D1CCD0653008AC148 /* ExecController.h */, 8501704E1CCD0653008AC148 /* ExecController.m */, 8501704F1CCD0653008AC148 /* Helpers.h */, 850170501CCD0653008AC148 /* Helpers.m */, 850170511CCD0653008AC148 /* iodbcdemo_Prefix.pch */, 850170521CCD0653008AC148 /* LinkTextFieldCell.h */, 850170531CCD0653008AC148 /* LinkTextFieldCell.m */, 850170541CCD0653008AC148 /* main.m */, 850170551CCD0653008AC148 /* NSAttributedStringAdditions.h */, 850170561CCD0653008AC148 /* NSAttributedStringAdditions.m */, 850170571CCD0653008AC148 /* NSResWindow.h */, 850170581CCD0653008AC148 /* NSResWindow.m */, 850170591CCD0653008AC148 /* TestController.h */, 8501705A1CCD0653008AC148 /* TestController.m */, ); name = "Other Sources"; sourceTree = ""; }; 29B97317FDCFA39411CA2CEA /* Resources */ = { isa = PBXGroup; children = ( 8594AF221CCE4D2500EE7ABC /* Credits.rtf */, 8594AF241CCE4D2500EE7ABC /* ExecSQL.xib */, 8594AF261CCE4D2500EE7ABC /* iODBCdemo.icns */, 8594AF281CCE4D2500EE7ABC /* MainMenu.xib */, 8518E2151CCD025900967942 /* InfoAnsi.plist */, 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */, ); name = Resources; sourceTree = ""; }; 29B97323FDCFA39411CA2CEA /* Frameworks */ = { isa = PBXGroup; children = ( 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, ); name = Frameworks; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ CD7C37A70A063F40001A43B7 /* iODBC Demo Ansi */ = { isa = PBXNativeTarget; buildConfigurationList = CD7C37B40A063F40001A43B7 /* Build configuration list for PBXNativeTarget "iODBC Demo Ansi" */; buildPhases = ( CD7C37A80A063F40001A43B7 /* Resources */, CD7C37AC0A063F40001A43B7 /* Sources */, CD7C37B00A063F40001A43B7 /* Frameworks */, ); buildRules = ( ); dependencies = ( ); name = "iODBC Demo Ansi"; productInstallPath = /Applications/iODBC; productName = "iODBC Demo Ansi"; productReference = CD7C37B70A063F40001A43B7 /* iODBC Demo Ansi.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 29B97313FDCFA39411CA2CEA /* Project object */ = { isa = PBXProject; attributes = { LastUpgradeCheck = 1130; TargetAttributes = { CD7C37A70A063F40001A43B7 = { ProvisioningStyle = Manual; }; }; }; buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "DemoAnsi" */; compatibilityVersion = "Xcode 8.0"; developmentRegion = en; hasScannedForEncodings = 1; knownRegions = ( en, Base, ); mainGroup = 29B97314FDCFA39411CA2CEA /* iODBC Demo Unicode */; projectDirPath = ""; projectRoot = ""; targets = ( CD7C37A70A063F40001A43B7 /* iODBC Demo Ansi */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ CD7C37A80A063F40001A43B7 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( 8594AF2C1CCE4D2500EE7ABC /* iODBCdemo.icns in Resources */, 8594AF2B1CCE4D2500EE7ABC /* ExecSQL.xib in Resources */, 8594AF2A1CCE4D2500EE7ABC /* Credits.rtf in Resources */, CD7C37AA0A063F40001A43B7 /* InfoPlist.strings in Resources */, 8594AF2D1CCE4D2500EE7ABC /* MainMenu.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ CD7C37AC0A063F40001A43B7 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 8501705B1CCD0653008AC148 /* ExecController.m in Sources */, 850170611CCD0653008AC148 /* TestController.m in Sources */, 850170601CCD0653008AC148 /* NSResWindow.m in Sources */, 8501705C1CCD0653008AC148 /* Helpers.m in Sources */, 8501705E1CCD0653008AC148 /* main.m in Sources */, 8501705D1CCD0653008AC148 /* LinkTextFieldCell.m in Sources */, 8501705F1CCD0653008AC148 /* NSAttributedStringAdditions.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = { isa = PBXVariantGroup; children = ( CDCBD5F6263707FF00F31A21 /* en */, ); name = InfoPlist.strings; sourceTree = ""; }; 8594AF221CCE4D2500EE7ABC /* Credits.rtf */ = { isa = PBXVariantGroup; children = ( CDCBD5F5263707FF00F31A21 /* en */, ); name = Credits.rtf; sourceTree = ""; }; 8594AF241CCE4D2500EE7ABC /* ExecSQL.xib */ = { isa = PBXVariantGroup; children = ( CDCBD5F3263707F900F31A21 /* Base */, ); name = ExecSQL.xib; sourceTree = ""; }; 8594AF261CCE4D2500EE7ABC /* iODBCdemo.icns */ = { isa = PBXVariantGroup; children = ( CDCBD5F7263707FF00F31A21 /* en */, ); name = iODBCdemo.icns; sourceTree = ""; }; 8594AF281CCE4D2500EE7ABC /* MainMenu.xib */ = { isa = PBXVariantGroup; children = ( CDCBD5F4263707FA00F31A21 /* Base */, ); name = MainMenu.xib; sourceTree = ""; }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ C01FCF4F08A954540054247B /* Development */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = ( arm64, $IODBC_32BIT, x86_64, ); CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "-"; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; FRAMEWORK_SEARCH_PATHS = ( ../../mac/iODBC/build/Deployment, ../../mac/iODBC/build, ../../mac/iODBCinst/build/Deployment, ../../mac/iODBCinst/build, ); GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ../../include; MACOSX_DEPLOYMENT_TARGET = 10.9; ONLY_ACTIVE_ARCH = YES; }; name = Development; }; C01FCF5008A954540054247B /* Deployment */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = ( arm64, $IODBC_32BIT, x86_64, ); CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "-"; ENABLE_STRICT_OBJC_MSGSEND = YES; FRAMEWORK_SEARCH_PATHS = ( ../../../mac/iODBC/build/Deployment, ../../../mac/iODBC/build, ../../../mac/iODBCinst/build/Deployment, ../../../mac/iODBCinst/build, ); GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ../../include; MACOSX_DEPLOYMENT_TARGET = 10.9; }; name = Deployment; }; CD7C37B50A063F40001A43B7 /* Development */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; CODE_SIGN_IDENTITY = "-"; COPY_PHASE_STRIP = NO; FRAMEWORK_SEARCH_PATHS = ( ../../../mac/iODBC/build/Deployment, ../../../mac/iODBC/build, ../../../mac/iODBCinst/build/Deployment, ../../../mac/iODBCinst/build, ); GCC_DYNAMIC_NO_PIC = NO; GCC_MODEL_TUNING = G5; GCC_OPTIMIZATION_LEVEL = 0; HEADER_SEARCH_PATHS = ../../include; INFOPLIST_FILE = InfoAnsi.plist; INSTALL_PATH = /Applications/iODBC; PRODUCT_BUNDLE_IDENTIFIER = "com.openlinksw.iodbcdemo-ansi"; PRODUCT_NAME = "iODBC Demo Ansi"; WRAPPER_EXTENSION = app; ZERO_LINK = YES; }; name = Development; }; CD7C37B60A063F40001A43B7 /* Deployment */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; FRAMEWORK_SEARCH_PATHS = ( ../../../mac/iODBC/build/Deployment, ../../../mac/iODBC/build, ../../../mac/iODBCinst/build/Deployment, ../../../mac/iODBCinst/build, ); GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_MODEL_TUNING = G5; HEADER_SEARCH_PATHS = ../../include; INFOPLIST_FILE = InfoAnsi.plist; INSTALL_PATH = /Applications/iODBC; PRODUCT_BUNDLE_IDENTIFIER = "com.openlinksw.iodbcdemo-ansi"; PRODUCT_NAME = "iODBC Demo Ansi"; WRAPPER_EXTENSION = app; }; name = Deployment; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ C01FCF4E08A954540054247B /* Build configuration list for PBXProject "DemoAnsi" */ = { isa = XCConfigurationList; buildConfigurations = ( C01FCF4F08A954540054247B /* Development */, C01FCF5008A954540054247B /* Deployment */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Deployment; }; CD7C37B40A063F40001A43B7 /* Build configuration list for PBXNativeTarget "iODBC Demo Ansi" */ = { isa = XCConfigurationList; buildConfigurations = ( CD7C37B50A063F40001A43B7 /* Development */, CD7C37B60A063F40001A43B7 /* Deployment */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Deployment; }; /* End XCConfigurationList section */ }; rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; } libiodbc-3.52.16/mac/iODBCdemo/DemoAnsi/DemoAnsi.xcodeproj/project.xcworkspace/0000775000175000017500000000000014424171427024125 500000000000000libiodbc-3.52.16/mac/iODBCdemo/DemoAnsi/DemoAnsi.xcodeproj/project.xcworkspace/xcshareddata/0000775000175000017500000000000014424171427026560 500000000000000libiodbc-3.52.16/mac/iODBCdemo/DemoAnsi/en.lproj/0000775000175000017500000000000014424171427016163 500000000000000libiodbc-3.52.16/mac/iODBCdemo/DemoAnsi/en.lproj/InfoPlist.strings0000664000175000017500000000043514424170750021425 00000000000000/* Localized versions of Info.plist keys */ CFBundleName = "iODBC Demo Ansi"; CFBundleShortVersionString = "Version 1.4"; CFBundleGetInfoString = "iODBC Demo version 1.4, Copyright 2006-2023, OpenLink Software"; NSHumanReadableCopyright = "Copyright © 2006-2023, OpenLink Software"; libiodbc-3.52.16/mac/iODBCdemo/iodbcdemo_Prefix.pch0000664000175000017500000000022114013216212016570 00000000000000// // Prefix header for all source files of the 'cppdemo' target in the 'cppdemo' project // #ifdef __OBJC__ #import #endif libiodbc-3.52.16/mac/iODBCdemo/NSAttributedStringAdditions.m0000664000175000017500000001023214424170750020425 00000000000000/* * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import "NSAttributedStringAdditions.h" @implementation NSAttributedString (TVLAttributedStringAdditions) + (NSAttributedString *)attributedStringWithBlueLink:(NSString *)val { NSMutableAttributedString *attrString = [[NSMutableAttributedString alloc] initWithString:val]; NSRange range = NSMakeRange(0, [attrString length]); [attrString beginEditing]; [attrString addAttribute:NSLinkAttributeName value:val range:range]; [attrString addAttribute:NSForegroundColorAttributeName value:[NSColor blueColor] range:range]; [attrString addAttribute:NSUnderlineStyleAttributeName value:[NSNumber numberWithInteger:NSSingleUnderlineStyle] range:range]; NSMutableParagraphStyle *ps = [[NSParagraphStyle defaultParagraphStyle] mutableCopy]; [ps setLineBreakMode:NSLineBreakByTruncatingTail]; [attrString addAttribute:NSParagraphStyleAttributeName value:ps range:range]; [attrString endEditing]; return attrString; } @end libiodbc-3.52.16/mac/iODBCdemo/Helpers.h0000664000175000017500000000776414424170750014444 00000000000000/* * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import #import #include #include #import #import #ifdef UNICODE wchar_t * NStoTEXT (NSString * str); NSString* TEXTtoNS (wchar_t * str); #define TEXT(x) (SQLWCHAR *) L##x #define TEXTLEN(x) wcslen ((wchar_t *) x) #define TEXTCMP(x,y) wcscmp((wchar_t *) x, (wchar_t *) y) #define TEXTCPY(x,y) wcscpy((wchar_t *) x, (wchar_t *) y) #else #define TEXT(x) (SQLCHAR *) x #define TEXTLEN(x) strlen ((char *) x) #define TEXTCMP(x,y) strcmp((char *) x, (char *) y) #define TEXTCPY(x,y) strcpy((char *) x, (char *) y) #define TEXTtoNS(x) [NSString stringWithUTF8String: x] #define NStoTEXT(x) [ x UTF8String ] #endif void _nativeerrorbox (SQLHENV _henv, SQLHDBC _hdbc, SQLHSTMT _hstmt); void create_error(const char *text, const char *errmsg); libiodbc-3.52.16/mac/link-inclibs.sh0000775000175000017500000001073314424170750014047 00000000000000#!/bin/sh # # link-inclibs.sh # # The iODBC driver manager. # # Copyright (C) 1996-2023 OpenLink Software # All Rights Reserved. # # This software is released under the terms of either of the following # licenses: # # - GNU Library General Public License (see LICENSE.LGPL) # - The BSD License (see LICENSE.BSD). # # Note that the only valid version of the LGPL license as far as this # project is concerned is the original GNU Library General Public License # Version 2, dated June 1991. # # While not mandated by the BSD license, any patches you make to the # iODBC source code may be contributed back into the iODBC project # at your discretion. Contributions will benefit the Open Source and # Data Access community as a whole. Submissions may be made at: # # http://www.iodbc.org # # # GNU Library Generic Public License Version 2 # ============================================ # 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; only # Version 2 of the License dated June 1991. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # The BSD License # =============== # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. Neither the name of OpenLink Software Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # # Installation PATHS # PREFIX="$DESTDIR/usr/local/iODBC" ODBC_FW="/Library/Frameworks/iODBC.framework" INST_FW="/Library/Frameworks/iODBCinst.framework" # # Remove old installation # if [ -d "$PREFIX" ] ; then rm -rf "$PREFIX" fi # # Create new directory structure # mkdir -p "$PREFIX/bin" mkdir -p "$PREFIX/lib" mkdir -p "$PREFIX/include" # # Copy header files # cp -f "../include/iodbcext.h" "$PREFIX/include/iodbcext.h" cp -f "../include/iodbcunix.h" "$PREFIX/include/iodbcunix.h" cp -f "../include/isql.h" "$PREFIX/include/isql.h" cp -f "../include/isqlext.h" "$PREFIX/include/isqlext.h" cp -f "../include/isqltypes.h" "$PREFIX/include/isqltypes.h" cp -f "../include/sql.h" "$PREFIX/include/sql.h" cp -f "../include/sqlext.h" "$PREFIX/include/sqlext.h" cp -f "../include/sqltypes.h" "$PREFIX/include/sqltypes.h" cp -f "../include/sqlucode.h" "$PREFIX/include/sqlucode.h" cp -f "../include/iodbcinst.h" "$PREFIX/include/iodbcinst.h" cp -f "../include/odbcinst.h" "$PREFIX/include/odbcinst.h" # # Create symlinks for libraries # ln -s "$ODBC_FW/iODBC" "$PREFIX/lib/libiodbc.dylib" ln -s "$INST_FW/iODBCinst" "$PREFIX/lib/libiodbcinst.dylib" # # Add special macOS version of iodbc-config # cp iodbc-config.macos "$PREFIX/bin/iodbc-config" chmod 755 "$PREFIX/bin/iodbc-config" # # Fix basic permissions # chmod -R og+rX "$PREFIX" # # Done # exit 0 libiodbc-3.52.16/mac/iODBCinst/0000775000175000017500000000000014424171427012766 500000000000000libiodbc-3.52.16/mac/iODBCinst/en.lproj/0000775000175000017500000000000014424171427014515 500000000000000libiodbc-3.52.16/mac/iODBCinst/en.lproj/InfoPlist.strings0000664000175000017500000000045014424170750017754 00000000000000/* Localized versions of Info.plist keys */ CFBundleName = "iODBCinst"; CFBundleShortVersionString = "iODBCinst version 3.52.16"; CFBundleGetInfoString = "iODBCinst version 3.52.16, Copyright 1995-2023, OpenLink Software"; NSHumanReadableCopyright = "Copyright © 1995-2023, OpenLink Software"; libiodbc-3.52.16/mac/iODBCinst/Info-iODBCinst.plist0000664000175000017500000000171514424170750016434 00000000000000 CFBundleDevelopmentRegion English CFBundleExecutable iODBCinst CFBundleGetInfoString iODBCinst version $IODBC_VERSION, Copyright 1995-2023, OpenLink Software CFBundleIconFile CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName iODBC Configuration CFBundlePackageType FMWK CFBundleShortVersionString $IODBC_VERSION CFBundleSignature odbc CFBundleVersion $IODBC_VERSION CSResourcesFileMapped libiodbc-3.52.16/mac/iODBCinst/iODBCinst.xcodeproj/0000775000175000017500000000000014424171427016540 500000000000000libiodbc-3.52.16/mac/iODBCinst/iODBCinst.xcodeproj/project.pbxproj0000664000175000017500000011106314424170750021534 00000000000000// !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 48; objects = { /* Begin PBXBuildFile section */ 85A390E91B79121900AC8862 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 85A390E71B79121900AC8862 /* InfoPlist.strings */; }; CDAE3AD30987CDA2003250F8 /* odbcinst.h in Headers */ = {isa = PBXBuildFile; fileRef = F535B35C0278023701A801DE /* odbcinst.h */; settings = {ATTRIBUTES = (Public, ); }; }; CDAE3AD40987CDA2003250F8 /* inifile.h in Headers */ = {isa = PBXBuildFile; fileRef = F535B3600278027E01A801DE /* inifile.h */; }; CDAE3AD50987CDA2003250F8 /* iodbc_error.h in Headers */ = {isa = PBXBuildFile; fileRef = F535B3620278027E01A801DE /* iodbc_error.h */; }; CDAE3AD60987CDA2003250F8 /* misc.h in Headers */ = {isa = PBXBuildFile; fileRef = F535B3650278027E01A801DE /* misc.h */; }; CDAE3AD70987CDA2003250F8 /* isqltypes.h in Headers */ = {isa = PBXBuildFile; fileRef = F535B3A702780BB701A801DE /* isqltypes.h */; }; CDAE3AD80987CDA2003250F8 /* isql.h in Headers */ = {isa = PBXBuildFile; fileRef = F535B3A802780BB701A801DE /* isql.h */; }; CDAE3AD90987CDA2003250F8 /* isqlext.h in Headers */ = {isa = PBXBuildFile; fileRef = F535B3A902780BB701A801DE /* isqlext.h */; }; CDAE3ADA0987CDA2003250F8 /* sql.h in Headers */ = {isa = PBXBuildFile; fileRef = F535B3AA02780BB701A801DE /* sql.h */; }; CDAE3ADB0987CDA2003250F8 /* sqlext.h in Headers */ = {isa = PBXBuildFile; fileRef = F535B3AB02780BB701A801DE /* sqlext.h */; }; CDAE3ADC0987CDA2003250F8 /* sqltypes.h in Headers */ = {isa = PBXBuildFile; fileRef = F535B3AC02780BB701A801DE /* sqltypes.h */; }; CDAE3ADD0987CDA2003250F8 /* iodbc.h in Headers */ = {isa = PBXBuildFile; fileRef = F535B3B302780BD401A801DE /* iodbc.h */; }; CDAE3ADE0987CDA2003250F8 /* dlf.h in Headers */ = {isa = PBXBuildFile; fileRef = F535B3C4027827A201A801DE /* dlf.h */; }; CDAE3ADF0987CDA2003250F8 /* iodbcadm.h in Headers */ = {isa = PBXBuildFile; fileRef = F59CCFDA0504F64401000DFE /* iodbcadm.h */; }; CDAE3AE00987CDA2003250F8 /* iodbcunix.h in Headers */ = {isa = PBXBuildFile; fileRef = 71DF013606A3E372007AF56B /* iodbcunix.h */; }; CDAE3AE10987CDA2003250F8 /* unicode.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C530B6007F075D3000BBF8D /* unicode.h */; }; CDAE3AE20987CDA2003250F8 /* iodbcinst.h in Headers */ = {isa = PBXBuildFile; fileRef = CD2616E108B138FD00D9BE06 /* iodbcinst.h */; settings = {ATTRIBUTES = (Public, ); }; }; CDAE3AE60987CDA2003250F8 /* SQLRemoveDSNFromIni.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B37B0278027E01A801DE /* SQLRemoveDSNFromIni.c */; }; CDAE3AE70987CDA2003250F8 /* Info.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B35E0278027E01A801DE /* Info.c */; }; CDAE3AE80987CDA2003250F8 /* inifile.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B35F0278027E01A801DE /* inifile.c */; }; CDAE3AE90987CDA2003250F8 /* iodbc_error.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B3610278027E01A801DE /* iodbc_error.c */; }; CDAE3AEA0987CDA2003250F8 /* misc.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B3640278027E01A801DE /* misc.c */; }; CDAE3AEB0987CDA2003250F8 /* SQLConfigDataSource.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B3660278027E01A801DE /* SQLConfigDataSource.c */; }; CDAE3AEC0987CDA2003250F8 /* SQLConfigDriver.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B3670278027E01A801DE /* SQLConfigDriver.c */; }; CDAE3AED0987CDA2003250F8 /* SQLCreateDataSource.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B3680278027E01A801DE /* SQLCreateDataSource.c */; }; CDAE3AEE0987CDA2003250F8 /* SQLGetAvailableDrivers.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B3690278027E01A801DE /* SQLGetAvailableDrivers.c */; }; CDAE3AEF0987CDA2003250F8 /* SQLGetConfigMode.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B36A0278027E01A801DE /* SQLGetConfigMode.c */; }; CDAE3AF00987CDA2003250F8 /* SQLGetInstalledDrivers.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B36B0278027E01A801DE /* SQLGetInstalledDrivers.c */; }; CDAE3AF10987CDA2003250F8 /* SQLGetPrivateProfileString.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B36C0278027E01A801DE /* SQLGetPrivateProfileString.c */; }; CDAE3AF20987CDA2003250F8 /* SQLGetTranslator.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B36D0278027E01A801DE /* SQLGetTranslator.c */; }; CDAE3AF30987CDA2003250F8 /* SQLInstallDriver.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B36E0278027E01A801DE /* SQLInstallDriver.c */; }; CDAE3AF40987CDA2003250F8 /* SQLInstallDriverEx.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B36F0278027E01A801DE /* SQLInstallDriverEx.c */; }; CDAE3AF50987CDA2003250F8 /* SQLInstallDriverManager.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B3700278027E01A801DE /* SQLInstallDriverManager.c */; }; CDAE3AF60987CDA2003250F8 /* SQLInstallerError.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B3710278027E01A801DE /* SQLInstallerError.c */; }; CDAE3AF70987CDA2003250F8 /* SQLInstallODBC.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B3720278027E01A801DE /* SQLInstallODBC.c */; }; CDAE3AF80987CDA2003250F8 /* SQLInstallTranslator.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B3730278027E01A801DE /* SQLInstallTranslator.c */; }; CDAE3AF90987CDA2003250F8 /* SQLInstallTranslatorEx.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B3740278027E01A801DE /* SQLInstallTranslatorEx.c */; }; CDAE3AFA0987CDA2003250F8 /* SQLManageDataSource.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B3750278027E01A801DE /* SQLManageDataSource.c */; }; CDAE3AFB0987CDA2003250F8 /* SQLPostInstallerError.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B3760278027E01A801DE /* SQLPostInstallerError.c */; }; CDAE3AFC0987CDA2003250F8 /* SQLReadFileDSN.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B3770278027E01A801DE /* SQLReadFileDSN.c */; }; CDAE3AFD0987CDA2003250F8 /* SQLRemoveDefaultDataSource.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B3780278027E01A801DE /* SQLRemoveDefaultDataSource.c */; }; CDAE3AFE0987CDA2003250F8 /* SQLRemoveDriver.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B3790278027E01A801DE /* SQLRemoveDriver.c */; }; CDAE3AFF0987CDA2003250F8 /* SQLRemoveDriverManager.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B37A0278027E01A801DE /* SQLRemoveDriverManager.c */; }; CDAE3B000987CDA2003250F8 /* SQLRemoveTranslator.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B37C0278027E01A801DE /* SQLRemoveTranslator.c */; }; CDAE3B010987CDA2003250F8 /* SQLSetConfigMode.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B37D0278027E01A801DE /* SQLSetConfigMode.c */; }; CDAE3B020987CDA2003250F8 /* SQLValidDSN.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B37E0278027E01A801DE /* SQLValidDSN.c */; }; CDAE3B030987CDA2003250F8 /* SQLWriteDSNToIni.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B37F0278027E01A801DE /* SQLWriteDSNToIni.c */; }; CDAE3B040987CDA2003250F8 /* SQLWriteFileDSN.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B3800278027E01A801DE /* SQLWriteFileDSN.c */; }; CDAE3B050987CDA2003250F8 /* SQLWritePrivateProfileString.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B3810278027E01A801DE /* SQLWritePrivateProfileString.c */; }; CDAE3B060987CDA2003250F8 /* dlf.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B3C3027827A201A801DE /* dlf.c */; }; CDAE3B070987CDA2003250F8 /* iodbcinst.exp in Sources */ = {isa = PBXBuildFile; fileRef = F54DA8D50279584A01A801DE /* iodbcinst.exp */; }; CDAE3B080987CDA2003250F8 /* unicode.c in Sources */ = {isa = PBXBuildFile; fileRef = 7C530B5E07F075A7000BBF8D /* unicode.c */; }; CDAE3B0A0987CDA2003250F8 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F54DA8D902795B3501A801DE /* CoreFoundation.framework */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 71DF013606A3E372007AF56B /* iodbcunix.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = iodbcunix.h; path = ../../include/iodbcunix.h; sourceTree = SOURCE_ROOT; }; 7C530B5E07F075A7000BBF8D /* unicode.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = unicode.c; path = ../../iodbcinst/unicode.c; sourceTree = SOURCE_ROOT; }; 7C530B6007F075D3000BBF8D /* unicode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = unicode.h; path = ../../iodbcinst/unicode.h; sourceTree = SOURCE_ROOT; }; CD2616E108B138FD00D9BE06 /* iodbcinst.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = iodbcinst.h; path = ../include/iodbcinst.h; sourceTree = SOURCE_ROOT; }; CD9487182636F68B00DBD85F /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = ../en.lproj/InfoPlist.strings; sourceTree = ""; }; CDAE3B100987CDA2003250F8 /* Info-iODBCinst.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Info-iODBCinst.plist"; sourceTree = ""; }; CDAE3B110987CDA2003250F8 /* iODBCinst.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = iODBCinst.framework; sourceTree = BUILT_PRODUCTS_DIR; }; F535B35C0278023701A801DE /* odbcinst.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = odbcinst.h; path = ../../include/odbcinst.h; sourceTree = SOURCE_ROOT; }; F535B35E0278027E01A801DE /* Info.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = Info.c; path = ../../iodbcinst/Info.c; sourceTree = SOURCE_ROOT; }; F535B35F0278027E01A801DE /* inifile.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = inifile.c; path = ../../iodbcinst/inifile.c; sourceTree = SOURCE_ROOT; }; F535B3600278027E01A801DE /* inifile.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = inifile.h; path = ../../iodbcinst/inifile.h; sourceTree = SOURCE_ROOT; }; F535B3610278027E01A801DE /* iodbc_error.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = iodbc_error.c; path = ../../iodbcinst/iodbc_error.c; sourceTree = SOURCE_ROOT; }; F535B3620278027E01A801DE /* iodbc_error.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = iodbc_error.h; path = ../../iodbcinst/iodbc_error.h; sourceTree = SOURCE_ROOT; }; F535B3640278027E01A801DE /* misc.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = misc.c; path = ../../iodbcinst/misc.c; sourceTree = SOURCE_ROOT; }; F535B3650278027E01A801DE /* misc.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = misc.h; path = ../../iodbcinst/misc.h; sourceTree = SOURCE_ROOT; }; F535B3660278027E01A801DE /* SQLConfigDataSource.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SQLConfigDataSource.c; path = ../../iodbcinst/SQLConfigDataSource.c; sourceTree = SOURCE_ROOT; }; F535B3670278027E01A801DE /* SQLConfigDriver.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SQLConfigDriver.c; path = ../../iodbcinst/SQLConfigDriver.c; sourceTree = SOURCE_ROOT; }; F535B3680278027E01A801DE /* SQLCreateDataSource.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SQLCreateDataSource.c; path = ../../iodbcinst/SQLCreateDataSource.c; sourceTree = SOURCE_ROOT; }; F535B3690278027E01A801DE /* SQLGetAvailableDrivers.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SQLGetAvailableDrivers.c; path = ../../iodbcinst/SQLGetAvailableDrivers.c; sourceTree = SOURCE_ROOT; }; F535B36A0278027E01A801DE /* SQLGetConfigMode.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SQLGetConfigMode.c; path = ../../iodbcinst/SQLGetConfigMode.c; sourceTree = SOURCE_ROOT; }; F535B36B0278027E01A801DE /* SQLGetInstalledDrivers.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SQLGetInstalledDrivers.c; path = ../../iodbcinst/SQLGetInstalledDrivers.c; sourceTree = SOURCE_ROOT; }; F535B36C0278027E01A801DE /* SQLGetPrivateProfileString.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SQLGetPrivateProfileString.c; path = ../../iodbcinst/SQLGetPrivateProfileString.c; sourceTree = SOURCE_ROOT; }; F535B36D0278027E01A801DE /* SQLGetTranslator.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SQLGetTranslator.c; path = ../../iodbcinst/SQLGetTranslator.c; sourceTree = SOURCE_ROOT; }; F535B36E0278027E01A801DE /* SQLInstallDriver.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SQLInstallDriver.c; path = ../../iodbcinst/SQLInstallDriver.c; sourceTree = SOURCE_ROOT; }; F535B36F0278027E01A801DE /* SQLInstallDriverEx.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SQLInstallDriverEx.c; path = ../../iodbcinst/SQLInstallDriverEx.c; sourceTree = SOURCE_ROOT; }; F535B3700278027E01A801DE /* SQLInstallDriverManager.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SQLInstallDriverManager.c; path = ../../iodbcinst/SQLInstallDriverManager.c; sourceTree = SOURCE_ROOT; }; F535B3710278027E01A801DE /* SQLInstallerError.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SQLInstallerError.c; path = ../../iodbcinst/SQLInstallerError.c; sourceTree = SOURCE_ROOT; }; F535B3720278027E01A801DE /* SQLInstallODBC.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SQLInstallODBC.c; path = ../../iodbcinst/SQLInstallODBC.c; sourceTree = SOURCE_ROOT; }; F535B3730278027E01A801DE /* SQLInstallTranslator.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SQLInstallTranslator.c; path = ../../iodbcinst/SQLInstallTranslator.c; sourceTree = SOURCE_ROOT; }; F535B3740278027E01A801DE /* SQLInstallTranslatorEx.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SQLInstallTranslatorEx.c; path = ../../iodbcinst/SQLInstallTranslatorEx.c; sourceTree = SOURCE_ROOT; }; F535B3750278027E01A801DE /* SQLManageDataSource.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SQLManageDataSource.c; path = ../../iodbcinst/SQLManageDataSource.c; sourceTree = SOURCE_ROOT; }; F535B3760278027E01A801DE /* SQLPostInstallerError.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SQLPostInstallerError.c; path = ../../iodbcinst/SQLPostInstallerError.c; sourceTree = SOURCE_ROOT; }; F535B3770278027E01A801DE /* SQLReadFileDSN.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SQLReadFileDSN.c; path = ../../iodbcinst/SQLReadFileDSN.c; sourceTree = SOURCE_ROOT; }; F535B3780278027E01A801DE /* SQLRemoveDefaultDataSource.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SQLRemoveDefaultDataSource.c; path = ../../iodbcinst/SQLRemoveDefaultDataSource.c; sourceTree = SOURCE_ROOT; }; F535B3790278027E01A801DE /* SQLRemoveDriver.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SQLRemoveDriver.c; path = ../../iodbcinst/SQLRemoveDriver.c; sourceTree = SOURCE_ROOT; }; F535B37A0278027E01A801DE /* SQLRemoveDriverManager.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SQLRemoveDriverManager.c; path = ../../iodbcinst/SQLRemoveDriverManager.c; sourceTree = SOURCE_ROOT; }; F535B37B0278027E01A801DE /* SQLRemoveDSNFromIni.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SQLRemoveDSNFromIni.c; path = ../../iodbcinst/SQLRemoveDSNFromIni.c; sourceTree = SOURCE_ROOT; }; F535B37C0278027E01A801DE /* SQLRemoveTranslator.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SQLRemoveTranslator.c; path = ../../iodbcinst/SQLRemoveTranslator.c; sourceTree = SOURCE_ROOT; }; F535B37D0278027E01A801DE /* SQLSetConfigMode.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SQLSetConfigMode.c; path = ../../iodbcinst/SQLSetConfigMode.c; sourceTree = SOURCE_ROOT; }; F535B37E0278027E01A801DE /* SQLValidDSN.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SQLValidDSN.c; path = ../../iodbcinst/SQLValidDSN.c; sourceTree = SOURCE_ROOT; }; F535B37F0278027E01A801DE /* SQLWriteDSNToIni.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SQLWriteDSNToIni.c; path = ../../iodbcinst/SQLWriteDSNToIni.c; sourceTree = SOURCE_ROOT; }; F535B3800278027E01A801DE /* SQLWriteFileDSN.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SQLWriteFileDSN.c; path = ../../iodbcinst/SQLWriteFileDSN.c; sourceTree = SOURCE_ROOT; }; F535B3810278027E01A801DE /* SQLWritePrivateProfileString.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SQLWritePrivateProfileString.c; path = ../../iodbcinst/SQLWritePrivateProfileString.c; sourceTree = SOURCE_ROOT; }; F535B3A702780BB701A801DE /* isqltypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = isqltypes.h; path = ../../include/isqltypes.h; sourceTree = SOURCE_ROOT; }; F535B3A802780BB701A801DE /* isql.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = isql.h; path = ../../include/isql.h; sourceTree = SOURCE_ROOT; }; F535B3A902780BB701A801DE /* isqlext.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = isqlext.h; path = ../../include/isqlext.h; sourceTree = SOURCE_ROOT; }; F535B3AA02780BB701A801DE /* sql.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sql.h; path = ../../include/sql.h; sourceTree = SOURCE_ROOT; }; F535B3AB02780BB701A801DE /* sqlext.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sqlext.h; path = ../../include/sqlext.h; sourceTree = SOURCE_ROOT; }; F535B3AC02780BB701A801DE /* sqltypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sqltypes.h; path = ../../include/sqltypes.h; sourceTree = SOURCE_ROOT; }; F535B3B302780BD401A801DE /* iodbc.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = iodbc.h; path = ../../include/iodbc.h; sourceTree = SOURCE_ROOT; }; F535B3C3027827A201A801DE /* dlf.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = dlf.c; path = ../../iodbcinst/dlf.c; sourceTree = SOURCE_ROOT; }; F535B3C4027827A201A801DE /* dlf.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = dlf.h; path = ../../iodbcinst/dlf.h; sourceTree = SOURCE_ROOT; }; F54DA8D50279584A01A801DE /* iodbcinst.exp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.exports; name = iodbcinst.exp; path = ../iodbcinst.exp; sourceTree = SOURCE_ROOT; }; F54DA8D902795B3501A801DE /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = ""; }; F59CCFDA0504F64401000DFE /* iodbcadm.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = iodbcadm.h; path = ../../iodbcadm/iodbcadm.h; sourceTree = SOURCE_ROOT; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ CDAE3B090987CDA2003250F8 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( CDAE3B0A0987CDA2003250F8 /* CoreFoundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 034768DDFF38A45A11DB9C8B /* Products */ = { isa = PBXGroup; children = ( CDAE3B110987CDA2003250F8 /* iODBCinst.framework */, ); name = Products; sourceTree = ""; }; 0867D691FE84028FC02AAC07 /* iODBCinst */ = { isa = PBXGroup; children = ( 08FB77ACFE841707C02AAC07 /* Source */, 089C1665FE841158C02AAC07 /* Resources */, 0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */, 034768DDFF38A45A11DB9C8B /* Products */, CDAE3B100987CDA2003250F8 /* Info-iODBCinst.plist */, ); name = iODBCinst; sourceTree = ""; }; 0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */ = { isa = PBXGroup; children = ( F54DA8D902795B3501A801DE /* CoreFoundation.framework */, ); name = "External Frameworks and Libraries"; sourceTree = ""; }; 089C1665FE841158C02AAC07 /* Resources */ = { isa = PBXGroup; children = ( 85A390E61B79121900AC8862 /* English.lproj */, ); name = Resources; sourceTree = ""; }; 08FB77ACFE841707C02AAC07 /* Source */ = { isa = PBXGroup; children = ( F535B35B0278021D01A801DE /* iodbcinst */, F535B3A602780B9C01A801DE /* iODBC */, ); name = Source; sourceTree = ""; }; 85A390E61B79121900AC8862 /* English.lproj */ = { isa = PBXGroup; children = ( 85A390E71B79121900AC8862 /* InfoPlist.strings */, ); path = English.lproj; sourceTree = ""; }; F535B35B0278021D01A801DE /* iodbcinst */ = { isa = PBXGroup; children = ( CD2616E108B138FD00D9BE06 /* iodbcinst.h */, F535B35C0278023701A801DE /* odbcinst.h */, 7C530B5E07F075A7000BBF8D /* unicode.c */, F535B35E0278027E01A801DE /* Info.c */, F535B35F0278027E01A801DE /* inifile.c */, F535B3600278027E01A801DE /* inifile.h */, F535B3610278027E01A801DE /* iodbc_error.c */, F535B3620278027E01A801DE /* iodbc_error.h */, F535B3640278027E01A801DE /* misc.c */, F535B3650278027E01A801DE /* misc.h */, F535B3660278027E01A801DE /* SQLConfigDataSource.c */, F535B3670278027E01A801DE /* SQLConfigDriver.c */, F535B3680278027E01A801DE /* SQLCreateDataSource.c */, F535B3690278027E01A801DE /* SQLGetAvailableDrivers.c */, F535B36A0278027E01A801DE /* SQLGetConfigMode.c */, F535B36B0278027E01A801DE /* SQLGetInstalledDrivers.c */, F535B36C0278027E01A801DE /* SQLGetPrivateProfileString.c */, F535B36D0278027E01A801DE /* SQLGetTranslator.c */, F535B36E0278027E01A801DE /* SQLInstallDriver.c */, F535B36F0278027E01A801DE /* SQLInstallDriverEx.c */, F535B3700278027E01A801DE /* SQLInstallDriverManager.c */, F535B3710278027E01A801DE /* SQLInstallerError.c */, F535B3720278027E01A801DE /* SQLInstallODBC.c */, F535B3730278027E01A801DE /* SQLInstallTranslator.c */, F535B3740278027E01A801DE /* SQLInstallTranslatorEx.c */, F535B3750278027E01A801DE /* SQLManageDataSource.c */, F535B3760278027E01A801DE /* SQLPostInstallerError.c */, F535B3770278027E01A801DE /* SQLReadFileDSN.c */, F535B3780278027E01A801DE /* SQLRemoveDefaultDataSource.c */, F535B3790278027E01A801DE /* SQLRemoveDriver.c */, F535B37A0278027E01A801DE /* SQLRemoveDriverManager.c */, F535B37B0278027E01A801DE /* SQLRemoveDSNFromIni.c */, F535B37C0278027E01A801DE /* SQLRemoveTranslator.c */, F535B37D0278027E01A801DE /* SQLSetConfigMode.c */, F535B37E0278027E01A801DE /* SQLValidDSN.c */, F535B37F0278027E01A801DE /* SQLWriteDSNToIni.c */, F535B3800278027E01A801DE /* SQLWriteFileDSN.c */, F535B3810278027E01A801DE /* SQLWritePrivateProfileString.c */, F54DA8D50279584A01A801DE /* iodbcinst.exp */, ); name = iodbcinst; sourceTree = ""; }; F535B3A602780B9C01A801DE /* iODBC */ = { isa = PBXGroup; children = ( 71DF013606A3E372007AF56B /* iodbcunix.h */, F535B3C3027827A201A801DE /* dlf.c */, F535B3C4027827A201A801DE /* dlf.h */, F535B3A702780BB701A801DE /* isqltypes.h */, F535B3A802780BB701A801DE /* isql.h */, F535B3A902780BB701A801DE /* isqlext.h */, 7C530B6007F075D3000BBF8D /* unicode.h */, F535B3AA02780BB701A801DE /* sql.h */, F535B3AB02780BB701A801DE /* sqlext.h */, F535B3AC02780BB701A801DE /* sqltypes.h */, F535B3B302780BD401A801DE /* iodbc.h */, F59CCFDA0504F64401000DFE /* iodbcadm.h */, ); name = iODBC; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ CDAE3AD20987CDA2003250F8 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( CDAE3AD30987CDA2003250F8 /* odbcinst.h in Headers */, CDAE3AD40987CDA2003250F8 /* inifile.h in Headers */, CDAE3AD50987CDA2003250F8 /* iodbc_error.h in Headers */, CDAE3AD60987CDA2003250F8 /* misc.h in Headers */, CDAE3AD70987CDA2003250F8 /* isqltypes.h in Headers */, CDAE3AD80987CDA2003250F8 /* isql.h in Headers */, CDAE3AD90987CDA2003250F8 /* isqlext.h in Headers */, CDAE3ADA0987CDA2003250F8 /* sql.h in Headers */, CDAE3ADB0987CDA2003250F8 /* sqlext.h in Headers */, CDAE3ADC0987CDA2003250F8 /* sqltypes.h in Headers */, CDAE3ADD0987CDA2003250F8 /* iodbc.h in Headers */, CDAE3ADE0987CDA2003250F8 /* dlf.h in Headers */, CDAE3ADF0987CDA2003250F8 /* iodbcadm.h in Headers */, CDAE3AE00987CDA2003250F8 /* iodbcunix.h in Headers */, CDAE3AE10987CDA2003250F8 /* unicode.h in Headers */, CDAE3AE20987CDA2003250F8 /* iodbcinst.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ CDAE3AD10987CDA2003250F8 /* iODBCinst */ = { isa = PBXNativeTarget; buildConfigurationList = CDAE3B0C0987CDA2003250F8 /* Build configuration list for PBXNativeTarget "iODBCinst" */; buildPhases = ( CDAE3AD20987CDA2003250F8 /* Headers */, CDAE3AE30987CDA2003250F8 /* Resources */, CDAE3AE50987CDA2003250F8 /* Sources */, CDAE3B090987CDA2003250F8 /* Frameworks */, CDAE3B0B0987CDA2003250F8 /* Rez */, ); buildRules = ( ); dependencies = ( ); name = iODBCinst; productInstallPath = /Library/Frameworks; productName = iODBCinst; productReference = CDAE3B110987CDA2003250F8 /* iODBCinst.framework */; productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 0867D690FE84028FC02AAC07 /* Project object */ = { isa = PBXProject; attributes = { LastUpgradeCheck = 1130; TargetAttributes = { CDAE3AD10987CDA2003250F8 = { ProvisioningStyle = Manual; }; }; }; buildConfigurationList = CDAE3ACB0987CD92003250F8 /* Build configuration list for PBXProject "iODBCinst" */; compatibilityVersion = "Xcode 8.0"; developmentRegion = en; hasScannedForEncodings = 1; knownRegions = ( en, Base, ); mainGroup = 0867D691FE84028FC02AAC07 /* iODBCinst */; productRefGroup = 034768DDFF38A45A11DB9C8B /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( CDAE3AD10987CDA2003250F8 /* iODBCinst */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ CDAE3AE30987CDA2003250F8 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( 85A390E91B79121900AC8862 /* InfoPlist.strings in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXRezBuildPhase section */ CDAE3B0B0987CDA2003250F8 /* Rez */ = { isa = PBXRezBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXRezBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ CDAE3AE50987CDA2003250F8 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( CDAE3AE60987CDA2003250F8 /* SQLRemoveDSNFromIni.c in Sources */, CDAE3AE70987CDA2003250F8 /* Info.c in Sources */, CDAE3AE80987CDA2003250F8 /* inifile.c in Sources */, CDAE3AE90987CDA2003250F8 /* iodbc_error.c in Sources */, CDAE3AEA0987CDA2003250F8 /* misc.c in Sources */, CDAE3AEB0987CDA2003250F8 /* SQLConfigDataSource.c in Sources */, CDAE3AEC0987CDA2003250F8 /* SQLConfigDriver.c in Sources */, CDAE3AED0987CDA2003250F8 /* SQLCreateDataSource.c in Sources */, CDAE3AEE0987CDA2003250F8 /* SQLGetAvailableDrivers.c in Sources */, CDAE3AEF0987CDA2003250F8 /* SQLGetConfigMode.c in Sources */, CDAE3AF00987CDA2003250F8 /* SQLGetInstalledDrivers.c in Sources */, CDAE3AF10987CDA2003250F8 /* SQLGetPrivateProfileString.c in Sources */, CDAE3AF20987CDA2003250F8 /* SQLGetTranslator.c in Sources */, CDAE3AF30987CDA2003250F8 /* SQLInstallDriver.c in Sources */, CDAE3AF40987CDA2003250F8 /* SQLInstallDriverEx.c in Sources */, CDAE3AF50987CDA2003250F8 /* SQLInstallDriverManager.c in Sources */, CDAE3AF60987CDA2003250F8 /* SQLInstallerError.c in Sources */, CDAE3AF70987CDA2003250F8 /* SQLInstallODBC.c in Sources */, CDAE3AF80987CDA2003250F8 /* SQLInstallTranslator.c in Sources */, CDAE3AF90987CDA2003250F8 /* SQLInstallTranslatorEx.c in Sources */, CDAE3AFA0987CDA2003250F8 /* SQLManageDataSource.c in Sources */, CDAE3AFB0987CDA2003250F8 /* SQLPostInstallerError.c in Sources */, CDAE3AFC0987CDA2003250F8 /* SQLReadFileDSN.c in Sources */, CDAE3AFD0987CDA2003250F8 /* SQLRemoveDefaultDataSource.c in Sources */, CDAE3AFE0987CDA2003250F8 /* SQLRemoveDriver.c in Sources */, CDAE3AFF0987CDA2003250F8 /* SQLRemoveDriverManager.c in Sources */, CDAE3B000987CDA2003250F8 /* SQLRemoveTranslator.c in Sources */, CDAE3B010987CDA2003250F8 /* SQLSetConfigMode.c in Sources */, CDAE3B020987CDA2003250F8 /* SQLValidDSN.c in Sources */, CDAE3B030987CDA2003250F8 /* SQLWriteDSNToIni.c in Sources */, CDAE3B040987CDA2003250F8 /* SQLWriteFileDSN.c in Sources */, CDAE3B050987CDA2003250F8 /* SQLWritePrivateProfileString.c in Sources */, CDAE3B060987CDA2003250F8 /* dlf.c in Sources */, CDAE3B070987CDA2003250F8 /* iodbcinst.exp in Sources */, CDAE3B080987CDA2003250F8 /* unicode.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ 85A390E71B79121900AC8862 /* InfoPlist.strings */ = { isa = PBXVariantGroup; children = ( CD9487182636F68B00DBD85F /* en */, ); name = InfoPlist.strings; sourceTree = ""; }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ CDAE3ACC0987CD92003250F8 /* Development */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = ( arm64, $IODBC_32BIT, x86_64, ); CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "-"; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.9; ONLY_ACTIVE_ARCH = YES; }; name = Development; }; CDAE3ACD0987CD92003250F8 /* Deployment */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = ( arm64, $IODBC_32BIT, x86_64, ); CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "-"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.9; }; name = Deployment; }; CDAE3B0D0987CDA2003250F8 /* Development */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = $IODBC_VERSION; DYLIB_COMPATIBILITY_VERSION = 1.0.0; DYLIB_CURRENT_VERSION = $IODBC_VERSION; EXPORTED_SYMBOLS_FILE = ../../mac/iodbcinst.exp; FRAMEWORK_SEARCH_PATHS = ( ../../mac/iODBC/build/Deployment, ../../mac/iODBC/build, ); FRAMEWORK_VERSION = 3.52; GCC_DYNAMIC_NO_PIC = NO; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "ODBCVER=0x351", _MACX, IODBC_COCOA, ); HEADER_SEARCH_PATHS = ( ../../include, ../../iodbcinst, ../../iodbc, ); INFOPLIST_FILE = "Info-iODBCinst.plist"; INSTALL_PATH = /Library/Frameworks; LIBRARY_SEARCH_PATHS = ""; MACOSX_DEPLOYMENT_TARGET = 10.9; OTHER_CFLAGS = "-fno-constant-cfstrings"; PRODUCT_BUNDLE_IDENTIFIER = org.iodbc.inst; PRODUCT_NAME = iODBCinst; RESMERGER_SOURCES_FORK = data; SECTORDER_FLAGS = ""; WARNING_CFLAGS = ( "-Wmost", "-Wno-four-char-constants", "-Wno-unknown-pragmas", ); WRAPPER_EXTENSION = framework; ZERO_LINK = NO; }; name = Development; }; CDAE3B0E0987CDA2003250F8 /* Deployment */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; COPY_PHASE_STRIP = YES; CURRENT_PROJECT_VERSION = $IODBC_VERSION; DYLIB_COMPATIBILITY_VERSION = 1.0.0; DYLIB_CURRENT_VERSION = $IODBC_VERSION; EXPORTED_SYMBOLS_FILE = ../../mac/iodbcinst.exp; FRAMEWORK_SEARCH_PATHS = ( ../../mac/iODBC/build/Deployment, ../../mac/iODBC/build, ); FRAMEWORK_VERSION = 3.52; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_OPTIMIZATION_LEVEL = 2; GCC_PREPROCESSOR_DEFINITIONS = ( "ODBCVER=0x351", _MACX, IODBC_COCOA, ); HEADER_SEARCH_PATHS = ( ../../include, ../../iodbcinst, ../../iodbc, ); INFOPLIST_FILE = "Info-iODBCinst.plist"; INSTALL_PATH = /Library/Frameworks; LIBRARY_SEARCH_PATHS = ""; MACOSX_DEPLOYMENT_TARGET = 10.9; OTHER_CFLAGS = "-fno-constant-cfstrings"; PRODUCT_BUNDLE_IDENTIFIER = org.iodbc.inst; PRODUCT_NAME = iODBCinst; RESMERGER_SOURCES_FORK = data; SECTORDER_FLAGS = ""; WARNING_CFLAGS = ( "-Wmost", "-Wno-four-char-constants", "-Wno-unknown-pragmas", ); WRAPPER_EXTENSION = framework; ZERO_LINK = NO; }; name = Deployment; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ CDAE3ACB0987CD92003250F8 /* Build configuration list for PBXProject "iODBCinst" */ = { isa = XCConfigurationList; buildConfigurations = ( CDAE3ACC0987CD92003250F8 /* Development */, CDAE3ACD0987CD92003250F8 /* Deployment */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Deployment; }; CDAE3B0C0987CDA2003250F8 /* Build configuration list for PBXNativeTarget "iODBCinst" */ = { isa = XCConfigurationList; buildConfigurations = ( CDAE3B0D0987CDA2003250F8 /* Development */, CDAE3B0E0987CDA2003250F8 /* Deployment */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Deployment; }; /* End XCConfigurationList section */ }; rootObject = 0867D690FE84028FC02AAC07 /* Project object */; } libiodbc-3.52.16/mac/iODBCinst/iODBCinst.xcodeproj/project.xcworkspace/0000775000175000017500000000000014424171427022536 500000000000000libiodbc-3.52.16/mac/iODBCinst/iODBCinst.xcodeproj/project.xcworkspace/contents.xcworkspacedata0000664000175000017500000000020714424170750027415 00000000000000 libiodbc-3.52.16/mac/iODBCinst/iODBCinst.xcodeproj/project.xcworkspace/xcshareddata/0000775000175000017500000000000014424171427025171 500000000000000libiodbc-3.52.16/mac/iODBCtestw/0000775000175000017500000000000014424171426013156 500000000000000libiodbc-3.52.16/mac/iODBCtestw/iODBCtestw.xcodeproj/0000775000175000017500000000000014424171427017122 500000000000000libiodbc-3.52.16/mac/iODBCtestw/iODBCtestw.xcodeproj/project.pbxproj0000664000175000017500000002503214424170750022116 00000000000000// !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 48; objects = { /* Begin PBXBuildFile section */ CDAE3B510987CF60003250F8 /* iodbctest.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B3B702780F5F01A801DE /* iodbctest.c */; }; CDAE3B530987CF60003250F8 /* iODBC.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F5CD65030497672D01A801EC /* iODBC.framework */; }; CDAE3B540987CF60003250F8 /* iODBCinst.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F5CD650E0497673F01A801EC /* iODBCinst.framework */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ CDAE3B5A0987CF60003250F8 /* iodbctestw */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = iodbctestw; sourceTree = BUILT_PRODUCTS_DIR; }; F535B3B702780F5F01A801DE /* iodbctest.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.c; fileEncoding = 30; name = iodbctest.c; path = ../../samples/iodbctest.c; sourceTree = SOURCE_ROOT; }; F5CD65030497672D01A801EC /* iODBC.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = iODBC.framework; path = ../iODBC/build/iODBC.framework; sourceTree = SOURCE_ROOT; }; F5CD650E0497673F01A801EC /* iODBCinst.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = iODBCinst.framework; path = ../iODBCinst/build/iODBCinst.framework; sourceTree = SOURCE_ROOT; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ CDAE3B520987CF60003250F8 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( CDAE3B530987CF60003250F8 /* iODBC.framework in Frameworks */, CDAE3B540987CF60003250F8 /* iODBCinst.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 08FB7794FE84155DC02AAC07 /* iodbctestw */ = { isa = PBXGroup; children = ( 08FB7795FE84155DC02AAC07 /* Source */, F535B3B802780F5F01A801DE /* Frameworks */, 1AB674ADFE9D54B511CA2CBB /* Products */, ); name = iodbctestw; sourceTree = ""; }; 08FB7795FE84155DC02AAC07 /* Source */ = { isa = PBXGroup; children = ( F535B3B702780F5F01A801DE /* iodbctest.c */, ); name = Source; sourceTree = ""; }; 1AB674ADFE9D54B511CA2CBB /* Products */ = { isa = PBXGroup; children = ( CDAE3B5A0987CF60003250F8 /* iodbctestw */, ); name = Products; sourceTree = ""; }; F535B3B802780F5F01A801DE /* Frameworks */ = { isa = PBXGroup; children = ( F5CD65030497672D01A801EC /* iODBC.framework */, F5CD650E0497673F01A801EC /* iODBCinst.framework */, ); name = Frameworks; path = ..; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ CDAE3B4F0987CF60003250F8 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ CDAE3B4E0987CF60003250F8 /* iodbctestw */ = { isa = PBXNativeTarget; buildConfigurationList = CDAE3B560987CF60003250F8 /* Build configuration list for PBXNativeTarget "iodbctestw" */; buildPhases = ( CDAE3B4F0987CF60003250F8 /* Headers */, CDAE3B500987CF60003250F8 /* Sources */, CDAE3B520987CF60003250F8 /* Frameworks */, CDAE3B550987CF60003250F8 /* Rez */, ); buildRules = ( ); dependencies = ( ); name = iodbctestw; productInstallPath = "/Library/Application Support/iODBC/bin"; productName = iodbctestw; productReference = CDAE3B5A0987CF60003250F8 /* iodbctestw */; productType = "com.apple.product-type.tool"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 08FB7793FE84155DC02AAC07 /* Project object */ = { isa = PBXProject; attributes = { LastUpgradeCheck = 1130; TargetAttributes = { CDAE3B4E0987CF60003250F8 = { ProvisioningStyle = Manual; }; }; }; buildConfigurationList = CDAE3B5C0987CF6F003250F8 /* Build configuration list for PBXProject "iODBCtestw" */; compatibilityVersion = "Xcode 8.0"; developmentRegion = en; hasScannedForEncodings = 1; knownRegions = ( en, Base, ); mainGroup = 08FB7794FE84155DC02AAC07 /* iodbctestw */; projectDirPath = ""; projectRoot = ""; targets = ( CDAE3B4E0987CF60003250F8 /* iodbctestw */, ); }; /* End PBXProject section */ /* Begin PBXRezBuildPhase section */ CDAE3B550987CF60003250F8 /* Rez */ = { isa = PBXRezBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXRezBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ CDAE3B500987CF60003250F8 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( CDAE3B510987CF60003250F8 /* iodbctest.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin XCBuildConfiguration section */ CDAE3B570987CF60003250F8 /* Development */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; CODE_SIGN_IDENTITY = "-"; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = $IODBC_VERSION; DYLIB_CURRENT_VERSION = $IODBC_VERSION; FRAMEWORK_SEARCH_PATHS = ( ../../mac/iODBC/build/Development, ../../mac/iODBC/build, ../../mac/iODBCinst/build/Development, ../../mac/iODBCinst/build, ); FRAMEWORK_VERSION = 3.52; GCC_DYNAMIC_NO_PIC = NO; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = UNICODE; HEADER_SEARCH_PATHS = ../../include; INSTALL_PATH = "/Library/Application Support/iODBC/bin"; LIBRARY_SEARCH_PATHS = ""; OTHER_CFLAGS = ""; OTHER_REZFLAGS = ""; PRODUCT_NAME = iodbctestw; RESMERGER_SOURCES_FORK = data; REZ_EXECUTABLE = YES; SECTORDER_FLAGS = ""; WARNING_CFLAGS = ( "-Wmost", "-Wno-four-char-constants", "-Wno-unknown-pragmas", ); ZERO_LINK = NO; }; name = Development; }; CDAE3B580987CF60003250F8 /* Deployment */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; COPY_PHASE_STRIP = YES; CURRENT_PROJECT_VERSION = $IODBC_VERSION; DYLIB_CURRENT_VERSION = $IODBC_VERSION; FRAMEWORK_SEARCH_PATHS = ( ../../mac/iODBC/build/Deployment, ../../mac/iODBC/build, ../../mac/iODBCinst/build/Deployment, ../../mac/iODBCinst/build, ); FRAMEWORK_VERSION = 3.52; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_OPTIMIZATION_LEVEL = 2; HEADER_SEARCH_PATHS = ../../include; INSTALL_PATH = "/Library/Application Support/iODBC/bin"; LIBRARY_SEARCH_PATHS = ""; OTHER_CFLAGS = ""; OTHER_REZFLAGS = ""; PRODUCT_NAME = iodbctestw; RESMERGER_SOURCES_FORK = data; REZ_EXECUTABLE = YES; SECTORDER_FLAGS = ""; WARNING_CFLAGS = ( "-Wmost", "-Wno-four-char-constants", "-Wno-unknown-pragmas", ); ZERO_LINK = NO; }; name = Deployment; }; CDAE3B5D0987CF6F003250F8 /* Development */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = ( arm64, $IODBC_32BIT, x86_64, ); CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "-"; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.9; ONLY_ACTIVE_ARCH = YES; }; name = Development; }; CDAE3B5E0987CF6F003250F8 /* Deployment */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = ( arm64, $IODBC_32BIT, x86_64, ); CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "-"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.9; }; name = Deployment; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ CDAE3B560987CF60003250F8 /* Build configuration list for PBXNativeTarget "iodbctestw" */ = { isa = XCConfigurationList; buildConfigurations = ( CDAE3B570987CF60003250F8 /* Development */, CDAE3B580987CF60003250F8 /* Deployment */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Deployment; }; CDAE3B5C0987CF6F003250F8 /* Build configuration list for PBXProject "iODBCtestw" */ = { isa = XCConfigurationList; buildConfigurations = ( CDAE3B5D0987CF6F003250F8 /* Development */, CDAE3B5E0987CF6F003250F8 /* Deployment */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Deployment; }; /* End XCConfigurationList section */ }; rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; } libiodbc-3.52.16/mac/iODBCtestw/iODBCtestw.xcodeproj/project.xcworkspace/0000775000175000017500000000000014424171427023120 500000000000000libiodbc-3.52.16/mac/iODBCtestw/iODBCtestw.xcodeproj/project.xcworkspace/contents.xcworkspacedata0000664000175000017500000000020714424170750027777 00000000000000 libiodbc-3.52.16/mac/iODBCtestw/iODBCtestw.xcodeproj/project.xcworkspace/xcshareddata/0000775000175000017500000000000014424171427025553 500000000000000libiodbc-3.52.16/mac/iODBCtest/0000775000175000017500000000000014424171426012767 500000000000000libiodbc-3.52.16/mac/iODBCtest/iODBCtest.xcodeproj/0000775000175000017500000000000014424171427016544 500000000000000libiodbc-3.52.16/mac/iODBCtest/iODBCtest.xcodeproj/project.xcworkspace/0000775000175000017500000000000014424171427022542 500000000000000libiodbc-3.52.16/mac/iODBCtest/iODBCtest.xcodeproj/project.xcworkspace/contents.xcworkspacedata0000664000175000017500000000020714424170750027421 00000000000000 libiodbc-3.52.16/mac/iODBCtest/iODBCtest.xcodeproj/project.xcworkspace/xcshareddata/0000775000175000017500000000000014424171427025175 500000000000000libiodbc-3.52.16/mac/iODBCtest/iODBCtest.xcodeproj/project.pbxproj0000664000175000017500000002504214424170750021541 00000000000000// !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 48; objects = { /* Begin PBXBuildFile section */ CDAE3B2F0987CEF4003250F8 /* iodbctest.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B3B702780F5F01A801DE /* iodbctest.c */; }; CDAE3B310987CEF4003250F8 /* iODBC.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F5CD65030497672D01A801EC /* iODBC.framework */; }; CDAE3B320987CEF4003250F8 /* iODBCinst.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F5CD650E0497673F01A801EC /* iODBCinst.framework */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ CDAE3B380987CEF4003250F8 /* iodbctest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = iodbctest; sourceTree = BUILT_PRODUCTS_DIR; }; F535B3B702780F5F01A801DE /* iodbctest.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.c; fileEncoding = 30; name = iodbctest.c; path = ../../samples/iodbctest.c; sourceTree = SOURCE_ROOT; }; F5CD65030497672D01A801EC /* iODBC.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = iODBC.framework; path = ../iODBC/build/iODBC.framework; sourceTree = SOURCE_ROOT; }; F5CD650E0497673F01A801EC /* iODBCinst.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = iODBCinst.framework; path = ../iODBCinst/build/iODBCinst.framework; sourceTree = SOURCE_ROOT; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ CDAE3B300987CEF4003250F8 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( CDAE3B310987CEF4003250F8 /* iODBC.framework in Frameworks */, CDAE3B320987CEF4003250F8 /* iODBCinst.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 08FB7794FE84155DC02AAC07 /* iodbctest */ = { isa = PBXGroup; children = ( 08FB7795FE84155DC02AAC07 /* Source */, F535B3B802780F5F01A801DE /* Frameworks */, 1AB674ADFE9D54B511CA2CBB /* Products */, ); name = iodbctest; sourceTree = ""; }; 08FB7795FE84155DC02AAC07 /* Source */ = { isa = PBXGroup; children = ( F535B3B702780F5F01A801DE /* iodbctest.c */, ); name = Source; sourceTree = ""; }; 1AB674ADFE9D54B511CA2CBB /* Products */ = { isa = PBXGroup; children = ( CDAE3B380987CEF4003250F8 /* iodbctest */, ); name = Products; sourceTree = ""; }; F535B3B802780F5F01A801DE /* Frameworks */ = { isa = PBXGroup; children = ( F5CD65030497672D01A801EC /* iODBC.framework */, F5CD650E0497673F01A801EC /* iODBCinst.framework */, ); name = Frameworks; path = ..; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ CDAE3B2D0987CEF4003250F8 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ CDAE3B2C0987CEF4003250F8 /* iodbctest */ = { isa = PBXNativeTarget; buildConfigurationList = CDAE3B340987CEF4003250F8 /* Build configuration list for PBXNativeTarget "iodbctest" */; buildPhases = ( CDAE3B2D0987CEF4003250F8 /* Headers */, CDAE3B2E0987CEF4003250F8 /* Sources */, CDAE3B300987CEF4003250F8 /* Frameworks */, CDAE3B330987CEF4003250F8 /* Rez */, ); buildRules = ( ); dependencies = ( ); name = iodbctest; productInstallPath = "/Library/Application Support/iODBC/bin"; productName = iodbctest; productReference = CDAE3B380987CEF4003250F8 /* iodbctest */; productType = "com.apple.product-type.tool"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 08FB7793FE84155DC02AAC07 /* Project object */ = { isa = PBXProject; attributes = { LastUpgradeCheck = 1130; TargetAttributes = { CDAE3B2C0987CEF4003250F8 = { ProvisioningStyle = Manual; }; }; }; buildConfigurationList = CDAE3B3A0987CEFE003250F8 /* Build configuration list for PBXProject "iODBCtest" */; compatibilityVersion = "Xcode 8.0"; developmentRegion = en; hasScannedForEncodings = 1; knownRegions = ( en, Base, ); mainGroup = 08FB7794FE84155DC02AAC07 /* iodbctest */; projectDirPath = ""; projectRoot = ""; targets = ( CDAE3B2C0987CEF4003250F8 /* iodbctest */, ); }; /* End PBXProject section */ /* Begin PBXRezBuildPhase section */ CDAE3B330987CEF4003250F8 /* Rez */ = { isa = PBXRezBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXRezBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ CDAE3B2E0987CEF4003250F8 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( CDAE3B2F0987CEF4003250F8 /* iodbctest.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin XCBuildConfiguration section */ CDAE3B350987CEF4003250F8 /* Development */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; CODE_SIGN_IDENTITY = "-"; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = $IODBC_VERSION; DYLIB_CURRENT_VERSION = $IODBC_VERSION; FRAMEWORK_SEARCH_PATHS = ( ../../mac/iODBC/build/Development, ../../mac/iODBC/build, ../../mac/iODBCinst/build/Development, ../../mac/iODBCinst/build, ); FRAMEWORK_VERSION = 3.52; GCC_DYNAMIC_NO_PIC = NO; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ""; HEADER_SEARCH_PATHS = ../../include; INSTALL_PATH = "/Library/Application Support/iODBC/bin"; LIBRARY_SEARCH_PATHS = ""; OTHER_CFLAGS = ""; OTHER_REZFLAGS = ""; PRODUCT_NAME = iodbctest; RESMERGER_SOURCES_FORK = data; REZ_EXECUTABLE = YES; SECTORDER_FLAGS = ""; WARNING_CFLAGS = ( "-Wmost", "-Wno-four-char-constants", "-Wno-unknown-pragmas", ); ZERO_LINK = NO; }; name = Development; }; CDAE3B360987CEF4003250F8 /* Deployment */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; COPY_PHASE_STRIP = YES; CURRENT_PROJECT_VERSION = $IODBC_VERSION; DEPLOYMENT_LOCATION = NO; DYLIB_CURRENT_VERSION = $IODBC_VERSION; FRAMEWORK_SEARCH_PATHS = ( ../../mac/iODBC/build/Deployment, ../../mac/iODBC/build, ../../mac/iODBCinst/build/Deployment, ../../mac/iODBCinst/build, ); FRAMEWORK_VERSION = 3.52; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_OPTIMIZATION_LEVEL = 2; HEADER_SEARCH_PATHS = ../../include; INSTALL_PATH = "/Library/Application Support/iODBC/bin"; LIBRARY_SEARCH_PATHS = ""; OTHER_CFLAGS = ""; OTHER_REZFLAGS = ""; PRODUCT_NAME = iodbctest; RESMERGER_SOURCES_FORK = data; REZ_EXECUTABLE = YES; SECTORDER_FLAGS = ""; WARNING_CFLAGS = ( "-Wmost", "-Wno-four-char-constants", "-Wno-unknown-pragmas", ); ZERO_LINK = NO; }; name = Deployment; }; CDAE3B3B0987CEFE003250F8 /* Development */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = ( arm64, $IODBC_32BIT, x86_64, ); CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "-"; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.9; ONLY_ACTIVE_ARCH = YES; }; name = Development; }; CDAE3B3C0987CEFE003250F8 /* Deployment */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = ( arm64, $IODBC_32BIT, x86_64, ); CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "-"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.9; }; name = Deployment; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ CDAE3B340987CEF4003250F8 /* Build configuration list for PBXNativeTarget "iodbctest" */ = { isa = XCConfigurationList; buildConfigurations = ( CDAE3B350987CEF4003250F8 /* Development */, CDAE3B360987CEF4003250F8 /* Deployment */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Deployment; }; CDAE3B3A0987CEFE003250F8 /* Build configuration list for PBXProject "iODBCtest" */ = { isa = XCConfigurationList; buildConfigurations = ( CDAE3B3B0987CEFE003250F8 /* Development */, CDAE3B3C0987CEFE003250F8 /* Deployment */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Deployment; }; /* End XCConfigurationList section */ }; rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; } libiodbc-3.52.16/mac/iODBC/0000775000175000017500000000000014424171426012067 500000000000000libiodbc-3.52.16/mac/iODBC/iODBC.xcodeproj/0000775000175000017500000000000014424171426014743 500000000000000libiodbc-3.52.16/mac/iODBC/iODBC.xcodeproj/project.xcworkspace/0000775000175000017500000000000014424171426020741 500000000000000libiodbc-3.52.16/mac/iODBC/iODBC.xcodeproj/project.xcworkspace/xcshareddata/0000775000175000017500000000000014424171426023374 500000000000000libiodbc-3.52.16/mac/iODBC/iODBC.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist0000664000175000017500000000035614424170750027775 00000000000000 IDEDidComputeMac32BitWarning libiodbc-3.52.16/mac/iODBC/iODBC.xcodeproj/project.xcworkspace/contents.xcworkspacedata0000664000175000017500000000020714424170750025621 00000000000000 libiodbc-3.52.16/mac/iODBC/iODBC.xcodeproj/project.pbxproj0000664000175000017500000020064614424170750017746 00000000000000// !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 48; objects = { /* Begin PBXBuildFile section */ 85A390BE1B790FB600AC8862 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 85A390BC1B790FB600AC8862 /* InfoPlist.strings */; }; CDAE3A340987CB86003250F8 /* dlf.h in Headers */ = {isa = PBXBuildFile; fileRef = F535B31A0277FBC601A801DE /* dlf.h */; }; CDAE3A350987CB86003250F8 /* dlproc.h in Headers */ = {isa = PBXBuildFile; fileRef = F535B31C0277FBC601A801DE /* dlproc.h */; }; CDAE3A360987CB86003250F8 /* hdbc.h in Headers */ = {isa = PBXBuildFile; fileRef = F535B3200277FBC601A801DE /* hdbc.h */; }; CDAE3A370987CB86003250F8 /* hdesc.h in Headers */ = {isa = PBXBuildFile; fileRef = F535B3210277FBC601A801DE /* hdesc.h */; }; CDAE3A380987CB86003250F8 /* henv.h in Headers */ = {isa = PBXBuildFile; fileRef = F535B3240277FBC601A801DE /* henv.h */; }; CDAE3A390987CB86003250F8 /* herr.h in Headers */ = {isa = PBXBuildFile; fileRef = F535B3270277FBC601A801DE /* herr.h */; }; CDAE3A3A0987CB86003250F8 /* hstmt.h in Headers */ = {isa = PBXBuildFile; fileRef = F535B3290277FBC601A801DE /* hstmt.h */; }; CDAE3A3B0987CB86003250F8 /* iodbc.h in Headers */ = {isa = PBXBuildFile; fileRef = F535B32C0277FBC601A801DE /* iodbc.h */; settings = {ATTRIBUTES = (); }; }; CDAE3A3C0987CB86003250F8 /* ithread.h in Headers */ = {isa = PBXBuildFile; fileRef = F535B32D0277FBC601A801DE /* ithread.h */; }; CDAE3A3D0987CB86003250F8 /* itrace.h in Headers */ = {isa = PBXBuildFile; fileRef = F535B32F0277FBC601A801DE /* itrace.h */; }; CDAE3A3E0987CB86003250F8 /* isqltypes.h in Headers */ = {isa = PBXBuildFile; fileRef = F535B34F0277FC2E01A801DE /* isqltypes.h */; settings = {ATTRIBUTES = (Public, ); }; }; CDAE3A3F0987CB86003250F8 /* isql.h in Headers */ = {isa = PBXBuildFile; fileRef = F535B3500277FC2E01A801DE /* isql.h */; settings = {ATTRIBUTES = (Public, ); }; }; CDAE3A400987CB86003250F8 /* isqlext.h in Headers */ = {isa = PBXBuildFile; fileRef = F535B3510277FC2E01A801DE /* isqlext.h */; settings = {ATTRIBUTES = (Public, ); }; }; CDAE3A410987CB86003250F8 /* sql.h in Headers */ = {isa = PBXBuildFile; fileRef = F535B3520277FC2E01A801DE /* sql.h */; settings = {ATTRIBUTES = (Public, ); }; }; CDAE3A420987CB86003250F8 /* sqlext.h in Headers */ = {isa = PBXBuildFile; fileRef = F535B3530277FC2E01A801DE /* sqlext.h */; settings = {ATTRIBUTES = (Public, ); }; }; CDAE3A430987CB86003250F8 /* sqltypes.h in Headers */ = {isa = PBXBuildFile; fileRef = F535B3540277FC2E01A801DE /* sqltypes.h */; settings = {ATTRIBUTES = (Public, ); }; }; CDAE3A440987CB86003250F8 /* sqlucode.h in Headers */ = {isa = PBXBuildFile; fileRef = F55DDABC04949A6001000FFE /* sqlucode.h */; settings = {ATTRIBUTES = (Public, ); }; }; CDAE3A450987CB86003250F8 /* iodbcext.h in Headers */ = {isa = PBXBuildFile; fileRef = F586819204949B4701000FFE /* iodbcext.h */; settings = {ATTRIBUTES = (Public, ); }; }; CDAE3A460987CB86003250F8 /* unicode.h in Headers */ = {isa = PBXBuildFile; fileRef = F586819504949C2101000FFE /* unicode.h */; }; CDAE3A470987CB86003250F8 /* proto.h in Headers */ = {isa = PBXBuildFile; fileRef = F578092B04CED1970194ADB8 /* proto.h */; }; CDAE3A480987CB86003250F8 /* trace.h in Headers */ = {isa = PBXBuildFile; fileRef = F578093B04CED1970194ADB8 /* trace.h */; }; CDAE3A490987CB86003250F8 /* iodbcunix.h in Headers */ = {isa = PBXBuildFile; fileRef = 71DF011C06A3E1DD007AF56B /* iodbcunix.h */; settings = {ATTRIBUTES = (Public, ); }; }; CDAE3A4D0987CB86003250F8 /* odbc3.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B3160277FBC601A801DE /* odbc3.c */; }; CDAE3A4E0987CB86003250F8 /* catalog.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B3170277FBC601A801DE /* catalog.c */; }; CDAE3A4F0987CB86003250F8 /* connect.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B3180277FBC601A801DE /* connect.c */; }; CDAE3A500987CB86003250F8 /* dlf.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B3190277FBC601A801DE /* dlf.c */; }; CDAE3A510987CB86003250F8 /* dlproc.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B31B0277FBC601A801DE /* dlproc.c */; }; CDAE3A520987CB86003250F8 /* execute.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B31D0277FBC601A801DE /* execute.c */; }; CDAE3A530987CB86003250F8 /* fetch.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B31E0277FBC601A801DE /* fetch.c */; }; CDAE3A540987CB86003250F8 /* hdbc.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B31F0277FBC601A801DE /* hdbc.c */; }; CDAE3A550987CB86003250F8 /* henv.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B3220277FBC601A801DE /* henv.c */; }; CDAE3A560987CB86003250F8 /* herr.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B3250277FBC601A801DE /* herr.c */; }; CDAE3A570987CB86003250F8 /* hstmt.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B3280277FBC601A801DE /* hstmt.c */; }; CDAE3A580987CB86003250F8 /* info.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B32A0277FBC601A801DE /* info.c */; }; CDAE3A590987CB86003250F8 /* misc.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B3310277FBC601A801DE /* misc.c */; }; CDAE3A5A0987CB86003250F8 /* prepare.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B3320277FBC601A801DE /* prepare.c */; }; CDAE3A5B0987CB86003250F8 /* result.c in Sources */ = {isa = PBXBuildFile; fileRef = F535B3330277FBC601A801DE /* result.c */; }; CDAE3A5C0987CB86003250F8 /* iodbc.exp in Sources */ = {isa = PBXBuildFile; fileRef = F54DA8D70279592201A801DE /* iodbc.exp */; }; CDAE3A5D0987CB86003250F8 /* unicode.c in Sources */ = {isa = PBXBuildFile; fileRef = F586819404949C2101000FFE /* unicode.c */; }; CDAE3A5E0987CB86003250F8 /* AllocConnect.c in Sources */ = {isa = PBXBuildFile; fileRef = F57808F204CED1970194ADB8 /* AllocConnect.c */; }; CDAE3A5F0987CB86003250F8 /* AllocEnv.c in Sources */ = {isa = PBXBuildFile; fileRef = F57808F304CED1970194ADB8 /* AllocEnv.c */; }; CDAE3A600987CB86003250F8 /* AllocHandle.c in Sources */ = {isa = PBXBuildFile; fileRef = F57808F404CED1970194ADB8 /* AllocHandle.c */; }; CDAE3A610987CB86003250F8 /* AllocStmt.c in Sources */ = {isa = PBXBuildFile; fileRef = F57808F504CED1970194ADB8 /* AllocStmt.c */; }; CDAE3A620987CB86003250F8 /* BindCol.c in Sources */ = {isa = PBXBuildFile; fileRef = F57808F604CED1970194ADB8 /* BindCol.c */; }; CDAE3A630987CB86003250F8 /* BindParameter.c in Sources */ = {isa = PBXBuildFile; fileRef = F57808F704CED1970194ADB8 /* BindParameter.c */; }; CDAE3A640987CB86003250F8 /* BrowseConnect.c in Sources */ = {isa = PBXBuildFile; fileRef = F57808F804CED1970194ADB8 /* BrowseConnect.c */; }; CDAE3A650987CB86003250F8 /* BulkOperations.c in Sources */ = {isa = PBXBuildFile; fileRef = F57808F904CED1970194ADB8 /* BulkOperations.c */; }; CDAE3A660987CB86003250F8 /* Cancel.c in Sources */ = {isa = PBXBuildFile; fileRef = F57808FA04CED1970194ADB8 /* Cancel.c */; }; CDAE3A670987CB86003250F8 /* CloseCursor.c in Sources */ = {isa = PBXBuildFile; fileRef = F57808FB04CED1970194ADB8 /* CloseCursor.c */; }; CDAE3A680987CB86003250F8 /* ColAttribute.c in Sources */ = {isa = PBXBuildFile; fileRef = F57808FC04CED1970194ADB8 /* ColAttribute.c */; }; CDAE3A690987CB86003250F8 /* ColumnPrivileges.c in Sources */ = {isa = PBXBuildFile; fileRef = F57808FD04CED1970194ADB8 /* ColumnPrivileges.c */; }; CDAE3A6A0987CB86003250F8 /* Columns.c in Sources */ = {isa = PBXBuildFile; fileRef = F57808FE04CED1970194ADB8 /* Columns.c */; }; CDAE3A6B0987CB86003250F8 /* Connect.c in Sources */ = {isa = PBXBuildFile; fileRef = F57808FF04CED1970194ADB8 /* Connect.c */; }; CDAE3A6C0987CB86003250F8 /* CopyDesc.c in Sources */ = {isa = PBXBuildFile; fileRef = F578090004CED1970194ADB8 /* CopyDesc.c */; }; CDAE3A6D0987CB86003250F8 /* DataSources.c in Sources */ = {isa = PBXBuildFile; fileRef = F578090104CED1970194ADB8 /* DataSources.c */; }; CDAE3A6E0987CB86003250F8 /* DescribeCol.c in Sources */ = {isa = PBXBuildFile; fileRef = F578090204CED1970194ADB8 /* DescribeCol.c */; }; CDAE3A6F0987CB86003250F8 /* DescribeParam.c in Sources */ = {isa = PBXBuildFile; fileRef = F578090304CED1970194ADB8 /* DescribeParam.c */; }; CDAE3A700987CB86003250F8 /* Disconnect.c in Sources */ = {isa = PBXBuildFile; fileRef = F578090404CED1970194ADB8 /* Disconnect.c */; }; CDAE3A710987CB86003250F8 /* DriverConnect.c in Sources */ = {isa = PBXBuildFile; fileRef = F578090504CED1970194ADB8 /* DriverConnect.c */; }; CDAE3A720987CB86003250F8 /* Drivers.c in Sources */ = {isa = PBXBuildFile; fileRef = F578090604CED1970194ADB8 /* Drivers.c */; }; CDAE3A730987CB86003250F8 /* EndTran.c in Sources */ = {isa = PBXBuildFile; fileRef = F578090704CED1970194ADB8 /* EndTran.c */; }; CDAE3A740987CB86003250F8 /* Error.c in Sources */ = {isa = PBXBuildFile; fileRef = F578090804CED1970194ADB8 /* Error.c */; }; CDAE3A750987CB86003250F8 /* ExecDirect.c in Sources */ = {isa = PBXBuildFile; fileRef = F578090904CED1970194ADB8 /* ExecDirect.c */; }; CDAE3A760987CB86003250F8 /* Execute.c in Sources */ = {isa = PBXBuildFile; fileRef = F578090A04CED1970194ADB8 /* Execute.c */; }; CDAE3A770987CB86003250F8 /* ExtendedFetch.c in Sources */ = {isa = PBXBuildFile; fileRef = F578090B04CED1970194ADB8 /* ExtendedFetch.c */; }; CDAE3A780987CB86003250F8 /* Fetch.c in Sources */ = {isa = PBXBuildFile; fileRef = F578090C04CED1970194ADB8 /* Fetch.c */; }; CDAE3A790987CB86003250F8 /* FetchScroll.c in Sources */ = {isa = PBXBuildFile; fileRef = F578090D04CED1970194ADB8 /* FetchScroll.c */; }; CDAE3A7A0987CB86003250F8 /* ForeignKeys.c in Sources */ = {isa = PBXBuildFile; fileRef = F578090E04CED1970194ADB8 /* ForeignKeys.c */; }; CDAE3A7B0987CB86003250F8 /* FreeConnect.c in Sources */ = {isa = PBXBuildFile; fileRef = F578090F04CED1970194ADB8 /* FreeConnect.c */; }; CDAE3A7C0987CB86003250F8 /* FreeEnv.c in Sources */ = {isa = PBXBuildFile; fileRef = F578091004CED1970194ADB8 /* FreeEnv.c */; }; CDAE3A7D0987CB86003250F8 /* FreeHandle.c in Sources */ = {isa = PBXBuildFile; fileRef = F578091104CED1970194ADB8 /* FreeHandle.c */; }; CDAE3A7E0987CB86003250F8 /* FreeStmt.c in Sources */ = {isa = PBXBuildFile; fileRef = F578091204CED1970194ADB8 /* FreeStmt.c */; }; CDAE3A7F0987CB86003250F8 /* GetConnectAttr.c in Sources */ = {isa = PBXBuildFile; fileRef = F578091304CED1970194ADB8 /* GetConnectAttr.c */; }; CDAE3A800987CB86003250F8 /* GetConnectOption.c in Sources */ = {isa = PBXBuildFile; fileRef = F578091404CED1970194ADB8 /* GetConnectOption.c */; }; CDAE3A810987CB86003250F8 /* GetCursorName.c in Sources */ = {isa = PBXBuildFile; fileRef = F578091504CED1970194ADB8 /* GetCursorName.c */; }; CDAE3A820987CB86003250F8 /* GetData.c in Sources */ = {isa = PBXBuildFile; fileRef = F578091604CED1970194ADB8 /* GetData.c */; }; CDAE3A830987CB86003250F8 /* GetDescField.c in Sources */ = {isa = PBXBuildFile; fileRef = F578091704CED1970194ADB8 /* GetDescField.c */; }; CDAE3A840987CB86003250F8 /* GetDescRec.c in Sources */ = {isa = PBXBuildFile; fileRef = F578091804CED1970194ADB8 /* GetDescRec.c */; }; CDAE3A850987CB86003250F8 /* GetDiagField.c in Sources */ = {isa = PBXBuildFile; fileRef = F578091904CED1970194ADB8 /* GetDiagField.c */; }; CDAE3A860987CB86003250F8 /* GetDiagRec.c in Sources */ = {isa = PBXBuildFile; fileRef = F578091A04CED1970194ADB8 /* GetDiagRec.c */; }; CDAE3A870987CB86003250F8 /* GetEnvAttr.c in Sources */ = {isa = PBXBuildFile; fileRef = F578091B04CED1970194ADB8 /* GetEnvAttr.c */; }; CDAE3A880987CB86003250F8 /* GetFunctions.c in Sources */ = {isa = PBXBuildFile; fileRef = F578091C04CED1970194ADB8 /* GetFunctions.c */; }; CDAE3A890987CB86003250F8 /* GetStmtAttr.c in Sources */ = {isa = PBXBuildFile; fileRef = F578091D04CED1970194ADB8 /* GetStmtAttr.c */; }; CDAE3A8A0987CB86003250F8 /* GetStmtOption.c in Sources */ = {isa = PBXBuildFile; fileRef = F578091E04CED1970194ADB8 /* GetStmtOption.c */; }; CDAE3A8B0987CB86003250F8 /* GetTypeInfo.c in Sources */ = {isa = PBXBuildFile; fileRef = F578091F04CED1970194ADB8 /* GetTypeInfo.c */; }; CDAE3A8C0987CB86003250F8 /* Info.c in Sources */ = {isa = PBXBuildFile; fileRef = F578092004CED1970194ADB8 /* Info.c */; }; CDAE3A8D0987CB86003250F8 /* MoreResults.c in Sources */ = {isa = PBXBuildFile; fileRef = F578092104CED1970194ADB8 /* MoreResults.c */; }; CDAE3A8E0987CB86003250F8 /* NativeSql.c in Sources */ = {isa = PBXBuildFile; fileRef = F578092204CED1970194ADB8 /* NativeSql.c */; }; CDAE3A8F0987CB86003250F8 /* NumParams.c in Sources */ = {isa = PBXBuildFile; fileRef = F578092304CED1970194ADB8 /* NumParams.c */; }; CDAE3A900987CB86003250F8 /* NumResultCols.c in Sources */ = {isa = PBXBuildFile; fileRef = F578092404CED1970194ADB8 /* NumResultCols.c */; }; CDAE3A910987CB86003250F8 /* ParamData.c in Sources */ = {isa = PBXBuildFile; fileRef = F578092504CED1970194ADB8 /* ParamData.c */; }; CDAE3A920987CB86003250F8 /* ParamOptions.c in Sources */ = {isa = PBXBuildFile; fileRef = F578092604CED1970194ADB8 /* ParamOptions.c */; }; CDAE3A930987CB86003250F8 /* Prepare.c in Sources */ = {isa = PBXBuildFile; fileRef = F578092704CED1970194ADB8 /* Prepare.c */; }; CDAE3A940987CB86003250F8 /* PrimaryKeys.c in Sources */ = {isa = PBXBuildFile; fileRef = F578092804CED1970194ADB8 /* PrimaryKeys.c */; }; CDAE3A950987CB86003250F8 /* ProcedureColumns.c in Sources */ = {isa = PBXBuildFile; fileRef = F578092904CED1970194ADB8 /* ProcedureColumns.c */; }; CDAE3A960987CB86003250F8 /* Procedures.c in Sources */ = {isa = PBXBuildFile; fileRef = F578092A04CED1970194ADB8 /* Procedures.c */; }; CDAE3A970987CB86003250F8 /* PutData.c in Sources */ = {isa = PBXBuildFile; fileRef = F578092C04CED1970194ADB8 /* PutData.c */; }; CDAE3A980987CB86003250F8 /* RowCount.c in Sources */ = {isa = PBXBuildFile; fileRef = F578092D04CED1970194ADB8 /* RowCount.c */; }; CDAE3A990987CB86003250F8 /* SetConnectAttr.c in Sources */ = {isa = PBXBuildFile; fileRef = F578092E04CED1970194ADB8 /* SetConnectAttr.c */; }; CDAE3A9A0987CB86003250F8 /* SetConnectOption.c in Sources */ = {isa = PBXBuildFile; fileRef = F578092F04CED1970194ADB8 /* SetConnectOption.c */; }; CDAE3A9B0987CB86003250F8 /* SetCursorName.c in Sources */ = {isa = PBXBuildFile; fileRef = F578093004CED1970194ADB8 /* SetCursorName.c */; }; CDAE3A9C0987CB86003250F8 /* SetEnvAttr.c in Sources */ = {isa = PBXBuildFile; fileRef = F578093104CED1970194ADB8 /* SetEnvAttr.c */; }; CDAE3A9D0987CB86003250F8 /* SetPos.c in Sources */ = {isa = PBXBuildFile; fileRef = F578093204CED1970194ADB8 /* SetPos.c */; }; CDAE3A9E0987CB86003250F8 /* SetScrollOptions.c in Sources */ = {isa = PBXBuildFile; fileRef = F578093304CED1970194ADB8 /* SetScrollOptions.c */; }; CDAE3A9F0987CB86003250F8 /* SetStmtAttr.c in Sources */ = {isa = PBXBuildFile; fileRef = F578093404CED1970194ADB8 /* SetStmtAttr.c */; }; CDAE3AA00987CB86003250F8 /* SetStmtOption.c in Sources */ = {isa = PBXBuildFile; fileRef = F578093504CED1970194ADB8 /* SetStmtOption.c */; }; CDAE3AA10987CB86003250F8 /* SpecialColumns.c in Sources */ = {isa = PBXBuildFile; fileRef = F578093604CED1970194ADB8 /* SpecialColumns.c */; }; CDAE3AA20987CB86003250F8 /* Statistics.c in Sources */ = {isa = PBXBuildFile; fileRef = F578093704CED1970194ADB8 /* Statistics.c */; }; CDAE3AA30987CB86003250F8 /* TablePrivileges.c in Sources */ = {isa = PBXBuildFile; fileRef = F578093804CED1970194ADB8 /* TablePrivileges.c */; }; CDAE3AA40987CB86003250F8 /* Tables.c in Sources */ = {isa = PBXBuildFile; fileRef = F578093904CED1970194ADB8 /* Tables.c */; }; CDAE3AA50987CB86003250F8 /* trace.c in Sources */ = {isa = PBXBuildFile; fileRef = F578093A04CED1970194ADB8 /* trace.c */; }; CDAE3AA60987CB86003250F8 /* Transact.c in Sources */ = {isa = PBXBuildFile; fileRef = F578093C04CED1970194ADB8 /* Transact.c */; }; CDAE3AA70987CB86003250F8 /* SetDescField.c in Sources */ = {isa = PBXBuildFile; fileRef = F5C609C304D1703401237589 /* SetDescField.c */; }; CDAE3AA80987CB86003250F8 /* SetDescRec.c in Sources */ = {isa = PBXBuildFile; fileRef = 71C53C2905E39D1F00D95EFB /* SetDescRec.c */; }; CDAE3AAA0987CB86003250F8 /* iODBCinst.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F5EC325104D01DC50121CDE8 /* iODBCinst.framework */; }; CDAE3AAB0987CB86003250F8 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F5EC325904D0397D0121CDE8 /* Carbon.framework */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 71C53C2905E39D1F00D95EFB /* SetDescRec.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SetDescRec.c; path = ../../iodbc/trace/SetDescRec.c; sourceTree = SOURCE_ROOT; }; 71DF011C06A3E1DD007AF56B /* iodbcunix.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = iodbcunix.h; path = ../include/iodbcunix.h; sourceTree = SOURCE_ROOT; }; CD9487172636F1F400DBD85F /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = ../en.lproj/InfoPlist.strings; sourceTree = ""; }; CDAE3AB10987CB86003250F8 /* Info-iODBC.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Info-iODBC.plist"; sourceTree = ""; }; CDAE3AB20987CB86003250F8 /* iODBC.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = iODBC.framework; sourceTree = BUILT_PRODUCTS_DIR; }; F535B3160277FBC601A801DE /* odbc3.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = odbc3.c; path = ../../iodbc/odbc3.c; sourceTree = SOURCE_ROOT; }; F535B3170277FBC601A801DE /* catalog.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = catalog.c; path = ../../iodbc/catalog.c; sourceTree = SOURCE_ROOT; }; F535B3180277FBC601A801DE /* connect.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = connect.c; path = ../../iodbc/connect.c; sourceTree = SOURCE_ROOT; }; F535B3190277FBC601A801DE /* dlf.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = dlf.c; path = ../../iodbcinst/dlf.c; sourceTree = SOURCE_ROOT; }; F535B31A0277FBC601A801DE /* dlf.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = dlf.h; path = ../../iodbcinst/dlf.h; sourceTree = SOURCE_ROOT; }; F535B31B0277FBC601A801DE /* dlproc.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = dlproc.c; path = ../../iodbc/dlproc.c; sourceTree = SOURCE_ROOT; }; F535B31C0277FBC601A801DE /* dlproc.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = dlproc.h; path = ../../iodbc/dlproc.h; sourceTree = SOURCE_ROOT; }; F535B31D0277FBC601A801DE /* execute.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = execute.c; path = ../../iodbc/execute.c; sourceTree = SOURCE_ROOT; }; F535B31E0277FBC601A801DE /* fetch.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = fetch.c; path = ../../iodbc/fetch.c; sourceTree = SOURCE_ROOT; }; F535B31F0277FBC601A801DE /* hdbc.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = hdbc.c; path = ../../iodbc/hdbc.c; sourceTree = SOURCE_ROOT; }; F535B3200277FBC601A801DE /* hdbc.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = hdbc.h; path = ../../iodbc/hdbc.h; sourceTree = SOURCE_ROOT; }; F535B3210277FBC601A801DE /* hdesc.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = hdesc.h; path = ../../iodbc/hdesc.h; sourceTree = SOURCE_ROOT; }; F535B3220277FBC601A801DE /* henv.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = henv.c; path = ../../iodbc/henv.c; sourceTree = SOURCE_ROOT; }; F535B3230277FBC601A801DE /* henv.ci */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = henv.ci; path = ../../iodbc/henv.ci; sourceTree = SOURCE_ROOT; }; F535B3240277FBC601A801DE /* henv.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = henv.h; path = ../../iodbc/henv.h; sourceTree = SOURCE_ROOT; }; F535B3250277FBC601A801DE /* herr.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = herr.c; path = ../../iodbc/herr.c; sourceTree = SOURCE_ROOT; }; F535B3260277FBC601A801DE /* herr.ci */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = herr.ci; path = ../../iodbc/herr.ci; sourceTree = SOURCE_ROOT; }; F535B3270277FBC601A801DE /* herr.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = herr.h; path = ../../iodbc/herr.h; sourceTree = SOURCE_ROOT; }; F535B3280277FBC601A801DE /* hstmt.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = hstmt.c; path = ../../iodbc/hstmt.c; sourceTree = SOURCE_ROOT; }; F535B3290277FBC601A801DE /* hstmt.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = hstmt.h; path = ../../iodbc/hstmt.h; sourceTree = SOURCE_ROOT; }; F535B32A0277FBC601A801DE /* info.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = info.c; path = ../../iodbc/info.c; sourceTree = SOURCE_ROOT; }; F535B32C0277FBC601A801DE /* iodbc.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = iodbc.h; path = ../../include/iodbc.h; sourceTree = SOURCE_ROOT; }; F535B32D0277FBC601A801DE /* ithread.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ithread.h; path = ../../iodbc/ithread.h; sourceTree = SOURCE_ROOT; }; F535B32F0277FBC601A801DE /* itrace.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = itrace.h; path = ../../iodbc/itrace.h; sourceTree = SOURCE_ROOT; }; F535B3300277FBC601A801DE /* main.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = main.c; path = ../../iodbc/main.c; sourceTree = SOURCE_ROOT; }; F535B3310277FBC601A801DE /* misc.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = misc.c; path = ../../iodbc/misc.c; sourceTree = SOURCE_ROOT; }; F535B3320277FBC601A801DE /* prepare.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = prepare.c; path = ../../iodbc/prepare.c; sourceTree = SOURCE_ROOT; }; F535B3330277FBC601A801DE /* result.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = result.c; path = ../../iodbc/result.c; sourceTree = SOURCE_ROOT; }; F535B34F0277FC2E01A801DE /* isqltypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = isqltypes.h; path = ../include/isqltypes.h; sourceTree = SOURCE_ROOT; }; F535B3500277FC2E01A801DE /* isql.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = isql.h; path = ../include/isql.h; sourceTree = SOURCE_ROOT; }; F535B3510277FC2E01A801DE /* isqlext.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = isqlext.h; path = ../include/isqlext.h; sourceTree = SOURCE_ROOT; }; F535B3520277FC2E01A801DE /* sql.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sql.h; path = ../include/sql.h; sourceTree = SOURCE_ROOT; }; F535B3530277FC2E01A801DE /* sqlext.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sqlext.h; path = ../include/sqlext.h; sourceTree = SOURCE_ROOT; }; F535B3540277FC2E01A801DE /* sqltypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sqltypes.h; path = ../include/sqltypes.h; sourceTree = SOURCE_ROOT; }; F54DA8D70279592201A801DE /* iodbc.exp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.exports; name = iodbc.exp; path = ../iodbc.exp; sourceTree = SOURCE_ROOT; }; F55DDABC04949A6001000FFE /* sqlucode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sqlucode.h; path = ../include/sqlucode.h; sourceTree = SOURCE_ROOT; }; F57808F204CED1970194ADB8 /* AllocConnect.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = AllocConnect.c; path = ../../iodbc/trace/AllocConnect.c; sourceTree = SOURCE_ROOT; }; F57808F304CED1970194ADB8 /* AllocEnv.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = AllocEnv.c; path = ../../iodbc/trace/AllocEnv.c; sourceTree = SOURCE_ROOT; }; F57808F404CED1970194ADB8 /* AllocHandle.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = AllocHandle.c; path = ../../iodbc/trace/AllocHandle.c; sourceTree = SOURCE_ROOT; }; F57808F504CED1970194ADB8 /* AllocStmt.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = AllocStmt.c; path = ../../iodbc/trace/AllocStmt.c; sourceTree = SOURCE_ROOT; }; F57808F604CED1970194ADB8 /* BindCol.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = BindCol.c; path = ../../iodbc/trace/BindCol.c; sourceTree = SOURCE_ROOT; }; F57808F704CED1970194ADB8 /* BindParameter.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = BindParameter.c; path = ../../iodbc/trace/BindParameter.c; sourceTree = SOURCE_ROOT; }; F57808F804CED1970194ADB8 /* BrowseConnect.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = BrowseConnect.c; path = ../../iodbc/trace/BrowseConnect.c; sourceTree = SOURCE_ROOT; }; F57808F904CED1970194ADB8 /* BulkOperations.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = BulkOperations.c; path = ../../iodbc/trace/BulkOperations.c; sourceTree = SOURCE_ROOT; }; F57808FA04CED1970194ADB8 /* Cancel.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = Cancel.c; path = ../../iodbc/trace/Cancel.c; sourceTree = SOURCE_ROOT; }; F57808FB04CED1970194ADB8 /* CloseCursor.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = CloseCursor.c; path = ../../iodbc/trace/CloseCursor.c; sourceTree = SOURCE_ROOT; }; F57808FC04CED1970194ADB8 /* ColAttribute.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = ColAttribute.c; path = ../../iodbc/trace/ColAttribute.c; sourceTree = SOURCE_ROOT; }; F57808FD04CED1970194ADB8 /* ColumnPrivileges.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = ColumnPrivileges.c; path = ../../iodbc/trace/ColumnPrivileges.c; sourceTree = SOURCE_ROOT; }; F57808FE04CED1970194ADB8 /* Columns.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = Columns.c; path = ../../iodbc/trace/Columns.c; sourceTree = SOURCE_ROOT; }; F57808FF04CED1970194ADB8 /* Connect.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = Connect.c; path = ../../iodbc/trace/Connect.c; sourceTree = SOURCE_ROOT; }; F578090004CED1970194ADB8 /* CopyDesc.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = CopyDesc.c; path = ../../iodbc/trace/CopyDesc.c; sourceTree = SOURCE_ROOT; }; F578090104CED1970194ADB8 /* DataSources.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = DataSources.c; path = ../../iodbc/trace/DataSources.c; sourceTree = SOURCE_ROOT; }; F578090204CED1970194ADB8 /* DescribeCol.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = DescribeCol.c; path = ../../iodbc/trace/DescribeCol.c; sourceTree = SOURCE_ROOT; }; F578090304CED1970194ADB8 /* DescribeParam.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = DescribeParam.c; path = ../../iodbc/trace/DescribeParam.c; sourceTree = SOURCE_ROOT; }; F578090404CED1970194ADB8 /* Disconnect.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = Disconnect.c; path = ../../iodbc/trace/Disconnect.c; sourceTree = SOURCE_ROOT; }; F578090504CED1970194ADB8 /* DriverConnect.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = DriverConnect.c; path = ../../iodbc/trace/DriverConnect.c; sourceTree = SOURCE_ROOT; }; F578090604CED1970194ADB8 /* Drivers.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = Drivers.c; path = ../../iodbc/trace/Drivers.c; sourceTree = SOURCE_ROOT; }; F578090704CED1970194ADB8 /* EndTran.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = EndTran.c; path = ../../iodbc/trace/EndTran.c; sourceTree = SOURCE_ROOT; }; F578090804CED1970194ADB8 /* Error.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = Error.c; path = ../../iodbc/trace/Error.c; sourceTree = SOURCE_ROOT; }; F578090904CED1970194ADB8 /* ExecDirect.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = ExecDirect.c; path = ../../iodbc/trace/ExecDirect.c; sourceTree = SOURCE_ROOT; }; F578090A04CED1970194ADB8 /* Execute.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = Execute.c; path = ../../iodbc/trace/Execute.c; sourceTree = SOURCE_ROOT; }; F578090B04CED1970194ADB8 /* ExtendedFetch.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = ExtendedFetch.c; path = ../../iodbc/trace/ExtendedFetch.c; sourceTree = SOURCE_ROOT; }; F578090C04CED1970194ADB8 /* Fetch.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = Fetch.c; path = ../../iodbc/trace/Fetch.c; sourceTree = SOURCE_ROOT; }; F578090D04CED1970194ADB8 /* FetchScroll.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = FetchScroll.c; path = ../../iodbc/trace/FetchScroll.c; sourceTree = SOURCE_ROOT; }; F578090E04CED1970194ADB8 /* ForeignKeys.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = ForeignKeys.c; path = ../../iodbc/trace/ForeignKeys.c; sourceTree = SOURCE_ROOT; }; F578090F04CED1970194ADB8 /* FreeConnect.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = FreeConnect.c; path = ../../iodbc/trace/FreeConnect.c; sourceTree = SOURCE_ROOT; }; F578091004CED1970194ADB8 /* FreeEnv.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = FreeEnv.c; path = ../../iodbc/trace/FreeEnv.c; sourceTree = SOURCE_ROOT; }; F578091104CED1970194ADB8 /* FreeHandle.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = FreeHandle.c; path = ../../iodbc/trace/FreeHandle.c; sourceTree = SOURCE_ROOT; }; F578091204CED1970194ADB8 /* FreeStmt.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = FreeStmt.c; path = ../../iodbc/trace/FreeStmt.c; sourceTree = SOURCE_ROOT; }; F578091304CED1970194ADB8 /* GetConnectAttr.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = GetConnectAttr.c; path = ../../iodbc/trace/GetConnectAttr.c; sourceTree = SOURCE_ROOT; }; F578091404CED1970194ADB8 /* GetConnectOption.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = GetConnectOption.c; path = ../../iodbc/trace/GetConnectOption.c; sourceTree = SOURCE_ROOT; }; F578091504CED1970194ADB8 /* GetCursorName.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = GetCursorName.c; path = ../../iodbc/trace/GetCursorName.c; sourceTree = SOURCE_ROOT; }; F578091604CED1970194ADB8 /* GetData.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = GetData.c; path = ../../iodbc/trace/GetData.c; sourceTree = SOURCE_ROOT; }; F578091704CED1970194ADB8 /* GetDescField.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = GetDescField.c; path = ../../iodbc/trace/GetDescField.c; sourceTree = SOURCE_ROOT; }; F578091804CED1970194ADB8 /* GetDescRec.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = GetDescRec.c; path = ../../iodbc/trace/GetDescRec.c; sourceTree = SOURCE_ROOT; }; F578091904CED1970194ADB8 /* GetDiagField.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = GetDiagField.c; path = ../../iodbc/trace/GetDiagField.c; sourceTree = SOURCE_ROOT; }; F578091A04CED1970194ADB8 /* GetDiagRec.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = GetDiagRec.c; path = ../../iodbc/trace/GetDiagRec.c; sourceTree = SOURCE_ROOT; }; F578091B04CED1970194ADB8 /* GetEnvAttr.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = GetEnvAttr.c; path = ../../iodbc/trace/GetEnvAttr.c; sourceTree = SOURCE_ROOT; }; F578091C04CED1970194ADB8 /* GetFunctions.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = GetFunctions.c; path = ../../iodbc/trace/GetFunctions.c; sourceTree = SOURCE_ROOT; }; F578091D04CED1970194ADB8 /* GetStmtAttr.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = GetStmtAttr.c; path = ../../iodbc/trace/GetStmtAttr.c; sourceTree = SOURCE_ROOT; }; F578091E04CED1970194ADB8 /* GetStmtOption.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = GetStmtOption.c; path = ../../iodbc/trace/GetStmtOption.c; sourceTree = SOURCE_ROOT; }; F578091F04CED1970194ADB8 /* GetTypeInfo.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = GetTypeInfo.c; path = ../../iodbc/trace/GetTypeInfo.c; sourceTree = SOURCE_ROOT; }; F578092004CED1970194ADB8 /* Info.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = Info.c; path = ../../iodbc/trace/Info.c; sourceTree = SOURCE_ROOT; }; F578092104CED1970194ADB8 /* MoreResults.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = MoreResults.c; path = ../../iodbc/trace/MoreResults.c; sourceTree = SOURCE_ROOT; }; F578092204CED1970194ADB8 /* NativeSql.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = NativeSql.c; path = ../../iodbc/trace/NativeSql.c; sourceTree = SOURCE_ROOT; }; F578092304CED1970194ADB8 /* NumParams.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = NumParams.c; path = ../../iodbc/trace/NumParams.c; sourceTree = SOURCE_ROOT; }; F578092404CED1970194ADB8 /* NumResultCols.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = NumResultCols.c; path = ../../iodbc/trace/NumResultCols.c; sourceTree = SOURCE_ROOT; }; F578092504CED1970194ADB8 /* ParamData.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = ParamData.c; path = ../../iodbc/trace/ParamData.c; sourceTree = SOURCE_ROOT; }; F578092604CED1970194ADB8 /* ParamOptions.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = ParamOptions.c; path = ../../iodbc/trace/ParamOptions.c; sourceTree = SOURCE_ROOT; }; F578092704CED1970194ADB8 /* Prepare.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = Prepare.c; path = ../../iodbc/trace/Prepare.c; sourceTree = SOURCE_ROOT; }; F578092804CED1970194ADB8 /* PrimaryKeys.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = PrimaryKeys.c; path = ../../iodbc/trace/PrimaryKeys.c; sourceTree = SOURCE_ROOT; }; F578092904CED1970194ADB8 /* ProcedureColumns.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = ProcedureColumns.c; path = ../../iodbc/trace/ProcedureColumns.c; sourceTree = SOURCE_ROOT; }; F578092A04CED1970194ADB8 /* Procedures.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = Procedures.c; path = ../../iodbc/trace/Procedures.c; sourceTree = SOURCE_ROOT; }; F578092B04CED1970194ADB8 /* proto.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = proto.h; path = ../../iodbc/trace/proto.h; sourceTree = SOURCE_ROOT; }; F578092C04CED1970194ADB8 /* PutData.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = PutData.c; path = ../../iodbc/trace/PutData.c; sourceTree = SOURCE_ROOT; }; F578092D04CED1970194ADB8 /* RowCount.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = RowCount.c; path = ../../iodbc/trace/RowCount.c; sourceTree = SOURCE_ROOT; }; F578092E04CED1970194ADB8 /* SetConnectAttr.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SetConnectAttr.c; path = ../../iodbc/trace/SetConnectAttr.c; sourceTree = SOURCE_ROOT; }; F578092F04CED1970194ADB8 /* SetConnectOption.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SetConnectOption.c; path = ../../iodbc/trace/SetConnectOption.c; sourceTree = SOURCE_ROOT; }; F578093004CED1970194ADB8 /* SetCursorName.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SetCursorName.c; path = ../../iodbc/trace/SetCursorName.c; sourceTree = SOURCE_ROOT; }; F578093104CED1970194ADB8 /* SetEnvAttr.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SetEnvAttr.c; path = ../../iodbc/trace/SetEnvAttr.c; sourceTree = SOURCE_ROOT; }; F578093204CED1970194ADB8 /* SetPos.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SetPos.c; path = ../../iodbc/trace/SetPos.c; sourceTree = SOURCE_ROOT; }; F578093304CED1970194ADB8 /* SetScrollOptions.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SetScrollOptions.c; path = ../../iodbc/trace/SetScrollOptions.c; sourceTree = SOURCE_ROOT; }; F578093404CED1970194ADB8 /* SetStmtAttr.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SetStmtAttr.c; path = ../../iodbc/trace/SetStmtAttr.c; sourceTree = SOURCE_ROOT; }; F578093504CED1970194ADB8 /* SetStmtOption.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SetStmtOption.c; path = ../../iodbc/trace/SetStmtOption.c; sourceTree = SOURCE_ROOT; }; F578093604CED1970194ADB8 /* SpecialColumns.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SpecialColumns.c; path = ../../iodbc/trace/SpecialColumns.c; sourceTree = SOURCE_ROOT; }; F578093704CED1970194ADB8 /* Statistics.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = Statistics.c; path = ../../iodbc/trace/Statistics.c; sourceTree = SOURCE_ROOT; }; F578093804CED1970194ADB8 /* TablePrivileges.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = TablePrivileges.c; path = ../../iodbc/trace/TablePrivileges.c; sourceTree = SOURCE_ROOT; }; F578093904CED1970194ADB8 /* Tables.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = Tables.c; path = ../../iodbc/trace/Tables.c; sourceTree = SOURCE_ROOT; }; F578093A04CED1970194ADB8 /* trace.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = trace.c; path = ../../iodbc/trace/trace.c; sourceTree = SOURCE_ROOT; }; F578093B04CED1970194ADB8 /* trace.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = trace.h; path = ../../iodbc/trace/trace.h; sourceTree = SOURCE_ROOT; }; F578093C04CED1970194ADB8 /* Transact.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = Transact.c; path = ../../iodbc/trace/Transact.c; sourceTree = SOURCE_ROOT; }; F586819204949B4701000FFE /* iodbcext.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = iodbcext.h; path = ../include/iodbcext.h; sourceTree = SOURCE_ROOT; }; F586819404949C2101000FFE /* unicode.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = unicode.c; path = ../../iodbcinst/unicode.c; sourceTree = SOURCE_ROOT; }; F586819504949C2101000FFE /* unicode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = unicode.h; path = ../../iodbcinst/unicode.h; sourceTree = SOURCE_ROOT; }; F5C609C304D1703401237589 /* SetDescField.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SetDescField.c; path = ../../iodbc/trace/SetDescField.c; sourceTree = SOURCE_ROOT; }; F5EC325104D01DC50121CDE8 /* iODBCinst.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = iODBCinst.framework; path = ../iODBCinst/build/iODBCinst.framework; sourceTree = SOURCE_ROOT; }; F5EC325904D0397D0121CDE8 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ CDAE3AA90987CB86003250F8 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( CDAE3AAA0987CB86003250F8 /* iODBCinst.framework in Frameworks */, CDAE3AAB0987CB86003250F8 /* Carbon.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 034768DDFF38A45A11DB9C8B /* Products */ = { isa = PBXGroup; children = ( CDAE3AB20987CB86003250F8 /* iODBC.framework */, ); name = Products; sourceTree = ""; }; 0867D691FE84028FC02AAC07 /* iODBC */ = { isa = PBXGroup; children = ( CD0056F708B12B6C006E73DA /* Headers */, 08FB77ACFE841707C02AAC07 /* Source */, 089C1665FE841158C02AAC07 /* Resources */, 0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */, 034768DDFF38A45A11DB9C8B /* Products */, CDAE3AB10987CB86003250F8 /* Info-iODBC.plist */, ); name = iODBC; sourceTree = ""; }; 0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */ = { isa = PBXGroup; children = ( F5EC325104D01DC50121CDE8 /* iODBCinst.framework */, F5EC325904D0397D0121CDE8 /* Carbon.framework */, ); name = "External Frameworks and Libraries"; sourceTree = ""; }; 089C1665FE841158C02AAC07 /* Resources */ = { isa = PBXGroup; children = ( 85A390BB1B790FB600AC8862 /* English.lproj */, ); name = Resources; sourceTree = ""; }; 08FB77ACFE841707C02AAC07 /* Source */ = { isa = PBXGroup; children = ( F535B3150277FB3501A801DE /* iODBC */, ); name = Source; sourceTree = ""; }; 85A390BB1B790FB600AC8862 /* English.lproj */ = { isa = PBXGroup; children = ( 85A390BC1B790FB600AC8862 /* InfoPlist.strings */, ); path = English.lproj; sourceTree = ""; }; CD0056F708B12B6C006E73DA /* Headers */ = { isa = PBXGroup; children = ( F535B34F0277FC2E01A801DE /* isqltypes.h */, F535B3510277FC2E01A801DE /* isqlext.h */, F535B3520277FC2E01A801DE /* sql.h */, F535B3500277FC2E01A801DE /* isql.h */, F535B3530277FC2E01A801DE /* sqlext.h */, F535B3540277FC2E01A801DE /* sqltypes.h */, 71DF011C06A3E1DD007AF56B /* iodbcunix.h */, ); name = Headers; sourceTree = ""; }; F535B3150277FB3501A801DE /* iODBC */ = { isa = PBXGroup; children = ( F57808F104CED1010194ADB8 /* trace */, F535B3160277FBC601A801DE /* odbc3.c */, F535B3170277FBC601A801DE /* catalog.c */, F535B3180277FBC601A801DE /* connect.c */, F535B3190277FBC601A801DE /* dlf.c */, F535B31A0277FBC601A801DE /* dlf.h */, F535B31B0277FBC601A801DE /* dlproc.c */, F535B31C0277FBC601A801DE /* dlproc.h */, F535B31D0277FBC601A801DE /* execute.c */, F535B31E0277FBC601A801DE /* fetch.c */, F535B31F0277FBC601A801DE /* hdbc.c */, F535B3200277FBC601A801DE /* hdbc.h */, F535B3210277FBC601A801DE /* hdesc.h */, F535B3220277FBC601A801DE /* henv.c */, F535B3230277FBC601A801DE /* henv.ci */, F535B3240277FBC601A801DE /* henv.h */, F535B3250277FBC601A801DE /* herr.c */, F535B3260277FBC601A801DE /* herr.ci */, F535B3270277FBC601A801DE /* herr.h */, F535B3280277FBC601A801DE /* hstmt.c */, F535B3290277FBC601A801DE /* hstmt.h */, F535B32A0277FBC601A801DE /* info.c */, F535B32C0277FBC601A801DE /* iodbc.h */, F535B32D0277FBC601A801DE /* ithread.h */, F535B32F0277FBC601A801DE /* itrace.h */, F535B3300277FBC601A801DE /* main.c */, F535B3310277FBC601A801DE /* misc.c */, F535B3320277FBC601A801DE /* prepare.c */, F535B3330277FBC601A801DE /* result.c */, F54DA8D70279592201A801DE /* iodbc.exp */, F55DDABC04949A6001000FFE /* sqlucode.h */, F586819204949B4701000FFE /* iodbcext.h */, F586819404949C2101000FFE /* unicode.c */, F586819504949C2101000FFE /* unicode.h */, ); name = iODBC; sourceTree = ""; }; F57808F104CED1010194ADB8 /* trace */ = { isa = PBXGroup; children = ( 71C53C2905E39D1F00D95EFB /* SetDescRec.c */, F57808F204CED1970194ADB8 /* AllocConnect.c */, F57808F304CED1970194ADB8 /* AllocEnv.c */, F57808F404CED1970194ADB8 /* AllocHandle.c */, F57808F504CED1970194ADB8 /* AllocStmt.c */, F57808F604CED1970194ADB8 /* BindCol.c */, F57808F704CED1970194ADB8 /* BindParameter.c */, F57808F804CED1970194ADB8 /* BrowseConnect.c */, F57808F904CED1970194ADB8 /* BulkOperations.c */, F57808FA04CED1970194ADB8 /* Cancel.c */, F57808FB04CED1970194ADB8 /* CloseCursor.c */, F57808FC04CED1970194ADB8 /* ColAttribute.c */, F57808FD04CED1970194ADB8 /* ColumnPrivileges.c */, F57808FE04CED1970194ADB8 /* Columns.c */, F57808FF04CED1970194ADB8 /* Connect.c */, F578090004CED1970194ADB8 /* CopyDesc.c */, F578090104CED1970194ADB8 /* DataSources.c */, F578090204CED1970194ADB8 /* DescribeCol.c */, F578090304CED1970194ADB8 /* DescribeParam.c */, F578090404CED1970194ADB8 /* Disconnect.c */, F578090504CED1970194ADB8 /* DriverConnect.c */, F578090604CED1970194ADB8 /* Drivers.c */, F578090704CED1970194ADB8 /* EndTran.c */, F578090804CED1970194ADB8 /* Error.c */, F578090904CED1970194ADB8 /* ExecDirect.c */, F578090A04CED1970194ADB8 /* Execute.c */, F578090B04CED1970194ADB8 /* ExtendedFetch.c */, F578090C04CED1970194ADB8 /* Fetch.c */, F578090D04CED1970194ADB8 /* FetchScroll.c */, F578090E04CED1970194ADB8 /* ForeignKeys.c */, F578090F04CED1970194ADB8 /* FreeConnect.c */, F578091004CED1970194ADB8 /* FreeEnv.c */, F578091104CED1970194ADB8 /* FreeHandle.c */, F578091204CED1970194ADB8 /* FreeStmt.c */, F578091304CED1970194ADB8 /* GetConnectAttr.c */, F578091404CED1970194ADB8 /* GetConnectOption.c */, F578091504CED1970194ADB8 /* GetCursorName.c */, F578091604CED1970194ADB8 /* GetData.c */, F578091704CED1970194ADB8 /* GetDescField.c */, F578091804CED1970194ADB8 /* GetDescRec.c */, F578091904CED1970194ADB8 /* GetDiagField.c */, F578091A04CED1970194ADB8 /* GetDiagRec.c */, F578091B04CED1970194ADB8 /* GetEnvAttr.c */, F578091C04CED1970194ADB8 /* GetFunctions.c */, F578091D04CED1970194ADB8 /* GetStmtAttr.c */, F578091E04CED1970194ADB8 /* GetStmtOption.c */, F578091F04CED1970194ADB8 /* GetTypeInfo.c */, F578092004CED1970194ADB8 /* Info.c */, F578092104CED1970194ADB8 /* MoreResults.c */, F578092204CED1970194ADB8 /* NativeSql.c */, F578092304CED1970194ADB8 /* NumParams.c */, F578092404CED1970194ADB8 /* NumResultCols.c */, F578092504CED1970194ADB8 /* ParamData.c */, F578092604CED1970194ADB8 /* ParamOptions.c */, F578092704CED1970194ADB8 /* Prepare.c */, F578092804CED1970194ADB8 /* PrimaryKeys.c */, F578092904CED1970194ADB8 /* ProcedureColumns.c */, F578092A04CED1970194ADB8 /* Procedures.c */, F578092B04CED1970194ADB8 /* proto.h */, F578092C04CED1970194ADB8 /* PutData.c */, F578092D04CED1970194ADB8 /* RowCount.c */, F578092E04CED1970194ADB8 /* SetConnectAttr.c */, F578092F04CED1970194ADB8 /* SetConnectOption.c */, F578093004CED1970194ADB8 /* SetCursorName.c */, F5C609C304D1703401237589 /* SetDescField.c */, F578093104CED1970194ADB8 /* SetEnvAttr.c */, F578093204CED1970194ADB8 /* SetPos.c */, F578093304CED1970194ADB8 /* SetScrollOptions.c */, F578093404CED1970194ADB8 /* SetStmtAttr.c */, F578093504CED1970194ADB8 /* SetStmtOption.c */, F578093604CED1970194ADB8 /* SpecialColumns.c */, F578093704CED1970194ADB8 /* Statistics.c */, F578093804CED1970194ADB8 /* TablePrivileges.c */, F578093904CED1970194ADB8 /* Tables.c */, F578093A04CED1970194ADB8 /* trace.c */, F578093B04CED1970194ADB8 /* trace.h */, F578093C04CED1970194ADB8 /* Transact.c */, ); name = trace; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ CDAE3A330987CB86003250F8 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( CDAE3A340987CB86003250F8 /* dlf.h in Headers */, CDAE3A350987CB86003250F8 /* dlproc.h in Headers */, CDAE3A360987CB86003250F8 /* hdbc.h in Headers */, CDAE3A370987CB86003250F8 /* hdesc.h in Headers */, CDAE3A380987CB86003250F8 /* henv.h in Headers */, CDAE3A390987CB86003250F8 /* herr.h in Headers */, CDAE3A3A0987CB86003250F8 /* hstmt.h in Headers */, CDAE3A3B0987CB86003250F8 /* iodbc.h in Headers */, CDAE3A3C0987CB86003250F8 /* ithread.h in Headers */, CDAE3A3D0987CB86003250F8 /* itrace.h in Headers */, CDAE3A3E0987CB86003250F8 /* isqltypes.h in Headers */, CDAE3A3F0987CB86003250F8 /* isql.h in Headers */, CDAE3A400987CB86003250F8 /* isqlext.h in Headers */, CDAE3A410987CB86003250F8 /* sql.h in Headers */, CDAE3A420987CB86003250F8 /* sqlext.h in Headers */, CDAE3A430987CB86003250F8 /* sqltypes.h in Headers */, CDAE3A440987CB86003250F8 /* sqlucode.h in Headers */, CDAE3A450987CB86003250F8 /* iodbcext.h in Headers */, CDAE3A460987CB86003250F8 /* unicode.h in Headers */, CDAE3A470987CB86003250F8 /* proto.h in Headers */, CDAE3A480987CB86003250F8 /* trace.h in Headers */, CDAE3A490987CB86003250F8 /* iodbcunix.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ CDAE3A320987CB86003250F8 /* iODBC */ = { isa = PBXNativeTarget; buildConfigurationList = CDAE3AAD0987CB86003250F8 /* Build configuration list for PBXNativeTarget "iODBC" */; buildPhases = ( CDAE3A330987CB86003250F8 /* Headers */, CDAE3A4A0987CB86003250F8 /* Resources */, CDAE3A4C0987CB86003250F8 /* Sources */, CDAE3AA90987CB86003250F8 /* Frameworks */, CDAE3AAC0987CB86003250F8 /* Rez */, ); buildRules = ( ); dependencies = ( ); name = iODBC; productInstallPath = /Library/Frameworks; productName = iODBC; productReference = CDAE3AB20987CB86003250F8 /* iODBC.framework */; productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 0867D690FE84028FC02AAC07 /* Project object */ = { isa = PBXProject; attributes = { LastUpgradeCheck = 1130; TargetAttributes = { CDAE3A320987CB86003250F8 = { ProvisioningStyle = Manual; }; }; }; buildConfigurationList = CDAE3AB30987CB87003250F8 /* Build configuration list for PBXProject "iODBC" */; compatibilityVersion = "Xcode 8.0"; developmentRegion = en; hasScannedForEncodings = 1; knownRegions = ( en, Base, ); mainGroup = 0867D691FE84028FC02AAC07 /* iODBC */; productRefGroup = 034768DDFF38A45A11DB9C8B /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( CDAE3A320987CB86003250F8 /* iODBC */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ CDAE3A4A0987CB86003250F8 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( 85A390BE1B790FB600AC8862 /* InfoPlist.strings in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXRezBuildPhase section */ CDAE3AAC0987CB86003250F8 /* Rez */ = { isa = PBXRezBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXRezBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ CDAE3A4C0987CB86003250F8 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( CDAE3A4D0987CB86003250F8 /* odbc3.c in Sources */, CDAE3A4E0987CB86003250F8 /* catalog.c in Sources */, CDAE3A4F0987CB86003250F8 /* connect.c in Sources */, CDAE3A500987CB86003250F8 /* dlf.c in Sources */, CDAE3A510987CB86003250F8 /* dlproc.c in Sources */, CDAE3A520987CB86003250F8 /* execute.c in Sources */, CDAE3A530987CB86003250F8 /* fetch.c in Sources */, CDAE3A540987CB86003250F8 /* hdbc.c in Sources */, CDAE3A550987CB86003250F8 /* henv.c in Sources */, CDAE3A560987CB86003250F8 /* herr.c in Sources */, CDAE3A570987CB86003250F8 /* hstmt.c in Sources */, CDAE3A580987CB86003250F8 /* info.c in Sources */, CDAE3A590987CB86003250F8 /* misc.c in Sources */, CDAE3A5A0987CB86003250F8 /* prepare.c in Sources */, CDAE3A5B0987CB86003250F8 /* result.c in Sources */, CDAE3A5C0987CB86003250F8 /* iodbc.exp in Sources */, CDAE3A5D0987CB86003250F8 /* unicode.c in Sources */, CDAE3A5E0987CB86003250F8 /* AllocConnect.c in Sources */, CDAE3A5F0987CB86003250F8 /* AllocEnv.c in Sources */, CDAE3A600987CB86003250F8 /* AllocHandle.c in Sources */, CDAE3A610987CB86003250F8 /* AllocStmt.c in Sources */, CDAE3A620987CB86003250F8 /* BindCol.c in Sources */, CDAE3A630987CB86003250F8 /* BindParameter.c in Sources */, CDAE3A640987CB86003250F8 /* BrowseConnect.c in Sources */, CDAE3A650987CB86003250F8 /* BulkOperations.c in Sources */, CDAE3A660987CB86003250F8 /* Cancel.c in Sources */, CDAE3A670987CB86003250F8 /* CloseCursor.c in Sources */, CDAE3A680987CB86003250F8 /* ColAttribute.c in Sources */, CDAE3A690987CB86003250F8 /* ColumnPrivileges.c in Sources */, CDAE3A6A0987CB86003250F8 /* Columns.c in Sources */, CDAE3A6B0987CB86003250F8 /* Connect.c in Sources */, CDAE3A6C0987CB86003250F8 /* CopyDesc.c in Sources */, CDAE3A6D0987CB86003250F8 /* DataSources.c in Sources */, CDAE3A6E0987CB86003250F8 /* DescribeCol.c in Sources */, CDAE3A6F0987CB86003250F8 /* DescribeParam.c in Sources */, CDAE3A700987CB86003250F8 /* Disconnect.c in Sources */, CDAE3A710987CB86003250F8 /* DriverConnect.c in Sources */, CDAE3A720987CB86003250F8 /* Drivers.c in Sources */, CDAE3A730987CB86003250F8 /* EndTran.c in Sources */, CDAE3A740987CB86003250F8 /* Error.c in Sources */, CDAE3A750987CB86003250F8 /* ExecDirect.c in Sources */, CDAE3A760987CB86003250F8 /* Execute.c in Sources */, CDAE3A770987CB86003250F8 /* ExtendedFetch.c in Sources */, CDAE3A780987CB86003250F8 /* Fetch.c in Sources */, CDAE3A790987CB86003250F8 /* FetchScroll.c in Sources */, CDAE3A7A0987CB86003250F8 /* ForeignKeys.c in Sources */, CDAE3A7B0987CB86003250F8 /* FreeConnect.c in Sources */, CDAE3A7C0987CB86003250F8 /* FreeEnv.c in Sources */, CDAE3A7D0987CB86003250F8 /* FreeHandle.c in Sources */, CDAE3A7E0987CB86003250F8 /* FreeStmt.c in Sources */, CDAE3A7F0987CB86003250F8 /* GetConnectAttr.c in Sources */, CDAE3A800987CB86003250F8 /* GetConnectOption.c in Sources */, CDAE3A810987CB86003250F8 /* GetCursorName.c in Sources */, CDAE3A820987CB86003250F8 /* GetData.c in Sources */, CDAE3A830987CB86003250F8 /* GetDescField.c in Sources */, CDAE3A840987CB86003250F8 /* GetDescRec.c in Sources */, CDAE3A850987CB86003250F8 /* GetDiagField.c in Sources */, CDAE3A860987CB86003250F8 /* GetDiagRec.c in Sources */, CDAE3A870987CB86003250F8 /* GetEnvAttr.c in Sources */, CDAE3A880987CB86003250F8 /* GetFunctions.c in Sources */, CDAE3A890987CB86003250F8 /* GetStmtAttr.c in Sources */, CDAE3A8A0987CB86003250F8 /* GetStmtOption.c in Sources */, CDAE3A8B0987CB86003250F8 /* GetTypeInfo.c in Sources */, CDAE3A8C0987CB86003250F8 /* Info.c in Sources */, CDAE3A8D0987CB86003250F8 /* MoreResults.c in Sources */, CDAE3A8E0987CB86003250F8 /* NativeSql.c in Sources */, CDAE3A8F0987CB86003250F8 /* NumParams.c in Sources */, CDAE3A900987CB86003250F8 /* NumResultCols.c in Sources */, CDAE3A910987CB86003250F8 /* ParamData.c in Sources */, CDAE3A920987CB86003250F8 /* ParamOptions.c in Sources */, CDAE3A930987CB86003250F8 /* Prepare.c in Sources */, CDAE3A940987CB86003250F8 /* PrimaryKeys.c in Sources */, CDAE3A950987CB86003250F8 /* ProcedureColumns.c in Sources */, CDAE3A960987CB86003250F8 /* Procedures.c in Sources */, CDAE3A970987CB86003250F8 /* PutData.c in Sources */, CDAE3A980987CB86003250F8 /* RowCount.c in Sources */, CDAE3A990987CB86003250F8 /* SetConnectAttr.c in Sources */, CDAE3A9A0987CB86003250F8 /* SetConnectOption.c in Sources */, CDAE3A9B0987CB86003250F8 /* SetCursorName.c in Sources */, CDAE3A9C0987CB86003250F8 /* SetEnvAttr.c in Sources */, CDAE3A9D0987CB86003250F8 /* SetPos.c in Sources */, CDAE3A9E0987CB86003250F8 /* SetScrollOptions.c in Sources */, CDAE3A9F0987CB86003250F8 /* SetStmtAttr.c in Sources */, CDAE3AA00987CB86003250F8 /* SetStmtOption.c in Sources */, CDAE3AA10987CB86003250F8 /* SpecialColumns.c in Sources */, CDAE3AA20987CB86003250F8 /* Statistics.c in Sources */, CDAE3AA30987CB86003250F8 /* TablePrivileges.c in Sources */, CDAE3AA40987CB86003250F8 /* Tables.c in Sources */, CDAE3AA50987CB86003250F8 /* trace.c in Sources */, CDAE3AA60987CB86003250F8 /* Transact.c in Sources */, CDAE3AA70987CB86003250F8 /* SetDescField.c in Sources */, CDAE3AA80987CB86003250F8 /* SetDescRec.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ 85A390BC1B790FB600AC8862 /* InfoPlist.strings */ = { isa = PBXVariantGroup; children = ( CD9487172636F1F400DBD85F /* en */, ); name = InfoPlist.strings; sourceTree = ""; }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ CDAE3AAE0987CB86003250F8 /* Development */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = ( $IODBC_32BIT, arm64, x86_64, ); CLANG_ENABLE_OBJC_WEAK = YES; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = $IODBC_VERSION; DYLIB_COMPATIBILITY_VERSION = 1.0.0; DYLIB_CURRENT_VERSION = $IODBC_VERSION; EXPORTED_SYMBOLS_FILE = ""; FRAMEWORK_SEARCH_PATHS = ( ../../mac/iODBCinst/build/Development, ../../mac/iODBCinst/build, ); FRAMEWORK_VERSION = 3.52; GCC_DYNAMIC_NO_PIC = NO; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( _REENTRANT, WITH_PTHREADS, _MACX, IODBC_COCOA, ); HEADER_SEARCH_PATHS = ( ../../include, ../../iodbcinst, ../../iodbc, ); INFOPLIST_FILE = "Info-iODBC.plist"; INSTALL_PATH = /Library/Frameworks; LIBRARY_SEARCH_PATHS = ""; MACOSX_DEPLOYMENT_TARGET = 10.9; OTHER_CFLAGS = "-fno-constant-cfstrings"; PRODUCT_BUNDLE_IDENTIFIER = org.iodbc.core; PRODUCT_NAME = iODBC; RESMERGER_SOURCES_FORK = data; SECTORDER_FLAGS = ""; WARNING_CFLAGS = ( "-Wmost", "-Wno-four-char-constants", "-Wno-unknown-pragmas", ); WRAPPER_EXTENSION = framework; ZERO_LINK = NO; }; name = Development; }; CDAE3AAF0987CB86003250F8 /* Deployment */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = ( $IODBC_32BIT, arm64, x86_64, ); CLANG_ENABLE_OBJC_WEAK = YES; COPY_PHASE_STRIP = YES; CURRENT_PROJECT_VERSION = $IODBC_VERSION; DYLIB_COMPATIBILITY_VERSION = 1.0.0; DYLIB_CURRENT_VERSION = $IODBC_VERSION; EXPORTED_SYMBOLS_FILE = ../../mac/iodbc.exp; FRAMEWORK_SEARCH_PATHS = ( ../../mac/iODBCinst/build/Deployment, ../../mac/iODBCinst/build, ); FRAMEWORK_VERSION = 3.52; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_OPTIMIZATION_LEVEL = 2; GCC_PREPROCESSOR_DEFINITIONS = ( _REENTRANT, WITH_PTHREADS, _MACX, IODBC_COCOA, ); HEADER_SEARCH_PATHS = ( ../../include, ../../iodbc, ../../iodbcinst, ); INFOPLIST_FILE = "Info-iODBC.plist"; INSTALL_PATH = /Library/Frameworks; LIBRARY_SEARCH_PATHS = ""; MACOSX_DEPLOYMENT_TARGET = 10.9; OTHER_CFLAGS = "-fno-constant-cfstrings"; PRODUCT_BUNDLE_IDENTIFIER = org.iodbc.core; PRODUCT_NAME = iODBC; RESMERGER_SOURCES_FORK = data; SECTORDER_FLAGS = ""; WARNING_CFLAGS = ( "-Wmost", "-Wno-four-char-constants", "-Wno-unknown-pragmas", ); WRAPPER_EXTENSION = framework; ZERO_LINK = NO; }; name = Deployment; }; CDAE3AB40987CB87003250F8 /* Development */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "-"; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.9; ONLY_ACTIVE_ARCH = YES; }; name = Development; }; CDAE3AB50987CB87003250F8 /* Deployment */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "-"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.9; }; name = Deployment; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ CDAE3AAD0987CB86003250F8 /* Build configuration list for PBXNativeTarget "iODBC" */ = { isa = XCConfigurationList; buildConfigurations = ( CDAE3AAE0987CB86003250F8 /* Development */, CDAE3AAF0987CB86003250F8 /* Deployment */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Deployment; }; CDAE3AB30987CB87003250F8 /* Build configuration list for PBXProject "iODBC" */ = { isa = XCConfigurationList; buildConfigurations = ( CDAE3AB40987CB87003250F8 /* Development */, CDAE3AB50987CB87003250F8 /* Deployment */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Deployment; }; /* End XCConfigurationList section */ }; rootObject = 0867D690FE84028FC02AAC07 /* Project object */; } libiodbc-3.52.16/mac/iODBC/en.lproj/0000775000175000017500000000000014424171426013616 500000000000000libiodbc-3.52.16/mac/iODBC/en.lproj/InfoPlist.strings0000664000175000017500000000043414424170750017060 00000000000000/* Localized versions of Info.plist keys */ CFBundleName = "iODBC"; CFBundleShortVersionString = "iODBC version 3.52.16"; CFBundleGetInfoString = "iODBC version 3.52.16, Copyright 1995-2023, OpenLink Software"; NSHumanReadableCopyright = "Copyright © 1995-2023, OpenLink Software"; libiodbc-3.52.16/mac/iODBC/Info-iODBC.plist0000664000175000017500000000167414424170750014644 00000000000000 CFBundleDevelopmentRegion English CFBundleExecutable iODBC CFBundleGetInfoString iODBC version $IODBC_VERSION, Copyright 1995-2023, OpenLink Software CFBundleIconFile CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName iODBC Core CFBundlePackageType FMWK CFBundleShortVersionString $IODBC_VERSION CFBundleSignature odbc CFBundleVersion $IODBC_VERSION CSResourcesFileMapped libiodbc-3.52.16/mac/iODBCadministrator/0000775000175000017500000000000014424171426014670 500000000000000libiodbc-3.52.16/mac/iODBCadministrator/AppDelegate.m0000664000175000017500000000757214424170750017153 00000000000000/* * AppDelegate.m * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import "AppDelegate.h" #import #import #import #import #import @interface AppDelegate () //@property (weak) IBOutlet NSWindow *window; @end @implementation AppDelegate - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { BOOL manage_return = false; // Insert code here to initialize your application manage_return = SQLManageDataSources (-1L); } - (void)applicationWillTerminate:(NSNotification *)aNotification { // Insert code here to tear down your application } - (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender { return YES; } @end libiodbc-3.52.16/mac/iODBCadministrator/Info-iODBC_Administrator.plist0000664000175000017500000000207714424170750022343 00000000000000 CFBundleDevelopmentRegion English CFBundleExecutable iODBC Administrator CFBundleGetInfoString iODBC Administrator version $IODBC_VERSION, Copyright 1995-2023, OpenLink Software CFBundleIconFile iODBCAdministrator.icns CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName iODBC Administrator CFBundlePackageType APPL CFBundleShortVersionString $IODBC_VERSION CFBundleSignature odbc CFBundleVersion $IODBC_VERSION NSMainNibFile MainMenu NSPrincipalClass NSApplication libiodbc-3.52.16/mac/iODBCadministrator/en.lproj/0000775000175000017500000000000014424171426016417 500000000000000libiodbc-3.52.16/mac/iODBCadministrator/en.lproj/iODBCAdministrator.icns0000664000175000017500000012035414424170750022642 00000000000000icnsics#H?~?~?~??????~?~?~?~?~?~?~??????~?~?~?~is32ZQ/ 8fff.ff 8ϔf.fp 8Ŧf.wੳ8fof侀f3.y.=o-Yjנּ 8f}T@ff 8ff.fff 8ff.f{8f.f.0]@0AyF UÈ U߶È UÈUuzM̀HEfe`EU^ai3`F U2@̀ UÈ UÈUÈEGvIGa^ p\ p\ p\pGW(]\w33M1\hp.$17 80" pd) p\ p\p\\^P^s8mkICN#????????????????????????????il32G~P.fh̀.fgЄ.fŀ.fƄ.ffҀffŀ.ffffƄ .fffffŀ .fffffƄ .fffuffŀ .f[fffƄ.fffff.dufffƄ.fffOffƄ.fknfńfƄ.eflx߹f;. x霃.+ sU[m퇑 wIoom 2UvmFD %\ju@.f 'j@@f˄.ff puR@@fٷfƄ .fff@Az@fffƄ .ffffƀ .fffvqffƄ .ffffƀ.ff݂fƄ .ffffƀ .ffjffƄ.ffffƀ.ff|ffƄ.fƀ.fƄ.ef.bf..9j˄~_DŽE݀E߄E؀EلE؀Eل E؀ Eل E؀ EلE֙EلEŮ}xلE ̟踎NلE ڒkffcZJȄBE ̥jffe^G^?E. k"KcZY_6 ~[d^, #|OgUcǂ ]g;ͪ`d<E HNfMFdN܄E /4lE4πل Em_ل Eـ Eل EـE肙ل Eـ EلEـEلEـEلEʀË́EE<~n\\˅\\\\́ \ \ \ \˷\\}\̂Ų^\ iUZcX'˃\ʂ n9432,>-%F\83*K%0 \5 iG&1.-8,/ {uS.@$2/ Ph+H<(4+~ /5.8002 \˂ $'99$2' \́ N&# \ eV ̂ \ \ \\ \ \\́\Ԁ\\\ʄ\ń\\?l8mksGw30Pich#H????????????????????????????????ih32 |G`.gyz7FFxz.]f7G@f~ʉ.]f7G@f{Ɖ.]ff7G@f~ff{Ɖ.]ffŃff7G@fff{Ɖ.]ffffff7G@f fyff{Ɖ.]fffff7G@fcXffff{Ɖ.]fffff7G@e\uffff{Ɖ.]ffffff@_]Lfff{Ɖ .]fffSff{Ɖ.]ff^yf{Ɖ.]fyֆf{Ɖ.Yfvшf{..:; U|ţ;Fb$+nqB+f\u~<jU@Vlkm- ;~߾fq|S$ ulkB 6afnsW@Z.jAdm@@.\fVgߝC@Wf~ɉ.]f 1˃@@Bf{Ɖ.]ffŃp]RW2fS@Bfuff{Ɖ.]fffW@BoP@ Vfoff{Ɖ.]ffffff]'7fffff{Ɖ.]ffłfm+7fff{Ɖ.]ffffm+7fffiff{Ɖ.]ffffffm+7ffffff{Ɖ.]ffŃffm+7fff{Ɖ.]fffm+7fhƀf{Ɖ.]fm+7f{Ɖ.Yfk+4f|.6CDE`?.@DMx.55.9jˇE7JhE7M_ۉE7M_ىÈ7M_ىEك7M_ىE̙7M_ ىE7M_ىE7M_ىEҙ֧_sىE̙Ǹ}͙ىEҙʼzىE ݸukjopL]ىE֧~jgffdWғTTzΉEFWXԭ}jfdZL]OBXh(/ĵvcef\ϻRdL9?/S*eۉE =6>TbkQR4"ىEك,!#JE(""‚ىEߙeR{. eىE]#S춙ىEقq/SىEq/SىEq/SىEكҙq/S֙ىE̴q/Sـ̀ىEq/SىEq/N։EOefhBEafsEIIE<ڈ\҇7P҈\7S\7S\ހ7S̃\7S̃\̀7S \7SƮ\7S˸\̀ɬ\³j\иnK>Ҁ\ ѠeG98?H5[(6\˄ȊS953-H:)*\]tvƑQ832.*P'/'!vĊ(/Q423.*>5+2&?/0,11).H".3%}/' &+:9&22#agu&SիU3A--32 aKRJ{`::"23/ %28E13>0(32+ \\…)+1Q 2=%/2- \"'1m+4&1- \ '0r&)) \8# #\~ Hr" \a'n\w/ǹ\ـw/ǹ\̀w/n\w/n\ڀw/n\w/n\w/hˈ\jF\Ή\]]\?h8mk @x@@@@@@@8@@@@@@@`@@@@@@@080`@@@@@@@@P 0Pit329umGYzL`E8Mm/@W..>^.2Kg..3Sfghn..A\fgjw؝..0Sfh..@\fgk̝..0Sfg..@\fhǝ../Sf..@\fgŝ../Sf..@\fĝ../Sf..@\fĝ../Sff..@\fyfĝ../Sfpyf..@\ffĝ../Sff..@\fŅfĝ../Sff..@\ffĝ../Sff..@\fpfĝ../Sff..@\fffyfĝ../Sfff..@\ffσfĝ../SfŃfςf..@\ffyfĝ../Sfpfpf..@\fecbaffĝ../Sffكf..@\fda^[fكfĝ../Sfمfكf ..@\ffeb\XTfكfĝ../Sfمfكf ..@\ffd_XRpfكfĝ../Sfمfكf ..@\feb\U_ufكfĝ../Sfff ..@\ec^XUTffĝ../Sfyfpf ..@[da[UqJfكfĝ../SfŃfłf ..@[b\V]eLffĝ../Sfpff WY_YWINpfĝ../Sfلfyҍ lVlpIQfĝ../Sff ۇOKUŅfĝ../Sff y~GOZfĝ../Sf쌀fՇ]S^ٳyfĝ../Sfppf ؞rayfĝ../Sfppfi|fĝ../Sfyp}fĝ../Rf՜aٽfg.Qefڹbnyɔfg.Kbefyma~x¹pfh.7PWXYԒZnvȼYZfE./7::;TڹUa||mŶG;<@LXb.kZn~s~±d.7F\ٞ9. ԐVbyymԿy.MԡϒҀ װT\n|qqԽz׸)cXcwvlԼ~q(˥~ԉU^mxphԹxh'qNESnװTZdssj{ҷq`ems@A_cX`ltngѴiWHjcU@QryV\errkqϰxbN=8[k@S{Y[blsph̫qZE=$+PՋJ@Sj`afprllȥiQ@=S"H~dxjfkqpj|ž}`G@<#(BlʵqjmqmhຕrT@@="Aa~qknnjrذfH@@RS%C^v~tmlpmgΤ{W@g$(,I\gmnljjmpkjΐkG@@=nv 6O^dfjnnhծW@LSh S">UaefglplgØiB@Om5Hb&(+FZbfhnpkuѭ~P@pE.@Gafpfĝ../Sf쁳ŁfS@ ADSpjP@?@Sffĝ../SfفfقfaW@ AGVhy}q_PD@A@Iafyńyfĝ../Sfفfpf~zQ=@FMX\YRIC><==>88Xfffĝ../Sfفff~ƿ..7XfكfŠfĝ../Sff~݉..7Xffypfĝ../Sff~݉..7Xfّfĝ../Sf얄f~݉..7Xfyّfĝ../Sff~݉..7Xfyّfĝ../Sf쁳ńyf~݉..7Xfّfĝ../Sfقff~݉..7XffŖpfĝ../Sfقff~݉..7XfكyfفϠfĝ../Sfقfσłf~݉..7Xfςffĝ../Sf쀳f~݉..7Xfyσfpfĝ../Sfyf~݉..7XfŎلfĝ../Sff~݉..7Xfpfĝ../Sfτf~݉..7Xffĝ../SfϠf~݉..7Xfpوfĝ../Sfpf~݉..7Xf٩pfĝ../Sf~݉..7Xfĝ../Sf~݉..7Xfĝ../Rf~݉..7Xfĝ.Qef~݉..6Wfĝ.Ndf~ى..4Vefg.F`ef|ӉÀ.PbefgE../IRTU]qωÀ.9NSTUby.0346@O\gߊ9.2458EUa9.:J.0@O̞U.99.HҠə˙j˚sΙZSs˙F_˙EE]EJpEEL}EEaEEH|EE_ݝEEG|EE_ڝEEG|EE_؝EEG|EE_םEEG|EE_םEEG|ƁƳEE_̉ҦםEEG|٦EE_̌̆םEEG|EE_̍مםEEG|EE_̎םEEG|EE_̎םEEG|EE_̃̄םEEG|ƁƄEE_̃̃߃םEEG|ك̃̃߂EE_̃םEEG| EE_ȃםEEG|셙EE_ăםEEG|兙 EE_}םEEG|兙 EE_zםEEG|兙 EE_םEEG|셙 EE_}םEEG|삙 EE_pƃ僙םEEG|ك҃̃قEE_ۗsƃםEEG|̟̄»gmuםEEG|삙ڪnzĎƄםEEG|»}xqǍمםEEG|!|ټjvʌ̆םEEG|򳀙"}zg|ˉ̦םEEG|Ɵ#ǾKMrםEEG|̹Ķ}ؑJNWםEEG|ȸxrnkjkmpqpon\LQX]םEEG|wpljgfghfb_֨KNTXWa֝Eyмyqljggfc^YgtNRWYUPsҝEqμwnkhggfed`ZUԿIPVZXSNJɝESwξvmjggfeda[U}щJTZ[VPKF\ZEFSWXgvmjggfdb]WcLLW]\WOIC@UXZ_qE ijxnjggfec^XTИEP[`]UNGA<>EShNE ¶{pjggfd`ZU|cGT_b^ULE>87Ef١ԓ Ŀvhcceefeb\VhлBLXad_ULC<61߸ܼx]OMRX^bdfec^XY}DQ]dd^UKB:2-.ƵlK937@KU\adefed`ZUIIUaee_UJ@70*Y([. !,9FPY_bca\Vh͗CNZbfe_TI>6-&:ζ_&3@LUZZVWcHT^dge_TH=3*#Ԉ6 .IIVaegfe^PB6* "\EP͗CN[cfd\N?2&.>ͲBLXbfgfeaVF7)3 prtxyz_3JtFQ]dfd^RB1#G-fgknqrt>3YKJVaegfdbZL;+ߘ͎aacejlmsݕ34kǀ͎DO[cffec^UF3#l|ΐ&j\]`bdgjw_3E|RHT`egfdaZN=*1}Plǐ&WXZ\_adk>3VΩBLYbfgdb\TE2 fZEZ%RRSUY\`coݫ33itFR]dgdb^VJ9&EEMz#jMMORUZ^etj3BzAJVafeb^XM>+JEEI|#HGHJNRV\fz>3V͎DO[bda^WN@.۝EEH|nBDINT[h۫33iQHT^ba\UL?/Y؝EEG|O<?CHOXjj3CƨCKW^^YRH<,2םEEG|=65683bkDNTWRJ@4&"םEEG|ҟ1/./148@Po٪3C=?DHF@5*̂ƦםEEG|q+)((*,17Mr3kn5344/'iٟםEEG|򟙄,"! !#'2JvE_I(&# "򬅙םEEG|6 ,L|nG2򟄙םEEG|فY 1SvrL.Y̎҄םEEG|偙備P #5J^dU@.BҳلםEEG|偙̃m2",7<90%-LƃƃםEEG|偙҃ٿEESٿםEEG|҄EESםEEG|EES呙םEEG|򹄙EES呙םEEG|EES呙םEEG|لEES呙םEEG|備ƃƂEESٹםEEG|備҂EES߿םEEG|備߃قEES҃߂҃םEEG|̂EES߬םEEG|EESَ儙םEEG|҃EESםEEG|߄EESםEEG|߿EESםEEG|EESƟםEEG|EESםEEG|EESםEEG|EESםEzEERםEvEEN՝EiˀEw͝ZEEGnz~܉ˀEUu}~EIMOQ_vNEJMOTgNEWnEH_w՞fENNE]ώmo^\\|ؚ\c؛\\f˙\\˚\\`˜\\˜\\_˝\\\\^\\\\^\\\\^\\\\^ى\\҇\\^҆\\\\^߅\\\\^ߍ߄\\܄\\^ُ܃\\σ\\^\\߃\\^܄߂\\ف\\^\\ف҃\\^σσ \\ق\\^̃\\»ۃق\\^̃ \\Ĺԃق\\^̃ \\ɾσق\\^̃ \\ĸ΃ق\\^̃ \\ƽvσق̄\\^҃σ \\¶}уف\\^׬\\ĹnՃـ\\^لπ܂Ž{~ds׃σ\\^gi{ێ\\^ցþ}m^hYkߍ\\^ߍ߀!žufVFfi\\^ـ"Ž~n`=Xf>~҇\\^π~}~zpfHCeV+(}ٌ҇\\^ςð~qf^YUVY^bdd^U3Xa?('+˕\\^ɶueVKC>989=@DHJL5@aU0(),6\\^˕íyeUI@;8535767840U[A,(*,,H\ʔq]MA;8553430..->]M3,(+,*(y\ˑξnXI>96553220.,+0SU>*++-,+'%\n˾nXH=8553220.+*->XH/)--.+(&#Xݝm\^ntuvƾsYH=855321/,**0PP=%(-/.-'$" kvxݝ\ }`K>855322/,*)->SE/$)/0/+'# 9\nd\ hP@8553 20-*)+1MM=&%+1*&#"\}ْ ̮oQ?6342321.+)*.>PA5!'.121*&"߸ѦzY<,(*,/12322/,*),2IH;)"*022/*&!.rL- &*.0223220-*)+/=K@6!$+224/*% K(pE2#(,/121.+)*-2EE8,"'-132/*%,B=gC  &*--+)*,0;F>5%$*/252/*$ }/2s' #&')+.2CC9/!&,1352/)# uvyy-}؞C  ',.1;E@6'#)/2332/)" .kmppxb(ik 2003@C;5!%+02532/(! "acfhku<$Sր3UK839A@8-"'-232.'  .VX[^_dp˼!;xXA8=A=6$#*/25331-% .cMPSVW\n  1emSA9>>81!&,135320+# & n@CFKLNVs@ "/H]c^SF=;@=5'#)/232/)! ?-359>ABFY˽ $.5=>;88=@92"%+025321-& {11228;>6+"(.23322/+# ً&E./01258Jq@ *0235;@;5#$*025320-' (j&},,-./14@90!&,13521.*# km\xӒ)!+,.14Baј '/28@=6(#)/2521/+% \\fˑ#e&&')+-16IoM *19@94 %+0341/,& U\\a˒#$#$%')+/9Q~ #.6=6+"(.121/,'  \\`˔w!"$'+/=\И (163"$*/12.+&  l\\_˕@ !$)/CiM !.2-!&,./.)$ 1\\^' %0Kw (/&"'*+)%  \\^ً̪#1RϚ !*"$#! ҈\\^ٍ̈4]g $ φ\\^َ̩8h#' օ\\^̵ُ3 @s7; 1τ\\^كl &JnjB" l\\^كփX )@U[L5"  J҄҃\\^كσo)  +1-$ 0bց߃\\^كփʼn\\n߃ք\\^ك\\n̄ψ\\^ٌ߅\\ñ\\^ٍ܄\\n҃\\^ُ߃\\n҃\\^ك҂\\ñ\\^ك\\ñυ\\^كك\\n҃߃\\^ك\\nك\\^ك\\n҄փ\\^ِ҂\\n\\^ُ\\nք\\^َ\\n߅\\^ً߅\\n܆\\^ωي\\nχ\\^\\n\\^\\n\\^˝\\n\ʝ\\m˜\˛\\hʝ\˘̀π\˘m\\^π\rޝ\afgild\cgjp՝d\tʋ\`x\dd\st8mk@Pp0Pp00@p@@@@@@@@@@@@@@@@@@@@``0`00@@@@@@@@@@@@@@@@@@@@@`@@@@@@@@@@@@@@@@@@@@@ P@pp@ P @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@00`0```@@@@@@@@@@@@@@@@@@@@@p@00pP0pPlibiodbc-3.52.16/mac/iODBCadministrator/en.lproj/InfoPlist.strings0000664000175000017500000000050614424170750021661 00000000000000/* Localized versions of Info.plist keys */ CFBundleName = "iODBC Administrator"; CFBundleShortVersionString = "iODBC Administrator version 3.52.16"; CFBundleGetInfoString = "iODBC Administrator version 3.52.16, Copyright 1995-2023, OpenLink Software"; NSHumanReadableCopyright = "Copyright © 1995-2023, OpenLink Software"; libiodbc-3.52.16/mac/iODBCadministrator/en.lproj/odbcman.tiff0000664000175000017500000022056614424170750020626 00000000000000MM*!v(RI<s H.`'`'8BIMxHH(FG(HH(d'`8BIM8BIMAlpha 18BIMAlpha 18BIMZ8BIM x8BIM8BIM 8BIM' 8BIMH/fflff/ff2Z5-8BIMp8BIM@@8BIM0pP8BIM.8BIM ppPJFIFHHAdobed            pp"?   3!1AQa"q2B#$Rb34rC%Scs5&DTdE£t6UeuF'Vfv7GWgw5!1AQaq"2B#R3$brCScs4%&5DTdEU6teuFVfv'7GWgw ?TBŢ̜M4CZ֎\%W^wVkcĴV:loNoޏIQ}տMJc;@=+. ~kq$s31pq̵c7Yk4W&IgzeXǍ>A֥gwt}~~J힟jU\+^+c\U/?bn$IUEuc:/3??8LpܛZEU/ՏnU Mu?+ځӨvHc; QH;wnCW,?&b4KH`.eO{mX2eሀq98)BulrٗvW{B&v{z)WAq asJ~uWuޙqͥ{cu౏폮F^VY谝Ik y8(9q{c9J3"G,}2=VUN ׳>=[Yu UDc:/2Js ^'^Wܫ'8Nm-/B/=*ZnECpcK,k- ˽JbcZ"ژ iZ8X3m~PmT.,{v6Ks'1ida8H CRa 2cO~`SwK&,C[Vsoug\ͷk#r+nEns+k(wmB7ZY]Ah`׹鬪w~"靕a2X@7n_U͘rY2J21U0Qorܩ0ጆ(Ky|Cߵ {)`sekd=:պg\fnk=ŋ$?hc:vt\Ɲ^|ceQnFw.UُnFCC~SK ?-*C_]a˷(HC˺E6av=h{uӒ6kOOd<>=mj.ê家?B3leG8x8OyxnhH@=?Yyu 0knʷ=\+r۔ZܜY<ثdu+re%[q{Cym5,W2:nP m{=wcԯtnWt<'&ޫxsi!y_o~^iUK/gPmN}uO֮=P}yyq Ǐ4K}gG$⟩і~tӻ]1[[mw:3`77&RvWlY۬]>~;D7ak]]_Kn'V}6szZt\ޱoQ9NMt AuUCcnKݖO޳ɉ|Cis#/T//mw5V7dd8n[7mѾ<:kO#!]1w-?b)˶AYus~gS=*-1ݯY[{i֞,?v92i|2yd˘o?ޗRzm'"0n,u~usio=KCq׮q~+sQ>MMͼ犝־w;wƜEl߹Y]! 61'?(H|Wk\d٩ztmɗ|˳>AUDc:32*ߩ}EE Y}]l}B#p|}]+:]G݀}&W$} jZ1tѴj_l?k5 } G9''=#xֵ٧ml~EkD gظʳ)nʯcZ6 \=mX74mg؍pɡ!X㣸a)L]#6Y0qp~otr?[ *Ι^N;kXlY-wԞ'|ȡwZxVVnc]u{lk]mr[:;  ^E3_]nv/ z5c!*zpv77{LYZ9! Hd67ÒxqJpT.WU;պ˫lʪzKm"1Ա 얹!.TbzN.vHsw?;j.'S{1TDLrQf|88__X{?յCS*ȡشo]͟/2叐Thp-pAPANJr_Z_OS`-?Mk$W)?& OZ$5]5뭡c@ k@1jVVh{ ^ 4&I$?M4_ZI%9?OS`-?M/W)?&ILXVƱ ckZk@RI$ HLinomntrRGB XYZ  1acspMSFTIEC sRGB-HP cprtP3desclwtptbkptrXYZgXYZ,bXYZ@dmndTpdmddvuedLview$lumimeas $tech0 rTRC< gTRC< bTRC< textCopyright (c) 1998 Hewlett-Packard CompanydescsRGB IEC61966-2.1sRGB IEC61966-2.1XYZ QXYZ XYZ o8XYZ bXYZ $descIEC http://www.iec.chIEC http://www.iec.chdesc.IEC 61966-2.1 Default RGB colour space - sRGB.IEC 61966-2.1 Default RGB colour space - sRGBdesc,Reference Viewing Condition in IEC61966-2.1,Reference Viewing Condition in IEC61966-2.1view_. \XYZ L VPWmeassig CRT curv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)KmPw߆pԏm0PGjYzpLs`0H\p8SoMsm0/F^@_W.E\.E\>]|^@p.E\2JcKpg.E\.E\3LfS}ffffffffffffffffffffffffffffffghn@.E\.E\Aa\ffffffffffffffffffffffffffffffgjw.E\.E\0H`S|ffffffffffffffffffffffffffffffffh@.E\.E\@_\fffffffffffffffffffffffffffffffgk.E\.E\0G_S|ffffffffffffffffffffffffffffffffg@.E\.E\@_\ffffffffffffffffffffffffffffffffh.E\.E\/G^S|fffffffffffffffffffffffffffffffff@.E\.E\@_\ffffffffffffffffffffffffffffffffg.E\.E\/G^S|fffffffffffffffffffffffffffffffff@.E\.E\@_\fffffffffffffffffffffffffffffffff.E\.E\/G^S|fffffffffffffffffffffffffffffffff@.E\.E\@_\fffffffffffffffffffffffffffffffff.E\.E\/G^S|fffffffffffffffffffffffff@.E\.E\@_\fffffffyffffffffff.E\.E\/G^S|ffffffffffpyfffffffff@.E\.E\@_\ffffffffffffffff.E\.E\/G^S|fffffffffffffffff@.E\.E\@_\fffffffffffffff.E\.E\/G^S|fffffffffffffff@.E\.E\@_\ffffffffffffff.E\.E\/G^S|fffffffffffff@.E\.E\@_\fffffffpffffff.E\.E\/G^S|fffffffffffff@.E\.E\@_\fffffffffyffffff.E\.E\/G^S|fffffffffffffff@.E\.E\@_\fffffffffffffffff.E\.E\/G^S|fffffffffffffffff@.E\.E\@_\fffffffffffyffffff.E\.E\/G^S|ffffffpffffffpfffff@.E\.E\@_\fffecbafffffffffff.E\.E\/G^S|fffffffffffffffffff@.E\.E\@_\fffda^[fffffffffff.E\.E\/G^S|fffffffffffffffffff@.E\.E\@_\ffeb\XT}fffffffffff.E\.E\/G^S|fffffffffffffffffff@.E\.E\@_\ffd_XRzpfffffffffff.E\.E\/G^S|fffffffffffffffffff@.E\.E\@_\feb\U_ufffffffffff.E\.E\/G^S|fffffffffffffffffff@.E\.E\@_\ec^XUvT}fffffffffff.E\.E\/G^S|ffffffyffffffpfffff`.E\.E\@_[da[Uq}Jpffffffffff.E\.E\/G^S|fffffffffffffffff.E\.E\@_[b\V]neLsfffffffff.E\.E\/G^S|ffffffpffffffffͽȶ®{Wg~Y_YWdsImNupffffff.E\.E\/G^S|ffffffffffffy˹ƳlVlgip{InQzfffffff.E\.E\/G^S|fffffffffffξ˹Ƴ®}m}^hYkOxKqUffffffff.E\.E\/G^S|fffffffffffξ˹ǵűu݄f|VyFf~iGjOvZfffffffff.E\.E\/G^S|ffffffffffffͽƳ~n}`=Xfz>]g~S|^yffffffffff.E\.E\/G^S|ffffffffffppfffǵ~}}}~zp؂fHrCeVK+M(r}ayfffffffffffffff.E\.E\/G^S|fffffffffffffppfffffİ~qf^YUUUVY^bdd}^ĀUi3Xa?J(N'W+|ffffffffffffffffffffffffff.E\.E\/G^S|fffffffffffffffffffffffffȶueVxKrCn>k9j8j8j8k9m=p@qDpHoJnLy5p@aU\0L(Q)X,]6}fffffffffffffffffffffffff.E\.E\/G^R|fffffffffffffffffffffffffyeUwIp@l;j8g5g5g5f3g5g5g5h7f6b7_84a0U[AK,N(T*X,W,aHffffffffffffffffffffffffg.E\.E\.E\Qyefffffffffffffffffffffffq]yMqAl;j8g5g5f3f3f3f3f3f3f4c3^0Y.g.b-n>]yMt3N,R(W+Y,U*P(syfffffffffffffffffffffffg.E\.E\.E\KqbefffffffffffffffffffffyξnXwIn>k9h6g5g5f3f3f3f3f3f3e2d2`0Z.U,m+a0~SUx>I*P+V+Z-X,S+N'J%pffffffffffffffffffffffh.E\.E\.E\7SnPwWXYYYYYYYYYYYYYYYYYYYYξnXvHm=j8g5g5f3f3f3f3f3f3f3e2d2a0[.U+}*Z-n>XvH/J)T-Z-[.V+P(K&F#\XYYYYYYYYYYYYYYYYYYYYYYZfH\p.E\.E\.E\/F^7Sn:Wt:Xu;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;XvTgξsYvHm=j8g5g5f3f3f3f3f3f3f3f3d2b1]/W,c*U*a0|P|Pm=L%L(W-]/\.W-O'I$C"@ GUk;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xvj8g5g5f3f3f3f3f3f3f3f3e2c2^/X,T*k)Z-n>~SsE~/E$P)[/`0]/U+N'G#A <d>9.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\7SnFh^0`;Qf.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\˹˹ǵ®h{Pp@j8g5g5f3f3f3f3f3f3f3f3f3d2`0Z-U*|)V+b1yMyMm=c&G%T+_1b1^1U*L&E#>8y7".E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\Pi00@@@@@@@@@@@@@@@@@@@@@®İİovQh?c6c3e4e2f3f3f3f3f3f3f3f3e2b1\.V+h)T*\.n>|PqAq5B!L'X.a1d2_1U*L&C"<6z1`@@@@@@@@@@@@@@@@@@@@@ zxY]6q-`&i=/Bm=gs_C@ @ @ A _&3@ L&U*Z-Z-V+W)c*X,`0l;tFn>g5c%H$T*^/d2g5e2_/T*H$=3i*W#J}j/c2ԨsU6'@ @ @ Q r.<F#M&O'y)V+\.e2rCrCk9q/B!L&X,b1f3g5e2_/S)F#;x0b'N@ uvyyף8q[-}kRC@ @ @ S!{1? m'Y,[.b1l;sEp@h6t'F#Q)]/d2f3f3e2^/R)D"8q-Z$E@ kmppxŲξ~b+VP(i|kJ(@ S!>j2`0a0f3p@rCl;l5I!I%V+a0e2g5f3e2^/P(B!6i*Q @ @ pacfhkuS\<"EH$~SdP3UxKj8f3k9qAp@j8|-C"N'[-c2f3f3f3d2\.N'? }2`&G@ @ @VX[^_dpıɼ(><B!l;xXqAj8m=qAm=h6Z$G#T*_/e2g5f3f3b1Z-J%<r.T"@ @ @ cyM|P~SVW\n̻3 >A a1em~SqAk9n>n>j8r1B!L&X,b1f3g5f3e2a0V+F#7f)H@ @ X7+Pqp@rCtFxKyLzNVsS_@3 %JC"^/vH]c^~StFm=l;p@m=g5t'F#Q)]/d2f3f3f3d2^/R)B!{1W#@ @ @ pSJ @@@@@@@@@@@@@@@@@@@@@f3g5k9n>qArBtFY®ʽ(>3 ,YI$\.g5m=n>l;j8j8m=p@k9j2K"J%V+a0e2g5f3d2b1Z-L&;k+G@ @ @ @@@@@@@@@@@@@@@@@@@@@@00qva1a1c2e2j8l;mn>h6+D"O([.c2f3f3e2c2^/U+F#3W#@ @ @ @ `0NnS|hjE\.]/`0b1d2g5j8wJqS_@3 "E>|U*a0e2f3g5l;p@l;g5R#H$T*`0e2g5f3d2a0Z-N'=i*B @ @ @ O1(`p5PjHlbȉ}W,X,Z-\._/a1d4k<U®̿(>3 +VF#Z-b1f3h6n>p@k9u0B!L&Y,b1f3g5d2b1\.T*E#~2P @ @ @ @ pfkH\p.E\l+@ @ @ @ @ NJUffffffffffffffffffffghp.E\.E\0IaR|fffffffffffffffffffffffqH$G#H$J%N'R)V+\/f9zQ~(>3 +VF#[.h6m=h6+D"O([.b1d2a1^/W,N'@ t.E@ @ @ @ @ affffffffffffffffffffffh.E\.E\0H`S|ffffffffffffffffffffffffnwB!B!B!D"I$N'T+[/h=\ɷ3 3 4iP(b1h6f3Q"H$T*^/b1a2\.U+L&? u/H@ @ @ @ @ SYlfffffffffffffffffffffffg.E\.E\0G_S|fffffffffffffffffffffffffO@<<<? C!H$O)X/jCibjM3 "CB![.c2t-C!K&W,^.^/Y.R)H$<n,E@ @ @ @ @ G21fffffffffffffffffffffffff.E\.E\/G^S|fffffffffffffffffffffffffn='6568<A H%T0mKw(>3 1bO(^/k&D"N'T*W+R)J%@ 4`&@ @ @ @ @ @ B"afffffffffffffffffffffffff.E\.E\/G^S|fffffffpfk{1u/t.u/z148@#P1oRۛ´3 "CB!b*=?D"H$F#@!5i*K@ @ @ @ @ @ @ _fffffyfffffffffff.E\.E\/G^S|ffffffffkqk+f)c(c(h*n,v17M4r]͠ǽxg3 6kun$5344u/b'K@ @ @ @ @ @ @ @ Xiffffpfffffffff.E\.E\/G^S|fffffffpff],V"S!Q S!W#^'j2J8vhŧ2E#0_xI'f(]&X#O B@ @ @ @ @ @ @ @ B"_fffpffffffff.E\.E\/G^S|fffffffffdR63GB @ @ A GT,oL@|sȺSn7jG;E= > @ @ @ @ @ @ @ @ @ G21affffpfffffff.E\.E\/G^S|fffffffffffSYl@ @ @ @ ADS1&pSJvnrjjLBP."@ ? @ @ @ @ @ @ @ @ SYlffffffffffff.E\.E\/G^S|ffffffffffffffffaWPX@ @ @ AG#V5)hJ@y^U}d[qUL_@5P."D@ A@ @ @ @ @ IBJafffffyyffffff.E\.E\/G^S|fffffffffffpffffff~zmoQ2)@ CI%P."X7+\<1Y9-R0$I%CA@ @ `@ `>8-08LbXffffffffffffffff.E\.E\/G^S|fffffffffffffffff~ɀrVM\;0F!G#G#DCAZ9-pSJ@.E\.E\7SnXfffffffffffffffffff.E\.E\/G^S|ffffffffffffff~@.E\.E\7SnXfffffffffffffypfffffffffff.E\.E\/G^S|fffffffffffffff~@.E\.E\7SnXffffffffffffffffffffffffff.E\.E\/G^S|ffffffffffffff~@.E\.E\7SnXfffffyffffffffffffffffffff.E\.E\/G^S|fffffffffffff~@.E\.E\7SnXfffffyffffffffffffffffffff.E\.E\/G^S|fffffffyfffff~@.E\.E\7SnXffffffffffffffffffffffffff.E\.E\/G^S|fffffffffffffffff~@.E\.E\7SnXfffffffffffffpffffffff.E\.E\/G^S|fffffffffffffffff~@.E\.E\7SnXffffffyffffffffffff.E\.E\/G^S|fffffffffffffffff~@.E\.E\7SnXfffffffffffffffff.E\.E\/G^S|ffffffffffff~@.E\.E\7SnXffffffyfpffffff.E\.E\/G^S|fffffffyfffff~@.E\.E\7SnXffffffffffffff.E\.E\/G^S|fffffffffffff~@.E\.E\7SnXfffffffpfffffff.E\.E\/G^S|ffffffffffffff~@.E\.E\7SnXffffffffffffffff.E\.E\/G^S|fffffffffffffff~@.E\.E\7SnXfffffffffpfffffffff.E\.E\/G^S|fffffffpfffffffffffff~@.E\.E\7SnXfffffffffffpffffffffff.E\.E\/G^S|fffffffffffffffffffffffffffffffff~@.E\.E\7SnXfffffffffffffffffffffffffffffffff.E\.E\/G^S|fffffffffffffffffffffffffffffffff~@.E\.E\7SnXfffffffffffffffffffffffffffffffff.E\.E\/G^R|fffffffffffffffffffffffffffffffff~@.E\.E\7SnXfffffffffffffffffffffffffffffffff.E\.E\.E\Qzeffffffffffffffffffffffffffffffff~@.E\.E\6RmWfffffffffffffffffffffffffffffffff.E\.E\.E\Nvdffffffffffffffffffffffffffffffff~@.E\.E\4NhVefffffffffffffffffffffffffffffffg.E\.E\.E\Fi`efffffffffffffffffffffffffffffff|@.E\.E\.E\PwbeffffffffffffffffffffffffffffffgH\p.E\.E\/G^InRzT~TTTTTTTTTTTTTTTTTTTTTTTTTTTTTU]qp@.E\.E\.E\9UrNuS}T~TTTTTTTTTTTTTTTTTTTTTTTTTTTTTUb}.E\.E\.E\.E\0Ia3Mf4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Oi6Ql@_Ov\g0;Qf.E\.E\.E\.E\2Jc4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg5Oj8TpEgUa0;Qf.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\:WtJn͟p.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\0H`@_OwP0Uh{.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\;Qfp;Qf.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\J`uPlibiodbc-3.52.16/mac/iODBCadministrator/Base.lproj/0000775000175000017500000000000014424171426016667 500000000000000libiodbc-3.52.16/mac/iODBCadministrator/Base.lproj/MainMenu.xib0000664000175000017500000001513114424170750021024 00000000000000 libiodbc-3.52.16/mac/iODBCadministrator/main.m0000664000175000017500000001341414424170750015714 00000000000000/* * main.m * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import #include int macosx_gui (int *argc, char **argv[]) { return NSApplicationMain(argc, argv); } void display_help (void) { printf ("-help\t\t\tDisplay the list of options.\n\r"); printf ("-odbc filename\t\tSet the location of the user ODBC.INI file.\n\r"); printf ("-odbcinst filename\tSet the location of the user ODBCINST.INI file.\n\r"); printf ("-sysodbc filename\tSet the location of the system ODBC.INI file.\n\r"); printf ("-sysodbcinst filename\tSet the location of the system ODBCINST.INI file.\n\r"); printf ("-debug\t\t\tThe error messages are displayed on the console.\n\r"); printf ("-admin odbcinstfile\tUsed to administrate the system odbcinst.ini file.\n\r\n\r"); printf ("-odbcfiledsn filename\tSet the location of the default File DSN directory.\n\r"); _exit (1); } int main (int argc, char *argv[]) { BOOL debug = FALSE; char *gui = NULL; int i = 1; setlocale (LC_ALL, ""); /* Use native locale */ printf ("OpenLink iODBC Administrator (macOS)\n"); printf ("iODBC Driver Manager %s\n", VERSION); printf ("Copyright (C) 2000-2023 OpenLink Software\n"); printf ("Please report all bugs to \n"); /* Check options commands */ if (argc > 1) { for (; i < argc; i++) { if (!strcasecmp (argv[i], "-help")) display_help (); if (!strcasecmp (argv[i], "-debug")) debug = TRUE; if (!strcasecmp (argv[i], "-odbc")) { if (i + 1 >= argc) display_help (); setenv ("ODBCINI", argv[++i], TRUE); } if (!strcasecmp (argv[i], "-admin")) { if (i + 1 >= argc) display_help (); setenv ("ODBCINSTINI", argv[++i], TRUE); setenv ("SYSODBCINSTINI", argv[i], TRUE); } if (!strcasecmp (argv[i], "-odbcinst")) { if (i + 1 >= argc) display_help (); setenv ("ODBCINSTINI", argv[++i], TRUE); } if (!strcasecmp (argv[i], "-sysodbc")) { if (i + 1 >= argc) display_help (); setenv ("SYSODBCINI", argv[++i], TRUE); } if (!strcasecmp (argv[i], "-sysodbcinst")) { if (i + 1 >= argc) display_help (); setenv ("SYSODBCINSTINI", argv[++i], TRUE); } if (!strcasecmp (argv[i], "-gui")) { if (i + 2 >= argc) display_help (); gui = argv[++i]; } if (!strcasecmp (argv[i], "-odbcfiledsn")) { if (i + 1 >= argc) display_help (); setenv ("ODBCFILEDSN", argv[++i], TRUE); } } } if (!debug) { #ifndef __APPLE__ close (STDOUT_FILENO); close (STDERR_FILENO); #endif } return macosx_gui (&argc, &argv); } libiodbc-3.52.16/mac/iODBCadministrator/AppDelegate.h0000664000175000017500000000643014424170750017136 00000000000000/* * AppDelegate.h * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import @interface AppDelegate : NSObject @end libiodbc-3.52.16/mac/iODBCadministrator/iODBCadministrator.xcodeproj/0000775000175000017500000000000014424171426022345 500000000000000libiodbc-3.52.16/mac/iODBCadministrator/iODBCadministrator.xcodeproj/project.xcworkspace/0000775000175000017500000000000014424171426026343 500000000000000libiodbc-3.52.16/mac/iODBCadministrator/iODBCadministrator.xcodeproj/project.pbxproj0000664000175000017500000004527714424170750025357 00000000000000// !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 48; objects = { /* Begin PBXBuildFile section */ 858A02D31B787ED900C8009C /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 858A02D21B787ED900C8009C /* main.m */; }; 858A02D61B787EE500C8009C /* AppDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 858A02D41B787EE500C8009C /* AppDelegate.h */; }; 858A02D71B787EE500C8009C /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 858A02D51B787EE500C8009C /* AppDelegate.m */; }; 858A02DC1B7883E300C8009C /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 858A02DB1B7883E300C8009C /* Cocoa.framework */; }; 85A390C81B79108D00AC8862 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 85A390C01B79108D00AC8862 /* InfoPlist.strings */; }; 85A390C91B79108D00AC8862 /* iODBCAdministrator.icns in Resources */ = {isa = PBXBuildFile; fileRef = 85A390C21B79108D00AC8862 /* iODBCAdministrator.icns */; }; 85A390CA1B79108D00AC8862 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 85A390C41B79108D00AC8862 /* MainMenu.xib */; }; 85A390CB1B79108D00AC8862 /* odbcman.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 85A390C61B79108D00AC8862 /* odbcman.tiff */; }; CDAE3B750987D655003250F8 /* odbcinst.h in Headers */ = {isa = PBXBuildFile; fileRef = F5C2EB0F0518625501A801EC /* odbcinst.h */; }; CDAE3B760987D655003250F8 /* sql.h in Headers */ = {isa = PBXBuildFile; fileRef = F5C2EB100518625501A801EC /* sql.h */; }; CDAE3B770987D655003250F8 /* sqltypes.h in Headers */ = {isa = PBXBuildFile; fileRef = F5C2EB110518625501A801EC /* sqltypes.h */; }; CDAE3B780987D655003250F8 /* iodbc.h in Headers */ = {isa = PBXBuildFile; fileRef = F5C2EB150518627501A801EC /* iodbc.h */; }; CDAE3B790987D655003250F8 /* iodbcunix.h in Headers */ = {isa = PBXBuildFile; fileRef = 71A26EE8069D5782005AC343 /* iodbcunix.h */; }; CDAE3B830987D655003250F8 /* iODBCinst.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F5C2EB0D0518623801A801EC /* iODBCinst.framework */; }; CDAE3B840987D655003250F8 /* iODBC.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 85D1BBC707E7D7C90070A59E /* iODBC.framework */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 71A26EE8069D5782005AC343 /* iodbcunix.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = iodbcunix.h; path = ../../include/iodbcunix.h; sourceTree = SOURCE_ROOT; }; 858A02D21B787ED900C8009C /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 858A02D41B787EE500C8009C /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 858A02D51B787EE500C8009C /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 858A02DB1B7883E300C8009C /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Cocoa.framework; sourceTree = DEVELOPER_DIR; }; 85D1BBC707E7D7C90070A59E /* iODBC.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = iODBC.framework; path = ../../mac/iODBC/build/iODBC.framework; sourceTree = SOURCE_ROOT; }; CDAE3B890987D655003250F8 /* Info-iODBC_Administrator.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Info-iODBC_Administrator.plist"; sourceTree = ""; }; CDAE3B8A0987D655003250F8 /* iODBC Administrator.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "iODBC Administrator.app"; sourceTree = BUILT_PRODUCTS_DIR; }; CDE9EB2D2636FEC20056782B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = ../Base.lproj/MainMenu.xib; sourceTree = ""; }; CDE9EB2E2636FEC60056782B /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = ../en.lproj/InfoPlist.strings; sourceTree = ""; }; CDE9EB2F2636FEC70056782B /* en */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = en; path = ../en.lproj/iODBCAdministrator.icns; sourceTree = ""; }; CDE9EB302636FEC70056782B /* en */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = en; path = ../en.lproj/odbcman.tiff; sourceTree = ""; }; F5C2EB0D0518623801A801EC /* iODBCinst.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = iODBCinst.framework; path = ../../mac/iODBCinst/build/iODBCinst.framework; sourceTree = SOURCE_ROOT; }; F5C2EB0F0518625501A801EC /* odbcinst.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = odbcinst.h; path = ../../include/odbcinst.h; sourceTree = SOURCE_ROOT; }; F5C2EB100518625501A801EC /* sql.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sql.h; path = ../../include/sql.h; sourceTree = SOURCE_ROOT; }; F5C2EB110518625501A801EC /* sqltypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqltypes.h; path = ../../include/sqltypes.h; sourceTree = SOURCE_ROOT; }; F5C2EB150518627501A801EC /* iodbc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = iodbc.h; path = ../../include/iodbc.h; sourceTree = SOURCE_ROOT; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ CDAE3B810987D655003250F8 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 858A02DC1B7883E300C8009C /* Cocoa.framework in Frameworks */, CDAE3B830987D655003250F8 /* iODBCinst.framework in Frameworks */, CDAE3B840987D655003250F8 /* iODBC.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 195DF8CFFE9D517E11CA2CBB /* Products */ = { isa = PBXGroup; children = ( CDAE3B8A0987D655003250F8 /* iODBC Administrator.app */, ); name = Products; sourceTree = ""; }; 20286C29FDCF999611CA2CEA /* iODBC Administrator */ = { isa = PBXGroup; children = ( 858A02D11B787EC900C8009C /* src */, 20286C2AFDCF999611CA2CEA /* Sources */, 20286C2CFDCF999611CA2CEA /* Resources */, 20286C32FDCF999611CA2CEA /* External Frameworks and Libraries */, 195DF8CFFE9D517E11CA2CBB /* Products */, CDAE3B890987D655003250F8 /* Info-iODBC_Administrator.plist */, ); name = "iODBC Administrator"; sourceTree = ""; }; 20286C2AFDCF999611CA2CEA /* Sources */ = { isa = PBXGroup; children = ( 71A26EE8069D5782005AC343 /* iodbcunix.h */, F5C2EB0F0518625501A801EC /* odbcinst.h */, F5C2EB100518625501A801EC /* sql.h */, F5C2EB110518625501A801EC /* sqltypes.h */, F5C2EB150518627501A801EC /* iodbc.h */, ); name = Sources; sourceTree = ""; }; 20286C2CFDCF999611CA2CEA /* Resources */ = { isa = PBXGroup; children = ( 85A390BF1B79108D00AC8862 /* English.lproj */, ); name = Resources; sourceTree = ""; }; 20286C32FDCF999611CA2CEA /* External Frameworks and Libraries */ = { isa = PBXGroup; children = ( 858A02DB1B7883E300C8009C /* Cocoa.framework */, 85D1BBC707E7D7C90070A59E /* iODBC.framework */, F5C2EB0D0518623801A801EC /* iODBCinst.framework */, ); name = "External Frameworks and Libraries"; sourceTree = ""; }; 858A02D11B787EC900C8009C /* src */ = { isa = PBXGroup; children = ( 858A02D41B787EE500C8009C /* AppDelegate.h */, 858A02D51B787EE500C8009C /* AppDelegate.m */, 858A02D21B787ED900C8009C /* main.m */, ); name = src; sourceTree = ""; }; 85A390BF1B79108D00AC8862 /* English.lproj */ = { isa = PBXGroup; children = ( 85A390C01B79108D00AC8862 /* InfoPlist.strings */, 85A390C21B79108D00AC8862 /* iODBCAdministrator.icns */, 85A390C41B79108D00AC8862 /* MainMenu.xib */, 85A390C61B79108D00AC8862 /* odbcman.tiff */, ); path = English.lproj; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ CDAE3B740987D655003250F8 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( CDAE3B750987D655003250F8 /* odbcinst.h in Headers */, CDAE3B760987D655003250F8 /* sql.h in Headers */, CDAE3B770987D655003250F8 /* sqltypes.h in Headers */, CDAE3B780987D655003250F8 /* iodbc.h in Headers */, CDAE3B790987D655003250F8 /* iodbcunix.h in Headers */, 858A02D61B787EE500C8009C /* AppDelegate.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ CDAE3B730987D655003250F8 /* iODBC Administrator */ = { isa = PBXNativeTarget; buildConfigurationList = CDAE3B860987D655003250F8 /* Build configuration list for PBXNativeTarget "iODBC Administrator" */; buildPhases = ( CDAE3B740987D655003250F8 /* Headers */, CDAE3B7A0987D655003250F8 /* Resources */, CDAE3B7F0987D655003250F8 /* Sources */, CDAE3B810987D655003250F8 /* Frameworks */, CDAE3B850987D655003250F8 /* Rez */, ); buildRules = ( ); dependencies = ( ); name = "iODBC Administrator"; productInstallPath = /Applications/iODBC; productName = "iODBC Administrator"; productReference = CDAE3B8A0987D655003250F8 /* iODBC Administrator.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 20286C28FDCF999611CA2CEA /* Project object */ = { isa = PBXProject; attributes = { LastUpgradeCheck = 1130; TargetAttributes = { CDAE3B730987D655003250F8 = { ProvisioningStyle = Manual; }; }; }; buildConfigurationList = CDAE3B8C0987D656003250F8 /* Build configuration list for PBXProject "iODBCadministrator" */; compatibilityVersion = "Xcode 8.0"; developmentRegion = en; hasScannedForEncodings = 1; knownRegions = ( en, Base, ); mainGroup = 20286C29FDCF999611CA2CEA /* iODBC Administrator */; projectDirPath = ""; projectRoot = ""; targets = ( CDAE3B730987D655003250F8 /* iODBC Administrator */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ CDAE3B7A0987D655003250F8 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( 85A390C81B79108D00AC8862 /* InfoPlist.strings in Resources */, 85A390C91B79108D00AC8862 /* iODBCAdministrator.icns in Resources */, 85A390CA1B79108D00AC8862 /* MainMenu.xib in Resources */, 85A390CB1B79108D00AC8862 /* odbcman.tiff in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXRezBuildPhase section */ CDAE3B850987D655003250F8 /* Rez */ = { isa = PBXRezBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXRezBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ CDAE3B7F0987D655003250F8 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 858A02D31B787ED900C8009C /* main.m in Sources */, 858A02D71B787EE500C8009C /* AppDelegate.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ 85A390C01B79108D00AC8862 /* InfoPlist.strings */ = { isa = PBXVariantGroup; children = ( CDE9EB2E2636FEC60056782B /* en */, ); name = InfoPlist.strings; sourceTree = ""; }; 85A390C21B79108D00AC8862 /* iODBCAdministrator.icns */ = { isa = PBXVariantGroup; children = ( CDE9EB2F2636FEC70056782B /* en */, ); name = iODBCAdministrator.icns; sourceTree = ""; }; 85A390C41B79108D00AC8862 /* MainMenu.xib */ = { isa = PBXVariantGroup; children = ( CDE9EB2D2636FEC20056782B /* Base */, ); name = MainMenu.xib; sourceTree = ""; }; 85A390C61B79108D00AC8862 /* odbcman.tiff */ = { isa = PBXVariantGroup; children = ( CDE9EB302636FEC70056782B /* en */, ); name = odbcman.tiff; sourceTree = ""; }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ CDAE3B870987D655003250F8 /* Development */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = ( arm64, $IODBC_32BIT, ); CLANG_ENABLE_OBJC_WEAK = YES; CODE_SIGN_IDENTITY = "-"; COPY_PHASE_STRIP = YES; CURRENT_PROJECT_VERSION = $IODBC_VERSION; DEPLOYMENT_POSTPROCESSING = YES; DYLIB_COMPATIBILITY_VERSION = ""; DYLIB_CURRENT_VERSION = $IODBC_VERSION; FRAMEWORK_SEARCH_PATHS = ( ../../mac/iODBC/build/Deployment, ../../mac/iODBC/build, ../../mac/iODBCinst/build/Deployment, ../../mac/iODBCinst/build, ); FRAMEWORK_VERSION = 3.52; GCC_DYNAMIC_NO_PIC = NO; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_OPTIMIZATION_LEVEL = 2; GCC_PREPROCESSOR_DEFINITIONS = ( "DATEBUILD=`date`", "ODBCVER=0x351", _MACX, ); HEADER_SEARCH_PATHS = ../../include; INFOPLIST_FILE = "Info-iODBC_Administrator.plist"; INSTALL_PATH = /Applications/iODBC; LIBRARY_SEARCH_PATHS = ""; MACOSX_DEPLOYMENT_TARGET = 10.9; ONLY_ACTIVE_ARCH_PRE_XCODE_3_1 = "$(NATIVE_ARCH)"; OTHER_CFLAGS = ""; OTHER_LDFLAGS = ( "-bind_at_load", "-multiply_defined", suppress, ); OTHER_REZFLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = org.iodbc.iODBCAdministrator; PRODUCT_NAME = "iODBC Administrator"; RESMERGER_SOURCES_FORK = data; SECTORDER_FLAGS = ""; SKIP_INSTALL = YES; WARNING_CFLAGS = ( "-Wmost", "-Wno-four-char-constants", "-Wno-unknown-pragmas", ); WRAPPER_EXTENSION = app; ZERO_LINK = NO; }; name = Development; }; CDAE3B880987D655003250F8 /* Deployment */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = ( arm64, $IODBC_32BIT, ); CLANG_ENABLE_OBJC_WEAK = YES; COPY_PHASE_STRIP = YES; FRAMEWORK_SEARCH_PATHS = ( ../../mac/iODBC/build/Deployment, ../../mac/iODBC/build, ../../mac/iODBCinst/build/Deployment, ../../mac/iODBCinst/build, ); GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_OPTIMIZATION_LEVEL = 2; GCC_PREPROCESSOR_DEFINITIONS = ( "DATEBUILD=`date`", "ODBCVER=0x351", _MACX, ); HEADER_SEARCH_PATHS = ../../include; INFOPLIST_FILE = "Info-iODBC_Administrator.plist"; INSTALL_PATH = /Applications/iODBC; LIBRARY_SEARCH_PATHS = ""; MACOSX_DEPLOYMENT_TARGET = 10.9; ONLY_ACTIVE_ARCH_PRE_XCODE_3_1 = "$(NATIVE_ARCH)"; OTHER_CFLAGS = ""; OTHER_LDFLAGS = ( "-bind_at_load", "-multiply_defined", suppress, ); OTHER_REZFLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = org.iodbc.iODBCAdministrator; PRODUCT_NAME = "iODBC Administrator"; SECTORDER_FLAGS = ""; WARNING_CFLAGS = ( "-Wmost", "-Wno-four-char-constants", "-Wno-unknown-pragmas", ); WRAPPER_EXTENSION = app; ZERO_LINK = NO; }; name = Deployment; }; CDAE3B8D0987D656003250F8 /* Development */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = ( arm64, $IODBC_32BIT, ); CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "-"; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.9; ONLY_ACTIVE_ARCH = YES; }; name = Development; }; CDAE3B8E0987D656003250F8 /* Deployment */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = ( arm64, $IODBC_32BIT, ); CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "-"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.9; }; name = Deployment; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ CDAE3B860987D655003250F8 /* Build configuration list for PBXNativeTarget "iODBC Administrator" */ = { isa = XCConfigurationList; buildConfigurations = ( CDAE3B870987D655003250F8 /* Development */, CDAE3B880987D655003250F8 /* Deployment */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Deployment; }; CDAE3B8C0987D656003250F8 /* Build configuration list for PBXProject "iODBCadministrator" */ = { isa = XCConfigurationList; buildConfigurations = ( CDAE3B8D0987D656003250F8 /* Development */, CDAE3B8E0987D656003250F8 /* Deployment */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Deployment; }; /* End XCConfigurationList section */ }; rootObject = 20286C28FDCF999611CA2CEA /* Project object */; } libiodbc-3.52.16/mac/iODBCadministrator64/0000775000175000017500000000000014424171426015042 500000000000000libiodbc-3.52.16/mac/iODBCadministrator64/main.m0000664000175000017500000001341414424170750016066 00000000000000/* * main.m * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import #include int macosx_gui (int *argc, char **argv[]) { return NSApplicationMain(argc, argv); } void display_help (void) { printf ("-help\t\t\tDisplay the list of options.\n\r"); printf ("-odbc filename\t\tSet the location of the user ODBC.INI file.\n\r"); printf ("-odbcinst filename\tSet the location of the user ODBCINST.INI file.\n\r"); printf ("-sysodbc filename\tSet the location of the system ODBC.INI file.\n\r"); printf ("-sysodbcinst filename\tSet the location of the system ODBCINST.INI file.\n\r"); printf ("-debug\t\t\tThe error messages are displayed on the console.\n\r"); printf ("-admin odbcinstfile\tUsed to administrate the system odbcinst.ini file.\n\r\n\r"); printf ("-odbcfiledsn filename\tSet the location of the default File DSN directory.\n\r"); _exit (1); } int main (int argc, char *argv[]) { BOOL debug = FALSE; char *gui = NULL; int i = 1; setlocale (LC_ALL, ""); /* Use native locale */ printf ("OpenLink iODBC Administrator (macOS)\n"); printf ("iODBC Driver Manager %s\n", VERSION); printf ("Copyright (C) 2000-2023 OpenLink Software\n"); printf ("Please report all bugs to \n"); /* Check options commands */ if (argc > 1) { for (; i < argc; i++) { if (!strcasecmp (argv[i], "-help")) display_help (); if (!strcasecmp (argv[i], "-debug")) debug = TRUE; if (!strcasecmp (argv[i], "-odbc")) { if (i + 1 >= argc) display_help (); setenv ("ODBCINI", argv[++i], TRUE); } if (!strcasecmp (argv[i], "-admin")) { if (i + 1 >= argc) display_help (); setenv ("ODBCINSTINI", argv[++i], TRUE); setenv ("SYSODBCINSTINI", argv[i], TRUE); } if (!strcasecmp (argv[i], "-odbcinst")) { if (i + 1 >= argc) display_help (); setenv ("ODBCINSTINI", argv[++i], TRUE); } if (!strcasecmp (argv[i], "-sysodbc")) { if (i + 1 >= argc) display_help (); setenv ("SYSODBCINI", argv[++i], TRUE); } if (!strcasecmp (argv[i], "-sysodbcinst")) { if (i + 1 >= argc) display_help (); setenv ("SYSODBCINSTINI", argv[++i], TRUE); } if (!strcasecmp (argv[i], "-gui")) { if (i + 2 >= argc) display_help (); gui = argv[++i]; } if (!strcasecmp (argv[i], "-odbcfiledsn")) { if (i + 1 >= argc) display_help (); setenv ("ODBCFILEDSN", argv[++i], TRUE); } } } if (!debug) { #ifndef __APPLE__ close (STDOUT_FILENO); close (STDERR_FILENO); #endif } return macosx_gui (&argc, &argv); } libiodbc-3.52.16/mac/iODBCadministrator64/iODBCadministrator64.xcodeproj/0000775000175000017500000000000014424171426022671 500000000000000libiodbc-3.52.16/mac/iODBCadministrator64/iODBCadministrator64.xcodeproj/project.xcworkspace/0000775000175000017500000000000014424171426026667 500000000000000libiodbc-3.52.16/mac/iODBCadministrator64/iODBCadministrator64.xcodeproj/project.pbxproj0000664000175000017500000004514514424170750025675 00000000000000// !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 48; objects = { /* Begin PBXBuildFile section */ 858A02D31B787ED900C8009C /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 858A02D21B787ED900C8009C /* main.m */; }; 858A02D61B787EE500C8009C /* AppDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 858A02D41B787EE500C8009C /* AppDelegate.h */; }; 858A02D71B787EE500C8009C /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 858A02D51B787EE500C8009C /* AppDelegate.m */; }; 858A02DC1B7883E300C8009C /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 858A02DB1B7883E300C8009C /* Cocoa.framework */; }; 85A390C81B79108D00AC8862 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 85A390C01B79108D00AC8862 /* InfoPlist.strings */; }; 85A390C91B79108D00AC8862 /* iODBCAdministrator.icns in Resources */ = {isa = PBXBuildFile; fileRef = 85A390C21B79108D00AC8862 /* iODBCAdministrator.icns */; }; 85A390CA1B79108D00AC8862 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 85A390C41B79108D00AC8862 /* MainMenu.xib */; }; 85A390CB1B79108D00AC8862 /* odbcman.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 85A390C61B79108D00AC8862 /* odbcman.tiff */; }; CDAE3B750987D655003250F8 /* odbcinst.h in Headers */ = {isa = PBXBuildFile; fileRef = F5C2EB0F0518625501A801EC /* odbcinst.h */; }; CDAE3B760987D655003250F8 /* sql.h in Headers */ = {isa = PBXBuildFile; fileRef = F5C2EB100518625501A801EC /* sql.h */; }; CDAE3B770987D655003250F8 /* sqltypes.h in Headers */ = {isa = PBXBuildFile; fileRef = F5C2EB110518625501A801EC /* sqltypes.h */; }; CDAE3B780987D655003250F8 /* iodbc.h in Headers */ = {isa = PBXBuildFile; fileRef = F5C2EB150518627501A801EC /* iodbc.h */; }; CDAE3B790987D655003250F8 /* iodbcunix.h in Headers */ = {isa = PBXBuildFile; fileRef = 71A26EE8069D5782005AC343 /* iodbcunix.h */; }; CDAE3B830987D655003250F8 /* iODBCinst.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F5C2EB0D0518623801A801EC /* iODBCinst.framework */; }; CDAE3B840987D655003250F8 /* iODBC.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 85D1BBC707E7D7C90070A59E /* iODBC.framework */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 71A26EE8069D5782005AC343 /* iodbcunix.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = iodbcunix.h; path = ../../include/iodbcunix.h; sourceTree = SOURCE_ROOT; }; 858A02D21B787ED900C8009C /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 858A02D41B787EE500C8009C /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 858A02D51B787EE500C8009C /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 858A02DB1B7883E300C8009C /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Cocoa.framework; sourceTree = DEVELOPER_DIR; }; 85D1BBC707E7D7C90070A59E /* iODBC.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = iODBC.framework; path = ../../mac/iODBC/build/iODBC.framework; sourceTree = SOURCE_ROOT; }; CD75BBFB2637000B00ED5683 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = ../Base.lproj/MainMenu.xib; sourceTree = ""; }; CD75BBFC2637001000ED5683 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = ../en.lproj/InfoPlist.strings; sourceTree = ""; }; CD75BBFD2637001000ED5683 /* en */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = en; path = ../en.lproj/iODBCAdministrator.icns; sourceTree = ""; }; CD75BBFE2637001000ED5683 /* en */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = en; path = ../en.lproj/odbcman.tiff; sourceTree = ""; }; CDAE3B890987D655003250F8 /* Info-iODBC_Administrator.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Info-iODBC_Administrator.plist"; sourceTree = ""; }; CDAE3B8A0987D655003250F8 /* iODBC Administrator64.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "iODBC Administrator64.app"; sourceTree = BUILT_PRODUCTS_DIR; }; F5C2EB0D0518623801A801EC /* iODBCinst.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = iODBCinst.framework; path = ../../mac/iODBCinst/build/iODBCinst.framework; sourceTree = SOURCE_ROOT; }; F5C2EB0F0518625501A801EC /* odbcinst.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = odbcinst.h; path = ../../include/odbcinst.h; sourceTree = SOURCE_ROOT; }; F5C2EB100518625501A801EC /* sql.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sql.h; path = ../../include/sql.h; sourceTree = SOURCE_ROOT; }; F5C2EB110518625501A801EC /* sqltypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqltypes.h; path = ../../include/sqltypes.h; sourceTree = SOURCE_ROOT; }; F5C2EB150518627501A801EC /* iodbc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = iodbc.h; path = ../../include/iodbc.h; sourceTree = SOURCE_ROOT; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ CDAE3B810987D655003250F8 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 858A02DC1B7883E300C8009C /* Cocoa.framework in Frameworks */, CDAE3B830987D655003250F8 /* iODBCinst.framework in Frameworks */, CDAE3B840987D655003250F8 /* iODBC.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 195DF8CFFE9D517E11CA2CBB /* Products */ = { isa = PBXGroup; children = ( CDAE3B8A0987D655003250F8 /* iODBC Administrator64.app */, ); name = Products; sourceTree = ""; }; 20286C29FDCF999611CA2CEA /* iODBC Administrator64 */ = { isa = PBXGroup; children = ( 858A02D11B787EC900C8009C /* src */, 20286C2AFDCF999611CA2CEA /* Sources */, 20286C2CFDCF999611CA2CEA /* Resources */, 20286C32FDCF999611CA2CEA /* External Frameworks and Libraries */, 195DF8CFFE9D517E11CA2CBB /* Products */, CDAE3B890987D655003250F8 /* Info-iODBC_Administrator.plist */, ); name = "iODBC Administrator64"; sourceTree = ""; }; 20286C2AFDCF999611CA2CEA /* Sources */ = { isa = PBXGroup; children = ( 71A26EE8069D5782005AC343 /* iodbcunix.h */, F5C2EB0F0518625501A801EC /* odbcinst.h */, F5C2EB100518625501A801EC /* sql.h */, F5C2EB110518625501A801EC /* sqltypes.h */, F5C2EB150518627501A801EC /* iodbc.h */, ); name = Sources; sourceTree = ""; }; 20286C2CFDCF999611CA2CEA /* Resources */ = { isa = PBXGroup; children = ( 85A390BF1B79108D00AC8862 /* English.lproj */, ); name = Resources; sourceTree = ""; }; 20286C32FDCF999611CA2CEA /* External Frameworks and Libraries */ = { isa = PBXGroup; children = ( 858A02DB1B7883E300C8009C /* Cocoa.framework */, 85D1BBC707E7D7C90070A59E /* iODBC.framework */, F5C2EB0D0518623801A801EC /* iODBCinst.framework */, ); name = "External Frameworks and Libraries"; sourceTree = ""; }; 858A02D11B787EC900C8009C /* src */ = { isa = PBXGroup; children = ( 858A02D41B787EE500C8009C /* AppDelegate.h */, 858A02D51B787EE500C8009C /* AppDelegate.m */, 858A02D21B787ED900C8009C /* main.m */, ); name = src; sourceTree = ""; }; 85A390BF1B79108D00AC8862 /* English.lproj */ = { isa = PBXGroup; children = ( 85A390C01B79108D00AC8862 /* InfoPlist.strings */, 85A390C21B79108D00AC8862 /* iODBCAdministrator.icns */, 85A390C41B79108D00AC8862 /* MainMenu.xib */, 85A390C61B79108D00AC8862 /* odbcman.tiff */, ); path = English.lproj; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ CDAE3B740987D655003250F8 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( CDAE3B750987D655003250F8 /* odbcinst.h in Headers */, CDAE3B760987D655003250F8 /* sql.h in Headers */, CDAE3B770987D655003250F8 /* sqltypes.h in Headers */, CDAE3B780987D655003250F8 /* iodbc.h in Headers */, CDAE3B790987D655003250F8 /* iodbcunix.h in Headers */, 858A02D61B787EE500C8009C /* AppDelegate.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ CDAE3B730987D655003250F8 /* iODBC Administrator64 */ = { isa = PBXNativeTarget; buildConfigurationList = CDAE3B860987D655003250F8 /* Build configuration list for PBXNativeTarget "iODBC Administrator64" */; buildPhases = ( CDAE3B740987D655003250F8 /* Headers */, CDAE3B7A0987D655003250F8 /* Resources */, CDAE3B7F0987D655003250F8 /* Sources */, CDAE3B810987D655003250F8 /* Frameworks */, CDAE3B850987D655003250F8 /* Rez */, ); buildRules = ( ); dependencies = ( ); name = "iODBC Administrator64"; productInstallPath = /Applications/iODBC; productName = "iODBC Administrator64"; productReference = CDAE3B8A0987D655003250F8 /* iODBC Administrator64.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 20286C28FDCF999611CA2CEA /* Project object */ = { isa = PBXProject; attributes = { LastUpgradeCheck = 1130; TargetAttributes = { CDAE3B730987D655003250F8 = { ProvisioningStyle = Manual; }; }; }; buildConfigurationList = CDAE3B8C0987D656003250F8 /* Build configuration list for PBXProject "iODBCadministrator64" */; compatibilityVersion = "Xcode 8.0"; developmentRegion = en; hasScannedForEncodings = 1; knownRegions = ( en, Base, ); mainGroup = 20286C29FDCF999611CA2CEA /* iODBC Administrator64 */; projectDirPath = ""; projectRoot = ""; targets = ( CDAE3B730987D655003250F8 /* iODBC Administrator64 */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ CDAE3B7A0987D655003250F8 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( 85A390C81B79108D00AC8862 /* InfoPlist.strings in Resources */, 85A390C91B79108D00AC8862 /* iODBCAdministrator.icns in Resources */, 85A390CA1B79108D00AC8862 /* MainMenu.xib in Resources */, 85A390CB1B79108D00AC8862 /* odbcman.tiff in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXRezBuildPhase section */ CDAE3B850987D655003250F8 /* Rez */ = { isa = PBXRezBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXRezBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ CDAE3B7F0987D655003250F8 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 858A02D31B787ED900C8009C /* main.m in Sources */, 858A02D71B787EE500C8009C /* AppDelegate.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ 85A390C01B79108D00AC8862 /* InfoPlist.strings */ = { isa = PBXVariantGroup; children = ( CD75BBFC2637001000ED5683 /* en */, ); name = InfoPlist.strings; sourceTree = ""; }; 85A390C21B79108D00AC8862 /* iODBCAdministrator.icns */ = { isa = PBXVariantGroup; children = ( CD75BBFD2637001000ED5683 /* en */, ); name = iODBCAdministrator.icns; sourceTree = ""; }; 85A390C41B79108D00AC8862 /* MainMenu.xib */ = { isa = PBXVariantGroup; children = ( CD75BBFB2637000B00ED5683 /* Base */, ); name = MainMenu.xib; sourceTree = ""; }; 85A390C61B79108D00AC8862 /* odbcman.tiff */ = { isa = PBXVariantGroup; children = ( CD75BBFE2637001000ED5683 /* en */, ); name = odbcman.tiff; sourceTree = ""; }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ CDAE3B870987D655003250F8 /* Development */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = x86_64; CLANG_ENABLE_OBJC_WEAK = YES; CODE_SIGN_IDENTITY = "-"; COPY_PHASE_STRIP = YES; CURRENT_PROJECT_VERSION = $IODBC_VERSION; DEPLOYMENT_POSTPROCESSING = YES; DYLIB_COMPATIBILITY_VERSION = ""; DYLIB_CURRENT_VERSION = $IODBC_VERSION; FRAMEWORK_SEARCH_PATHS = ( ../../mac/iODBC/build/Deployment, ../../mac/iODBC/build, ../../mac/iODBCinst/build/Deployment, ../../mac/iODBCinst/build, ); FRAMEWORK_VERSION = 3.52; GCC_DYNAMIC_NO_PIC = NO; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_OPTIMIZATION_LEVEL = 2; GCC_PREPROCESSOR_DEFINITIONS = ( "DATEBUILD=`date`", "ODBCVER=0x351", _MACX, ); HEADER_SEARCH_PATHS = ../../include; INFOPLIST_FILE = "Info-iODBC_Administrator.plist"; INSTALL_PATH = /Applications/iODBC; LIBRARY_SEARCH_PATHS = ""; MACOSX_DEPLOYMENT_TARGET = 10.9; ONLY_ACTIVE_ARCH_PRE_XCODE_3_1 = "$(NATIVE_ARCH)"; OTHER_CFLAGS = ""; OTHER_LDFLAGS = ( "-bind_at_load", "-multiply_defined", suppress, ); OTHER_REZFLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = org.iodbc.iODBCAdministrator64; PRODUCT_NAME = "iODBC Administrator64"; RESMERGER_SOURCES_FORK = data; SECTORDER_FLAGS = ""; SKIP_INSTALL = YES; WARNING_CFLAGS = ( "-Wmost", "-Wno-four-char-constants", "-Wno-unknown-pragmas", ); WRAPPER_EXTENSION = app; ZERO_LINK = NO; }; name = Development; }; CDAE3B880987D655003250F8 /* Deployment */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = x86_64; CLANG_ENABLE_OBJC_WEAK = YES; COPY_PHASE_STRIP = YES; FRAMEWORK_SEARCH_PATHS = ( ../../mac/iODBC/build/Deployment, ../../mac/iODBC/build, ../../mac/iODBCinst/build/Deployment, ../../mac/iODBCinst/build, ); GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_OPTIMIZATION_LEVEL = 2; GCC_PREPROCESSOR_DEFINITIONS = ( "DATEBUILD=`date`", "ODBCVER=0x351", _MACX, ); HEADER_SEARCH_PATHS = ../../include; INFOPLIST_FILE = "Info-iODBC_Administrator.plist"; INSTALL_PATH = /Applications/iODBC; LIBRARY_SEARCH_PATHS = ""; MACOSX_DEPLOYMENT_TARGET = 10.9; ONLY_ACTIVE_ARCH_PRE_XCODE_3_1 = "$(NATIVE_ARCH)"; OTHER_CFLAGS = ""; OTHER_LDFLAGS = ( "-bind_at_load", "-multiply_defined", suppress, ); OTHER_REZFLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = org.iodbc.iODBCAdministrator64; PRODUCT_NAME = "iODBC Administrator64"; SECTORDER_FLAGS = ""; WARNING_CFLAGS = ( "-Wmost", "-Wno-four-char-constants", "-Wno-unknown-pragmas", ); WRAPPER_EXTENSION = app; ZERO_LINK = NO; }; name = Deployment; }; CDAE3B8D0987D656003250F8 /* Development */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = x86_64; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "-"; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.9; ONLY_ACTIVE_ARCH = YES; }; name = Development; }; CDAE3B8E0987D656003250F8 /* Deployment */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = x86_64; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "-"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.9; }; name = Deployment; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ CDAE3B860987D655003250F8 /* Build configuration list for PBXNativeTarget "iODBC Administrator64" */ = { isa = XCConfigurationList; buildConfigurations = ( CDAE3B870987D655003250F8 /* Development */, CDAE3B880987D655003250F8 /* Deployment */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Deployment; }; CDAE3B8C0987D656003250F8 /* Build configuration list for PBXProject "iODBCadministrator64" */ = { isa = XCConfigurationList; buildConfigurations = ( CDAE3B8D0987D656003250F8 /* Development */, CDAE3B8E0987D656003250F8 /* Deployment */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Deployment; }; /* End XCConfigurationList section */ }; rootObject = 20286C28FDCF999611CA2CEA /* Project object */; } libiodbc-3.52.16/mac/iODBCadministrator64/AppDelegate.h0000664000175000017500000000643014424170750017310 00000000000000/* * AppDelegate.h * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import @interface AppDelegate : NSObject @end libiodbc-3.52.16/mac/iODBCadministrator64/AppDelegate.m0000664000175000017500000000757314424170750017326 00000000000000/* * AppDelegate.m * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import "AppDelegate.h" #import #import #import #import #include @interface AppDelegate () //@property (weak) IBOutlet NSWindow *window; @end @implementation AppDelegate - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { BOOL manage_return = false; // Insert code here to initialize your application manage_return = SQLManageDataSources (-1L); } - (void)applicationWillTerminate:(NSNotification *)aNotification { // Insert code here to tear down your application } - (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender { return YES; } @end libiodbc-3.52.16/mac/iODBCadministrator64/Base.lproj/0000775000175000017500000000000014424171426017041 500000000000000libiodbc-3.52.16/mac/iODBCadministrator64/Base.lproj/MainMenu.xib0000664000175000017500000001514514424170750021203 00000000000000 libiodbc-3.52.16/mac/iODBCadministrator64/Info-iODBC_Administrator.plist0000664000175000017500000000210514424170750022505 00000000000000 CFBundleDevelopmentRegion English CFBundleExecutable iODBC Administrator64 CFBundleGetInfoString iODBC Administrator64 version $IODBC_VERSION, Copyright 1995-2023, OpenLink Software CFBundleIconFile iODBCAdministrator.icns CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName iODBC Administrator64 CFBundlePackageType APPL CFBundleShortVersionString $IODBC_VERSION CFBundleSignature odbc CFBundleVersion $IODBC_VERSION NSMainNibFile MainMenu NSPrincipalClass NSApplication libiodbc-3.52.16/mac/iODBCadministrator64/en.lproj/0000775000175000017500000000000014424171426016571 500000000000000libiodbc-3.52.16/mac/iODBCadministrator64/en.lproj/InfoPlist.strings0000664000175000017500000000051414424170750022032 00000000000000/* Localized versions of Info.plist keys */ CFBundleName = "iODBC Administrator64"; CFBundleShortVersionString = "iODBC Administrator64 version 3.52.16"; CFBundleGetInfoString = "iODBC Administrator64 version 3.52.16, Copyright 1995-2023, OpenLink Software"; NSHumanReadableCopyright = "Copyright © 1995-2023, OpenLink Software"; libiodbc-3.52.16/mac/iODBCadministrator64/en.lproj/iODBCAdministrator.icns0000664000175000017500000012035414424170750023014 00000000000000icnsics#H?~?~?~??????~?~?~?~?~?~?~??????~?~?~?~is32ZQ/ 8fff.ff 8ϔf.fp 8Ŧf.wੳ8fof侀f3.y.=o-Yjנּ 8f}T@ff 8ff.fff 8ff.f{8f.f.0]@0AyF UÈ U߶È UÈUuzM̀HEfe`EU^ai3`F U2@̀ UÈ UÈUÈEGvIGa^ p\ p\ p\pGW(]\w33M1\hp.$17 80" pd) p\ p\p\\^P^s8mkICN#????????????????????????????il32G~P.fh̀.fgЄ.fŀ.fƄ.ffҀffŀ.ffffƄ .fffffŀ .fffffƄ .fffuffŀ .f[fffƄ.fffff.dufffƄ.fffOffƄ.fknfńfƄ.eflx߹f;. x霃.+ sU[m퇑 wIoom 2UvmFD %\ju@.f 'j@@f˄.ff puR@@fٷfƄ .fff@Az@fffƄ .ffffƀ .fffvqffƄ .ffffƀ.ff݂fƄ .ffffƀ .ffjffƄ.ffffƀ.ff|ffƄ.fƀ.fƄ.ef.bf..9j˄~_DŽE݀E߄E؀EلE؀Eل E؀ Eل E؀ EلE֙EلEŮ}xلE ̟踎NلE ڒkffcZJȄBE ̥jffe^G^?E. k"KcZY_6 ~[d^, #|OgUcǂ ]g;ͪ`d<E HNfMFdN܄E /4lE4πل Em_ل Eـ Eل EـE肙ل Eـ EلEـEلEـEلEʀË́EE<~n\\˅\\\\́ \ \ \ \˷\\}\̂Ų^\ iUZcX'˃\ʂ n9432,>-%F\83*K%0 \5 iG&1.-8,/ {uS.@$2/ Ph+H<(4+~ /5.8002 \˂ $'99$2' \́ N&# \ eV ̂ \ \ \\ \ \\́\Ԁ\\\ʄ\ń\\?l8mksGw30Pich#H????????????????????????????????ih32 |G`.gyz7FFxz.]f7G@f~ʉ.]f7G@f{Ɖ.]ff7G@f~ff{Ɖ.]ffŃff7G@fff{Ɖ.]ffffff7G@f fyff{Ɖ.]fffff7G@fcXffff{Ɖ.]fffff7G@e\uffff{Ɖ.]ffffff@_]Lfff{Ɖ .]fffSff{Ɖ.]ff^yf{Ɖ.]fyֆf{Ɖ.Yfvшf{..:; U|ţ;Fb$+nqB+f\u~<jU@Vlkm- ;~߾fq|S$ ulkB 6afnsW@Z.jAdm@@.\fVgߝC@Wf~ɉ.]f 1˃@@Bf{Ɖ.]ffŃp]RW2fS@Bfuff{Ɖ.]fffW@BoP@ Vfoff{Ɖ.]ffffff]'7fffff{Ɖ.]ffłfm+7fff{Ɖ.]ffffm+7fffiff{Ɖ.]ffffffm+7ffffff{Ɖ.]ffŃffm+7fff{Ɖ.]fffm+7fhƀf{Ɖ.]fm+7f{Ɖ.Yfk+4f|.6CDE`?.@DMx.55.9jˇE7JhE7M_ۉE7M_ىÈ7M_ىEك7M_ىE̙7M_ ىE7M_ىE7M_ىEҙ֧_sىE̙Ǹ}͙ىEҙʼzىE ݸukjopL]ىE֧~jgffdWғTTzΉEFWXԭ}jfdZL]OBXh(/ĵvcef\ϻRdL9?/S*eۉE =6>TbkQR4"ىEك,!#JE(""‚ىEߙeR{. eىE]#S춙ىEقq/SىEq/SىEq/SىEكҙq/S֙ىE̴q/Sـ̀ىEq/SىEq/N։EOefhBEafsEIIE<ڈ\҇7P҈\7S\7S\ހ7S̃\7S̃\̀7S \7SƮ\7S˸\̀ɬ\³j\иnK>Ҁ\ ѠeG98?H5[(6\˄ȊS953-H:)*\]tvƑQ832.*P'/'!vĊ(/Q423.*>5+2&?/0,11).H".3%}/' &+:9&22#agu&SիU3A--32 aKRJ{`::"23/ %28E13>0(32+ \\…)+1Q 2=%/2- \"'1m+4&1- \ '0r&)) \8# #\~ Hr" \a'n\w/ǹ\ـw/ǹ\̀w/n\w/n\ڀw/n\w/n\w/hˈ\jF\Ή\]]\?h8mk @x@@@@@@@8@@@@@@@`@@@@@@@080`@@@@@@@@P 0Pit329umGYzL`E8Mm/@W..>^.2Kg..3Sfghn..A\fgjw؝..0Sfh..@\fgk̝..0Sfg..@\fhǝ../Sf..@\fgŝ../Sf..@\fĝ../Sf..@\fĝ../Sff..@\fyfĝ../Sfpyf..@\ffĝ../Sff..@\fŅfĝ../Sff..@\ffĝ../Sff..@\fpfĝ../Sff..@\fffyfĝ../Sfff..@\ffσfĝ../SfŃfςf..@\ffyfĝ../Sfpfpf..@\fecbaffĝ../Sffكf..@\fda^[fكfĝ../Sfمfكf ..@\ffeb\XTfكfĝ../Sfمfكf ..@\ffd_XRpfكfĝ../Sfمfكf ..@\feb\U_ufكfĝ../Sfff ..@\ec^XUTffĝ../Sfyfpf ..@[da[UqJfكfĝ../SfŃfłf ..@[b\V]eLffĝ../Sfpff WY_YWINpfĝ../Sfلfyҍ lVlpIQfĝ../Sff ۇOKUŅfĝ../Sff y~GOZfĝ../Sf쌀fՇ]S^ٳyfĝ../Sfppf ؞rayfĝ../Sfppfi|fĝ../Sfyp}fĝ../Rf՜aٽfg.Qefڹbnyɔfg.Kbefyma~x¹pfh.7PWXYԒZnvȼYZfE./7::;TڹUa||mŶG;<@LXb.kZn~s~±d.7F\ٞ9. ԐVbyymԿy.MԡϒҀ װT\n|qqԽz׸)cXcwvlԼ~q(˥~ԉU^mxphԹxh'qNESnװTZdssj{ҷq`ems@A_cX`ltngѴiWHjcU@QryV\errkqϰxbN=8[k@S{Y[blsph̫qZE=$+PՋJ@Sj`afprllȥiQ@=S"H~dxjfkqpj|ž}`G@<#(BlʵqjmqmhຕrT@@="Aa~qknnjrذfH@@RS%C^v~tmlpmgΤ{W@g$(,I\gmnljjmpkjΐkG@@=nv 6O^dfjnnhծW@LSh S">UaefglplgØiB@Om5Hb&(+FZbfhnpkuѭ~P@pE.@Gafpfĝ../Sf쁳ŁfS@ ADSpjP@?@Sffĝ../SfفfقfaW@ AGVhy}q_PD@A@Iafyńyfĝ../Sfفfpf~zQ=@FMX\YRIC><==>88Xfffĝ../Sfفff~ƿ..7XfكfŠfĝ../Sff~݉..7Xffypfĝ../Sff~݉..7Xfّfĝ../Sf얄f~݉..7Xfyّfĝ../Sff~݉..7Xfyّfĝ../Sf쁳ńyf~݉..7Xfّfĝ../Sfقff~݉..7XffŖpfĝ../Sfقff~݉..7XfكyfفϠfĝ../Sfقfσłf~݉..7Xfςffĝ../Sf쀳f~݉..7Xfyσfpfĝ../Sfyf~݉..7XfŎلfĝ../Sff~݉..7Xfpfĝ../Sfτf~݉..7Xffĝ../SfϠf~݉..7Xfpوfĝ../Sfpf~݉..7Xf٩pfĝ../Sf~݉..7Xfĝ../Sf~݉..7Xfĝ../Rf~݉..7Xfĝ.Qef~݉..6Wfĝ.Ndf~ى..4Vefg.F`ef|ӉÀ.PbefgE../IRTU]qωÀ.9NSTUby.0346@O\gߊ9.2458EUa9.:J.0@O̞U.99.HҠə˙j˚sΙZSs˙F_˙EE]EJpEEL}EEaEEH|EE_ݝEEG|EE_ڝEEG|EE_؝EEG|EE_םEEG|EE_םEEG|ƁƳEE_̉ҦםEEG|٦EE_̌̆םEEG|EE_̍مםEEG|EE_̎םEEG|EE_̎םEEG|EE_̃̄םEEG|ƁƄEE_̃̃߃םEEG|ك̃̃߂EE_̃םEEG| EE_ȃםEEG|셙EE_ăםEEG|兙 EE_}םEEG|兙 EE_zםEEG|兙 EE_םEEG|셙 EE_}םEEG|삙 EE_pƃ僙םEEG|ك҃̃قEE_ۗsƃםEEG|̟̄»gmuםEEG|삙ڪnzĎƄםEEG|»}xqǍمםEEG|!|ټjvʌ̆םEEG|򳀙"}zg|ˉ̦םEEG|Ɵ#ǾKMrםEEG|̹Ķ}ؑJNWםEEG|ȸxrnkjkmpqpon\LQX]םEEG|wpljgfghfb_֨KNTXWa֝Eyмyqljggfc^YgtNRWYUPsҝEqμwnkhggfed`ZUԿIPVZXSNJɝESwξvmjggfeda[U}щJTZ[VPKF\ZEFSWXgvmjggfdb]WcLLW]\WOIC@UXZ_qE ijxnjggfec^XTИEP[`]UNGA<>EShNE ¶{pjggfd`ZU|cGT_b^ULE>87Ef١ԓ Ŀvhcceefeb\VhлBLXad_ULC<61߸ܼx]OMRX^bdfec^XY}DQ]dd^UKB:2-.ƵlK937@KU\adefed`ZUIIUaee_UJ@70*Y([. !,9FPY_bca\Vh͗CNZbfe_TI>6-&:ζ_&3@LUZZVWcHT^dge_TH=3*#Ԉ6 .IIVaegfe^PB6* "\EP͗CN[cfd\N?2&.>ͲBLXbfgfeaVF7)3 prtxyz_3JtFQ]dfd^RB1#G-fgknqrt>3YKJVaegfdbZL;+ߘ͎aacejlmsݕ34kǀ͎DO[cffec^UF3#l|ΐ&j\]`bdgjw_3E|RHT`egfdaZN=*1}Plǐ&WXZ\_adk>3VΩBLYbfgdb\TE2 fZEZ%RRSUY\`coݫ33itFR]dgdb^VJ9&EEMz#jMMORUZ^etj3BzAJVafeb^XM>+JEEI|#HGHJNRV\fz>3V͎DO[bda^WN@.۝EEH|nBDINT[h۫33iQHT^ba\UL?/Y؝EEG|O<?CHOXjj3CƨCKW^^YRH<,2םEEG|=65683bkDNTWRJ@4&"םEEG|ҟ1/./148@Po٪3C=?DHF@5*̂ƦםEEG|q+)((*,17Mr3kn5344/'iٟםEEG|򟙄,"! !#'2JvE_I(&# "򬅙םEEG|6 ,L|nG2򟄙םEEG|فY 1SvrL.Y̎҄םEEG|偙備P #5J^dU@.BҳلםEEG|偙̃m2",7<90%-LƃƃםEEG|偙҃ٿEESٿםEEG|҄EESםEEG|EES呙םEEG|򹄙EES呙םEEG|EES呙םEEG|لEES呙םEEG|備ƃƂEESٹםEEG|備҂EES߿םEEG|備߃قEES҃߂҃םEEG|̂EES߬םEEG|EESَ儙םEEG|҃EESםEEG|߄EESםEEG|߿EESםEEG|EESƟםEEG|EESםEEG|EESםEEG|EESםEzEERםEvEEN՝EiˀEw͝ZEEGnz~܉ˀEUu}~EIMOQ_vNEJMOTgNEWnEH_w՞fENNE]ώmo^\\|ؚ\c؛\\f˙\\˚\\`˜\\˜\\_˝\\\\^\\\\^\\\\^\\\\^ى\\҇\\^҆\\\\^߅\\\\^ߍ߄\\܄\\^ُ܃\\σ\\^\\߃\\^܄߂\\ف\\^\\ف҃\\^σσ \\ق\\^̃\\»ۃق\\^̃ \\Ĺԃق\\^̃ \\ɾσق\\^̃ \\ĸ΃ق\\^̃ \\ƽvσق̄\\^҃σ \\¶}уف\\^׬\\ĹnՃـ\\^لπ܂Ž{~ds׃σ\\^gi{ێ\\^ցþ}m^hYkߍ\\^ߍ߀!žufVFfi\\^ـ"Ž~n`=Xf>~҇\\^π~}~zpfHCeV+(}ٌ҇\\^ςð~qf^YUVY^bdd^U3Xa?('+˕\\^ɶueVKC>989=@DHJL5@aU0(),6\\^˕íyeUI@;8535767840U[A,(*,,H\ʔq]MA;8553430..->]M3,(+,*(y\ˑξnXI>96553220.,+0SU>*++-,+'%\n˾nXH=8553220.+*->XH/)--.+(&#Xݝm\^ntuvƾsYH=855321/,**0PP=%(-/.-'$" kvxݝ\ }`K>855322/,*)->SE/$)/0/+'# 9\nd\ hP@8553 20-*)+1MM=&%+1*&#"\}ْ ̮oQ?6342321.+)*.>PA5!'.121*&"߸ѦzY<,(*,/12322/,*),2IH;)"*022/*&!.rL- &*.0223220-*)+/=K@6!$+224/*% K(pE2#(,/121.+)*-2EE8,"'-132/*%,B=gC  &*--+)*,0;F>5%$*/252/*$ }/2s' #&')+.2CC9/!&,1352/)# uvyy-}؞C  ',.1;E@6'#)/2332/)" .kmppxb(ik 2003@C;5!%+02532/(! "acfhku<$Sր3UK839A@8-"'-232.'  .VX[^_dp˼!;xXA8=A=6$#*/25331-% .cMPSVW\n  1emSA9>>81!&,135320+# & n@CFKLNVs@ "/H]c^SF=;@=5'#)/232/)! ?-359>ABFY˽ $.5=>;88=@92"%+025321-& {11228;>6+"(.23322/+# ً&E./01258Jq@ *0235;@;5#$*025320-' (j&},,-./14@90!&,13521.*# km\xӒ)!+,.14Baј '/28@=6(#)/2521/+% \\fˑ#e&&')+-16IoM *19@94 %+0341/,& U\\a˒#$#$%')+/9Q~ #.6=6+"(.121/,'  \\`˔w!"$'+/=\И (163"$*/12.+&  l\\_˕@ !$)/CiM !.2-!&,./.)$ 1\\^' %0Kw (/&"'*+)%  \\^ً̪#1RϚ !*"$#! ҈\\^ٍ̈4]g $ φ\\^َ̩8h#' օ\\^̵ُ3 @s7; 1τ\\^كl &JnjB" l\\^كփX )@U[L5"  J҄҃\\^كσo)  +1-$ 0bց߃\\^كփʼn\\n߃ք\\^ك\\n̄ψ\\^ٌ߅\\ñ\\^ٍ܄\\n҃\\^ُ߃\\n҃\\^ك҂\\ñ\\^ك\\ñυ\\^كك\\n҃߃\\^ك\\nك\\^ك\\n҄փ\\^ِ҂\\n\\^ُ\\nք\\^َ\\n߅\\^ً߅\\n܆\\^ωي\\nχ\\^\\n\\^\\n\\^˝\\n\ʝ\\m˜\˛\\hʝ\˘̀π\˘m\\^π\rޝ\afgild\cgjp՝d\tʋ\`x\dd\st8mk@Pp0Pp00@p@@@@@@@@@@@@@@@@@@@@``0`00@@@@@@@@@@@@@@@@@@@@@`@@@@@@@@@@@@@@@@@@@@@ P@pp@ P @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@00`0```@@@@@@@@@@@@@@@@@@@@@p@00pP0pPlibiodbc-3.52.16/mac/iODBCadministrator64/en.lproj/odbcman.tiff0000664000175000017500000022056614424170750021000 00000000000000MM*!v(RI<s H.`'`'8BIMxHH(FG(HH(d'`8BIM8BIMAlpha 18BIMAlpha 18BIMZ8BIM x8BIM8BIM 8BIM' 8BIMH/fflff/ff2Z5-8BIMp8BIM@@8BIM0pP8BIM.8BIM ppPJFIFHHAdobed            pp"?   3!1AQa"q2B#$Rb34rC%Scs5&DTdE£t6UeuF'Vfv7GWgw5!1AQaq"2B#R3$brCScs4%&5DTdEU6teuFVfv'7GWgw ?TBŢ̜M4CZ֎\%W^wVkcĴV:loNoޏIQ}տMJc;@=+. ~kq$s31pq̵c7Yk4W&IgzeXǍ>A֥gwt}~~J힟jU\+^+c\U/?bn$IUEuc:/3??8LpܛZEU/ՏnU Mu?+ځӨvHc; QH;wnCW,?&b4KH`.eO{mX2eሀq98)BulrٗvW{B&v{z)WAq asJ~uWuޙqͥ{cu౏폮F^VY谝Ik y8(9q{c9J3"G,}2=VUN ׳>=[Yu UDc:/2Js ^'^Wܫ'8Nm-/B/=*ZnECpcK,k- ˽JbcZ"ژ iZ8X3m~PmT.,{v6Ks'1ida8H CRa 2cO~`SwK&,C[Vsoug\ͷk#r+nEns+k(wmB7ZY]Ah`׹鬪w~"靕a2X@7n_U͘rY2J21U0Qorܩ0ጆ(Ky|Cߵ {)`sekd=:պg\fnk=ŋ$?hc:vt\Ɲ^|ceQnFw.UُnFCC~SK ?-*C_]a˷(HC˺E6av=h{uӒ6kOOd<>=mj.ê家?B3leG8x8OyxnhH@=?Yyu 0knʷ=\+r۔ZܜY<ثdu+re%[q{Cym5,W2:nP m{=wcԯtnWt<'&ޫxsi!y_o~^iUK/gPmN}uO֮=P}yyq Ǐ4K}gG$⟩і~tӻ]1[[mw:3`77&RvWlY۬]>~;D7ak]]_Kn'V}6szZt\ޱoQ9NMt AuUCcnKݖO޳ɉ|Cis#/T//mw5V7dd8n[7mѾ<:kO#!]1w-?b)˶AYus~gS=*-1ݯY[{i֞,?v92i|2yd˘o?ޗRzm'"0n,u~usio=KCq׮q~+sQ>MMͼ犝־w;wƜEl߹Y]! 61'?(H|Wk\d٩ztmɗ|˳>AUDc:32*ߩ}EE Y}]l}B#p|}]+:]G݀}&W$} jZ1tѴj_l?k5 } G9''=#xֵ٧ml~EkD gظʳ)nʯcZ6 \=mX74mg؍pɡ!X㣸a)L]#6Y0qp~otr?[ *Ι^N;kXlY-wԞ'|ȡwZxVVnc]u{lk]mr[:;  ^E3_]nv/ z5c!*zpv77{LYZ9! Hd67ÒxqJpT.WU;պ˫lʪzKm"1Ա 얹!.TbzN.vHsw?;j.'S{1TDLrQf|88__X{?յCS*ȡشo]͟/2叐Thp-pAPANJr_Z_OS`-?Mk$W)?& OZ$5]5뭡c@ k@1jVVh{ ^ 4&I$?M4_ZI%9?OS`-?M/W)?&ILXVƱ ckZk@RI$ HLinomntrRGB XYZ  1acspMSFTIEC sRGB-HP cprtP3desclwtptbkptrXYZgXYZ,bXYZ@dmndTpdmddvuedLview$lumimeas $tech0 rTRC< gTRC< bTRC< textCopyright (c) 1998 Hewlett-Packard CompanydescsRGB IEC61966-2.1sRGB IEC61966-2.1XYZ QXYZ XYZ o8XYZ bXYZ $descIEC http://www.iec.chIEC http://www.iec.chdesc.IEC 61966-2.1 Default RGB colour space - sRGB.IEC 61966-2.1 Default RGB colour space - sRGBdesc,Reference Viewing Condition in IEC61966-2.1,Reference Viewing Condition in IEC61966-2.1view_. \XYZ L VPWmeassig CRT curv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)KmPw߆pԏm0PGjYzpLs`0H\p8SoMsm0/F^@_W.E\.E\>]|^@p.E\2JcKpg.E\.E\3LfS}ffffffffffffffffffffffffffffffghn@.E\.E\Aa\ffffffffffffffffffffffffffffffgjw.E\.E\0H`S|ffffffffffffffffffffffffffffffffh@.E\.E\@_\fffffffffffffffffffffffffffffffgk.E\.E\0G_S|ffffffffffffffffffffffffffffffffg@.E\.E\@_\ffffffffffffffffffffffffffffffffh.E\.E\/G^S|fffffffffffffffffffffffffffffffff@.E\.E\@_\ffffffffffffffffffffffffffffffffg.E\.E\/G^S|fffffffffffffffffffffffffffffffff@.E\.E\@_\fffffffffffffffffffffffffffffffff.E\.E\/G^S|fffffffffffffffffffffffffffffffff@.E\.E\@_\fffffffffffffffffffffffffffffffff.E\.E\/G^S|fffffffffffffffffffffffff@.E\.E\@_\fffffffyffffffffff.E\.E\/G^S|ffffffffffpyfffffffff@.E\.E\@_\ffffffffffffffff.E\.E\/G^S|fffffffffffffffff@.E\.E\@_\fffffffffffffff.E\.E\/G^S|fffffffffffffff@.E\.E\@_\ffffffffffffff.E\.E\/G^S|fffffffffffff@.E\.E\@_\fffffffpffffff.E\.E\/G^S|fffffffffffff@.E\.E\@_\fffffffffyffffff.E\.E\/G^S|fffffffffffffff@.E\.E\@_\fffffffffffffffff.E\.E\/G^S|fffffffffffffffff@.E\.E\@_\fffffffffffyffffff.E\.E\/G^S|ffffffpffffffpfffff@.E\.E\@_\fffecbafffffffffff.E\.E\/G^S|fffffffffffffffffff@.E\.E\@_\fffda^[fffffffffff.E\.E\/G^S|fffffffffffffffffff@.E\.E\@_\ffeb\XT}fffffffffff.E\.E\/G^S|fffffffffffffffffff@.E\.E\@_\ffd_XRzpfffffffffff.E\.E\/G^S|fffffffffffffffffff@.E\.E\@_\feb\U_ufffffffffff.E\.E\/G^S|fffffffffffffffffff@.E\.E\@_\ec^XUvT}fffffffffff.E\.E\/G^S|ffffffyffffffpfffff`.E\.E\@_[da[Uq}Jpffffffffff.E\.E\/G^S|fffffffffffffffff.E\.E\@_[b\V]neLsfffffffff.E\.E\/G^S|ffffffpffffffffͽȶ®{Wg~Y_YWdsImNupffffff.E\.E\/G^S|ffffffffffffy˹ƳlVlgip{InQzfffffff.E\.E\/G^S|fffffffffffξ˹Ƴ®}m}^hYkOxKqUffffffff.E\.E\/G^S|fffffffffffξ˹ǵűu݄f|VyFf~iGjOvZfffffffff.E\.E\/G^S|ffffffffffffͽƳ~n}`=Xfz>]g~S|^yffffffffff.E\.E\/G^S|ffffffffffppfffǵ~}}}~zp؂fHrCeVK+M(r}ayfffffffffffffff.E\.E\/G^S|fffffffffffffppfffffİ~qf^YUUUVY^bdd}^ĀUi3Xa?J(N'W+|ffffffffffffffffffffffffff.E\.E\/G^S|fffffffffffffffffffffffffȶueVxKrCn>k9j8j8j8k9m=p@qDpHoJnLy5p@aU\0L(Q)X,]6}fffffffffffffffffffffffff.E\.E\/G^R|fffffffffffffffffffffffffyeUwIp@l;j8g5g5g5f3g5g5g5h7f6b7_84a0U[AK,N(T*X,W,aHffffffffffffffffffffffffg.E\.E\.E\Qyefffffffffffffffffffffffq]yMqAl;j8g5g5f3f3f3f3f3f3f4c3^0Y.g.b-n>]yMt3N,R(W+Y,U*P(syfffffffffffffffffffffffg.E\.E\.E\KqbefffffffffffffffffffffyξnXwIn>k9h6g5g5f3f3f3f3f3f3e2d2`0Z.U,m+a0~SUx>I*P+V+Z-X,S+N'J%pffffffffffffffffffffffh.E\.E\.E\7SnPwWXYYYYYYYYYYYYYYYYYYYYξnXvHm=j8g5g5f3f3f3f3f3f3f3e2d2a0[.U+}*Z-n>XvH/J)T-Z-[.V+P(K&F#\XYYYYYYYYYYYYYYYYYYYYYYZfH\p.E\.E\.E\/F^7Sn:Wt:Xu;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;XvTgξsYvHm=j8g5g5f3f3f3f3f3f3f3f3d2b1]/W,c*U*a0|P|Pm=L%L(W-]/\.W-O'I$C"@ GUk;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xv;Xvj8g5g5f3f3f3f3f3f3f3f3e2c2^/X,T*k)Z-n>~SsE~/E$P)[/`0]/U+N'G#A <d>9.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\7SnFh^0`;Qf.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\˹˹ǵ®h{Pp@j8g5g5f3f3f3f3f3f3f3f3f3d2`0Z-U*|)V+b1yMyMm=c&G%T+_1b1^1U*L&E#>8y7".E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\.E\Pi00@@@@@@@@@@@@@@@@@@@@@®İİovQh?c6c3e4e2f3f3f3f3f3f3f3f3e2b1\.V+h)T*\.n>|PqAq5B!L'X.a1d2_1U*L&C"<6z1`@@@@@@@@@@@@@@@@@@@@@ zxY]6q-`&i=/Bm=gs_C@ @ @ A _&3@ L&U*Z-Z-V+W)c*X,`0l;tFn>g5c%H$T*^/d2g5e2_/T*H$=3i*W#J}j/c2ԨsU6'@ @ @ Q r.<F#M&O'y)V+\.e2rCrCk9q/B!L&X,b1f3g5e2_/S)F#;x0b'N@ uvyyף8q[-}kRC@ @ @ S!{1? m'Y,[.b1l;sEp@h6t'F#Q)]/d2f3f3e2^/R)D"8q-Z$E@ kmppxŲξ~b+VP(i|kJ(@ S!>j2`0a0f3p@rCl;l5I!I%V+a0e2g5f3e2^/P(B!6i*Q @ @ pacfhkuS\<"EH$~SdP3UxKj8f3k9qAp@j8|-C"N'[-c2f3f3f3d2\.N'? }2`&G@ @ @VX[^_dpıɼ(><B!l;xXqAj8m=qAm=h6Z$G#T*_/e2g5f3f3b1Z-J%<r.T"@ @ @ cyM|P~SVW\n̻3 >A a1em~SqAk9n>n>j8r1B!L&X,b1f3g5f3e2a0V+F#7f)H@ @ X7+Pqp@rCtFxKyLzNVsS_@3 %JC"^/vH]c^~StFm=l;p@m=g5t'F#Q)]/d2f3f3f3d2^/R)B!{1W#@ @ @ pSJ @@@@@@@@@@@@@@@@@@@@@f3g5k9n>qArBtFY®ʽ(>3 ,YI$\.g5m=n>l;j8j8m=p@k9j2K"J%V+a0e2g5f3d2b1Z-L&;k+G@ @ @ @@@@@@@@@@@@@@@@@@@@@@00qva1a1c2e2j8l;mn>h6+D"O([.c2f3f3e2c2^/U+F#3W#@ @ @ @ `0NnS|hjE\.]/`0b1d2g5j8wJqS_@3 "E>|U*a0e2f3g5l;p@l;g5R#H$T*`0e2g5f3d2a0Z-N'=i*B @ @ @ O1(`p5PjHlbȉ}W,X,Z-\._/a1d4k<U®̿(>3 +VF#Z-b1f3h6n>p@k9u0B!L&Y,b1f3g5d2b1\.T*E#~2P @ @ @ @ pfkH\p.E\l+@ @ @ @ @ NJUffffffffffffffffffffghp.E\.E\0IaR|fffffffffffffffffffffffqH$G#H$J%N'R)V+\/f9zQ~(>3 +VF#[.h6m=h6+D"O([.b1d2a1^/W,N'@ t.E@ @ @ @ @ affffffffffffffffffffffh.E\.E\0H`S|ffffffffffffffffffffffffnwB!B!B!D"I$N'T+[/h=\ɷ3 3 4iP(b1h6f3Q"H$T*^/b1a2\.U+L&? u/H@ @ @ @ @ SYlfffffffffffffffffffffffg.E\.E\0G_S|fffffffffffffffffffffffffO@<<<? C!H$O)X/jCibjM3 "CB![.c2t-C!K&W,^.^/Y.R)H$<n,E@ @ @ @ @ G21fffffffffffffffffffffffff.E\.E\/G^S|fffffffffffffffffffffffffn='6568<A H%T0mKw(>3 1bO(^/k&D"N'T*W+R)J%@ 4`&@ @ @ @ @ @ B"afffffffffffffffffffffffff.E\.E\/G^S|fffffffpfk{1u/t.u/z148@#P1oRۛ´3 "CB!b*=?D"H$F#@!5i*K@ @ @ @ @ @ @ _fffffyfffffffffff.E\.E\/G^S|ffffffffkqk+f)c(c(h*n,v17M4r]͠ǽxg3 6kun$5344u/b'K@ @ @ @ @ @ @ @ Xiffffpfffffffff.E\.E\/G^S|fffffffpff],V"S!Q S!W#^'j2J8vhŧ2E#0_xI'f(]&X#O B@ @ @ @ @ @ @ @ B"_fffpffffffff.E\.E\/G^S|fffffffffdR63GB @ @ A GT,oL@|sȺSn7jG;E= > @ @ @ @ @ @ @ @ @ G21affffpfffffff.E\.E\/G^S|fffffffffffSYl@ @ @ @ ADS1&pSJvnrjjLBP."@ ? @ @ @ @ @ @ @ @ SYlffffffffffff.E\.E\/G^S|ffffffffffffffffaWPX@ @ @ AG#V5)hJ@y^U}d[qUL_@5P."D@ A@ @ @ @ @ IBJafffffyyffffff.E\.E\/G^S|fffffffffffpffffff~zmoQ2)@ CI%P."X7+\<1Y9-R0$I%CA@ @ `@ `>8-08LbXffffffffffffffff.E\.E\/G^S|fffffffffffffffff~ɀrVM\;0F!G#G#DCAZ9-pSJ@.E\.E\7SnXfffffffffffffffffff.E\.E\/G^S|ffffffffffffff~@.E\.E\7SnXfffffffffffffypfffffffffff.E\.E\/G^S|fffffffffffffff~@.E\.E\7SnXffffffffffffffffffffffffff.E\.E\/G^S|ffffffffffffff~@.E\.E\7SnXfffffyffffffffffffffffffff.E\.E\/G^S|fffffffffffff~@.E\.E\7SnXfffffyffffffffffffffffffff.E\.E\/G^S|fffffffyfffff~@.E\.E\7SnXffffffffffffffffffffffffff.E\.E\/G^S|fffffffffffffffff~@.E\.E\7SnXfffffffffffffpffffffff.E\.E\/G^S|fffffffffffffffff~@.E\.E\7SnXffffffyffffffffffff.E\.E\/G^S|fffffffffffffffff~@.E\.E\7SnXfffffffffffffffff.E\.E\/G^S|ffffffffffff~@.E\.E\7SnXffffffyfpffffff.E\.E\/G^S|fffffffyfffff~@.E\.E\7SnXffffffffffffff.E\.E\/G^S|fffffffffffff~@.E\.E\7SnXfffffffpfffffff.E\.E\/G^S|ffffffffffffff~@.E\.E\7SnXffffffffffffffff.E\.E\/G^S|fffffffffffffff~@.E\.E\7SnXfffffffffpfffffffff.E\.E\/G^S|fffffffpfffffffffffff~@.E\.E\7SnXfffffffffffpffffffffff.E\.E\/G^S|fffffffffffffffffffffffffffffffff~@.E\.E\7SnXfffffffffffffffffffffffffffffffff.E\.E\/G^S|fffffffffffffffffffffffffffffffff~@.E\.E\7SnXfffffffffffffffffffffffffffffffff.E\.E\/G^R|fffffffffffffffffffffffffffffffff~@.E\.E\7SnXfffffffffffffffffffffffffffffffff.E\.E\.E\Qzeffffffffffffffffffffffffffffffff~@.E\.E\6RmWfffffffffffffffffffffffffffffffff.E\.E\.E\Nvdffffffffffffffffffffffffffffffff~@.E\.E\4NhVefffffffffffffffffffffffffffffffg.E\.E\.E\Fi`efffffffffffffffffffffffffffffff|@.E\.E\.E\PwbeffffffffffffffffffffffffffffffgH\p.E\.E\/G^InRzT~TTTTTTTTTTTTTTTTTTTTTTTTTTTTTU]qp@.E\.E\.E\9UrNuS}T~TTTTTTTTTTTTTTTTTTTTTTTTTTTTTUb}.E\.E\.E\.E\0Ia3Mf4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Oi6Ql@_Ov\g0;Qf.E\.E\.E\.E\2Jc4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg4Mg5Oj8TpEgUa0;Qf.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\:WtJn͟p.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\0H`@_OwP0Uh{.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\;Qfp;Qf.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\J`uPlibiodbc-3.52.16/mac/iodbcadm.exp0000664000175000017500000000045314013216212013374 00000000000000_iodbcdm_drvconn_dialbox _iodbcdm_drvconn_dialboxw __iodbcdm_drvchoose_dialbox __iodbcdm_trschoose_dialbox __iodbcdm_nativeerrorbox __iodbcdm_confirmboxw __iodbcdm_confirmbox __iodbcdm_errorbox __iodbcdm_errorboxw __iodbcdm_messagebox __iodbcdm_messageboxw __iodbcdm_admin_dialbox _iodbcadm_version libiodbc-3.52.16/mac/iODBCadm/0000775000175000017500000000000014424171426012551 500000000000000libiodbc-3.52.16/mac/iODBCadm/Info-iODBCadm.plist0000664000175000017500000000260314424170750016001 00000000000000 CFBundleDevelopmentRegion English CFBundleExecutable iODBCadm CFBundleGetInfoString iODBCadm version $IODBC_VERSION, Copyright 1995-2023, OpenLink Software CFBundleIconFile CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName iODBC Administrator CFBundlePackageType BNDL CFBundleShortVersionString $IODBC_VERSION CFBundleSignature odbc CFBundleVersion $IODBC_VERSION CFPlugInDynamicRegisterFunction CFPlugInDynamicRegistration NO CFPlugInFactories 00000000-0000-0000-0000-000000000000 MyFactoryFunction CFPlugInTypes 00000000-0000-0000-0000-000000000000 00000000-0000-0000-0000-000000000000 CFPlugInUnloadFunction libiodbc-3.52.16/mac/iODBCadm/iODBCadm.xcodeproj/0000775000175000017500000000000014424171426016107 500000000000000libiodbc-3.52.16/mac/iODBCadm/iODBCadm.xcodeproj/project.xcworkspace/0000775000175000017500000000000014424171426022105 500000000000000libiodbc-3.52.16/mac/iODBCadm/iODBCadm.xcodeproj/project.xcworkspace/xcshareddata/0000775000175000017500000000000014424171426024540 500000000000000libiodbc-3.52.16/mac/iODBCadm/iODBCadm.xcodeproj/project.xcworkspace/contents.xcworkspacedata0000664000175000017500000000020714424170750026765 00000000000000 libiodbc-3.52.16/mac/iODBCadm/iODBCadm.xcodeproj/project.pbxproj0000664000175000017500000013217614424170750021114 00000000000000// !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 48; objects = { /* Begin PBXBuildFile section */ 8568A59D196E8AE900738ECF /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8568A59C196E8AE900738ECF /* Cocoa.framework */; }; 8568A5A4196E8B1D00738ECF /* confirm.png in Resources */ = {isa = PBXBuildFile; fileRef = 8568A59E196E8B1D00738ECF /* confirm.png */; }; 8568A5A8196E8B1D00738ECF /* utils.h in Headers */ = {isa = PBXBuildFile; fileRef = 8568A5A2196E8B1D00738ECF /* utils.h */; }; 8568A5A9196E8B1D00738ECF /* utils.m in Sources */ = {isa = PBXBuildFile; fileRef = 8568A5A3196E8B1D00738ECF /* utils.m */; }; 8568A5E11977BCE100738ECF /* Helpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 8568A5DF1977BCE100738ECF /* Helpers.h */; }; 8568A5E21977BCE100738ECF /* Helpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 8568A5E01977BCE100738ECF /* Helpers.m */; }; 8568A5E61977BCFB00738ECF /* IODBCadm_DSNchooserController.h in Headers */ = {isa = PBXBuildFile; fileRef = 8568A5E31977BCFB00738ECF /* IODBCadm_DSNchooserController.h */; }; 8568A5E71977BCFB00738ECF /* IODBCadm_DSNchooserController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8568A5E41977BCFB00738ECF /* IODBCadm_DSNchooserController.m */; }; 8568A5EC1977BF6400738ECF /* IODBCadm_SetupController.h in Headers */ = {isa = PBXBuildFile; fileRef = 8568A5E91977BF6400738ECF /* IODBCadm_SetupController.h */; }; 8568A5ED1977BF6400738ECF /* IODBCadm_SetupController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8568A5EA1977BF6400738ECF /* IODBCadm_SetupController.m */; }; 8568A5F21978D54600738ECF /* drvchoose.png in Resources */ = {isa = PBXBuildFile; fileRef = 8568A5F11978D54600738ECF /* drvchoose.png */; }; 8568A5F41978D55500738ECF /* odbc.png in Resources */ = {isa = PBXBuildFile; fileRef = 8568A5F31978D55500738ECF /* odbc.png */; }; 8568A604197907C100738ECF /* IODBCadm_DriverChooseDSNController.h in Headers */ = {isa = PBXBuildFile; fileRef = 8568A601197907C100738ECF /* IODBCadm_DriverChooseDSNController.h */; }; 8568A605197907C100738ECF /* IODBCadm_DriverChooseDSNController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8568A602197907C100738ECF /* IODBCadm_DriverChooseDSNController.m */; }; 858A02931B74E7F000C8009C /* IODBCadm_DrvConfigController.h in Headers */ = {isa = PBXBuildFile; fileRef = 858A028D1B74E7F000C8009C /* IODBCadm_DrvConfigController.h */; }; 858A02941B74E7F000C8009C /* IODBCadm_DrvConfigController.m in Sources */ = {isa = PBXBuildFile; fileRef = 858A028E1B74E7F000C8009C /* IODBCadm_DrvConfigController.m */; }; 858A02961B74E7F000C8009C /* IODBCadm_DrvRemoveController.h in Headers */ = {isa = PBXBuildFile; fileRef = 858A02901B74E7F000C8009C /* IODBCadm_DrvRemoveController.h */; }; 858A02971B74E7F000C8009C /* IODBCadm_DrvRemoveController.m in Sources */ = {isa = PBXBuildFile; fileRef = 858A02911B74E7F000C8009C /* IODBCadm_DrvRemoveController.m */; }; 858A029C1B74E80500C8009C /* IODBCadm_DSNmanageController.h in Headers */ = {isa = PBXBuildFile; fileRef = 858A02991B74E80500C8009C /* IODBCadm_DSNmanageController.h */; }; 858A029D1B74E80500C8009C /* IODBCadm_DSNmanageController.m in Sources */ = {isa = PBXBuildFile; fileRef = 858A029A1B74E80500C8009C /* IODBCadm_DSNmanageController.m */; }; 858A02A21B74E81C00C8009C /* IODBCadm_PoolConfigController.h in Headers */ = {isa = PBXBuildFile; fileRef = 858A029F1B74E81C00C8009C /* IODBCadm_PoolConfigController.h */; }; 858A02A31B74E81C00C8009C /* IODBCadm_PoolConfigController.m in Sources */ = {isa = PBXBuildFile; fileRef = 858A02A01B74E81C00C8009C /* IODBCadm_PoolConfigController.m */; }; 85A3909B1B790E0A00AC8862 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 85A390991B790E0A00AC8862 /* InfoPlist.strings */; }; 85A3909C1B790E1700AC8862 /* IODBCadm_PoolConfigController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 85A3909E1B790E1700AC8862 /* IODBCadm_PoolConfigController.xib */; }; 85A3909F1B790E2000AC8862 /* IODBCadm_DSNmanageController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 85A390A11B790E2000AC8862 /* IODBCadm_DSNmanageController.xib */; }; 85A390A21B790E2D00AC8862 /* IODBCadm_DrvConfigController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 85A390A41B790E2D00AC8862 /* IODBCadm_DrvConfigController.xib */; }; 85A390A51B790E3500AC8862 /* IODBCadm_DrvRemoveController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 85A390A71B790E3500AC8862 /* IODBCadm_DrvRemoveController.xib */; }; 85A390A81B790E3A00AC8862 /* IODBCadm_DriverChooseDSNController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 85A390AA1B790E3A00AC8862 /* IODBCadm_DriverChooseDSNController.xib */; }; 85A390AB1B790E4000AC8862 /* IODBCadm_SetupController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 85A390AD1B790E4000AC8862 /* IODBCadm_SetupController.xib */; }; 85A390AE1B790E4900AC8862 /* IODBCadm_DSNchooserController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 85A390B01B790E4900AC8862 /* IODBCadm_DSNchooserController.xib */; }; 85A390B41B790E5700AC8862 /* IODBCadm_DriverChooseFDSNController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 85A390B61B790E5700AC8862 /* IODBCadm_DriverChooseFDSNController.xib */; }; 85A390B71B790E5C00AC8862 /* IODBCadm_KeyValController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 85A390B91B790E5C00AC8862 /* IODBCadm_KeyValController.xib */; }; 85D41908197B822B00C2C443 /* IODBCadm_DriverChooseFDSNController.h in Headers */ = {isa = PBXBuildFile; fileRef = 85D41905197B822B00C2C443 /* IODBCadm_DriverChooseFDSNController.h */; }; 85D41909197B822B00C2C443 /* IODBCadm_DriverChooseFDSNController.m in Sources */ = {isa = PBXBuildFile; fileRef = 85D41906197B822B00C2C443 /* IODBCadm_DriverChooseFDSNController.m */; }; 85D4190E197B824300C2C443 /* IODBCadm_KeyValController.h in Headers */ = {isa = PBXBuildFile; fileRef = 85D4190B197B824300C2C443 /* IODBCadm_KeyValController.h */; }; 85D4190F197B824300C2C443 /* IODBCadm_KeyValController.m in Sources */ = {isa = PBXBuildFile; fileRef = 85D4190C197B824300C2C443 /* IODBCadm_KeyValController.m */; }; CDAE3BEB0987D71D003250F8 /* gui.h in Headers */ = {isa = PBXBuildFile; fileRef = 85983C5D07D2B7260022E958 /* gui.h */; }; CDAE3BEC0987D71D003250F8 /* iodbcadm.h in Headers */ = {isa = PBXBuildFile; fileRef = 85983C6007D2B7260022E958 /* iodbcadm.h */; }; CDAE3BED0987D71D003250F8 /* gui.h in Headers */ = {isa = PBXBuildFile; fileRef = 85983C8907D2B7780022E958 /* gui.h */; }; CDAE3BEE0987D71D003250F8 /* iodbc.h in Headers */ = {isa = PBXBuildFile; fileRef = 85983C9D07D2B8290022E958 /* iodbc.h */; }; CDAE3BEF0987D71D003250F8 /* iodbcext.h in Headers */ = {isa = PBXBuildFile; fileRef = 85983C9E07D2B8290022E958 /* iodbcext.h */; }; CDAE3BF00987D71D003250F8 /* iodbcunix.h in Headers */ = {isa = PBXBuildFile; fileRef = 85983CA107D2B85F0022E958 /* iodbcunix.h */; }; CDAE3BF10987D71D003250F8 /* sql.h in Headers */ = {isa = PBXBuildFile; fileRef = 85983CA307D2B8930022E958 /* sql.h */; }; CDAE3BF20987D71D003250F8 /* sqltypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 85983CA507D2B8930022E958 /* sqltypes.h */; }; CDAE3BF30987D71D003250F8 /* sqlucode.h in Headers */ = {isa = PBXBuildFile; fileRef = 85983CA607D2B8930022E958 /* sqlucode.h */; }; CDAE3BF40987D71D003250F8 /* dlf.h in Headers */ = {isa = PBXBuildFile; fileRef = 85983CAB07D2B8CD0022E958 /* dlf.h */; }; CDAE3BF50987D71D003250F8 /* dlproc.h in Headers */ = {isa = PBXBuildFile; fileRef = 85983CAD07D2B8CD0022E958 /* dlproc.h */; }; CDAE3BF60987D71D003250F8 /* herr.h in Headers */ = {isa = PBXBuildFile; fileRef = 85983CB507D2B9330022E958 /* herr.h */; }; CDAE3BF70987D71D003250F8 /* unicode.h in Headers */ = {isa = PBXBuildFile; fileRef = 85983CB807D2B94F0022E958 /* unicode.h */; }; CDAE3BF80987D71D003250F8 /* iodbcinst.h in Headers */ = {isa = PBXBuildFile; fileRef = 85983CBB07D2B98B0022E958 /* iodbcinst.h */; }; CDAE3BF90987D71D003250F8 /* odbcinst.h in Headers */ = {isa = PBXBuildFile; fileRef = 85983CBD07D2B9B30022E958 /* odbcinst.h */; }; CDAE3C060987D71D003250F8 /* drvconn.c in Sources */ = {isa = PBXBuildFile; fileRef = 85983C5907D2B7000022E958 /* drvconn.c */; }; CDAE3C070987D71D003250F8 /* error.c in Sources */ = {isa = PBXBuildFile; fileRef = 85983C5A07D2B7000022E958 /* error.c */; }; CDAE3C080987D71D003250F8 /* Info.c in Sources */ = {isa = PBXBuildFile; fileRef = 85983C5E07D2B7260022E958 /* Info.c */; }; CDAE3C090987D71D003250F8 /* iodbcadm.exp in Sources */ = {isa = PBXBuildFile; fileRef = 85983C5F07D2B7260022E958 /* iodbcadm.exp */; }; CDAE3C130987D71D003250F8 /* translatorchooser.c in Sources */ = {isa = PBXBuildFile; fileRef = 85983C8D07D2B7780022E958 /* translatorchooser.c */; }; CDAE3C140987D71D003250F8 /* dlproc.c in Sources */ = {isa = PBXBuildFile; fileRef = 85983CB107D2B8F10022E958 /* dlproc.c */; }; CDAE3C150987D71D003250F8 /* dlf.c in Sources */ = {isa = PBXBuildFile; fileRef = 85983CB307D2B90F0022E958 /* dlf.c */; }; CDAE3C160987D71D003250F8 /* unicode.c in Sources */ = {isa = PBXBuildFile; fileRef = 85983CB707D2B94F0022E958 /* unicode.c */; }; CDAE3C1A0987D71D003250F8 /* iODBC.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 85983D8507D2C1870022E958 /* iODBC.framework */; }; CDAE3C1B0987D71D003250F8 /* iODBCinst.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 85983D8707D2C1A50022E958 /* iODBCinst.framework */; }; CDAE3C1C0987D71D003250F8 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 85983E0E07D2C2080022E958 /* CoreServices.framework */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 8568A59C196E8AE900738ECF /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Cocoa.framework; sourceTree = DEVELOPER_DIR; }; 8568A59E196E8B1D00738ECF /* confirm.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = confirm.png; path = ../../iodbcadm/mac/confirm.png; sourceTree = ""; }; 8568A5A2196E8B1D00738ECF /* utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = utils.h; path = ../../iodbcadm/mac/utils.h; sourceTree = ""; }; 8568A5A3196E8B1D00738ECF /* utils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = utils.m; path = ../../iodbcadm/mac/utils.m; sourceTree = ""; }; 8568A5DF1977BCE100738ECF /* Helpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Helpers.h; path = ../../iodbcadm/mac/Helpers.h; sourceTree = ""; }; 8568A5E01977BCE100738ECF /* Helpers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Helpers.m; path = ../../iodbcadm/mac/Helpers.m; sourceTree = ""; }; 8568A5E31977BCFB00738ECF /* IODBCadm_DSNchooserController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IODBCadm_DSNchooserController.h; path = ../../iodbcadm/mac/IODBCadm_DSNchooserController.h; sourceTree = ""; }; 8568A5E41977BCFB00738ECF /* IODBCadm_DSNchooserController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IODBCadm_DSNchooserController.m; path = ../../iodbcadm/mac/IODBCadm_DSNchooserController.m; sourceTree = ""; }; 8568A5E91977BF6400738ECF /* IODBCadm_SetupController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IODBCadm_SetupController.h; path = ../../iodbcadm/mac/IODBCadm_SetupController.h; sourceTree = ""; }; 8568A5EA1977BF6400738ECF /* IODBCadm_SetupController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IODBCadm_SetupController.m; path = ../../iodbcadm/mac/IODBCadm_SetupController.m; sourceTree = ""; }; 8568A5F11978D54600738ECF /* drvchoose.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = drvchoose.png; path = ../../iodbcadm/mac/drvchoose.png; sourceTree = ""; }; 8568A5F31978D55500738ECF /* odbc.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = odbc.png; path = ../../iodbcadm/mac/odbc.png; sourceTree = ""; }; 8568A601197907C100738ECF /* IODBCadm_DriverChooseDSNController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IODBCadm_DriverChooseDSNController.h; path = ../../iodbcadm/mac/IODBCadm_DriverChooseDSNController.h; sourceTree = ""; }; 8568A602197907C100738ECF /* IODBCadm_DriverChooseDSNController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IODBCadm_DriverChooseDSNController.m; path = ../../iodbcadm/mac/IODBCadm_DriverChooseDSNController.m; sourceTree = ""; }; 858A028D1B74E7F000C8009C /* IODBCadm_DrvConfigController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IODBCadm_DrvConfigController.h; path = ../../iodbcadm/mac/IODBCadm_DrvConfigController.h; sourceTree = ""; }; 858A028E1B74E7F000C8009C /* IODBCadm_DrvConfigController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IODBCadm_DrvConfigController.m; path = ../../iodbcadm/mac/IODBCadm_DrvConfigController.m; sourceTree = ""; }; 858A02901B74E7F000C8009C /* IODBCadm_DrvRemoveController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IODBCadm_DrvRemoveController.h; path = ../../iodbcadm/mac/IODBCadm_DrvRemoveController.h; sourceTree = ""; }; 858A02911B74E7F000C8009C /* IODBCadm_DrvRemoveController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IODBCadm_DrvRemoveController.m; path = ../../iodbcadm/mac/IODBCadm_DrvRemoveController.m; sourceTree = ""; }; 858A02991B74E80500C8009C /* IODBCadm_DSNmanageController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IODBCadm_DSNmanageController.h; path = ../../iodbcadm/mac/IODBCadm_DSNmanageController.h; sourceTree = ""; }; 858A029A1B74E80500C8009C /* IODBCadm_DSNmanageController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IODBCadm_DSNmanageController.m; path = ../../iodbcadm/mac/IODBCadm_DSNmanageController.m; sourceTree = ""; }; 858A029F1B74E81C00C8009C /* IODBCadm_PoolConfigController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IODBCadm_PoolConfigController.h; path = ../../iodbcadm/mac/IODBCadm_PoolConfigController.h; sourceTree = ""; }; 858A02A01B74E81C00C8009C /* IODBCadm_PoolConfigController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IODBCadm_PoolConfigController.m; path = ../../iodbcadm/mac/IODBCadm_PoolConfigController.m; sourceTree = ""; }; 85983C5907D2B7000022E958 /* drvconn.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = drvconn.c; path = ../../iodbcadm/drvconn.c; sourceTree = SOURCE_ROOT; }; 85983C5A07D2B7000022E958 /* error.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = error.c; path = ../../iodbcadm/error.c; sourceTree = SOURCE_ROOT; }; 85983C5D07D2B7260022E958 /* gui.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = gui.h; path = ../../iodbcadm/gui.h; sourceTree = SOURCE_ROOT; }; 85983C5E07D2B7260022E958 /* Info.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = Info.c; path = ../../iodbcadm/Info.c; sourceTree = SOURCE_ROOT; }; 85983C5F07D2B7260022E958 /* iodbcadm.exp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.exports; name = iodbcadm.exp; path = ../../mac/iodbcadm.exp; sourceTree = SOURCE_ROOT; }; 85983C6007D2B7260022E958 /* iodbcadm.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = iodbcadm.h; path = ../../iodbcadm/iodbcadm.h; sourceTree = SOURCE_ROOT; }; 85983C8907D2B7780022E958 /* gui.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = gui.h; path = ../../iodbcadm/mac/gui.h; sourceTree = SOURCE_ROOT; }; 85983C8D07D2B7780022E958 /* translatorchooser.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = translatorchooser.c; path = ../../iodbcadm/mac/translatorchooser.c; sourceTree = SOURCE_ROOT; }; 85983C9D07D2B8290022E958 /* iodbc.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = iodbc.h; path = ../../include/iodbc.h; sourceTree = SOURCE_ROOT; }; 85983C9E07D2B8290022E958 /* iodbcext.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = iodbcext.h; path = ../../include/iodbcext.h; sourceTree = SOURCE_ROOT; }; 85983CA107D2B85F0022E958 /* iodbcunix.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = iodbcunix.h; path = ../../include/iodbcunix.h; sourceTree = SOURCE_ROOT; }; 85983CA307D2B8930022E958 /* sql.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sql.h; path = ../../include/sql.h; sourceTree = SOURCE_ROOT; }; 85983CA507D2B8930022E958 /* sqltypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sqltypes.h; path = ../../include/sqltypes.h; sourceTree = SOURCE_ROOT; }; 85983CA607D2B8930022E958 /* sqlucode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sqlucode.h; path = ../../include/sqlucode.h; sourceTree = SOURCE_ROOT; }; 85983CAB07D2B8CD0022E958 /* dlf.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = dlf.h; path = ../../iodbcinst/dlf.h; sourceTree = SOURCE_ROOT; }; 85983CAD07D2B8CD0022E958 /* dlproc.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = dlproc.h; path = ../../iodbc/dlproc.h; sourceTree = SOURCE_ROOT; }; 85983CB107D2B8F10022E958 /* dlproc.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = dlproc.c; path = ../../iodbc/dlproc.c; sourceTree = SOURCE_ROOT; }; 85983CB307D2B90F0022E958 /* dlf.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = dlf.c; path = ../../iodbcinst/dlf.c; sourceTree = SOURCE_ROOT; }; 85983CB507D2B9330022E958 /* herr.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = herr.h; path = ../../iodbc/herr.h; sourceTree = SOURCE_ROOT; }; 85983CB707D2B94F0022E958 /* unicode.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = unicode.c; path = ../../iodbcinst/unicode.c; sourceTree = SOURCE_ROOT; }; 85983CB807D2B94F0022E958 /* unicode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = unicode.h; path = ../../iodbcinst/unicode.h; sourceTree = SOURCE_ROOT; }; 85983CBB07D2B98B0022E958 /* iodbcinst.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = iodbcinst.h; path = ../../include/iodbcinst.h; sourceTree = SOURCE_ROOT; }; 85983CBD07D2B9B30022E958 /* odbcinst.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = odbcinst.h; path = ../../include/odbcinst.h; sourceTree = SOURCE_ROOT; }; 85983D8507D2C1870022E958 /* iODBC.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = iODBC.framework; path = ../iODBC/build/Development/iODBC.framework; sourceTree = SOURCE_ROOT; }; 85983D8707D2C1A50022E958 /* iODBCinst.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = iODBCinst.framework; path = ../iODBCinst/build/Development/iODBCinst.framework; sourceTree = SOURCE_ROOT; }; 85983E0E07D2C2080022E958 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = ""; }; 85D41905197B822B00C2C443 /* IODBCadm_DriverChooseFDSNController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IODBCadm_DriverChooseFDSNController.h; path = ../../iodbcadm/mac/IODBCadm_DriverChooseFDSNController.h; sourceTree = ""; }; 85D41906197B822B00C2C443 /* IODBCadm_DriverChooseFDSNController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IODBCadm_DriverChooseFDSNController.m; path = ../../iodbcadm/mac/IODBCadm_DriverChooseFDSNController.m; sourceTree = ""; }; 85D4190B197B824300C2C443 /* IODBCadm_KeyValController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IODBCadm_KeyValController.h; path = ../../iodbcadm/mac/IODBCadm_KeyValController.h; sourceTree = ""; }; 85D4190C197B824300C2C443 /* IODBCadm_KeyValController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IODBCadm_KeyValController.m; path = ../../iodbcadm/mac/IODBCadm_KeyValController.m; sourceTree = ""; }; CDAE3C230987D71D003250F8 /* Info-iODBCadm.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Info-iODBCadm.plist"; sourceTree = ""; }; CDAE3C240987D71D003250F8 /* iODBCadm.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = iODBCadm.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; CDE9EB232636F93B0056782B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/IODBCadm_PoolConfigController.xib; sourceTree = ""; }; CDE9EB242636F93B0056782B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/IODBCadm_DSNmanageController.xib; sourceTree = ""; }; CDE9EB252636F93B0056782B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/IODBCadm_DrvConfigController.xib; sourceTree = ""; }; CDE9EB262636F93C0056782B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/IODBCadm_DrvRemoveController.xib; sourceTree = ""; }; CDE9EB272636F93C0056782B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/IODBCadm_DriverChooseDSNController.xib; sourceTree = ""; }; CDE9EB282636F93C0056782B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/IODBCadm_SetupController.xib; sourceTree = ""; }; CDE9EB292636F93C0056782B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/IODBCadm_DSNchooserController.xib; sourceTree = ""; }; CDE9EB2A2636F93C0056782B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/IODBCadm_DriverChooseFDSNController.xib; sourceTree = ""; }; CDE9EB2B2636F93D0056782B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/IODBCadm_KeyValController.xib; sourceTree = ""; }; CDE9EB2C2636F9440056782B /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = ../en.lproj/InfoPlist.strings; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ CDAE3C180987D71D003250F8 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 8568A59D196E8AE900738ECF /* Cocoa.framework in Frameworks */, CDAE3C1A0987D71D003250F8 /* iODBC.framework in Frameworks */, CDAE3C1B0987D71D003250F8 /* iODBCinst.framework in Frameworks */, CDAE3C1C0987D71D003250F8 /* CoreServices.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 089C166AFE841209C02AAC07 /* iODBCadm */ = { isa = PBXGroup; children = ( 08FB77ADFE841716C02AAC07 /* Source */, 089C167CFE841241C02AAC07 /* Resources */, 089C1671FE841209C02AAC07 /* External Frameworks and Libraries */, 19C28FB4FE9D528D11CA2CBB /* Products */, CDAE3C230987D71D003250F8 /* Info-iODBCadm.plist */, ); name = iODBCadm; sourceTree = ""; }; 089C1671FE841209C02AAC07 /* External Frameworks and Libraries */ = { isa = PBXGroup; children = ( 8568A59C196E8AE900738ECF /* Cocoa.framework */, 85983E0E07D2C2080022E958 /* CoreServices.framework */, 85983D8707D2C1A50022E958 /* iODBCinst.framework */, 85983D8507D2C1870022E958 /* iODBC.framework */, ); name = "External Frameworks and Libraries"; sourceTree = ""; }; 089C167CFE841241C02AAC07 /* Resources */ = { isa = PBXGroup; children = ( 85A390981B790E0A00AC8862 /* English.lproj */, ); name = Resources; sourceTree = ""; }; 08FB77ADFE841716C02AAC07 /* Source */ = { isa = PBXGroup; children = ( 85983C9B07D2B7960022E958 /* iODBCinst */, 85983C9A07D2B78C0022E958 /* iODBC */, 85983C5807D2B6C60022E958 /* iodbcadm */, ); name = Source; sourceTree = ""; }; 19C28FB4FE9D528D11CA2CBB /* Products */ = { isa = PBXGroup; children = ( CDAE3C240987D71D003250F8 /* iODBCadm.bundle */, ); name = Products; sourceTree = ""; }; 8568A59B196E89BC00738ECF /* mac */ = { isa = PBXGroup; children = ( 85A390BA1B790E6500AC8862 /* English.lproj */, 858A029F1B74E81C00C8009C /* IODBCadm_PoolConfigController.h */, 858A02A01B74E81C00C8009C /* IODBCadm_PoolConfigController.m */, 858A02991B74E80500C8009C /* IODBCadm_DSNmanageController.h */, 858A029A1B74E80500C8009C /* IODBCadm_DSNmanageController.m */, 858A028D1B74E7F000C8009C /* IODBCadm_DrvConfigController.h */, 858A028E1B74E7F000C8009C /* IODBCadm_DrvConfigController.m */, 858A02901B74E7F000C8009C /* IODBCadm_DrvRemoveController.h */, 858A02911B74E7F000C8009C /* IODBCadm_DrvRemoveController.m */, 8568A601197907C100738ECF /* IODBCadm_DriverChooseDSNController.h */, 8568A602197907C100738ECF /* IODBCadm_DriverChooseDSNController.m */, 8568A5E91977BF6400738ECF /* IODBCadm_SetupController.h */, 8568A5EA1977BF6400738ECF /* IODBCadm_SetupController.m */, 8568A5E31977BCFB00738ECF /* IODBCadm_DSNchooserController.h */, 8568A5E41977BCFB00738ECF /* IODBCadm_DSNchooserController.m */, 85D41905197B822B00C2C443 /* IODBCadm_DriverChooseFDSNController.h */, 85D41906197B822B00C2C443 /* IODBCadm_DriverChooseFDSNController.m */, 85D4190B197B824300C2C443 /* IODBCadm_KeyValController.h */, 85D4190C197B824300C2C443 /* IODBCadm_KeyValController.m */, 8568A5DF1977BCE100738ECF /* Helpers.h */, 8568A5E01977BCE100738ECF /* Helpers.m */, 8568A5A2196E8B1D00738ECF /* utils.h */, 8568A5A3196E8B1D00738ECF /* utils.m */, 8568A5F31978D55500738ECF /* odbc.png */, 8568A59E196E8B1D00738ECF /* confirm.png */, 8568A5F11978D54600738ECF /* drvchoose.png */, ); name = mac; sourceTree = ""; }; 85983C5807D2B6C60022E958 /* iodbcadm */ = { isa = PBXGroup; children = ( 8568A59B196E89BC00738ECF /* mac */, 85983C8107D2B7400022E958 /* macosx */, 85983C5D07D2B7260022E958 /* gui.h */, 85983C5E07D2B7260022E958 /* Info.c */, 85983C5F07D2B7260022E958 /* iodbcadm.exp */, 85983C6007D2B7260022E958 /* iodbcadm.h */, 85983C5907D2B7000022E958 /* drvconn.c */, 85983C5A07D2B7000022E958 /* error.c */, ); name = iodbcadm; sourceTree = ""; }; 85983C8107D2B7400022E958 /* macosx */ = { isa = PBXGroup; children = ( 85983C8907D2B7780022E958 /* gui.h */, 85983C8D07D2B7780022E958 /* translatorchooser.c */, ); name = macosx; sourceTree = ""; }; 85983C9A07D2B78C0022E958 /* iODBC */ = { isa = PBXGroup; children = ( 85983CB707D2B94F0022E958 /* unicode.c */, 85983CB807D2B94F0022E958 /* unicode.h */, 85983CB507D2B9330022E958 /* herr.h */, 85983CB307D2B90F0022E958 /* dlf.c */, 85983CB107D2B8F10022E958 /* dlproc.c */, 85983CAB07D2B8CD0022E958 /* dlf.h */, 85983CAD07D2B8CD0022E958 /* dlproc.h */, 85983CA307D2B8930022E958 /* sql.h */, 85983CA507D2B8930022E958 /* sqltypes.h */, 85983CA607D2B8930022E958 /* sqlucode.h */, 85983CA107D2B85F0022E958 /* iodbcunix.h */, 85983C9D07D2B8290022E958 /* iodbc.h */, 85983C9E07D2B8290022E958 /* iodbcext.h */, ); name = iODBC; sourceTree = ""; }; 85983C9B07D2B7960022E958 /* iODBCinst */ = { isa = PBXGroup; children = ( 85983CBD07D2B9B30022E958 /* odbcinst.h */, 85983CBB07D2B98B0022E958 /* iodbcinst.h */, ); name = iODBCinst; sourceTree = ""; }; 85A390981B790E0A00AC8862 /* English.lproj */ = { isa = PBXGroup; children = ( 85A390991B790E0A00AC8862 /* InfoPlist.strings */, ); path = English.lproj; sourceTree = ""; }; 85A390BA1B790E6500AC8862 /* English.lproj */ = { isa = PBXGroup; children = ( 85A3909E1B790E1700AC8862 /* IODBCadm_PoolConfigController.xib */, 85A390A11B790E2000AC8862 /* IODBCadm_DSNmanageController.xib */, 85A390A41B790E2D00AC8862 /* IODBCadm_DrvConfigController.xib */, 85A390A71B790E3500AC8862 /* IODBCadm_DrvRemoveController.xib */, 85A390AA1B790E3A00AC8862 /* IODBCadm_DriverChooseDSNController.xib */, 85A390AD1B790E4000AC8862 /* IODBCadm_SetupController.xib */, 85A390B01B790E4900AC8862 /* IODBCadm_DSNchooserController.xib */, 85A390B61B790E5700AC8862 /* IODBCadm_DriverChooseFDSNController.xib */, 85A390B91B790E5C00AC8862 /* IODBCadm_KeyValController.xib */, ); name = English.lproj; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ CDAE3BEA0987D71D003250F8 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( 858A02961B74E7F000C8009C /* IODBCadm_DrvRemoveController.h in Headers */, 8568A5A8196E8B1D00738ECF /* utils.h in Headers */, CDAE3BEB0987D71D003250F8 /* gui.h in Headers */, CDAE3BEC0987D71D003250F8 /* iodbcadm.h in Headers */, 8568A5E11977BCE100738ECF /* Helpers.h in Headers */, CDAE3BED0987D71D003250F8 /* gui.h in Headers */, CDAE3BEE0987D71D003250F8 /* iodbc.h in Headers */, 8568A5EC1977BF6400738ECF /* IODBCadm_SetupController.h in Headers */, CDAE3BEF0987D71D003250F8 /* iodbcext.h in Headers */, 8568A604197907C100738ECF /* IODBCadm_DriverChooseDSNController.h in Headers */, CDAE3BF00987D71D003250F8 /* iodbcunix.h in Headers */, CDAE3BF10987D71D003250F8 /* sql.h in Headers */, 858A02931B74E7F000C8009C /* IODBCadm_DrvConfigController.h in Headers */, 85D4190E197B824300C2C443 /* IODBCadm_KeyValController.h in Headers */, CDAE3BF20987D71D003250F8 /* sqltypes.h in Headers */, CDAE3BF30987D71D003250F8 /* sqlucode.h in Headers */, 8568A5E61977BCFB00738ECF /* IODBCadm_DSNchooserController.h in Headers */, 85D41908197B822B00C2C443 /* IODBCadm_DriverChooseFDSNController.h in Headers */, CDAE3BF40987D71D003250F8 /* dlf.h in Headers */, 858A02A21B74E81C00C8009C /* IODBCadm_PoolConfigController.h in Headers */, CDAE3BF50987D71D003250F8 /* dlproc.h in Headers */, CDAE3BF60987D71D003250F8 /* herr.h in Headers */, CDAE3BF70987D71D003250F8 /* unicode.h in Headers */, CDAE3BF80987D71D003250F8 /* iodbcinst.h in Headers */, 858A029C1B74E80500C8009C /* IODBCadm_DSNmanageController.h in Headers */, CDAE3BF90987D71D003250F8 /* odbcinst.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ CDAE3BE90987D71D003250F8 /* iODBCadm */ = { isa = PBXNativeTarget; buildConfigurationList = CDAE3C1F0987D71D003250F8 /* Build configuration list for PBXNativeTarget "iODBCadm" */; buildPhases = ( CDAE3BEA0987D71D003250F8 /* Headers */, CDAE3BFB0987D71D003250F8 /* Resources */, CDAE3C050987D71D003250F8 /* Sources */, CDAE3C180987D71D003250F8 /* Frameworks */, CDAE3C1D0987D71D003250F8 /* Rez */, ); buildRules = ( ); dependencies = ( ); name = iODBCadm; productInstallPath = .; productName = iODBCadm; productReference = CDAE3C240987D71D003250F8 /* iODBCadm.bundle */; productType = "com.apple.product-type.bundle"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 089C1669FE841209C02AAC07 /* Project object */ = { isa = PBXProject; attributes = { LastUpgradeCheck = 1130; TargetAttributes = { CDAE3BE90987D71D003250F8 = { ProvisioningStyle = Manual; }; }; }; buildConfigurationList = CDAE3C250987D71E003250F8 /* Build configuration list for PBXProject "iODBCadm" */; compatibilityVersion = "Xcode 8.0"; developmentRegion = en; hasScannedForEncodings = 1; knownRegions = ( en, Base, ); mainGroup = 089C166AFE841209C02AAC07 /* iODBCadm */; projectDirPath = ""; projectRoot = ""; targets = ( CDAE3BE90987D71D003250F8 /* iODBCadm */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ CDAE3BFB0987D71D003250F8 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( 85A390A51B790E3500AC8862 /* IODBCadm_DrvRemoveController.xib in Resources */, 85A3909C1B790E1700AC8862 /* IODBCadm_PoolConfigController.xib in Resources */, 85A390A81B790E3A00AC8862 /* IODBCadm_DriverChooseDSNController.xib in Resources */, 85A390AB1B790E4000AC8862 /* IODBCadm_SetupController.xib in Resources */, 85A3909F1B790E2000AC8862 /* IODBCadm_DSNmanageController.xib in Resources */, 85A390AE1B790E4900AC8862 /* IODBCadm_DSNchooserController.xib in Resources */, 85A390B41B790E5700AC8862 /* IODBCadm_DriverChooseFDSNController.xib in Resources */, 85A390B71B790E5C00AC8862 /* IODBCadm_KeyValController.xib in Resources */, 85A390A21B790E2D00AC8862 /* IODBCadm_DrvConfigController.xib in Resources */, 8568A5F41978D55500738ECF /* odbc.png in Resources */, 8568A5F21978D54600738ECF /* drvchoose.png in Resources */, 8568A5A4196E8B1D00738ECF /* confirm.png in Resources */, 85A3909B1B790E0A00AC8862 /* InfoPlist.strings in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXRezBuildPhase section */ CDAE3C1D0987D71D003250F8 /* Rez */ = { isa = PBXRezBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXRezBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ CDAE3C050987D71D003250F8 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 858A02A31B74E81C00C8009C /* IODBCadm_PoolConfigController.m in Sources */, CDAE3C060987D71D003250F8 /* drvconn.c in Sources */, CDAE3C070987D71D003250F8 /* error.c in Sources */, CDAE3C080987D71D003250F8 /* Info.c in Sources */, 858A02971B74E7F000C8009C /* IODBCadm_DrvRemoveController.m in Sources */, CDAE3C090987D71D003250F8 /* iodbcadm.exp in Sources */, 85D41909197B822B00C2C443 /* IODBCadm_DriverChooseFDSNController.m in Sources */, 8568A605197907C100738ECF /* IODBCadm_DriverChooseDSNController.m in Sources */, 8568A5E21977BCE100738ECF /* Helpers.m in Sources */, 8568A5ED1977BF6400738ECF /* IODBCadm_SetupController.m in Sources */, CDAE3C130987D71D003250F8 /* translatorchooser.c in Sources */, 8568A5A9196E8B1D00738ECF /* utils.m in Sources */, 85D4190F197B824300C2C443 /* IODBCadm_KeyValController.m in Sources */, CDAE3C140987D71D003250F8 /* dlproc.c in Sources */, CDAE3C150987D71D003250F8 /* dlf.c in Sources */, CDAE3C160987D71D003250F8 /* unicode.c in Sources */, 858A02941B74E7F000C8009C /* IODBCadm_DrvConfigController.m in Sources */, 858A029D1B74E80500C8009C /* IODBCadm_DSNmanageController.m in Sources */, 8568A5E71977BCFB00738ECF /* IODBCadm_DSNchooserController.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ 85A390991B790E0A00AC8862 /* InfoPlist.strings */ = { isa = PBXVariantGroup; children = ( CDE9EB2C2636F9440056782B /* en */, ); name = InfoPlist.strings; sourceTree = ""; }; 85A3909E1B790E1700AC8862 /* IODBCadm_PoolConfigController.xib */ = { isa = PBXVariantGroup; children = ( CDE9EB232636F93B0056782B /* Base */, ); name = IODBCadm_PoolConfigController.xib; path = ../../iodbcadm/mac; sourceTree = ""; }; 85A390A11B790E2000AC8862 /* IODBCadm_DSNmanageController.xib */ = { isa = PBXVariantGroup; children = ( CDE9EB242636F93B0056782B /* Base */, ); name = IODBCadm_DSNmanageController.xib; path = ../../iodbcadm/mac; sourceTree = ""; }; 85A390A41B790E2D00AC8862 /* IODBCadm_DrvConfigController.xib */ = { isa = PBXVariantGroup; children = ( CDE9EB252636F93B0056782B /* Base */, ); name = IODBCadm_DrvConfigController.xib; path = ../../iodbcadm/mac; sourceTree = ""; }; 85A390A71B790E3500AC8862 /* IODBCadm_DrvRemoveController.xib */ = { isa = PBXVariantGroup; children = ( CDE9EB262636F93C0056782B /* Base */, ); name = IODBCadm_DrvRemoveController.xib; path = ../../iodbcadm/mac; sourceTree = ""; }; 85A390AA1B790E3A00AC8862 /* IODBCadm_DriverChooseDSNController.xib */ = { isa = PBXVariantGroup; children = ( CDE9EB272636F93C0056782B /* Base */, ); name = IODBCadm_DriverChooseDSNController.xib; path = ../../iodbcadm/mac; sourceTree = ""; }; 85A390AD1B790E4000AC8862 /* IODBCadm_SetupController.xib */ = { isa = PBXVariantGroup; children = ( CDE9EB282636F93C0056782B /* Base */, ); name = IODBCadm_SetupController.xib; path = ../../iodbcadm/mac; sourceTree = ""; }; 85A390B01B790E4900AC8862 /* IODBCadm_DSNchooserController.xib */ = { isa = PBXVariantGroup; children = ( CDE9EB292636F93C0056782B /* Base */, ); name = IODBCadm_DSNchooserController.xib; path = ../../iodbcadm/mac; sourceTree = ""; }; 85A390B61B790E5700AC8862 /* IODBCadm_DriverChooseFDSNController.xib */ = { isa = PBXVariantGroup; children = ( CDE9EB2A2636F93C0056782B /* Base */, ); name = IODBCadm_DriverChooseFDSNController.xib; path = ../../iodbcadm/mac; sourceTree = ""; }; 85A390B91B790E5C00AC8862 /* IODBCadm_KeyValController.xib */ = { isa = PBXVariantGroup; children = ( CDE9EB2B2636F93D0056782B /* Base */, ); name = IODBCadm_KeyValController.xib; path = ../../iodbcadm/mac; sourceTree = ""; }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ CDAE3C200987D71D003250F8 /* Development */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = ( arm64, $IODBC_32BIT, x86_64, ); CLANG_ENABLE_OBJC_WEAK = YES; COPY_PHASE_STRIP = YES; CURRENT_PROJECT_VERSION = $IODBC_VERSION; DEPLOYMENT_POSTPROCESSING = YES; DYLIB_COMPATIBILITY_VERSION = 1.0.0; DYLIB_CURRENT_VERSION = $IODBC_VERSION; EXPORTED_SYMBOLS_FILE = ../../mac/iodbcadm.exp; FRAMEWORK_SEARCH_PATHS = ( ../../mac/iODBCinst/build/Development, ../../mac/iODBCinst/build, ../../mac/iODBC/build/Development, ../../mac/iODBC/build, ); FRAMEWORK_VERSION = 3.52; GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_TRIGRAPHS = NO; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_OPTIMIZATION_LEVEL = 2; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREPROCESSOR_DEFINITIONS = ( "ODBCVER=0x351", _MACX, IODBC_COCOA, ); HEADER_SEARCH_PATHS = ../../include; INFOPLIST_FILE = "Info-iODBCadm.plist"; INSTALL_PATH = /; LIBRARY_SEARCH_PATHS = ""; LIBRARY_STYLE = BUNDLE; MACOSX_DEPLOYMENT_TARGET = 10.9; OTHER_CFLAGS = "-fno-constant-cfstrings"; OTHER_LDFLAGS = ( "-multiply_defined", suppress, ); OTHER_REZFLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = org.iodbc.adm; PRODUCT_NAME = iODBCadm; SECTORDER_FLAGS = ""; SKIP_INSTALL = YES; STRIPFLAGS = "-u -r -s ../../mac/iodbcadm.exp"; WARNING_CFLAGS = ( "-Wmost", "-Wno-four-char-constants", "-Wno-unknown-pragmas", ); WRAPPER_EXTENSION = bundle; ZERO_LINK = NO; }; name = Development; }; CDAE3C210987D71D003250F8 /* Deployment */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = ( arm64, $IODBC_32BIT, x86_64, ); CLANG_ENABLE_OBJC_WEAK = YES; COPY_PHASE_STRIP = YES; FRAMEWORK_SEARCH_PATHS = ( ../../mac/iODBCinst/build/Deployment, ../../mac/iODBCinst/build, ../../mac/iODBC/build/Deployment, ../../mac/iODBC/build, ); GCC_ENABLE_TRIGRAPHS = NO; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_OPTIMIZATION_LEVEL = 2; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREPROCESSOR_DEFINITIONS = ( "ODBCVER=0x351", _MACX, IODBC_COCOA, ); HEADER_SEARCH_PATHS = ../../include; INFOPLIST_FILE = "Info-iODBCadm.plist"; INSTALL_PATH = /; LIBRARY_SEARCH_PATHS = ""; LIBRARY_STYLE = Bundle; MACOSX_DEPLOYMENT_TARGET = 10.9; OTHER_CFLAGS = "-fno-constant-cfstrings"; OTHER_LDFLAGS = ( "-multiply_defined", suppress, ); OTHER_REZFLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = org.iodbc.adm; PRODUCT_NAME = iODBCadm; SECTORDER_FLAGS = ""; WARNING_CFLAGS = ( "-Wmost", "-Wno-four-char-constants", "-Wno-unknown-pragmas", ); WRAPPER_EXTENSION = bundle; ZERO_LINK = NO; }; name = Deployment; }; CDAE3C260987D71E003250F8 /* Development */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = ( arm64, $IODBC_32BIT, x86_64, ); CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "-"; COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.9; ONLY_ACTIVE_ARCH = YES; STRIP_INSTALLED_PRODUCT = NO; }; name = Development; }; CDAE3C270987D71E003250F8 /* Deployment */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = ( arm64, $IODBC_32BIT, x86_64, ); CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "-"; COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.9; STRIP_INSTALLED_PRODUCT = NO; }; name = Deployment; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ CDAE3C1F0987D71D003250F8 /* Build configuration list for PBXNativeTarget "iODBCadm" */ = { isa = XCConfigurationList; buildConfigurations = ( CDAE3C200987D71D003250F8 /* Development */, CDAE3C210987D71D003250F8 /* Deployment */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Deployment; }; CDAE3C250987D71E003250F8 /* Build configuration list for PBXProject "iODBCadm" */ = { isa = XCConfigurationList; buildConfigurations = ( CDAE3C260987D71E003250F8 /* Development */, CDAE3C270987D71E003250F8 /* Deployment */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Deployment; }; /* End XCConfigurationList section */ }; rootObject = 089C1669FE841209C02AAC07 /* Project object */; } libiodbc-3.52.16/mac/iODBCadm/en.lproj/0000775000175000017500000000000014424171426014300 500000000000000libiodbc-3.52.16/mac/iODBCadm/en.lproj/InfoPlist.strings0000664000175000017500000000044514424170750017544 00000000000000/* Localized versions of Info.plist keys */ CFBundleName = "iODBCadm"; CFBundleShortVersionString = "iODBCadm version 3.52.16"; CFBundleGetInfoString = "iODBCadm version 3.52.16, Copyright 1995-2023, OpenLink Software"; NSHumanReadableCopyright = "Copyright © 1995-2023, OpenLink Software"; libiodbc-3.52.16/mac/drvproxy.exp0000664000175000017500000000010714013216212013523 00000000000000_ConfigDriver _ConfigDSN __iodbcdm_drvconn_dialbox _iodbcproxy_version libiodbc-3.52.16/acinclude.m40000664000175000017500000000760314424170750012565 00000000000000# # acinclude.m4 # # The iODBC driver manager. # # Copyright (C) 1995 Ke Jin # Copyright (C) 1996-2023 OpenLink Software # All Rights Reserved. # # This software is released under the terms of either of the following # licenses: # # - GNU Library General Public License (see LICENSE.LGPL) # - The BSD License (see LICENSE.BSD). # # Note that the only valid version of the LGPL license as far as this # project is concerned is the original GNU Library General Public License # Version 2, dated June 1991. # # While not mandated by the BSD license, any patches you make to the # iODBC source code may be contributed back into the iODBC project # at your discretion. Contributions will benefit the Open Source and # Data Access community as a whole. Submissions may be made at: # # http://www.iodbc.org # # # GNU Library Generic Public License Version 2 # ============================================ # 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; only # Version 2 of the License dated June 1991. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # The BSD License # =============== # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. Neither the name of OpenLink Software Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # AC_DEFUN([IODBC_CHECK_PTHREAD_LIB], [AC_MSG_CHECKING([for $2 in -l$1 $5]) ac_save_LIBS="$LIBS" LIBS="-l$1 $5 $LIBS" AC_LINK_IFELSE([AC_LANG_PROGRAM(dnl [[ #ifdef __cplusplus extern "C" #endif #if defined (HAVE_PTHREAD_H) #include #endif ]], [[$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 ]) libiodbc-3.52.16/debian/0000775000175000017500000000000014424171427011672 500000000000000libiodbc-3.52.16/debian/rules0000664000175000017500000000321514013216212012652 00000000000000#!/usr/bin/make -f DEB_AUTO_UPDATE_LIBTOOL=pre DEB_AUTO_UPDATE_ACLOCAL=1.11 DEB_AUTO_UPDATE_AUTOMAKE=1.11 DEB_AUTO_UPDATE_AUTOCONF=2.50 include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/autotools.mk include /usr/share/dpkg/architecture.mk # To make sure that every package that links against libiodbc defines # a versioned dependency and not just a normal one. DEB_CONFIGURE_EXTRA_FLAGS := --with-layout=debian DEB_DH_MAKESHLIBS_ARGS := -V DEB_SHLIBDEPS_LIBRARY_iodbc := libiodbc2 DEB_SHLIBDEPS_INCLUDE_iodbc := debian/libiodbc2/usr/lib:debian/iodbc/usr/lib DEB_SHLIBDEPS_INCLUDE_libiodbc2 := debian/libiodbc2/usr/lib CRUFT := \ aclocal.m4 \ admin/ltmain.sh \ admin/Makefile.in \ bin/Makefile.in \ configure \ drvproxy/gtk/Makefile.in \ drvproxy/Makefile.in \ etc/Makefile.in \ include/Makefile.in \ iodbc/Makefile.in \ iodbc/trace/Makefile.in \ iodbcadm/gtk/Makefile.in \ iodbcadm/Makefile.in \ iodbcinst/Makefile.in \ Makefile.in \ man/Makefile.in \ samples/Makefile.in \ update-config:: for f in $(CRUFT) ; do [ -e $$f.d-r-orig ] || cp -p $$f $$f.d-r-orig ; done reverse-config:: for f in $(CRUFT) ; do [ ! -e $$f.d-r-orig ] || mv $$f.d-r-orig $$f ; done install/iodbc :: mkdir -p debian/tmp/usr/share/lintian/overrides/ cp debian/iodbc.lintian-overrides debian/tmp/usr/share/lintian/overrides/iodbc install/libiodbc2 :: mkdir -p debian/tmp/usr/share/lintian/overrides/ cp debian/libiodbc2.lintian-overrides debian/tmp/usr/share/lintian/overrides/libiodbc2 #clean:: # for f in $(CRUFT) ; do cp -p ../orig/*/$$f $$f ; done clean:: rm -f admin/libtool.m4 admin/ltoptions.m4 admin/ltversion.m4 admin/lt~obsolete.m4 libiodbc-3.52.16/debian/libiodbc2.examples0000664000175000017500000000005414013216212015164 00000000000000etc/odbc.ini.sample etc/odbcinst.ini.sample libiodbc-3.52.16/debian/compat0000664000175000017500000000000214013216212012772 000000000000008 libiodbc-3.52.16/debian/changelog0000664000175000017500000002021614013216212013447 00000000000000libiodbc2 (3.52.12) unstable; urgency=low * Added new Cocoa based UI for Mac OS X 10.5 and above so 64bit applications can use 64bit dialog boxes from the iODBCinst framework * Small bugfixes and cleanups -- iODBC maintainer Tue, 12 Jul 2016 12:00:00 +0200 libiodbc2 (3.52.4-3) unstable; urgency=low * New maintainer. Closes: #230646. * debian/copyright: Updated by removing the existing patches. This fixes the FSF address, and this restores some subtle upstream license choices. * debian/iodbc.lintian-overrides: Updated. * debian/libiodbc2.lintian-overrides: Updated. * debian/control, debian/rules: Use automake1.9. * debian/control: Standards version. * debian/control: Added homepage. -- Bart Martens Sat, 22 Apr 2006 16:38:52 +0200 libiodbc2 (3.52.4-2) unstable; urgency=low * Fixed FTBFS due to bug in iodbc control file which has recently started to let dpkg-genchanges fail. -- Christian Hammers Mon, 6 Feb 2006 20:28:19 +0100 libiodbc2 (3.52.4-1) unstable; urgency=low * New upstream release. Closes: #339501 -- Christian Hammers Mon, 30 Jan 2006 21:37:30 +0100 libiodbc2 (3.52.3-1) unstable; urgency=low * New upstream release. Closes: #309935, #309936, #301304 * Removed Debian specific patches and added --layout=debian to configure. -- Christian Hammers Wed, 16 Nov 2005 02:56:21 +0100 libiodbc2 (3.52.2-4) unstable; urgency=low * Raised automake version from 1.6 to 1.7 on request of Eric Dorland. -- Christian Hammers Sun, 31 Jul 2005 23:50:25 +0200 libiodbc2 (3.52.2-3) unstable; urgency=low * Andreas Jochens reported a build problem on amd64 which uses the apparently more strict gcc-4.0 and provided a patch. Thanks! Closes: #294154 -- Christian Hammers Tue, 8 Feb 2005 13:04:39 +0100 libiodbc2 (3.52.2-2) unstable; urgency=low * debian/rules: Adjusted CDBS variables necessary to update libtool (thanks to Robert Millan). Closes: #268306, #262295 -- Christian Hammers Mon, 7 Feb 2005 21:05:33 +0100 libiodbc2 (3.52.2-1) unstable; urgency=low * New upstream version. -- Christian Hammers Mon, 7 Feb 2005 19:28:33 +0100 libiodbc2 (3.52.1-2) unstable; urgency=medium * Moved all .so files from libiodbc2-dev to iodbc and libiodbc2 as some applications like iodbcadm-gtk from iodbc load their shared libraries in a DLL wrapper function at runtime and not via the common dynamic linking way! (thanks to Alexey Nezhdanov). Closes: #275179 -- Christian Hammers Thu, 7 Oct 2004 23:02:04 +0200 libiodbc2 (3.52.1-1) unstable; urgency=low * New upstream release. -- Christian Hammers Sat, 2 Oct 2004 21:48:11 +0200 libiodbc2 (3.51.2-5) unstable; urgency=medium * Reworked libtool update to fix FTBFS on ARM. Sadly buildd said maybe-success and it took me a while to figure out that there was something for me to do :-( -- Christian Hammers Sat, 21 Aug 2004 15:08:48 +0200 libiodbc2 (3.51.2-4) unstable; urgency=medium * Added versioned dependencies to the .shlibs file (thanks to Adrian Bunk). Closes: #265494 * Added shlibs.local. -- Christian Hammers Fri, 13 Aug 2004 22:38:39 +0200 libiodbc2 (3.51.2-3) unstable; urgency=low * Converted debian/rules to cdbs. -- Christian Hammers Mon, 2 Aug 2004 19:43:22 +0200 libiodbc2 (3.51.2-2) unstable; urgency=low * Reverted the "-ld" patch from last upload. The problem that my iodbc libraries all had a TEXTREL symbol in them was simply caused do a "bug" in the libc6 package that made libdl.so a symlink pointing from /usr/lib/ to ../../lib/ which does not work if /usr is on another partition than /lib! -- Christian Hammers Thu, 4 Mar 2004 01:33:55 +0100 libiodbc2 (3.51.2-1) unstable; urgency=medium * New upstream version. * Changed Makefile so that there is no longer a TEXTREL secion in libiodbc.so.2.1.9 and "prelink" is happy. The shared library is now hopefully fully PIC compatible. Closes: #228859 * Upstream fixed this bug according to private email. Closes: #169174 * Changed section of libiodbc2-dev to libdevel. * Updated download link in copyright file. -- Christian Hammers Sun, 29 Feb 2004 22:39:59 +0100 libiodbc2 (3.51.1-3) unstable; urgency=low * Moved libdrvproxy from libiodbc2 to iodbc as it seems to be necessary only for the GUI (thanks to Raphael Surcouf Bordet). Closes: #221087 -- Christian Hammers Sun, 16 Nov 2003 16:06:02 +0100 libiodbc2 (3.51.1-2) unstable; urgency=low * Added libdrvproxy.so library (thanks to Adrian Kubala). Closes: #220834 -- Christian Hammers Sat, 15 Nov 2003 13:47:32 +0100 libiodbc2 (3.51.1-1) unstable; urgency=low * New upstream version. - Unicode support - bugfixes * Fixed small description typo (thanks to Thanasis Kinias). Closes: #197627 -- Christian Hammers Tue, 28 Oct 2003 01:15:32 +0100 libiodbc2 (3.0.6-4) unstable; urgency=low * Updated GNU autoconf files for Debian/FreeBSD (Thanks to Robert Millan). Closes: #195923 -- Christian Hammers Tue, 3 Jun 2003 14:28:22 +0200 libiodbc2 (3.0.6-3.1) unstable; urgency=low * NMU * iodbc-config.1 needs to be out of libiodbc2.undocumented, and libiodbc2-dev needs to Replace: libiodbc2 (<3.0.6-3). Closes: #148226 -- LaMont Jones Thu, 30 May 2002 22:18:56 -0600 libiodbc2 (3.0.6-3) unstable; urgency=low * Moved iodbc-config from lib to -dev package. Closes: #146905 -- Christian Hammers Mon, 20 May 2002 14:28:49 +0200 libiodbc2 (3.0.6-2) unstable; urgency=medium * Fixed build problems due to broken libtool support. Closes: #145325 -- Christian Hammers Tue, 7 May 2002 10:57:27 +0200 libiodbc2 (3.0.6-1) unstable; urgency=low * New upstream version. (minor bugfixes only) * The debian directory is now integrated into the upstream source. * Added iodbc-test binary. -- Christian Hammers Tue, 30 Apr 2002 00:28:59 +0200 libiodbc2 (3.0.5b-2) unstable; urgency=medium * Added dependency to libiodbc2. Closes: #144495 -- Christian Hammers Thu, 25 Apr 2002 18:02:34 +0200 libiodbc2 (3.0.5b-1) unstable; urgency=low * New snapshot source from upstream author that fixes build problems. * Put the new GTK configuration binary to a seperate package called 'iodbc'. Closes: #140859 -- Christian Hammers Sun, 14 Apr 2002 18:07:28 +0200 libiodbc2 (3.0.5-3) unstable; urgency=low * Corrected typo in package description. * Added libgtk1.2-dev to build-depends. Closes: #140723 -- Christian Hammers Fri, 29 Mar 2002 17:12:55 +0100 libiodbc2 (3.0.5-2) unstable; urgency=low * Corrected typo in package description. * Added libgtk1.2-dev to build-depends. Closes: #140723 -- Christian Hammers Fri, 29 Mar 2002 17:12:55 +0100 libiodbc2 (3.0.5-1) unstable; urgency=low * New upstream version. Closes: #113987 - now supports ODBC3 - added iodbc-config and iodbcadm-gtk binaries * This library is supposed to be backwards compatible to the 2.x versions. * iodbcadm-gtk doesn't build correctly -- Christian Hammers Tue, 26 Mar 2002 03:39:12 +0100 libiodbc2 (2.50.3-4) unstable; urgency=low * Updated config.guess and config.sub to make compilation on PARISC architecuture possible. Closes: #94763 -- Christian Hammers Sun, 20 May 2001 17:05:05 +0200 libiodbc2 (2.50.3-3) unstable; urgency=low * Added s390 recognition in config.sub. Closes: #88556 Thanks to kokids@debian.org for the patch. -- Christian Hammers Sat, 10 Mar 2001 17:14:00 +0100 libiodbc2 (2.50.3-2) unstable; urgency=low * Added Build-Depends. * No code change. -- Christian Hammers Sun, 18 Feb 2001 05:14:04 +0100 libiodbc2 (2.50.3-1) unstable; urgency=low * Initial Release. -- Christian Hammers Sat, 2 Oct 1999 15:44:05 +0200 libiodbc-3.52.16/debian/iodbc.undocumented0000664000175000017500000000001714013216212015266 00000000000000iodbcadm-gtk.1 libiodbc-3.52.16/debian/control0000664000175000017500000000536414013216212013207 00000000000000Source: libiodbc2 Section: libs Priority: optional Maintainer: Debian QA Group Build-Depends: debhelper (>= 8), autotools-dev, libtool (>= 1.5-2), automake1.11, autoconf, cdbs, m4 (>= 1.4.7), libgtk2.0-dev Standards-Version: 3.8.0 Homepage: http://www.iodbc.org/ Package: iodbc Section: misc Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: GTK+ config frontend for the iODBC Driver Manager The iODBC (intrinsic Open Database Connectivity) driver manager is compatible with the ODBC 2.x and 3.x specification and performs all the jobs of a ODBC driver manager (i.e. driver loading, parameters and function sequence checking, driver's function invoking, etc). Any ODBC driver working with ODBC 2.0 and 3.x driver manager will also work with iODBC driver manager and vice versa. . Applications (using ODBC function calls) linked with iODBC driver manager will be able to simultaneously access different types of data sources within one process through suitable iODBC drivers. . This package contains the configuration binaries. Package: libiodbc2 Section: libs Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Suggests: iodbc (= ${binary:Version}) Description: iODBC Driver Manager The iODBC (intrinsic Open Database Connectivity) driver manager is compatible with the ODBC 2.x and 3.x specification and performs all the jobs of a ODBC driver manager (i.e. driver loading, parameters and function sequence checking, driver's function invoking, etc). Any ODBC driver working with ODBC 2.0 and 3.x driver manager will also work with iODBC driver manager and vice versa. . Applications (using ODBC function calls) linked with iODBC driver manager will be able to simultaneously access different types of data sources within one process through suitable iODBC drivers. . This package contains the library files. Look for the iodbc package, too! Package: libiodbc2-dev Section: libdevel Architecture: any Depends: libiodbc2 (= ${binary:Version}), ${misc:Depends} Conflicts: libiodbc2 (<= 3.52.6-1), iodbc (<= 3.52.6-1) Description: iODBC Driver Manager (development files) The iODBC (intrinsic Open Database Connectivity) driver manager is compatible with the ODBC 2.x and 3.x specification and performs all the jobs of a ODBC driver manager (i.e. driver loading, parameters and function sequence checking, driver's function invoking, etc). Any ODBC driver working with ODBC 2.0 and 3.x driver manager will also work with iODBC driver manager and vice versa. . Applications (using ODBC function calls) linked with iODBC driver manager will be able to simultaneously access different types of data sources within one process through suitable iODBC drivers. . This package contains the development files. libiodbc-3.52.16/debian/libiodbc2.files0000664000175000017500000000010714013216212014447 00000000000000usr/bin/iodbc-config usr/lib/libiodbc.so.2* usr/lib/libiodbcinst.so.2* libiodbc-3.52.16/debian/libiodbc2.lintian-overrides0000664000175000017500000000027214013216212017006 00000000000000libiodbc2: non-dev-pkg-with-shlib-symlink usr/lib/libiodbcinst.so.2.1.18 usr/lib/libiodbcinst.so libiodbc2: non-dev-pkg-with-shlib-symlink usr/lib/libiodbc.so.2.1.18 usr/lib/libiodbc.so libiodbc-3.52.16/debian/iodbc.install0000664000175000017500000000041114013216212014240 00000000000000debian/tmp/usr/bin/iodbcadm-gtk debian/tmp/usr/bin/iodbctest debian/tmp/usr/lib/libdrvproxy.so.* debian/tmp/usr/lib/libiodbcadm.so.* debian/tmp/usr/share/man/man1/iodbcadm-gtk.1 debian/tmp/usr/share/man/man1/iodbctest.1 debian/tmp/usr/share/lintian/overrides/iodbc libiodbc-3.52.16/debian/libiodbc2-dev.install0000664000175000017500000000056014013216212015572 00000000000000debian/tmp/usr/bin/iodbc-config debian/tmp/usr/include/*.h debian/tmp/usr/lib/libiodbc.a debian/tmp/usr/lib/libiodbcadm.a debian/tmp/usr/lib/libiodbcinst.a debian/tmp/usr/lib/libdrvproxy.a debian/tmp/usr/share/man/man1/iodbc-config.1 debian/tmp/usr/lib/libiodbc.so debian/tmp/usr/lib/libiodbcinst.so debian/tmp/usr/lib/libdrvproxy.so debian/tmp/usr/lib/libiodbcadm.so libiodbc-3.52.16/debian/copyright0000664000175000017500000000667114424170750013555 00000000000000This package was debianized by Christian Hammers on Sat, 2 Oct 1999 15:44:05 +0200. It was downloaded from http://www.iodbc.org/ Current Upstream Author: OpenLink Software Inc. You can find a copy of the common licenses in /usr/share/common-licenses/ Copyright: # # The iODBC driver manager. # # Copyright (C) 1995 Ke Jin # Copyright (C) 1996-2023 OpenLink Software # All Rights Reserved. # # This software is released under the terms of either of the following # licenses: # # - GNU Library General Public License (see LICENSE.LGPL) # - The BSD License (see LICENSE.BSD). # # Note that the only valid version of the LGPL license as far as this # project is concerned is the original GNU Library General Public License # Version 2, dated June 1991. # # While not mandated by the BSD license, any patches you make to the # iODBC source code may be contributed back into the iODBC project # at your discretion. Contributions will benefit the Open Source and # Data Access community as a whole. Submissions may be made at: # # http://www.iodbc.org # # # GNU Library Generic Public License Version 2 # ============================================ # 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; only # Version 2 of the License dated June 1991. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # The BSD License # =============== # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. Neither the name of OpenLink Software Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # libiodbc-3.52.16/debian/libiodbc2-dev.files0000664000175000017500000000023214013216212015222 00000000000000usr/include/*.h usr/lib/libiodbc.so usr/lib/libiodbc.a usr/lib/libiodbcinst.so usr/lib/libiodbcinst.a usr/lib/libiodbcadm-gtk.a usr/lib/libdrvproxy-gtk.a libiodbc-3.52.16/debian/watch0000664000175000017500000000016614013216212012630 00000000000000version=3 #http://www.iodbc.org/downloads/iODBC/libiodbc-(\d.*)\.tar\.gz http://sf.net/iodbc/libiodbc-(\d.*)\.tar\.gz libiodbc-3.52.16/debian/libiodbc2.docs0000664000175000017500000000006614013216212014301 00000000000000debian/README.Debian AUTHORS IAFA-PACKAGE NEWS README libiodbc-3.52.16/debian/libiodbc2-dev.examples0000664000175000017500000000002414013216212015735 00000000000000samples/iodbctest.c libiodbc-3.52.16/debian/iodbc.lintian-overrides0000664000175000017500000000047414013216212016241 00000000000000iodbc: non-dev-pkg-with-shlib-symlink usr/lib/libiodbcadm.so.2.1.18 usr/lib/libiodbcadm.so iodbc: non-dev-pkg-with-shlib-symlink usr/lib/libdrvproxy.so.2.1.18 usr/lib/libdrvproxy.so iodbc: package-name-doesnt-match-sonames libiodbcadm2 libdrvproxy2 iodbc: package-name-doesnt-match-sonames libdrvproxy2 libiodbcadm2 libiodbc-3.52.16/debian/libiodbc2.install0000664000175000017500000000016714013216212015021 00000000000000debian/tmp/usr/lib/libiodbc.so.* debian/tmp/usr/lib/libiodbcinst.so.* debian/tmp/usr/share/lintian/overrides/libiodbc2 libiodbc-3.52.16/debian/libiodbc2.undocumented0000664000175000017500000000001714013216212016037 00000000000000iodbc-config.1 libiodbc-3.52.16/debian/iodbc.files0000664000175000017500000000002514013216212013675 00000000000000usr/bin/iodbcadm-gtk libiodbc-3.52.16/debian/README.Debian0000664000175000017500000000133514013216212013637 00000000000000# # What about libodbc.so? (bug #171370) # According to the upstream authors the library can safely be installed as libodbc.so to use it with OpenOffice, R and other applications. It is not yet done in Debian by default as currently unixODBC maintains a symlink to libodbc.so and using alternatives for shared libraries is maybe dangerous. We are currently deciding if maybe one ODBC library can be dropped alltogether. last edited: 2004-03-01, ch@debian.org # # Why are .so libraries not in -dev packages? (bug #275179) # This is an unfortunate side effect from the (legacy) version of libtool used at the time when this code was written and will be fixed in an upcoming version. last edited: 2007-01-05, iodbc@openlinksw.com libiodbc-3.52.16/README0000664000175000017500000004126414424170750011255 00000000000000# iODBC Driver Manager Copyright (C) 1995 Ke Jin . Copyright (C) 1996-2023 OpenLink Software . ## License Copyright 1996-2023 [OpenLink Software](http://www.openlinksw.com) This software is released under either the GNU Library General Public License (see [LICENSE.LGPL](./LICENSE.LGPL)) or the BSD License (see [LICENSE.BSD](./LICENSE.BSD)). **Note**: The only valid version of the GPL license as far as this project is concerned is the original GNU General Public License Version 2, dated June 1991. ### Contributions While not mandated by the BSD license, any patches you make to the iODBC project may be contributed back into the project at your discretion. Contributions will benefit the Open Source and Data Access community as a whole. Submissions may be made via the [iODBC Github project](https://github.com/openlink/iODBC/) or via email to . ## Introduction Welcome to the iODBC driver manager maintained by [OpenLink Software](http://www.openlinksw.com/). This kit will provide you with everything you need to develop ODBC-compliant applications under Unix without having to pay royalties to other parties. This kit consists of a number of parts: - **The iODBC driver manager.** This is a complete implementation of an ODBC driver manager, released under either the GNU Library General Public License or the BSD License. We fully comply with these licenses by giving you this product in source form (as well as the binary form). You can download the latest version of the driver manager from the [iODBC website](http://www.iodbc.org/). - **A simple example application, `iodbctest.c`**, which gives you a command-line interface to SQL. You can fit this to your purposes, but at the very least this is useful for verification of your ODBC installation. You can use either part stand-alone, if you wish. An ODBC driver is still needed to affect your connection architecture. You may build a driver with the iODBC components or obtain an ODBC driver from a commercial vendor. OpenLink Software produces cross-platform commercial drivers as well as maintaining the iODBC distribution: evaluation copies may be obtained via download from the [OpenLink Software website](http://www.openlinksw.com/). Any ODBC-compliant driver will work with the iODBC Driver Manager. You can see the [iODBC website](http://www.iodbc.org/) for pointers to various ODBC drivers. ## Installation of run-time distribution You have probably already unpacked this distribution. The next step is to make sure that your applications can find all the dynamic link libraries. Depending on your system's implementation of dynamic link libraries, you have a number of options: - Install the libraries in a directory that is searched by your linker by default. Typical locations are `/usr/lib` and `/usr/local/lib`. - Install the libraries in some other place, and make sure that the environment variable your dynamic linker uses to find extra locations for dynamic link libraries. Most systems use the environment variable `LD_LIBRARY_PATH` to this end. Known exceptions include AIX which uses `LIBPATH`, and HP/UX which uses `SHLIB_PATH` for 32-bit libraries. If your system has a C compiler, you can verify the installation by compiling the `iodbctest` program. Otherwise, you may have ODBC applications installed on your system which you can use. ## Configuration of run-time distribution The iODBC driver manager looks for a file `~/.odbc.ini`, where the tilde stands for the user's home directory. This file initially contains only a default section where you can select which driver library to use. Copy the `odbc.ini` file from the examples directory to `~/.odbc.ini` and make sure the right path and filename is used for your installation. A data source is a section (enclosed in square brackets), and the attributes for a data source are given within this section. The most important attribute to iODBC for each datasource is the `Driver` attribute. This must point to the shared library for the ODBC driver associated with the data source. For example, the OpenLink Enterprise Edition (Multi-Tier) ODBC drivers have a number of attributes which can be set for a data source. Here is a description: ----------------------------------------------------------------------------------- `odbc.ini` keyword ODBC connect string keyword Description -------------------------- -------------------------------------- ----------------- `Host` `HOST` The hostname where the database resides. `ServerType` `SVT` The type of Database Agent. (See `oplrqb.ini` on the server.) `ServerOptions` `SVO` Server-specific extra options. See Enterprise Edition server-side documentation for Agents which can use this. `Database` `DATABASE` The database to use. `Options` `OPTIONS` Connect options for the database. `UserName` `UID` The name of the database user. `Password` `PWD` The password of the database user. `ReadOnly` `READONLY` A `Yes`/`No` value in order to make the connection read-only. `FetchBufferSize` `FBS` The number of records that are transferred in a single call to the server. Default is `5`; maximum is `999`; minimum is `1`. `Protocol` `PROTO` The protocol to use. Set to `TCP` for Release 3.x and later. ----------------------------------------------------------------------------------- Apart from these data source-specific settings, you may add a section called `[Communications]`, which you may use to tune the OpenLink Enterprise Edition (Multi-Tier) driver further: ----------------------------------------------------------------------- `odbc.ini` keyword Description ------------------------------------------- --------------------------- `ReceiveTimeout` The time in seconds that the client application will wait for the Database Agent to start sending results. Default is `60`. `BrokerTimeout` The time in seconds that the client application will wait for the Request Broker to accept or reject a database connection request. Default is `30`. `SendSize` RPC send buffer size. A value of `0` (the default) will cause the application to use system-dependent defaults. `ReceiveSize` RPC receive buffer size. A value of `0` (the default) will cause the application to use system-dependent defaults. `DebugFile` If set, the name of a file to which debugging output from the driver should be directed. ----------------------------------------------------------------------- ## iODBC driver manager platform availability The iODBC driver manager has been ported to following platforms: OS Version Processor ------------------ -------------- ------------------------------------------------ BSDi BSD/OS 2.x x86 DEC Unix (OSF/1) 3.x - 5.x DEC Alpha DG/UX 5.x Aviion FreeBSD 2.x - 9.x x86 HP/UX 9.x - 11.x HP9000 s700/s800 HP/UX 9.x HP9000 s300/s400 IBM AIX 3.x - 5.x IBM RS6000, ppc32, ppc64 Linux ELF 1.x, 2.x x86, x86_64, IA_64, ppc32, ppc64, arm32, arm64 macOS 10.x -- 11.x ppc32, ppc64, x86, x86_64, arm64 Max/OS SVR4 1.x Concurrent Maxion 9200 MP NCR SVR4 3.x NCR 3435 OpenVMS 6.x DEC Alpha SCO OpenServer 5.x x86 SGI Irix SVR4 5.x, 6.x IP12 MIPS, IP22 MIPS SunOS 4.1.x Sun Sparc Sun Solaris 2.x Sun Sparc, x86, x86_64 UnixWare SVR4.2 1.x, 2.x x86 Windows NT 4.x x86 As the iODBC driver manager uses `autoconf`/`automake`/`libtool`, it should be portable to most modern UNIX-like OS out of the box. However, if you do need to make changes to the code or the configuration files, we would appreciate it if you would share your changes with the rest of the internet community by mailing your patches to , so we can include them for the next build. Porting the iODBC driver manager to some non-UNIX-like operating systems, such as the Windows family (3.x, 95, NT, 200x, etc.), IBM OS/2, or Mac Classic, is supported, but has not been compiled or tested recently. Of course, you will need to supply a `make`/`build` file and a short `LibMain` for creating the `iodbc.dll`. ## How to build the iODBC driver manager Users of macOS should read the separate [README_MACOSX](./README_MACOSX.md) document for more detail of porting to this platform. Users of all other UNIX-like OS: 1. Run `configure` to adjust to target platform 2. Run `make` 3. Run `make install` The `configure` program will examine your system for various compiler flags, system options, etc. In some cases, extra flags need to be added for the `C` compiler to work properly; for instance, on HP systems, you may need: $ CFLAGS="-Ae -O" ./configure --prefix=/usr/local .......... ### File Hierarchy Note that the path of the system wide `odbc.ini` file is calculated as follows (based on flags to `./configure`): no --prefix default is /etc/odbc.ini --prefix=/usr /etc/odbc.ini --prefix=/xxx/yyy /xxx/yyy/etc/odbc.ini --sysconfdir=/xxx/yyy /xxx/yyy/odbc.ini --with-iodbc-inidir=/xxx/yyy /xxx/yyy/odbc.ini If the **`--with-layout=`** option is set, then the `prefix` and `sysconfdir` parameters will be changed accordingly. Currently, this parameter understands values of **`gentoo`**, **`redhat`**, **`gnu`**, **`debian`**, or **`opt`** (with everything going into `/opt/iodbc/`). If both are specified, `--prefix` argument will overrule `--with-layout`. ### Example $ ./configure --prefix=/usr/local --with-iodbc-inidir=/etc ... ... ... $ make ... ... ... $ su # make install ... ... ... ## `odbc.ini` Driver manager and drivers use the `odbc.ini` file or connection string when establishing a data source connection. On Windows, `odbc.ini` is located in the Windows directory. On UNIX-like OS, the iODBC driver manager looks for the `odbc.ini` file in the following sequence: 1. check environment variable `ODBCINI` 2. check `$HOME/.odbc.ini` 3. check home in `/etc/passwd` and try `.odbc.ini` in there 4. system-wide `odbc.ini` (settable at configuration time) Item 1 is the easiest, as most drivers will also look at this variable. The format of `odbc.ini` (or `~/.odbc.ini`) is defined as: odbc.ini ::= data_source_list data_source_list ::= /* empty */ | data_source '\n' data_source_list data_source ::= '[' data_source_name ']' '\n' data_source_desc data_source_name ::= 'default' | [A-Za-z]*[A-Za-z0-9_]* data_source_desc ::= /* empty */ | attrib_desc '\n' data_source_desc addrib_desc ::= Attrib '=' attrib_value Attrib ::= 'Driver' | 'PID' | 'UID' | driver_def_attrib driver_def_attrib ::= [A-Za-z]*[A-Za-z0-9_]* An example of an `odbc.ini` file: ; ; odbc.ini ; [ODBC Data Sources] Myodbc = Myodbc Sample = OpenLink Generic ODBC Driver Virtuoso = Virtuoso [ODBC] TraceFile = /tmp/odbc.trace Trace = 0 ; set to 1 to enable tracing [Sample] Driver = /usr/local/openlink/lib/oplodbc.so.1 Description = Sample OpenLink DSN Host = localhost UserName = openlink Password = xxxx ServerType = Oracle 8.1.x Database = FetchBufferSize = 99 ReadOnly = no [Virtuoso] Driver = /usr/local/virtuoso/lib/virtodbc.so.1 Address = localhost:1112 Database = Demo [Myodbc] Driver = /usr/lib/libmyodbc.so HOST = localhost [Default] Driver = /usr/local/openlink/lib/oplodbc.so.1 ## Tracing The iODBC driver manager traces driver's ODBC call invoked by the driver manager. Default tracing file is `./odbc.log`. Tracing option (i.e., on/off or optional tracing file name) can be set in `odbc.ini` file under the `[ODBC]` heading, as: [ODBC] TraceFile = Trace = ON | On | on | 1 | OFF | Off | off | 0 If `` is `stderr` or `stdout`, i.e. -- TraceFile = stderr -- or -- TraceFile = stdout -- the tracing message will go to the terminal screen (if available). ## Further Information Sources - [iODBC Website](http://www.iodbc.org/) containing binaries, sources and documentation. - [iODBC Project page on GitHub](https://github.com/openlink/iODBC/) containing source archives, GIT tree, issues forum. - [iODBC Project page on Sourceforge](http://sourceforge.net/projects/iodbc) containing source archives, GIT tree, mailing lists, forums, bug reports. - [OpenLink Software Website](http://www.openlinksw.com/) containing free trials and support for OpenLink's ODBC drivers. - [Microsoft ODBC Documentation](https://msdn.microsoft.com/en-us/library/ms714177) containing the ODBC API Reference Guide. libiodbc-3.52.16/Makefile.am0000664000175000017500000002653514424170750012435 00000000000000# # Makefile.am # # The iODBC driver manager. # # Copyright (C) 1995 Ke Jin # Copyright (C) 1996-2023 OpenLink Software # All Rights Reserved. # # This software is released under the terms of either of the following # licenses: # # - GNU Library General Public License (see LICENSE.LGPL) # - The BSD License (see LICENSE.BSD). # # Note that the only valid version of the LGPL license as far as this # project is concerned is the original GNU Library General Public License # Version 2, dated June 1991. # # While not mandated by the BSD license, any patches you make to the # iODBC source code may be contributed back into the iODBC project # at your discretion. Contributions will benefit the Open Source and # Data Access community as a whole. Submissions may be made at: # # http://www.iodbc.org # # # GNU Library Generic Public License Version 2 # ============================================ # 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; only # Version 2 of the License dated June 1991. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # The BSD License # =============== # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. Neither the name of OpenLink Software Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # AUTOMAKE_OPTIONS = gnu dist-zip 1.9.6 SUBDIRS = admin bin etc man include iodbcinst iodbc iodbcadm drvproxy samples ACLOCAL_AMFLAGS = -I admin EXTRA_DIST = \ $(srcdir)/IAFA-PACKAGE \ $(srcdir)/LICENSE \ $(srcdir)/LICENSE.LGPL \ $(srcdir)/LICENSE.BSD \ $(srcdir)/README \ $(srcdir)/README.md \ $(srcdir)/README_GIT \ $(srcdir)/README_GIT.md \ $(srcdir)/README_MACOSX \ $(srcdir)/README_MACOSX.md \ $(srcdir)/autogen.sh \ $(srcdir)/PORT.OpenLink \ $(srcdir)/acinclude.m4 \ $(srcdir)/drvproxy/*.exp \ $(srcdir)/mac/drvproxy.exp \ $(srcdir)/mac/framework-include.sh \ $(srcdir)/mac/GNUmakefile \ $(srcdir)/mac/iodbc-config.macos \ $(srcdir)/mac/iodbc.exp \ $(srcdir)/mac/iODBC/en.lproj/InfoPlist.strings \ $(srcdir)/mac/iODBC/Info-iODBC.plist \ $(srcdir)/mac/iODBC/iODBC.xcodeproj/project.pbxproj \ $(srcdir)/mac/iODBC/iODBC.xcodeproj/project.xcworkspace/contents.xcworkspacedata \ $(srcdir)/mac/iODBC/iODBC.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist \ $(srcdir)/mac/iODBC/iODBC.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings \ $(srcdir)/mac/iodbcadm.exp \ $(srcdir)/mac/iODBCadm/en.lproj/InfoPlist.strings \ $(srcdir)/mac/iODBCadm/Info-iODBCadm.plist \ $(srcdir)/mac/iODBCadm/iODBCadm.xcodeproj/project.pbxproj \ $(srcdir)/mac/iODBCadm/iODBCadm.xcodeproj/project.xcworkspace/contents.xcworkspacedata \ $(srcdir)/mac/iODBCadm/iODBCadm.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist \ $(srcdir)/mac/iODBCadm/iODBCadm.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings \ $(srcdir)/mac/iODBCadministrator/*.h \ $(srcdir)/mac/iODBCadministrator/*.m \ $(srcdir)/mac/iODBCadministrator/Base.lproj/MainMenu.xib \ $(srcdir)/mac/iODBCadministrator/en.lproj/InfoPlist.strings \ $(srcdir)/mac/iODBCadministrator/en.lproj/iODBCAdministrator.icns \ $(srcdir)/mac/iODBCadministrator/en.lproj/odbcman.tiff \ $(srcdir)/mac/iODBCadministrator/Info-iODBC_Administrator.plist \ $(srcdir)/mac/iODBCadministrator/iODBCadministrator.xcodeproj/project.pbxproj \ $(srcdir)/mac/iODBCadministrator/iODBCadministrator.xcodeproj/project.xcworkspace/contents.xcworkspacedata \ $(srcdir)/mac/iODBCadministrator/iODBCadministrator.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist \ $(srcdir)/mac/iODBCadministrator/iODBCadministrator.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings \ $(srcdir)/mac/iODBCadministrator64/*.h \ $(srcdir)/mac/iODBCadministrator64/*.m \ $(srcdir)/mac/iODBCadministrator64/Base.lproj/MainMenu.xib \ $(srcdir)/mac/iODBCadministrator64/en.lproj/InfoPlist.strings \ $(srcdir)/mac/iODBCadministrator64/en.lproj/iODBCAdministrator.icns \ $(srcdir)/mac/iODBCadministrator64/en.lproj/odbcman.tiff \ $(srcdir)/mac/iODBCadministrator64/Info-iODBC_Administrator.plist \ $(srcdir)/mac/iODBCadministrator64/iODBCadministrator64.xcodeproj/project.pbxproj \ $(srcdir)/mac/iODBCadministrator64/iODBCadministrator64.xcodeproj/project.xcworkspace/contents.xcworkspacedata \ $(srcdir)/mac/iODBCadministrator64/iODBCadministrator64.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist \ $(srcdir)/mac/iODBCadministrator64/iODBCadministrator64.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings \ $(srcdir)/mac/iODBCdemo/*.h \ $(srcdir)/mac/iODBCdemo/*.m \ $(srcdir)/mac/iODBCdemo/Base.lproj/ExecSQL.xib \ $(srcdir)/mac/iODBCdemo/Base.lproj/MainMenu.xib \ $(srcdir)/mac/iODBCdemo/DemoAnsi/DemoAnsi.xcodeproj/project.pbxproj \ $(srcdir)/mac/iODBCdemo/DemoAnsi/DemoAnsi.xcodeproj/project.xcworkspace/contents.xcworkspacedata \ $(srcdir)/mac/iODBCdemo/DemoAnsi/DemoAnsi.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist \ $(srcdir)/mac/iODBCdemo/DemoAnsi/DemoAnsi.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings \ $(srcdir)/mac/iODBCdemo/DemoAnsi/en.lproj/InfoPlist.strings \ $(srcdir)/mac/iODBCdemo/DemoAnsi/InfoAnsi.plist \ $(srcdir)/mac/iODBCdemo/DemoUnicode/DemoUnicode.xcodeproj/project.pbxproj \ $(srcdir)/mac/iODBCdemo/DemoUnicode/DemoUnicode.xcodeproj/project.xcworkspace/contents.xcworkspacedata \ $(srcdir)/mac/iODBCdemo/DemoUnicode/DemoUnicode.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist \ $(srcdir)/mac/iODBCdemo/DemoUnicode/DemoUnicode.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings \ $(srcdir)/mac/iODBCdemo/DemoUnicode/en.lproj/InfoPlist.strings \ $(srcdir)/mac/iODBCdemo/DemoUnicode/InfoUnicode.plist \ $(srcdir)/mac/iODBCdemo/DSNchooserController.xib \ $(srcdir)/mac/iODBCdemo/en.lproj/Credits.rtf \ $(srcdir)/mac/iODBCdemo/en.lproj/iODBCdemo.icns \ $(srcdir)/mac/iODBCdemo/iodbcdemo_Prefix.pch \ $(srcdir)/mac/iODBCdrvproxy/en.lproj/InfoPlist.strings \ $(srcdir)/mac/iODBCdrvproxy/Info-iODBCdrvproxy.plist \ $(srcdir)/mac/iODBCdrvproxy/iODBCdrvproxy.xcodeproj/project.pbxproj \ $(srcdir)/mac/iODBCdrvproxy/iODBCdrvproxy.xcodeproj/project.xcworkspace/contents.xcworkspacedata \ $(srcdir)/mac/iODBCdrvproxy/iODBCdrvproxy.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist \ $(srcdir)/mac/iODBCdrvproxy/iODBCdrvproxy.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings \ $(srcdir)/mac/iodbcinst.exp \ $(srcdir)/mac/iODBCinst/en.lproj/InfoPlist.strings \ $(srcdir)/mac/iODBCinst/Info-iODBCinst.plist \ $(srcdir)/mac/iODBCinst/iODBCinst.xcodeproj/project.pbxproj \ $(srcdir)/mac/iODBCinst/iODBCinst.xcodeproj/project.xcworkspace/contents.xcworkspacedata \ $(srcdir)/mac/iODBCinst/iODBCinst.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist \ $(srcdir)/mac/iODBCinst/iODBCinst.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings \ $(srcdir)/mac/iODBCtest/iODBCtest.xcodeproj/project.pbxproj \ $(srcdir)/mac/iODBCtest/iODBCtest.xcodeproj/project.xcworkspace/contents.xcworkspacedata \ $(srcdir)/mac/iODBCtest/iODBCtest.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist \ $(srcdir)/mac/iODBCtest/iODBCtest.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings \ $(srcdir)/mac/iODBCtestw/iODBCtestw.xcodeproj/project.pbxproj \ $(srcdir)/mac/iODBCtestw/iODBCtestw.xcodeproj/project.xcworkspace/contents.xcworkspacedata \ $(srcdir)/mac/iODBCtestw/iODBCtestw.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist \ $(srcdir)/mac/iODBCtestw/iODBCtestw.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings \ $(srcdir)/mac/link-inclibs.sh \ $(srcdir)/debian/changelog \ $(srcdir)/debian/compat \ $(srcdir)/debian/control \ $(srcdir)/debian/copyright \ $(srcdir)/debian/iodbc.files \ $(srcdir)/debian/iodbc.install \ $(srcdir)/debian/iodbc.lintian-overrides \ $(srcdir)/debian/iodbc.undocumented \ $(srcdir)/debian/libiodbc2-dev.examples \ $(srcdir)/debian/libiodbc2-dev.files \ $(srcdir)/debian/libiodbc2-dev.install \ $(srcdir)/debian/libiodbc2.docs \ $(srcdir)/debian/libiodbc2.examples \ $(srcdir)/debian/libiodbc2.files \ $(srcdir)/debian/libiodbc2.install \ $(srcdir)/debian/libiodbc2.lintian-overrides \ $(srcdir)/debian/libiodbc2.undocumented \ $(srcdir)/debian/README.Debian \ $(srcdir)/debian/rules \ $(srcdir)/debian/watch # ---------------------------------------------------------------------- # # Maintainers only # # ---------------------------------------------------------------------- MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure DISTCLEANFILES = config.nice if MAINTAINER_MODE # # Create Linux RPM's # RPMFLAGS=--define="_topdir `pwd`/distrib" linux-rpm: $(mkinstalldirs) distrib/SOURCES distrib/SRPMS distrib/SPECS $(mkinstalldirs) distrib/BUILD distrib/RPMS/i386 $(MAKE) dist cp $(PACKAGE)-$(VERSION).tar.gz distrib/SOURCES rpmbuild $(RPMFLAGS) -ba admin/libiodbc.spec rpmbuild $(RPMFLAGS) --clean --rmsource admin/libiodbc.spec # # Create a tar file containing the library and include files # binary-tar: -mkdir @build@ $(MAKE) install prefix=`pwd`/@build@ tar cvf @build@.tar @build@ gzip -9vf @build@.tar rm -rf @build@ # # Create a source snapshot package # snapshot: $(MAKE) dist distdir=$(PACKAGE)-`date +"%Y%m%d"` # # Create an official release package # release: $(MAKE) distcheck # # Generate ChangeLog # .PHONY: changelog changelog: git2cl --format='%s%n%n%b%n' --strip-tab --strip-cherry-pick > ChangeLog endif libiodbc-3.52.16/INSTALL0000664000175000017500000002202414013216212011403 00000000000000Copyright 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. 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, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. (Caching is disabled by default to prevent problems with accidental use of stale cache files.) If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You only need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. 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. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. 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. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you 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 support 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' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the `--target=TYPE' option to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc will cause the specified gcc to be used as the C compiler (unless it is overridden in the site shell script). `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. libiodbc-3.52.16/ChangeLog0000664000175000017500000023637714424171014012154 000000000000002023-05-02 Patrick van Kleef Updated NEWS Updated iODBC version to 3.52.16 for release 2023-05-02 Sergey Malinin Fixed issue with generic setup dialogs on macOS not saving values Set field attribute to use "Continuously Updates Value" 2023-04-05 Patrick van Kleef Updated build timestamp Updated Copyright 2022-10-07 Sergey Malinin Fixed SQLBindParameter trace when bind offset is in use (fixes #80) Reported by: matthew-wozniczka Fixed SQLGetInstalledDrivers single entry error (fixes #79) Modified-by: smalinin Reported-By: paul-aiyedun 2022-10-07 Patrick van Kleef Merge branch 'feature/2022_10_06_fix_github_78' into develop 2022-10-07 Sergey Malinin Fix for support modern limit for path name size Fixed silent truncation of 'long' diagnostic messages in SQLGetDiagRec (fixes #78) Reported by: matthew-wozniczka Fixed issue overriding SQL_DEFAULT_PARAM length indicator (fixes #67) Reported by: matthew-wozniczka 2022-10-06 OpenLink Software Merge pull request #81 from TallTed/patch-1 cleanup and update README_MACOSX and README_MACOSX.md 2022-10-06 Ted Thibodeau Jr apply README_MACOSX.md changes to README_MACOSX 2022-10-05 Ted Thibodeau Jr cleanup and update README_MACOSX.md 2022-04-11 Patrick van Kleef Fixed compiler warning Fixed copyright Fixed missing comma (fixes #72) Reported by: dcb314 Fixed potential memory leak (fixes #71) Reported by: matthew-wozniczka 2021-09-20 Sergey Malinin Fix github#68 2021-09-20 Patrick van Kleef Merge branch 'feature/2021_09_17_fix_github' into develop 2021-09-17 Sergey Malinin Fix github#66 Fix for github#69 2021-07-27 Patrick van Kleef Fixed version check of build tools 2021-07-05 Patrick van Kleef Updated build id to 21.07.05 2021-06-24 Sergey Malinin Fix GitHub issue #63. Crash in create new DSN via drvproxy UI. Also fixed the similar issues in another places. 2021-06-07 Patrick van Kleef Regenerated text versions of markdown documents 2021-06-07 Ted Thibodeau Jr update README_GIT.md update README.md * cleaned up formatting * fixed much language * various corrections Various cleanup of README_MACOSX.md Grammar, punctuation, Apple's OS naming scheme, etc. minor updates to NEWS Corrected macOS identifications; added missing comma; removed errant blankline, 2021-06-07 Patrick van Kleef Regenerated README from README.md 2021-06-07 Ted Thibodeau Updates to README.md for 3.52.15 2021-06-07 Sergey Malinin Fix issue with new vertical layout for Alerts on OSX BigSur 2021-06-07 Patrick van Kleef Merge branch 'feature/2021_06_07_fix_github_58' into develop 2021-06-07 Sergey Malinin Fix for resolve compilation warnings, that threats as errors 2021-06-07 Patrick van Kleef Updated version to 3.52.16-dev at start of new development cycle Merge tag 'v3.52.15' into develop Tagged for release Merge branch 'release/3.52.15' Updated version to 3.52.15 build 21.06.07 Updated Changelog Updated NEWS Updated README_MACOSX to add notes for macOS 11 Big Sur 2021-05-20 Patrick van Kleef Fixed iODBC Administrator base cpu flag for catalina and big sure builds Fixed length of error message buffer 2021-05-09 Patrick van Kleef Fixed make distcheck Fixed small portability issues and removed support for very old Mac OS X versions 2021-05-09 Patrick van Kleef Fixed use macOS instead of Mac OS X 2021-04-28 Patrick van Kleef Merge branch 'feature/big_sur' into develop Fixed title to show CPU architecture used 2021-04-28 Patrick van Kleef Upgraded to use recent versions of Xcode * Minimum Xcode version is set to Xcode 8.0 * Minimum Mac OS deployment target is Mac OS X 10.9 * Migrated dialogs and plist files * Migrated translation support * Removed build support for older versions 2021-04-12 Patrick van Kleef Added support for building on Big Sur 2021-04-12 Patrick van Kleef Simplified build rules for Mac OS X and Mac OS 11 * Added support for building Apple Silicon on BigSur * Fixed support for building i386 on Mojave and older * Fixed backward compatible building for Mac OS 10.9 where possible * Removed build rules for deprecated platforms Mac OS X 10.6 and older 2021-04-12 Patrick van Kleef Added missing import Fixed local include files from <> to "" 2021-02-24 Patrick van Kleef Removed deprecated iODBCcfmbridge for PPC 2021-02-24 Patrick van Kleef Fixed dialog and menu definitions The dialogs have been converted to the format used by Xcode 8 or newer and are tagged to be compatible with machines running Mac OS X 10.9 or newer. 2021-02-24 Patrick van Kleef Fixed pass iODBC version via environment variable to xcodebuild Updated DOCTYPE of plist files Updated version to 3.52.15 to start a new development cycle Converted .strings files to UTF-8 2021-02-17 Patrick van Kleef Merge tag 'v3.52.14' into develop Tagged for final release 2021-02-17 Patrick van Kleef Merge branch 'release/3.52.14' Updated version and build date for release 3.52.14 Updated ChangeLog and NEWS 2021-02-17 Ted Thibodeau Small documentation fixes 2021-02-17 Patrick van Kleef Fixed issue with return buffer Fixed cast Fixed argument type Fixed mode flags Fixed missing check on pcbConnStrOut 2021-02-09 Patrick van Kleef Fixed always build with PIC on linux Updated version to 3.53.14-rc4 2021-02-09 Sergey Malinin SQLSetEnvAttr doesn't return SQL_SUCCESS for option SQL_ATTR_APP_UNICODE_TYPE 2021-02-08 Patrick van Kleef Updated version to 3.53.14-rc3 2021-02-08 Sergey Malinin Fix issue with switch ODBC driver to best supported unicode codepage 2021-01-03 Patrick van Kleef Updated Copyright to include 2021 2020-05-29 Sergey Malinin Remove outdated file Remove old code Fix __WtoU8() 2020-05-20 Patrick van Kleef Updated version to rc2 2020-05-20 Sergey Malinin Fix include files for /usr/local/iODBC/include 2020-05-20 Patrick van Kleef Merge branch 'feature/2020_05_20_fix_SQLGetConnectOption' into develop 2020-05-20 Sergey Malinin Fix missprint in SQLBrowseConnect SQLGetConnectOption returned wrong value for SQL_CURRENT_QUALIFIER and SQL_TRANSLATE_DLL for some cases 2020-03-06 Sergey Malinin Fix mixing calls to SQLFetchScroll with SQLFetch Fix unicode conversion issues 2020-03-05 Patrick van Kleef Updated version to rc1 2020-03-05 Sergey Malinin Fix issues with Unicode <=> Ansi conversions, remove old Windows code 2020-03-03 Patrick van Kleef Fixed issues checking for underscore 2020-03-03 Sergey Malinin Add DataDirect options to iodbcext.h 2020-03-01 Sergey Malinin Fix for ansi buffers allocation 2020-01-02 Patrick van Kleef Updated Copyright 2019-12-06 Patrick van Kleef Merge branch 'feature/2019_09_11_fix_ansi_conversions' into develop 2019-12-06 Sergey Malinin Increase size of buffers for Wide=>Ansi conversion Update code for conversion between Ansi and Unicode 2019-12-06 Patrick van Kleef Fixed compiler warnings Fixed issue with tracing Fixed compiler warning 2019-09-10 Patrick van Kleef Updated build number 2019-09-09 Sergey Malinin Fix truncate data in SQLGetPrivateProfileStringW 2019-08-15 Patrick van Kleef Fixed small issues building on recent versions of Mac OS X 2019-08-13 iODBC Maintainer Updated version to 3.52.14 2019-07-25 Patrick van Kleef Fixed issue with older compilers 2019-07-23 Sergey Malinin Added initial support for Unicode UTF-8 and UTF-16 codepages Enable transparent conversions between UCS4, UTF-8 and UTF-16 codepages 2019-07-23 Patrick van Kleef Update documentation Started new development cycle 3.52.14 2019-07-23 Patrick van Kleef Merge tag 'v3.52.13' into develop Tagged stable release 2019-07-23 Patrick van Kleef Merge branch 'release/3.52.13' Updated iODBC version to 03.52.13 Updated documentation Merge branch 'feature/pthread_fix' into develop Fixed small memory leaks Fixed issue with memory use after free and potential memory leak 2019-07-10 Patrick van Kleef Fixed issue holding global lock too long in SQLError, SQLGetDiagRec and SQLGetDiagField 2019-07-09 Patrick van Kleef Disable empty initialization block 2019-06-25 Patrick van Kleef Merge branch 'feature/fixes' into develop Removed unneeded checks Fixed package versioning Fixed issue with arg expansion while generating config.nice script 2019-06-25 Sergey Malinin Fixed missing check for section Fixed issue using heap after free in SQLConnect_internal Fixed issue in Mac Cocoa code 2019-05-02 Sergey Malinin Fixed SQLSetStmtAttr to cache the correct values for SQL_ATTR_ROW_ARRAY_SIZE and SQL_ATTR_ROW_BIND_TYPE Closes: 35 2019-05-02 Sergey Malinin Added missing define SQL_CONVERT_GUID Closes: 31 2019-01-01 Patrick van Kleef Updated Copyright to include 2019 2018-06-26 Adam Majer non-void function needs to return a value 2018-06-26 Sam Hatchett fixes an issue where build fails on Alpine 2018-06-26 Patrick van Kleef Added extra validation for SQLAllocHandle (SQL_HANDLE_DESC, ...) Fixed valgrind reporting write after free in SQLFreeHandle 2018-01-02 Patrick van Kleef Updated Copyright to 2018 2017-11-01 iODBC Maintainer Updated BUILD id to 171101 2017-11-01 Sergey Malinin Fix iODBC crash issue https://github.com/openlink/iODBC/issues/23 2017-11-01 iODBC Maintainer Fixed format specifiers and some casts to fix trace output Added GCC __attribute__ for checking format string 2017-01-11 Sergey Malinin Fix iODBC apps/frameworks CFBundleGetInfoString attribute 2017-01-10 iODBC Maintainer Updated copyright to include 2017 2016-11-02 iODBC Maintainer Fixed typo 2016-07-12 iODBC Maintainer Merge branch 'release/3.52.12' into develop Merge branch 'release/3.52.12' Updated version to 3.52.12 for final release Updated NEWS and changelog Fixed artifact in text conversion Updated build number to 160712 for release Regenerated text versions of README*.md files Updated README files and converted them to MarkDown format Fixed compiler warning 2016-07-07 Patrick van Kleef Fixed autoconf/automake warning Renamed configure.in to configure.ac Renamed bootstrap.sh to autogen.sh 2016-07-07 iODBC Maintainer Removed deprecated file Merge branch 'feature/remove_carbon' into develop Fixed indentation 2016-07-05 iODBC Maintainer Fixed typo 2016-07-04 iODBC Maintainer Ignore mac build directories Removed hooks to call graphical bundles if not building frameworks Fixed EXTRA_DIST to package all the new Cocoa based code Fixed issues building on Mac OS X 10.10 and 10.11 Renamed mac_cocoa/ -> mac/ Removed old Carbon based UI code 2016-06-21 Sergey Malinin Fix UI - rename title of dialog to "iODBC Data Source Administrator (64-Bit Edition)" for 64bit version - fix crash for ODBC Driver Add and Configure UI 2016-06-13 Sergey Malinin Update iODBC UI - update behavior for DoubleClick action in DSNchoose(execute OK) and DSNmanage(execute Configure) dialogs - rewrite loader of file list for FileDSN to Cocoa 2016-06-08 Sergey Malinin Fix missprint Update for OS X Office2016 fix for recreate properly link, when source file was deleted and recreated 2016-06-07 Sergey Malinin Fix issue with MSOffice2016 and UserDSN access 2016-06-07 iODBC Maintainer Fixed pool alloc 2016-06-06 Sergey Malinin Fix FileDSN tab, new button was added for choose FileDSN dir 2016-06-03 Sergey Malinin Fix issue when dialog getting lost behind another dialog 2016-06-02 Sergey Malinin Fix double free issue and update xib file for resolve resource compilation issue 2016-05-31 iODBC Maintainer Updated copyright to include 2016 2016-05-30 Sergey Malinin Fix Memory alloc issues in iODBC 2016-05-26 iODBC Maintainer Updated version to 3.52.12-dev to start next development cycle Merge branch 'feature/2015_08_11_CocoaPort' into develop 2016-05-26 Sergey Malinin Fix typo 'divers' => 'drivers' 2016-05-26 Sergey Malinin Fix iODBC DM - improve the starting speed of iODBC DM - fix UI names 'iODBC Administrator' => 'iODBC Administrator64' in iODBC Administrator64.app 2016-05-26 Sergey Malinin Fix TLOGIN structure Fixed issue with Proxy Login/Setup dialogs Rename Makefiles Fix resource localised paths and split iODBCDemo package on two packages Remove cfrelease(bundle_dll) calls in connect.c Remove cfrelease(bundle_dll) calls Add latest changes Fix permissions 2016-05-26 Sergey Malinin Add latest fixes for CocoaPort - convert UI dialogs for Xcode4.6 format - fix issue with release bundle ref - update version to 3.52.12 2016-05-26 Sergey Malinin Fix iODBCdemo resources Fix func for conversion char/wchar to NSString Fix permissions Fix UI, rename iODBCAdminitirator64bit to iODBCAdminitirator64 Fix iODBCadministrator Fix year and update iODBC Administrator Port iODBC DM to Cocoa UI 2016-05-26 iODBC Maintainer Merge branch 'release/3.52.11' into develop Merge branch 'release/3.52.11' Updated version to 3.52.11 for internal release 2016-03-10 iODBC Maintainer Added xcodebuild option for Mac OS X 10.11 Fixed issue with Xcode on Mac OS X 10.10 Xcode 7.2.1 Fixed use only major.minor of Mac OS X version to configure flags 2016-03-03 iODBC Maintainer Updated build numbers Fixed merge issue Updated Copyright to 2016 2016-03-03 Bo Anderson Fixed iODBCdrvproxy XIBs not compiling to NIBs on OS X. 2016-01-12 iODBC Maintainer Updated Copyright to 2016 2015-09-28 OpenLink Software Merge pull request #13 from Bo98/drvproxy-nib-fix Fixed iODBCdrvproxy XIBs not compiling to NIBs on OS X 2015-09-28 OpenLink Software Merge pull request #10 from Bo98/drvconn-free-fix Fixed crash when passing an empty connect string with no window handle 2015-09-28 OpenLink Software Merge pull request #11 from Bo98/osx-dev-build-fixes Fixed iODBCadm and iODBCdrvproxy Development build errors on OS X 2015-09-28 OpenLink Software Merge pull request #12 from Bo98/create_dsnsetup-crash-fix OS X: Fixed crash when create_dsnsetup fails to load the window 2015-09-28 Bo Anderson Fixed iODBCdrvproxy XIBs not compiling to NIBs on OS X. Fixed crash when create_dsnsetup fails to load the window. Fixed iODBCadm and iODBCdrvproxy Development build errors on OS X. Fixed crash when passing an empty connect string with no window handle. 2015-07-21 Sergey Malinin Fix iODBCdemo issue with UID/PWD values 2015-07-17 Sergey Malinin Added support for x86_64 to iODBC Demo 2015-07-15 Sergey Malinin Fix crash ODBCdemo - error message overwrite stack data 2015-07-13 Sergey Malinin Fixed crash in iODBC DM on push of "Test" button when 64bit ODBC driver is used. 2015-02-27 Sergey Malinin Fixed issue in SQLGetInfo 2015-02-10 iODBC Maintainer Merge branch 'hotfix/3.52.10.1' into develop Merge branch 'hotfix/3.52.10.1' Added missing file to distribution Updated version to 3.52.11-dev to signal start of new development cycle Merge branch 'release/3.52.10' into develop Merge branch 'release/3.52.10' Updated NEWS Updated version number to 3.52.10 for final release Added missing files from distribution 2015-02-06 Sergey Malinin Fix Unicode conversion issues - SQLGetDiagField(,,,SQL_DIAG_MESSAGE_TEXT,,,) - possible memory overwrite - SQLGetDiagField() - output string truncation when SQLGetDiagFieldW is call with ANSI ODBC driver - SQLGetConnectAttr() - output string truncation when SQLGetConnectAttrW is call with ANSI ODBC driver - SQLGetDescField() - output string truncation when SQLGetDescFieldW is call with ANSI ODBC driver - SQLColAttribute() - output string truncation when SQLColAttributeW is call with ANSI ODBC driver 2015-02-05 iODBC Maintainer Updated version to 3.52.10-rc1 for upcoming release Updated NEWS Updated version strings to 3.52.10 for upcoming release 2015-02-05 Sergey Malinin Fixed UI elements * Use SingleLine attribute for all textFields * Fixed messages below the various tabs 2015-01-31 iODBC Maintainer Install iODBC Administrator in /Applications/iODBC/ 2015-01-31 Patrick van Kleef Ignore error if directory already exists Renamedd OpenLink ODBC Administrator to iODBC Administrator Fixed About dialog and other text to make a more generic Administrator 2015-01-31 Sergey Malinin Fixed FileDSN default path From /Library/ODBC/ODBCDataSources => $HOME/Documents 2015-01-31 Sergey Malinin Fixed FileDSN save dialog and Set Trace file option 2015-01-29 iODBC Maintainer Fixed app names/titles to iODBC Demo Unicode and iODBC Demo Ansi Fixed permissions 2015-01-29 Sergey Malinin Updated iODBCdemo on Mac OS X to support blue links in gridView 2015-01-28 Sergey Malinin Fixed issue with ~/Library/ODBC/odbc[inst].ini on Mac OS X iODBC creates ~/.odbc[inst].ini when ~/Library/ODBC/odbc[inst].ini does not exist * If $HOME/.odbc[inst].ini exists, import it and after this replace it with link to $HOME/Library/ODBC/.odbc[inst].ini * open $HOME/Library/ODBC/odbc[inst].ini always and doesn't use $HOME/odbc[inst].ini 2015-01-21 Sergey Malinin Fixed Mac OS X file chooser dialogs to return long file names 2015-01-07 iODBC Maintainer Fixed About Fixed branding Fixed typo Added build support for Mac OS X 10.10 Updated About dialogs Updated copyright to include 2015 2015-01-06 iODBC Maintainer Updated iODBC version timestamp 2015-01-06 Sergey Malinin Fix - OSX iODBC Demo.app shows gridView with columns, that could not be resized, for "SPARQL DESCRIBE..." queries 2015-01-05 iODBC Maintainer Updated copyright to include 2015 2014-04-15 iODBC Maintainer Updated version to 3.52.10-dev to signal start of new development cycle Merge branch 'release/3.52.9' into develop Merge branch 'release/3.52.9' Updated Debian build files Updated iODBC package version to 3.52.9 for final release 2014-04-15 Patrick van Kleef Updated NEWS Merge fixes 2014-04-15 iODBC Maintainer Added support for Mac OS X 10.9 2014-04-15 Patrick van Kleef Removed ChangeLog as it is generated Added unix build directories to ignore list 2014-04-15 Patrick van Kleef Partially reverted recent change for version autoconf/libtool Recent changes did not work properly with the minimum required versions of autoconf and libtool 2014-04-15 Patrick van Kleef Updated files to reflect minimum versions of autoconf/automake/libtool 2014-04-01 iODBC Maintainer Updated version to 3.32.9-dev 2014-04-01 Sergey Malinin Miscellaneous fixes from a developer from Teragram configure.in: * Rewrote the "underscore before symbols" code snippet to eliminate warnings (e.g. improper main() prototype) and potential optimizing-out of the fnord() function * Use ${CFLAGS} with ${CC}, as the former may contain important flags * Fail if pthread.h is not found, otherwise the configuration falls into a state where threading is enabled, but the header is missing include/sqltypes.h: * Need to check whether _MSC_VER is defined before using it in a cpp conditional, otherwise -Wundef gives a warning iodbc/dlproc.h: * Simplified the conditional affecting the definition of HDLL. (Is there any non-Win32 system that provides this type?) http://sourceforge.net/p/iodbc/mailman/message/29560355/ 2014-04-01 Sergey Malinin Build system updates ++ acinclude.m4 * Properly quote macro name in AC_DEFUN * Use AC_LINK_IFELSE instead of the obsolete AC_TRY_LINK ++ admin/gtk-2.0.m4, admin/gtk.m4 * Properly quote macro name in AC_DEFUN ++ bootstrap.sh * Call the various Autotools initialization programs with --warnings=all where applicable, to help with QA (and autoconf also gets no-obsolete so we don't hear about the obsolete usages still in the GTK m4 macros) ++ configure.in * Use AC_CONFIG_HEADERS instead of the obsolete AM_CONFIG_HEADER * Use AS_HELP_STRING instead of the obsolete AC_HELP_STRING * Don't use A[CS]_HELP_STRING inside an echo "...", as this is not how the macro is intended to be used, and it doesn't do much good anyway * Use AM_PROG_CC_C_O because AC_PROG_CC_C_O is not sufficient * Replaced the obsolete AC_LIBTOOL_DLOPEN and AM_PROG_LIBTOOL macros with a call to LT_INIT * Fixed the doc string for --disable-gui * Use AC_RUN_IFELSE instead of the obsolete AC_TRY_RUN * Can't use a variable in the doc string for --with-iodbc-filedsnpath, so replaced "$inidir" with "INIDIR" * Rewrote the config info summary at the end to use "cat < Fixed infinite loop in connection pool http://sourceforge.net/p/iodbc/mailman/message/29986083/ 2014-04-01 Sergey Malinin Fix build warning messages and using "strlen" function with unicode data - fix build warning messages - fix using strlen with unicode data 2014-04-01 Sergey Malinin Fix check, if Unicode driver is used http://sourceforge.net/p/iodbc/mailman/message/31801152/ 2014-04-01 iODBC Maintainer Merge branch 'feature/fix_pkg_config_and_odbc_config' into develop Fixed typo 2014-04-01 Sergey Malinin Fixes for the pkg-config file and iodbc-config http://sourceforge.net/p/iodbc/mailman/message/29721400/ 2014-04-01 Sergey Malinin Fix issue, when SQLCancel is call from another thread From a developer at MySQL/Sun/Oracle, an issue with SQLCancel() http://sourceforge.net/p/iodbc/mailman/message/31944526/ 2014-03-27 Sergey Malinin SQLInstallDriverEx does not work when driver library is read-only 2014-02-17 iODBC Maintainer Updated copyright year 2013-01-08 iODBC Maintainer Fixed missing declaration Fixed issue with dladdr prototype on linux Fixed issue with build dependancy when using make -j6 Fixed compiler warnings on newer Xcode compilers Mac OS X Added support for Mac OS X 10.8 Added support for Mac OS X 10.8 Fixed issue with SDKs path on Mac OS X 10.7 Added support for Mac OS X 10.7 Fixed deprecated macro 2013-01-04 Patrick van Kleef Updated copyright to include 2013 2012-03-27 Patrick van Kleef Added missing file 2012-03-27 Patrick van Kleef Merge branch 'release/v3.52.8' into develop Merge branch 'release/v3.52.8' Updated documentation Added info to NEWS Updated changelog Updated version number to 3.52.8 Added support for Mac OS X 10.7 2012-03-26 Patrick van Kleef Fixed list of files to be distributed Updated version to 3.52.8-rc1 Removed old .cvsignore files Merge branch 'feature/mac_ui' into develop Updated version of iODBC Demo to 1.1 Converted build rules to compile the UI from new .xib files Fixed problem installing CFMSupport Converted old .nib format to .xib format Added Mac OS X build files to ignore list Added more files to ignore Added initial .gitignore 2012-03-12 Patrick van Kleef * Updated copyright to 2012 2011-08-10 Patrick van Kleef * Fixed issue with using buffer after free * Updated copyright year 2010-09-04 Patrick van Kleef * Fixed use ssize_t where appropriate * Fixed compiler warning * Fixed version info * Fixed warnings * Fixed issue with strlen if param can be NULL * Fixed use ssize_t for length of string * Fixed tracing SQLGetData using multiple chunks * Fixed problem tracing on big-endian machines * Removed unused variables * Fixed wrong type label 2009-09-10 Patrick van Kleef * Fixed version *** empty log message *** *** empty log message *** * Updated version of package to 3.52.7 for final release * Updated library versions * Fixed loading libdrvproxy.so.2 and libiodbcadm.so.2 using major version number. * Removed libdrvproxy.{a|so} and libiodbcadm.{a|so} from packaging since they are not development libraries that user applications should try to link with. * Fixed instructions *** empty log message *** * Fixed distribution packaging 2009-09-09 Patrick van Kleef * Removed deprecated file * Removed space from file name * Moved iodbcunix.h from sql.h to sqltypes.h * Fixed description * Updated debian files * Fixed compiler warnings * Updated version info * Fixed compile flags * Fixed check for wchar.h on Mac framework build * Moved symbol files * Added install rules for iODBC CFM bridge * Added iODBC CFM Bridge code * Added support for overruling CFLAGS, CC and other environment vars * Updated Mac OS X build instructions * Fixed building/installing iODBC Demo Unicode version * Removed sudo from rules, user should perform 'sudo make install" 2009-09-08 Patrick van Kleef * Fixed portability between various versions of Mac OS X * Updated version info * Added support for building solaris 2.10 on AMD64 and Sparc * Added support for Mac OS X 10.6 *** empty log message *** * Added defines for Virtuoso ODBC SPASQL extensions * Fixed case label for x86_64 linux systems * Fixed compiler warning * FIxed namespace for internal dlopen functions * Added support for Mac OS X 10.6 * Added support for Mac OS X 10.5 2009-09-07 Patrick van Kleef * Fixed allow installation in temp directory structure * Fixed typo * More files to ignore * Fixed install rules * Fixed copyright year * Fixed support to quit application from decoration * Added iODBCdemo sample program for Mac OS X 2009-09-02 Patrick van Kleef * Fixed prototype * Fixed find relevant section instead of reading all entries in the file 2009-09-01 Patrick van Kleef *** empty log message *** * Ignore files from libtool 2.x * Set minimum requirement for auto* tools to match RedHat Enterprise 4 * Use newer RPM macros for building to fix building on x86_64 * Fixed configure to completely disable building UI extensions when using rpmbuild --define 'noadmin 1' ..... * Fixed prototype *** empty log message *** *** empty log message *** * Fixed group box size 2009-08-31 Patrick van Kleef * Fixed wrong text on tab 2009-08-30 Patrick van Kleef *** empty log message *** * Fixed unload bug deref wrong pointer * Added support for $S (sequence number) in TraceFile * When tracefile length has reached its limit, try to open a new tracefile * Fixed default window sizes * Fixed typos * Fixed typos * Updated copyright year to 2009 * Fixed licensing information * Fixed GTK based administrative code to use resizable windows 2009-06-24 Patrick van Kleef * Updated release number 2009-02-23 Patrick van Kleef * Moved Mac OS X gui components * Moved Mac OS X gui components 2009-02-16 Patrick van Kleef * Added support for Mac OS X 10.5 * Fixed missing function * Removed old endif 2009-01-30 Sergey Malinin * Added additional translations between unicode and ansi components (sm) * Added additional translations between unicode and ansi components (sm) 2008-10-30 Patrick van Kleef * Updated spec file to latest standards 2008-04-25 Patrick van Kleef * Fixed Connection Pooling UI 2008-03-14 Patrick van Kleef * Fixed bug checking for odbc_ver on connect handle 2007-10-08 Patrick van Kleef * Updated version to 3.52.6 for final release (pvk) *** empty log message *** * Updated version to 3.52.6 for final release (pvk) *** empty log message *** * Fixed problem returning memory allocation error when max length of buffer was set to 0. 2007-10-07 Patrick van Kleef *** empty log message *** * Updated instructions to get CVS tree from sourceforge archive * Fixed checking for driver version when not connected * Fixed typo * Fixed for openbsd * Fixed towlower on older Mac OS X systems * Use dummy towlower on systems that have no native support * Fixed wchar check for FreeBSD 4.8 (pvk) * Fixed checking pthread library on OSF 3.x and OSF 4.x (pvk) * Fixed problem with C variable scope (pvk) 2007-10-02 Patrick van Kleef * Removed AutoReqProv:no setting 2007-10-01 Patrick van Kleef * Disabled building/installing old libodbc.a as this can interfere with other driver managers * Fixed License keyword * Updated version of rpm 2007-09-10 Patrick van Kleef * Don't keep odbc mutex unnecessary long * Split locking section into smaller segements 2007-09-04 Patrick van Kleef * Fixed typos * Fixed return code when driver could not be found * Fixed error messages * Use SQLFetchScroll on ODBC 3.x * Added missing SQLStmtOptionA to export list * Fixed checking for driver version when not connected 2007-02-02 Sergey Malinin * Added initial support for gtk+ 2.x (sm) * Fixed Unicode bug in SQLBrowseConnect * Added SQLBrowseConnectW to export-symbol list (sm) 2007-01-08 Patrick van Kleef * Minor text changes (pvk) 2007-01-05 Patrick van Kleef *** empty log message *** * Updated version to 3.53.5 (pvk) * Added support for RedHat FC6 64bit (pvk) *** empty log message *** * Reverted incomplete patch (pvk) 2007-01-03 Sergey Malinin * Fixed buffer size calculation (sm) * Fixed problem connecting with FileDSN (sm) * Fixed missing newline when showing parameters (sm) 2006-12-21 Patrick van Kleef * Increased limit of tracedump char and hex data to 1000 lines max (pvk) * Limit the size of the tracefile to about 1Gb (pvk) 2006-12-21 Sergey Malinin * Fixed problems with FileDSN in GTK build (sm) 2006-12-15 Patrick van Kleef * Updated version to 3.52.5-rc2 * Added configure option to set default FileDSN directory (pvk) 2006-12-15 Sergey Malinin * Allow user to bypass connection check when adding a FileDSN (sm) 2006-12-12 Patrick van Kleef * Removed bogus free (pvk) * Removed duplicate error message box (pvk) 2006-12-11 Patrick van Kleef * Incorporated diff from debian web site (pvk) * Updated version to 3.52.5-rc1 * Fixed problem when driver has not yet been connected (pvk) * Use SQL_SUCCEEDED macro to increase readability (pvk) * Fixed problem always returning SQL_ERROR due to logic bug (pvk) * Call ODBC 2.x functions in driver if application uses ODBC 2.x only (pvk) 2006-09-25 Sergey Malinin * Call ODBC 2.x functions in driver if application uses ODBC 2.x only (sm) 2006-08-03 Patrick van Kleef * Added missing header to distribution 2006-07-17 Patrick van Kleef * Removed procid reference from code and simplified call mechanism (pvk) 2006-07-11 Patrick van Kleef * Simplified CALL_DRIVER and CALL_UDRIVER macros 2006-07-10 Patrick van Kleef * Merged FileDSN and ConnectionPooling support from iODBC-3_52_4-DEVEL * Merged FileDSN and ConnectionPooling support from iODBC-3_52_4-DEVEL * Merged FileDSN support from iODBC-3_52_4-DEVEL into HEAD * Use highlighting in overview screen (pvk) * Rewrote bootstrap script to be more verbose about programs/versions needed (pvk) 2006-04-27 Sergey Malinin * Skip {..} when parsing connect string (sm) 2006-03-21 Patrick van Kleef * Use localtime_r (pvk) 2006-03-06 Patrick van Kleef * Fixed typo in function prototype (pvk) 2006-03-03 Patrick van Kleef * Updated Info strings (pvk) 2006-02-24 Sergey Malinin * Let the driver manager call the setup dialogs for now and then call the driver with SQL_DRIVER_NOPROMPT (sm) 2006-02-13 Patrick van Kleef * Version information is inserted by installer scripts (pvk) * Added sccid to all sections to get string with load type into binary (pvk) 2006-02-08 Patrick van Kleef * Remove ppc64 from universal builds (pvk) 2006-02-03 Patrick van Kleef * Fixed include file problem on Mac OS X 10.3 (pvk) * Added realclean rule (pvk) 2006-01-26 Patrick van Kleef *** empty log message *** * Finalized iODBC-3.52.4 release (pvk) * Updated version number to 3.52.4 (pvk) * Add -Wl,+s to HP/UX builds to enable SHLIB_PATH handling (pvk) * Moved darwin specific -DNO_FRAMEWORKS from PORT.OpenLink to configure.in * Updated build instructions for Mac OS X (pvk) * Updated version number and build number in preparation for release (pvk) * Fixed copyright notice (pvk) * Added missing include directory (pvk) 2006-01-25 Patrick van Kleef * Added project files for Mac OS X 10.4 Universal builds (pvk) * Make it easier to change buildstyles (pvk) * Fixed order in which targets need to be installed (pvk) * Converted Xcode project files for Mac OS X 10.4 Universal builds (pvk) * Fixed bug in determining which version of Mac OS X we build on (pvk) * Cleanup Mac OS X project files (pvk) * Cleanup Mac OS X project files (pvk) * Cleanup Mac OS X project files (pvk) * Updated version number (pvk) 2006-01-24 Patrick van Kleef * Simplified building process (pvk) * Fixed include paths (pvk) * Fixed wchar_t issue on Mac OS X (pvk) * Added new version macros for Mac OS X build (pvk) * Fixed building and installing iodbctest and iodbctestw (pvk) * Files to ignore (pvk) * Added guard against including sqlext.h twice (pvk) * Fixed include paths building on Mac OS X (pvk) * Added proper header file for prototypes * Fixed typo in function name (pvk) * Fixed compiler warnings (pvk) * Fixed some compiler warnings (pvk) 2006-01-20 Patrick van Kleef * Clarify which version of the LGPL license this project adheres to (pvk) * Fixed temporary framework search paths * Fixed framework version for non-standard build (pvk) * Moved dlf.[ch] and unicode.[ch] to iodbcinst (pvk) * Use iodbcinst_common and gtk/libdrvproxy-gtk.la convenience libraries instead of referring to individual object files (pvk) * Use iodbcinst_common and gtk/libiodbcadm-gtk.la convenience libraries instead of referring to individual object files (pvk) * Added more functions to export (pvk) * Use new iodbcinst_common library so iodbc does not need to be linked against libiodbcinst. This created problems on various platforms like HP/UX with static link paths being inserted into the libiodbc.so library (pvk) * Created convenience library with common objects that are used in more than one place (pvk) * Moved dlf.[ch] and unicode.[ch] to iodbcinst (pvk) * Moved confirm.c and question.xpm from drvproxy/gtk to iodbcadm/gtk (pvk) 2006-01-18 Patrick van Kleef * If towlower does not exist and we cannot use Frameworks, then just return the original character (pvk) * Added support for Mac OS X 10.2 (pvk) * On AIX we prefer the cc_r7 compiler instead of the cc compiler (pvk) * Temporarily disabled --disable-odbc3 untill all parts of iODBC DM have been fixed to compile with ODBCVER=0x0250 (pvk) * Unicode and ANSI functions did not exist in ODBC 2.50 (pvk) 2006-01-17 Patrick van Kleef * Fixed errors when compiling iODBC for ODBC 2.50 specs (pvk) * Fixed ODBCVER (pvk) 2006-01-13 Patrick van Kleef * Added support for SUSE Linux on AMD opteron (pvk) * Added missing header files for function prototypes (pvk) 2006-01-12 Patrick van Kleef * Added support for building on Apple Mac OS X 10.4 ppc, ppc64 and i386 all in one (pvk) 2006-01-11 Patrick van Kleef * Allow # as extra comment character on reading the odbc.ini file. (pvk) * If subsequent SQLExecute returns SQL_ERROR, set handle state back to en_stmt_prepared and leave the prep_state as is. (pvk) * Fixed typo in local variable decl (pvk) 2005-11-07 Patrick van Kleef * Added missing file (pvk) *** empty log message *** * Finalized iODBC-3.52.3 release (pvk) * Fixed build issue with previously installed libraries (pvk) 2005-11-04 Patrick van Kleef * Fixed problem building on Mac OS X 64bit (pvk) * Apple does not provide certain frameworks in 64bit mode yet (pvk) * Added Unicode symbols (pvk) * Added option to build in current directory (pvk) * Updated DM build number and library version number (pvk) * Updated version number to 3.52.3 (pvk) * Added check for more wchar functions (pvk) * Added support for AIX 5.x (pvk) * Removed check for xml2 which is not needed for iODBC (pvk) * Added support for HP/UX Itanium (pvk) * Fixed support for building on Mac OS X 10.3 and 10.4 in Darwin mode (pvk) * Added detection for glibtoolize for Mac OS X build (pvk) * Apple does not provide certain frameworks in 64bit mode yet (pvk) 2005-10-08 Patrick van Kleef * Include config.h if present (pvk) * Fixed calculating end of buffer without lvalue cast as some compilers did not like this construction (pvk) * Ignore files from copied from autoconf/automake/libtool (pvk) * Resurrected mkinstalldirs (pvk) * Added timestamp to ENTER/EXIT trace lines to get better idea of where application time was spend; inside or outside of ODBC calls. (pvk) * Removed files that are distributed by autoconf/automake/libtoolize (pvk) * Updated build version and library version (pvk) * Fixed problem with truncated messages in ODBC_Error function (pvk) * C++ normally has wchar_t (pvk) * Fixed problem with symbol hiding unicode translation functions (pvk) 2005-09-12 Sergey Malinin * Avoid calling _iodbcdm_drvconn_dialbox twice (sm) 2005-09-12 Patrick van Kleef * Removed semicolon from end of statement block * Small code cleanup (pvk) 2005-09-12 Sergey Malinin * Set config mode before looking for driver name (sm) * Fixed problem with ODBC_BOTH_DSN (sm) 2005-08-30 Patrick van Kleef * Reordered InfoTypes based on ODBC version * Fixed problem with some types like SQL_POS_OPERATION and SQL_POSITIONED_STATEMENTS which where flagged ODBC 2.x only by mistake (pvk) 2005-08-22 Max Khon * Fixed NUL termination problem * DSN input was not disabled correctly (mk) * Fixed NUL termination problem (mk) 2005-08-16 Patrick van Kleef * Fixed minor build problems on Mac OS X * Allow both Xcode 1.5 and 2.1 style build directories (pvk) * Disable Carbon framework in Mac OS X 64bit port (pvk) * Fixed problem mixing framework type header files, which are prefixed with framework name, and internal header files (pvk) * Add iodbcinst.h to install target (pvk) * Do not distribute iodbc.h header anymore (pvk) 2005-08-15 Patrick van Kleef * Install iodbctest and iodbctestw in /Library/Application Support/iODBC/bin (pvk) * Fixed include files for Mac OS X framework build (pvk) 2005-08-03 Patrick van Kleef * Added 'reconnect' command to iodbctest (pvk) 2005-07-29 Sergey Malinin * Added defines for Mac OS X 10.3 and newer (sergei) * Fixed typo (sergei) 2005-07-27 Sergey Malinin * Improve the quality of error messages for dynamic linker problems (sergei) 2005-07-27 Patrick van Kleef * Added Max (pvk) 2005-07-27 Max Khon * Recalculate cbConnStrIn as szConnStrIn might have been changed by iodbcdm_drvconn_dialbox (mk) 2005-07-19 Patrick van Kleef * Changed SQL_DRIVER_PROMPT to SQL_DRIVER_COMPLETE which still allows drivers that have graphical setup screens to use them, but fixes a problem with the MyODBC driver which returns a very cryptic "No DSN entered". (pvk) 2005-07-16 Patrick van Kleef * Added initial support for pkg-config spec file (pvk) * Fixed problem with SQLDriverConnect when graphical library could not be found, the driver manager automatically returned an error when performing SQLDriverConnect (....., SQL_DRIVER_PROMPT). Instead we now silently continue to call the driver and hope it either asks for the missing connection parameters, or return an error. (pvk) * Added support for DSN-less connections (pvk) 2005-05-13 Patrick van Kleef * Renamed iodbcinst.h to odbcinst.h (pvk) * Replaced enum bool with int (pvk) * Use getprogname on Mac OS X 10.3 and above (pvk) * Fixed frameworkname for iODBCinst (pvk) * Added support for sqlucode.h (pvk) 2005-05-12 Patrick van Kleef * Renamed iodbcinst.h to odbcinst.h (pvk) * Renamed iodbcinst.h to odbcinst.h (pvk) 2005-03-22 Patrick van Kleef * Added missing unicode.[ch] into project file (pvk) 2005-03-14 Sergey Malinin * Added Unicode functions to gtk graphical code * Fixed small Unicode bugs (sm) 2005-03-09 Patrick van Kleef * Removed space from -D compile flag (pvk) 2005-03-03 Patrick van Kleef * Stubs for gtk code until we can fix the Unicode part (pvk) 2005-03-02 Sergey Malinin * Build iODBCadm as a bundle rather than a Framework * Fixed problems calling drvproxy code from iodbcadm (sm) * Added support for missing wchar functions (ep+sm) 2005-03-02 Patrick van Kleef * Indented code to improve readability (pvk) 2005-03-02 Sergey Malinin * Added support for iodbcinst Unicode functions (ep+sm) 2005-03-02 Patrick van Kleef * Updated debian build files with latest fixes from Christian (pvk) 2005-03-01 Patrick van Kleef * Ignore config.nice (pvk) * Explain which layouts are available instead of cryptic error (pvk) * Added extra configure flag --disable-libodbc to disable the building of the additional libodbc.so library some programs are linked against (pvk) 2005-02-15 Patrick van Kleef * Fixed problem compiling iodbctest.c with C++ compiler (pvk) 2005-02-14 Patrick van Kleef * Added initial support for building on MAC OS X 10.4 (pvk) * Don't stop the build process if strip fails on Darwin (pvk) 2005-02-14 Sergey Malinin * Fixed symbol clash between Oracle instant client and iODBC on Mac OS X (sergei) 2005-02-08 Patrick van Kleef * Removed static declaration from Done_iODBC (pvk) 2005-02-04 Patrick van Kleef *** empty log message *** * Finalized 3.52.2 release (pvk) * Put in final release stamp (pvk) * Added Mac OS X specific iodbc-config script for framework link (pvk) 2005-02-01 Patrick van Kleef * Ignore build directories (pvk) * Updated version number to 3.52.2 (pvk) * Added Port.OpenLink script to package distribution (pvk) * Fixed iODBC initialization code * Added global lock around SQLAllocHandleSTD (SQL_HANDLE_HENV) (pvk) * Close tracefile after the last environment handle has been freed (pvk) * Make sure trace_stop can be called multiple times (pvk) * Fixed iODBC initialization code * Added global lock around SQLAllocEnv/SQLAllocHandle (SQL_HANDLE_HENV) (pvk) * Do not stop tracing prematurely (pvk) 2005-01-31 Patrick van Kleef * Fixed whitespace (pvk) * Allow root to trace odbc sessions, but make sure we do not overwrite any existing files (pvk) * Changed parsing of TraceFile to avoid buffer overruns (pvk) * Added Driver Manager version to start of trace * Added date/time finished to end of trace * Changed date/time format (pvk) 2005-01-21 Patrick van Kleef * Build sample programs with static iODBC libraries (pvk) * Removed generated file (pvk) * Added script OpenLink uses to port iODBC as reference (pvk) * Added bootstrap.sh in package distribution * Added admin/gtk.m4 so target machines without GTK can still use bootstrap.sh to setup the automake/autoconf configuration (pvk) 2004-12-15 Patrick van Kleef * When a driver specific SQLSetConnectAttr fails return SQL_SUCCESS_WITH_INFO rather than failing the connection (pvk) * Only Darwin needs this special build rule (pvk) * Only call SQLGetDiagRec on allocated handles (pvk) * Fixed C++ prototype problems with older code on 32bit (pvk) * Use $DESTDIR/$libdir to make libodbc symlinks (pvk) 2004-11-03 Patrick van Kleef * Fixed argument check to be case insensitive (pvk) 2004-10-23 Patrick van Kleef * Fixed null pointer problem (pvk) 2004-10-15 Patrick van Kleef * Use returned size of buffer if possible instead of relying on SQL_NTS (pvk) 2004-10-04 Patrick van Kleef * Added DESTDIR in make install for packaging in different dir (pvk) 2004-09-29 Patrick van Kleef *** empty log message *** * Updated NEWS with highlights of new release * Added tag iODBC-3_52_1 to mark final release (pvk) 2004-09-29 Emmanuel Poitier * Fixed Mac OS X install problems (ep) 2004-09-29 Patrick van Kleef * Fixed RPM build/package issue on RedHat 9 (pvk) *** empty log message *** * Keep deprecated SQLROWCOUNT,SQLROWSETSIZE,SQLTRANSID and SQLROWOFFSET types around for backward compatibility (pvk) 2004-09-28 Patrick van Kleef * Added missing files for Mac OS X build (pvk) * Set project version to 3.52.1 (pvk) * Added support for SQL_BINARY fields (pvk) * Use SQL_DRIVER_PROMPT to call GUI setup if available (pvk) * Final fixes for SQLLEN definition (pvk) * Fixed problem with ODBCINT64 definition (pvk) * Make sure SQLGUID structure is the same size on both 32 and 64bit platforms (pvk) * Moved some typedefs around (pvk) * Small fixes to align with ms header file (pvk) * Explain prototype choice SQLColAttribute (pvk) * Mask out old and unused windows types (pvk) * Added compile time check for sizeof(long) (pvk) * Added symbolic tracing for SQLColAttribute (pvk) * Indentation + standard copyright header (pvk) 2004-09-10 Patrick van Kleef * Added new layer so drivers can be logically unloaded without being physically unloaded. This is needed to resolve an outstanding memory leak, while protecting the application from crashing if the unloaded driver registered an on_exit hook. A new flag UnloadSafe can be added to a driver to note it is safe to physically unload the driver. (pvk) 2004-08-26 Patrick van Kleef * Fixed SQLSetDescRec trace function (pvk) * Fixed "statement not reached" warning (pvk) * Converted SQLUINTEGER to SQLULEN for 64bit handling (pvk) 2004-08-20 Patrick van Kleef * Fixed build issue on non Mac OS X machines (pvk) 2004-08-20 Emmanuel Poitier * Fix to build non-framework version of iODBC on Mac OS X (ep) 2004-08-16 Patrick van Kleef * Enhanced support for tracing SQLGetFunctions (pvk) 2004-08-13 Patrick van Kleef * Increased size of output buffer for DSN to 1024 (pvk) 2004-07-13 Tim Haynes * Set basic permissions (th) 2004-07-13 Emmanuel Poitier * Added script to link Framework build into /usr/local/iODBC on Mac OS X * Fixed problem rewriting header files for Framework build (ep) 2004-07-13 Patrick van Kleef * Allow other ini files besides odbc.ini and odbcinst.ini to support FileDSN functions (pvk) * Added standard headers to get some basic typedefs like wchar_t * Added C calling conventions for C++ (pvk) * Replaces wchar.h with stdlib.h (pvk) 2004-07-13 Emmanuel Poitier * Small fixes for Mac OS X build (ep) 2004-07-07 Patrick van Kleef * Do not assume . is in PATH when reading the libiodbc.la file (pvk) * Make sure we use shl_open on HP/UX (pvk) * Removed INT64 and UINT64 types as they clash on various Unix versions (pvk) 2004-07-06 Patrick van Kleef * Added support for iodbcunix.h and iodbcext.h headers (pvk) * Fixed 64bit cast problems (pvk) * Fixed prototypes (pvk) * Use ssize_t and size_t for string lengths * Fixed 64bit cast issues (pvk) * Fixed 64bit cast problems (pvk) * Initial support for ODBC 3.52 API SQLLEN (pvk) * Initialize SQLGetPrivateProfileString return buffer to empty string (pvk) * Perform assignment in two steps for some older compilers (pvk) * Use _mandir macro for path to man pages (pvk) * Enhanced method for detecting pthread support on various platforms (pvk) * Use AC_HELP_STRING to format --help texts (pvk) * Handle UTF-8 sequences of 5 and 6 bytes * Skip bad UTF-8 sequences replacing them with a # in the trace (pvk) 2004-07-05 Patrick van Kleef * Fixed typo in HP/UX shared library name handling (pvk) 2004-06-24 Emmanuel Poitier * Added project build file for iodbctestw (ep) * Small fixes for Mac OS X build (ep) 2004-06-22 Patrick van Kleef * Small indentation fixes (pvk) * Fixed compiler warnings * Small indentation fixes (pvk) * Removed unused functions * Small indentation cleanups (pvk) 2004-06-21 Patrick van Kleef * Fixed C and C++ compiler warnings * Small indentation fixes (pvk) * Preparations for adding ODBC64 support (pvk) 2004-06-19 Patrick van Kleef * Removed obsolete FAR keyword (pvk) * Simplified version number maintenance (pvk) * Added initial man pages (pvk) 2004-06-18 Patrick van Kleef * Fixed problems in SQLSetScrollOption emulation when driver does not support this function (pvk) * Added checks to make sure all stages succeed properly (pvk) * Added extra tool needed to compile sample directory (pvk) * Export Unicode and ANSI names of ODBC functions (pvk) * Install sample source and Makefile in binary distributions (pvk) * Added Unicode support * Added extra datatypes (pvk) 2004-05-13 Patrick van Kleef * Added iodbcext.h (pvk) 2004-05-13 Sergey Malinin * Added support for SQLGetEnvAttr(SQL_ATTR_WCHAR_SIZE) extension (sm) 2004-04-20 Patrick van Kleef * Fixed NULL pointer dereference when connection fails (pvk) 2004-03-18 Emmanuel Poitier * Removed dependency on Carbon libraries for now so the driver manager works on non console sessions (ep) 2004-03-15 Patrick van Kleef * Increased input buffer to 4096 (pvk) 2004-02-24 Patrick van Kleef *** empty log message *** * Updated NEWS with highlights of new release * Updated version and build numbers to 3.51.2 (pvk) 2004-02-24 Tim Haynes * Fixed build problem on panther (th) 2004-02-23 Patrick van Kleef * Fixed build problem with older make programs (pvk) * Fixed problem building on FreeBSD * Clean symbolic links (pvk) * Regenerated ChangeLog (pvk) * Remove config.nice when making distributions (pvk) * Updated version information in preparation of final release (pvk) * Added --include-deps * Print comment on using --enable-maintainer-mode (pvk) 2004-02-23 Tim Haynes * Fixed problem building iodbctest program on Mac OS X (th) * Removed Framework build (th) * Check for pbxbuild (jaguar) or xcodebuild (panther) (th) 2004-02-23 Patrick van Kleef * Updated copyright string (pvk) * Added support for config.nice script (pvk) * Removed debug code (pvk) * Automatically regenerate libiodb.spec script when configure.in changes (pvk) 2004-02-20 Patrick van Kleef * Added --with-layout to simplify installation layouts for different distributions like Debian, Gentoo, FreeBSD etc (pvk) * Added missing file in distcheck (pvk) * Small documentation enhancements and clarifications (pvk) * Renewed build utilities (pvk) * Fixed license explaination * Fixed URL to source code on www.iodbc.org site (pvk) 2004-02-19 Patrick van Kleef * Fixed problem with finding install_libodbc.sh shell script (pvk) * If the allocation of the statement handle in the drivermanager fails, also release the statement handle in the driver (pvk) * Fixed prototype problem on Linux (pvk) 2004-02-18 Patrick van Kleef * Fixed typo in fprintf format (pvk) * Initialise native_error to 0 as some drivers do not set this field (pvk) 2004-02-18 Emmanuel Poitier * Increased size of local variables to accommodate larger input * Added SQLRowCount to display number of affected rows on DDL/DML statements (ep) * Removed compiler warning (ep) * Initialise some local variables (ep) * Added missing prototype (ep) * Updated Mac OS X build project (ep) 2004-02-18 Patrick van Kleef * Added support for displaying NativeError number * Added support for SQLDiagRec when compiling for ODBC 3.x (pvk) * Fixed problem with SQLCloseCursor * Replaced call to SQLFreeStmt (hstmt, SQL_CLOSE) with SQLCloseCursor when compiling for ODBC 3.x (pvk) * Removed call to SQLSetConnectOption(SQL_OPT_TRACEFILE) (pvk) * SQLCloseCursor should not return SQLState 24000 as this is up to the Driver not the DriverManager (pvk) 2004-02-17 Patrick van Kleef * Fixed compiler warnings * Fixed size calculation for variable length string and binary fields (pvk) * Fixed small compiler warnings * Use snprintf when available to guard against buffer overruns * Fixed problem with empty strings (pvk) * Added missing trace function for SQLSetDescRec (pvk) * Removed stale message handler (pvk) * Added support for asprintf and snprintf to guard against buffer overflows (pvk) * Create symbolic links for libodbc.a and libodbc.so for applications that need it (pvk) * Added support for snprintf (pvk) * Increased size of buf to fix potential stack overwrite (pvk) * Removed duplicate call to MEM_FREE (pvk) * Changed command line arguments for cvs2cl (pvk) * Added Tim (pvk) 2004-02-17 Tim Haynes * Small text clarifications (th) 2004-02-17 Patrick van Kleef * Added check for asnprintf and snprintf (pvk) * Added tracing to SQLSetDescRec (pvk) 2003-09-08 Patrick van Kleef * Added README.CVS to documentation (pvk) * Merged previous Changelogs into NEWS file * Use cvs2cl script to generate Changelog information from CVS (pvk) * Updated version and build numbers to 3.51.1 (pvk) * Added basic instructions for using the CVS tree (pvk) * Renamed bootstrap to bootstrap.sh and made it more developer friendly (pvk) 2003-09-07 Patrick van Kleef * Upgraded to libtool-1.4.3 (pvk) * Updated package information and version/build strings (pvk) * Rewrote check for Dl_info type (pvk) * Removed symbol clash on iodbc_version between various components (pvk) * Removed symbol clash on iodbc_version between various components (pvk) * Added check for OS dependent compilers and flags for building threaded programs (pvk) * Display version number of Driver Manager (pvk) * Removed symbol clash on iodbc_version between various components * Simplified getting version information from various components for iodbcadm-gtk (pvk) * Added check for const handling (pvk) 2003-09-05 Patrick van Kleef * Added check for FreeBSD wchar_t define (pvk) * Do not use -static on convenience libraries (pvk) 2003-09-04 Patrick van Kleef * Moved iodbc/iodbc.h to include/iodbc.h (pvk) 2003-09-04 Emmanuel Poitier * Updated build instructions for MyODBC on Mac OS X (ep) 2003-09-04 Patrick van Kleef * Use instead of (pvk) * Moved iodbc/iodbc.h to include/iodbc.h (pvk) 2003-09-03 Emmanuel Poitier * Small fixes for MAC OS X (ep) 2003-09-03 Patrick van Kleef * Added check for OS dependent libraries (pvk) 2003-09-03 Emmanuel Poitier * Small cleanups for MAC OS X build (ep) 2003-09-03 Patrick van Kleef * Small changes to fix problems indicated by gcc compiler warnings (pvk) * Fixed buffer size allocation using SQLGetPrivateProfileString * Always use a char buffer for SQLGetPrivateProfileString (pvk) * Use correct trace functions (pvk) 2003-09-02 Patrick van Kleef * Added checks for wchar.h and wcslen, wcscpy and wcsncpy and provide our own implementation if they do not exist in the standard C library (pvk) 2003-08-29 Patrick van Kleef * Fixed dependency problem between iodbc and iodbcinst (pvk) * Fixed state transition for SQLExecDirect (pvk) * Fixed state transitions for SQLFetch/SQLMoreresults (pvk) * Added libiodbcinst.la to the library dependency list (pvk) * Compile iodbcinst before iodbc (pvk) * Removed libiodbcinst.la as this is already implicit from libiodbc.la (pvk) * Added $(LIBADD_DL) to --static-libs (pvk) 2003-08-22 Patrick van Kleef * Added info for new release (pvk) * Updated version number to 3.51.00 to indicate start of new development cycle (pvk) * Merged iODBC-3_0_6-DEVEL tree onto main trunk (pvk) 2002-04-29 Patrick van Kleef * Added instructions on how to build MyODBC using the Mac OS X frameworks (pvk) * Wrote final entries for V3.0.6 release (pvk) 2002-04-29 Patrick van Kleef * Install iODBC frameworks always in /Library/Frameworks (pvk) * Fixed problems with iODBC header files when building with Mac OS X frameworks (pvk) 2002-04-29 Patrick van Kleef * Added relative search path for iODBC framework (pvk) 2002-04-29 Christian Hammers * Added packaging rules for the Debian project (ch) 2002-04-26 Emmanuel Poitier * Changed includes to for framework builds (ep) 2002-04-26 Patrick van Kleef * Added define in config.h for building GUI extentions (pvk) 2002-04-26 Emmanuel Poitier * Added initial build environment for Mac OS X framework (ep) * Use /Library/Preferences instead of the old /System/Library/Preferences (ep) * When using Apple Frameworks we need to provide the framework name (ep) * Cleaned some unused variables (ep) * If we are not compiling with GUI enabled, make sure we do not have any GUI references in our library (ep) * Cleaned some unused variables (ep) 2002-04-26 Emmanuel Poitier * Set default version if the package has not been configured (ep) * Add default path for MacOS X preferences (ep) 2002-04-25 Patrick van Kleef * Fixed GTK detection to enable GUI components * Fixed warnings from latest autoconf * Added check for DL_info datatype * Updated library version number to 3:6:1 (pvk) * Install the odbctest program with the rest of the package (pvk) 2002-04-25 Emmanuel Poitier * Create a new TOPLEVEL window if the user did not provide a valid window handle (ep) 2002-04-25 Patrick van Kleef * Fixed detection of Dl_info structure (pvk) * Makefile cleanups (pvk) * Ignore the autom4te.cache dir (pvk) * Updated RedHat RPM spec file to latest release (pvk) * Upgraded to automake 1.6.1 (pvk) * Only build .tar.gz and .zip distributions for now (pvk) 2002-03-14 Patrick van Kleef * Added support for automake 1.6, autoconf 2.53 and libtool 1.4.2 (pvk) * Updated comment to reflect dual LGPL/BSD license (pvk) * Updated comment to reflect dual LGPL/BSD license (pvk) * Added include of iodbc.h (pvk) * Fixed multiple definitions of CFLAGS in generated Makefile (pvk) 2002-01-31 Emmanuel Poitier * Added support for mapping SQLError to either SQLGetDiagRec or SQLError in the driver (epoitier) 2001-10-08 Patrick van Kleef * Print the version information of the connected driver * Renamed functions from DB_xxxx to ODBC_xxxx (pvk) 2001-09-11 Patrick van Kleef * Updated version number to 3.0.6 (pvk) * Wrote entries for V3.0.6 (pvk) * Fixed wrong argument to SQLEndTran call (pvk) * Fixed spelling errors (pvk) * Added state transitions to SQLFetchScroll (pvk) * Fixed typo in mapping SQL_COLUMN_NAME, SQL_COLUMN_NULLABLE, or SQL_COLUMN_COUNT in SQLColumnAttributes (pvk) * Fixed bug in cleanup code for descriptors * Fixed getting correct descriptor from driver * Return immediately if the arguments to SQLSetPos are wrong (pvk) * Added better support for skipping comments in string (pvk) * Added support for Driver specific connect options (pvk) 2001-06-12 Patrick van Kleef * Finalized notes for 3.0.5 release (pvk) * SQLMoreResults always returned SQL_NO_DATA_FOUND (pvk) 2001-06-11 Patrick van Kleef * Added new package libiodbc-admin (pvk) * Added support for multiple result sets (pvk) * Added configure flag --enable-gui to switch building the GUI parts of the iODBC administrator (pvk) * iODBC is now released under either the GNU Library General Public License or the BSD License. See files COPYING, COPYING.LGPL and COPYING.BSD for details (pvk) * Fixed portability issue with dladdr function (pvk) * Check if setenv function exists in standard libraries, otherwise use an internal copy (pvk) * Fixed typo (pvk) * Added sample odbcinst.ini file (pvk) 2001-06-07 Patrick van Kleef * Wrote entries for V3.0.5 (pvk) * More files to ignore (pvk) * Added new iodbcinst, iodbcadm, drvproxy directories (pvk) * Added new contributor (pvk) 2001-06-07 Emmanuel Poitier * Added new iodbcinst library (ep) 2001-06-07 Patrick van Kleef * Added modified BSD license file (pvk) 2001-06-07 Emmanuel Poitier * Added GUI frontend (ep) * Added new iodbcadm library and iodbcadm-gtk frontend (ep) 2001-06-06 Emmanuel Poitier * Rewrote SQLDriverConnect(..., SQL_DRIVER_PROMPT) to use GUI where appropriate (ep) * Added version and libname symbols (ep) * Fixed compiler warning on older compilers (ep) * Added dlopen support for Macintosh, Beos and MACX (ep) * Added support for Macintosh, Beos and MACX (ep) 2001-06-04 Patrick van Kleef * Only top Makefile.am needs AUTOMAKE_OPTIONS setting (pvk) * Added notes (pvk) * More files to ignore (pvk) * Add -f to gzip (pvk) * More files to ignore (pvk) * Some files to ignore (pvk) 2001-06-04 Patrick van Kleef * Added new config.h (generated from configure.in) (pvk) * Linux RPM spec file now automatically contains proper version number (pvk) * Set version number to 3.0.4 (pvk) 2001-06-04 Patrick van Kleef * Added new config.h (generated from configure.in) (pvk) * The libiodbc.spec file was moved to the admin directory (pvk) * Updated version number to 3.0.4 (pvk) * Renamed config.h to iodbc.h (pvk) 2001-06-04 Patrick van Kleef * Renamed config.h to iodbc.h (pvk) * Added new config.h (generated from configure.in) (pvk) 2001-06-04 Patrick van Kleef * Linux RPM spec file now automatically contains proper version number (pvk) * Major archive restructuring in preparation of adding iodbcinst code (pvk) * Major archive restructuring in preparation of adding iodbcinst code (pvk) * Major archive restructuring in preparation of adding iodbcinst code (pvk) * Major archive restructuring in preparation of adding iodbcinst code (pvk) 2001-06-01 Patrick van Kleef * Added support for automake 1.4-p2, autoconf 2.50 and libtool 1.4 (pvk) * Fixed problem with shl_unload on HP/UX (pvk) * iODBC does not need a handle to itself on HP/UX (pvk) 2001-06-01 Patrick van Kleef * Added usage information when called with -? (pvk) * Added more datatypes (pvk) 2001-06-01 Patrick van Kleef * Rewrote DYLD support for MacOS X/Darwin 1.2 (pvk) * Disallow root to start a debug session as this is a security risk (pvk) * Added checks for ODBC 3.x date, time and timestamp defines (pvk) * Return Driver Type name instead of DSN Description (pvk) * Removed stub for SQLGetPrivateProfileString (pvk) 2000-07-05 Patrick van Kleef * Translation of SQL_OJ_CAPABILITIES should only be done in ODBC 3.x (todd) * Fixed typo (pvk) 2000-06-14 Patrick van Kleef * Fixed initialization of cip flag which resulted in function sequence errors (pvk) * Added call to SQLCloseCursor for ODBC 3.x (pvk) 2000-02-01 Patrick van Kleef * Wrote ChangeLog entries for V3.0.1 and V3.0.2 distribution (pvk) * Incremented package version number to 3.0.2 (pvk) * SQLNumResult calls is also called from within iODBC, so it needs a wrapper function (pvk) * Check the pointer instead of the content (pvk) 2000-01-28 Patrick van Kleef * Added extra check for ANSI C Compilers (pvk) * Forgot to update pcbDSN and pcbDesc fields (pvk) * Incremented package version number to 3.0.1 (pvk) * Incremented package version number to 3.0.1 (pvk) * Added new argument --libtool-libs (pvk) * Added check for pthread library (pvk) * Added new header file for thread-safe codebase (pvk) * Added thread-safe macros to the codebase (pvk) * Added thread-safe macros and definitions (pvk) 2000-01-26 Patrick van Kleef * Use $(MAKE) instead of plain make command (pvk) 2000-01-21 Patrick van Kleef * Ignore generated files (pvk) * Removed generated files in favor of the bootstrap script (pvk) * Added shell script for freshly checked out CVS tree (pvk) 1999-12-16 Patrick van Kleef * Refreshed generated files (pvk) * Wrote ChangeLog entries for V3.0.0 distribution (pvk) * Start using some of the ODBC 3.x API calls (pvk) * Notify a ODBC 2.x driver when the internal rowset size changes (pvk) * Added support for SQLCloseCursor (pvk) * Added backward compatibility for SQL_OJ_CAPABILITIES call to ODBC 2.x driver (pvk) * Updated RPM specification file to reflect the new build (pvk) 1999-12-16 Patrick van Kleef * Set library version for ODBC 3.x interface to 3:0:1 (pvk) * Set library version for ODBC 2.x interface to 2:51:0 (pvk) 1999-12-15 Patrick van Kleef * Added initial support for MacOS X aka Rhapsody (pvk) * Added initial support for MacOS X aka Rhapsody (pvk) 1999-12-13 Patrick van Kleef * Only use the [ODBC Data Sources] section to populate the SQLDataSources call * Simplified mapping of API calls to function pointers or text (pvk) * Removed unneeded defines (pvk) 1999-12-10 Patrick van Kleef * Ignore iodbc-config generated script (pvk) * Refreshed generated files (pvk) * Added config script to get information about the installed version of iODBC. (pvk) * Set default directory for system wide odbc.ini to /etc (pvk) * Rewrote checks for dlopen checking (pvk) 1999-12-09 Patrick van Kleef * Removed spurious #endif (pvk) 1999-12-09 George Kodinov * Added initial ODBC 3.x support (gk) * Added initial ODBC 3.x support (gk) 1999-12-09 Patrick van Kleef * Changed to ODBC 3.x mode (pvk) * Regenerated files (pvk) * Added new contributor (pvk) * Regenerated files (pvk) * Reran libtoolize version 1.3.4 (pvk) 1999-12-09 Patrick van Kleef * Added maintainer mode (pvk) * Added support for ODBC 2.x and ODBC 3.x (pvk) 1999-12-09 Patrick van Kleef * Rewrote header files to support ODBC 3.5 specification (pvk) 1999-06-25 Patrick van Kleef * Added latest changes to the log * Changed typedef for SQLHENV, SQLHDBC, SQLSTMT to be void * instead of SQLINTEGER. Although this is contra to the official header files, it makes life a lot easier when you have ODBC 2.0 code you want to use * Added latest changes to the log * Updated README to reflect the current state of the project (pvk) 1999-06-25 Patrick van Kleef * Added sql.h, sqlext.h, sqltypes.h to the list of installable headers (pvk) * Set AutoReqProv flag to yes to allow rpm to automatically calculate dependancies (pvk) 1999-06-25 Patrick van Kleef * Regenerated file (pvk) * Fixed check for default SYS_ODBC_INI when configure --prefix=/xxx is used (pvk) * Regenerated (pvk) * Added sql.h, sqlext.h and sqltypes.h to the list of installable include files (pvk) * Use sql.h and sqlext.h instead of the nonstandard names isql.h and isqlext.h (pvk) * Renamed isql.h, isqlext.h and isqltypes.h to sql.h sqlext.h and sqtypes.h and added dummy files for backward compatibility (pvk) * Return SQL_SUCCESS on setting SQL_OPT_TRACEFILE (pvk) * Removed empty line as this causes confusion to some linkers (pvk) * Added target for binary tar distribution (pvk) 1999-04-26 Patrick van Kleef * Simplify building RPMS files on Linux (pvk) * Removed CVS Id tag from header so Makefile.am and the generated Makefile.in can be committed together rather than separate (pvk) * Search for odbc.ini in various places (pvk) * Set default system wide odbc.ini to /etc/odbc.ini if not configured otherwise (pvk) * Checked in generated files (pvk) * Figure out location for system wide odbc.ini (pvk) 1999-04-24 Patrick van Kleef * Checked in generated files (pvk) * Use -I$(top_srcdir) to find the include files (pvk) * Added source directory path to export file iodbc.exp (pvk) * Checked in generated file (pvk) * Added main.c to the list of files to be distributed. (pvk) * Checked in generated file (pvk) * Added iodbc.exp file which contains the symbol list of all symbols we want to export using libtool. (pvk) 1999-04-24 Patrick van Kleef * Added isqltypes.h (pvk) * Updated library version to 2.0.50 (pvk) 1999-04-24 Patrick van Kleef * Added Windows link file for iodbc.dll (pvk) * Include isqltypes.h as a global include rather than a local include file (pvk) * Small code cleanups (pvk) 1999-04-24 Patrick van Kleef * Code cleanups (pvk) * Fixed errors in Windows macros (pvk) 1999-04-24 Patrick van Kleef * Checked in new generated files (pvk) 1999-04-24 Patrick van Kleef * Updated version number of package to 2.50.2 (pvk) * Updated version number of library to 2:50:0 (pvk) 1999-04-24 Patrick van Kleef * Updated to more recent version of libtool 1.2f (pvk) * Code cleanups (pvk) * Added rudementary SQLGetPrivateProfileString call (pvk) * Close open file handle (pvk) * Use the internal form of the handle instead of the external representation (pvk) * Fixed some typo's (pvk) * Use the libtool define to check for underscore representation (pvk) * Added NEAR definition and HWND type for UNIX/VMS (pvk) 1999-03-22 Patrick van Kleef * Fixed a couple of typos (pvk) 1999-03-17 Patrick van Kleef * Added missing arguments to prototype (pvk) * Added support for SQL_DATE, SQL_TIME and SQL_TIMESTAMP (pvk) 1999-03-17 Per Schroder * Added support for VMS (ps) 1999-03-17 Patrick van Kleef * Added Per Schroder who contributed the VMS patches to the iODBC project 1999-03-17 Per Schroder * Added support for VMS (ps) * Added support for VMS (ps) 1999-03-17 Patrick van Kleef * Wrote new handle validation checks to make the driver manager more resistant to handle misuse (pvk) * Rewrote all function prototypes to conform to ODBC 2.51 standard (pvk) * Rewrote all function prototypes to conform to ODBC 2.51 standard (pvk) * Added file isqltypes.h (pvk) * Rewrote all function prototypes to conform to ODBC 2.51 standard (pvk) 1999-03-16 Patrick van Kleef * Added handle type definitions (pvk) * Added new file with ODBC 2.51 types (pvk) * Added full support for ODBC 2.51 specifications (pvk) 1999-01-25 Patrick van Kleef * Removed 2 copyright sccs stamps and comments as requested by Ke Jin (pvk) 1999-01-19 Patrick van Kleef * Prefix should of cause be / instead of /usr if we want to install /etc/odbc.ini * Added support for automake 1.4, autoconf 2.13 and libtool 1.2a * Added sample odbc.ini file * Changed reading of tokens from .ini file. We should really rewrite all of these functions. * Added specification file for Linux RPM builds * Use NEED_USCORE to set _SQL if needed * Removed as automake/autoconf/libtool can do this portable * Added to comply to GNU standards * Set default options * Added unwanted files * Version number is now set to 2.50 * Moved Changes.log into ChangeLog to comply with GNU standards * Added new files to comply with standard GNU source packages * Added missing typedefs, constants and prototypes * Moves HWND typedef to isql.h * Added proper support for SQLDataSources * SQLDrivers now returns SQL_NO_MORE_DATA so applications will not go into infinite loops when trying to retrieve driver information * Removed hwnd argument from SQLBrowseConnect as this is not part of the API * Added sample directory framework * Removed as libtool does this automatically 1999-01-18 Patrick van Kleef * Moved iODBC licensing to LGPL as per Ke Jin's request * Removed old build code * Added information on LGPL licensing * Re-indented code * Code cleanups * Added LGPL notice in all opening comments 1998-12-27 Patrick van Kleef * Added new comment to beginning of file * Reindented code * Checkin of initial version from Ke Jin * Checkin of initial version from Ke Jin libiodbc-3.52.16/README_MACOSX.md0000664000175000017500000001373614424170750012731 00000000000000# How to build iODBC for macOS (formerly known as _OS X_ and _Mac OS X_) Copyright © 1996-2023 OpenLink Software ## Method 1: Using Project builder This build method only works for Xcode 8.0 or newer. This version of Xcode was first supported on macOS El Capitan (10.11), however the resulting binaries are backward-compatible with OS X Mavericks (10.9) and newer. OpenLink uses build environments on macOS Mojave (10.14) and macOS Big Sur (11.x) to produce suitable notarized installers with graphical components. To build iODBC components yourself, you will first need to install the latest Mac OS X Developer Packages, which you can download from . Then, execute the following commands in a terminal session, to build all the frameworks and demo applications: ```shell $ cd mac $ make ``` After building the iODBC libraries and applications, you have to install them on your system with the command: ```shell $ sudo make install ``` This installs the `iODBCinst` and `iODBC` frameworks into — ```shell /Library/Frameworks/iODBC.framework /Library/Frameworks/iODBCinst.framework ``` — and the test applications `iodbctest` and `iodbctestw` into — ```shell /Library/Application Support/iODBC/bin ``` — and the iODBC Administrator and iODBC Demo applications in — ```shell /Applications/iODBC ``` ### `iODBC Administrator.app` Now that you have installed the iODBC frameworks on your system, you will be able to use ODBC applications or build your own applications using the iODBC API. Once you have installed an ODBC Driver, you can configure and test a new ODBC DSN, using either the 32-bit Cocoa UI, which can configure and test any ODBC driver that is built in Universal mode — ```shell /Applications/iODBC/iODBC Administrator.app ``` — or the 64-bit version, which can configure drivers that only support a 64-bit Cocoa UI — ```shell /Applications/iODBC/iODBC Administrator64.app ``` ### Test DSN connection Once you have configured a DSN, you will be able to make a connection using the `iodbctest` tool which is located at — ```shell /Library/Application Support/iODBC/bin/iodbctest ``` ## Method 2: Using `configure` and `make` The iODBC package can also be built like any other Open Source package not using any frameworks. This build method still works with older versions of Xcode. On OS X Yosemite (10.10) and newer, Apple removed a number of programs from their **`Xcode.app`** commandline installation, including `autoconf`, `automake`, `libtool`, and some other tools needed to build iODBC from a newly checked out GIT tree. We suggest using the [HomeBrew package manager](http://brew.sh/) to install these tools, according to their documentation. To build the libraries, open up a terminal session in **`Terminal.app`** or similar, and execute the following commands: ```shell $ sh autogen.sh $ ./configure $ make ``` To install the header files and libraries in `/usr/local`, execute the following command as an administrator, and provide that user's password when prompted: ```shell $ sudo make install ``` Note that, by default, this will build components that only run on the CPU type you are building on, so `ppc` on very old machines, `x86` on early CoreDuo machines, `x86_64` on recent Intel models, and `arm64` on current Apple Silicon models. You can also build iODBC components that support multiple CPU architectures — either **Universal** components that support `ppc`, `x86`, and/or `x86_64`; or **Universal2** components that support `x86_64` (including as emulated by Rosetta2) and `arm64`. ### Mac OS X Leopard (10.5) and Mac OS X Snow Leopard (10.6) The following commands will build a release of iODBC that supports Mac OS X Leopard (10.5) as well as Mac OS X Snow Leopard (10.6), on `ppc` (including as emulated by Rosetta), `x86`, and `x86_64`: ```shell $ CFLAGS="-O -arch ppc -arch i386 -arch x86_64" $ CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX10.5.sdk" $ CFLAGS="$CFLAGS -mmacosx-version-min=10.5" $ export CFLAGS $ sh autogen.sh $ ./configure \ --disable-dependency-tracking \ --prefix=/usr/local/iODBC.universal $ make $ sudo make install ``` ### Mac OS X Lion (10.7) and OS X Mountain Lion (10.8) The following commands will build a release of iODBC that works on Mac OS X Lion (10.7) and OS X Mountain Lion (10.8): ```shell $ CFLAGS="-O -arch i386 -arch x86_64" $ CFLAGS="$CFLAGS -mmacosx-version-min=10.7" $ export CFLAGS $ sh autogen.sh $ ./configure \ --disable-dependency-tracking \ --prefix=/usr/local/iODBC.universal $ make $ sudo make install ``` ### OS X Mavericks (10.9) through macOS Big Sur (11.x) on `x86` or `x86_64` (including Rosetta2 emulation) The following commands will build a release of iODBC that works on OS X Mavericks (10.9) through macOS Ventura (13.x), supporting other components built for `x86` (through macOS Mojave (10.14), where Apple dropped support for 32-bit components) or `x86_64` (including Rosetta2 emulation): ```shell $ CFLAGS="-O -arch i386 -arch x86_64" $ CFLAGS="$CFLAGS -mmacosx-version-min=10.9" $ export CFLAGS $ sh autogen.sh $ ./configure \ --disable-dependency-tracking \ --prefix=/usr/local/iODBC.universal $ make $ sudo make install ``` ### macOS Big Sur (11.x) through macOS Ventura (13.x) on `x86_64` (including Rosetta2 emulation) or `arm64` (Apple Silicon a/k/a M1 or M2) The following commands will build a release of iODBC that works on macOS Big Sur (11.x) through macOS Ventura (13.x), running on Intel (`x86_64`) or Apple Silicon (`arm64` a/k/a `M1` or `M2`): ```shell $ CFLAGS="-O -arch arm64 -arch x86_64" $ CFLAGS="$CFLAGS -mmacosx-version-min=10.9" $ export CFLAGS $ sh autogen.sh $ ./configure \ --disable-dependency-tracking \ --prefix=/usr/local/iODBC.universal $ make $ sudo make install ``` ### Test DSN connection Once you have installed an ODBC driver and configured a DSN, you will be able to make a connection using the `iodbctest` tool which is located at — /usr/local/iODBC.universal/bin/iodbctest libiodbc-3.52.16/iodbcinst/0000775000175000017500000000000014424171427012426 500000000000000libiodbc-3.52.16/iodbcinst/SQLInstallDriverManager.c0000664000175000017500000001061514424170750017150 00000000000000/* * SQLInstallDriverManager.c * * $Id$ * * These functions intentionally left blank * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include "unicode.h" #include "iodbc_error.h" extern BOOL InstallDriverPath (LPSTR lpszPath, WORD cbPathMax, WORD * pcbPathOut, LPSTR envname); BOOL INSTAPI SQLInstallDriverManager (LPSTR lpszPath, WORD cbPathMax, WORD * pcbPathOut) { BOOL retcode = FALSE; /* Check input parameters */ CLEAR_ERROR (); if (!lpszPath || !cbPathMax) { PUSH_ERROR (ODBC_ERROR_INVALID_BUFF_LEN); goto quit; } retcode = InstallDriverPath (lpszPath, cbPathMax, pcbPathOut, "ODBCMANAGER"); quit: return retcode; } BOOL INSTAPI SQLInstallDriverManagerW (LPWSTR lpszPath, WORD cbPathMax, WORD FAR * pcbPathOut) { char *_path_u8 = NULL; BOOL retcode = FALSE; if (cbPathMax > 0) { if ((_path_u8 = malloc (cbPathMax * UTF8_MAX_CHAR_LEN + 1)) == NULL) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } } retcode = SQLInstallDriverManager (_path_u8, cbPathMax * UTF8_MAX_CHAR_LEN, pcbPathOut); if (retcode == TRUE) { dm_StrCopyOut2_U8toW ((SQLCHAR *)_path_u8, lpszPath, cbPathMax, pcbPathOut); } done: MEM_FREE (_path_u8); return retcode; } libiodbc-3.52.16/iodbcinst/inifile.c0000664000175000017500000010732414424170750014136 00000000000000/* * inifile.c * * $Id$ * * Configuration File Management * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include #ifndef _MAC #include #include #endif #include #include #include "inifile.h" #include "misc.h" #if !defined(WINDOWS) && !defined(WIN32) && !defined(OS2) && !defined(macintosh) # include # define UNIX_PWD #endif extern BOOL ValidDSN (LPCSTR lpszDSN); static PCFGENTRY __iodbcdm_cfg_poolalloc (PCONFIG p, unsigned int count); static int __iodbcdm_cfg_parse (PCONFIG pconfig); /*** READ MODULE ****/ #ifndef O_BINARY #define O_BINARY 0 #endif #ifdef _MAC static int strcasecmp (const char *s1, const char *s2) { int cmp; while (*s1) { if ((cmp = toupper (*s1) - toupper (*s2)) != 0) return cmp; s1++; s2++; } return (*s2) ? -1 : 0; } #endif /* * Initialize a configuration */ int _iodbcdm_cfg_init (PCONFIG *ppconf, const char *filename, int doCreate) { PCONFIG pconfig; *ppconf = NULL; if (!filename) return -1; if ((pconfig = (PCONFIG) calloc (1, sizeof (TCONFIG))) == NULL) return -1; pconfig->fileName = strdup (filename); if (pconfig->fileName == NULL) { _iodbcdm_cfg_done (pconfig); return -1; } /* If the file does not exist, try to create it */ if (doCreate && access (pconfig->fileName, 0) == -1) { int fd; fd = creat (filename, 0644); if (fd) close (fd); } if (_iodbcdm_cfg_refresh (pconfig) == -1) { _iodbcdm_cfg_done (pconfig); return -1; } *ppconf = pconfig; return 0; } /* * Free all data associated with a configuration */ int _iodbcdm_cfg_done (PCONFIG pconfig) { if (pconfig) { _iodbcdm_cfg_freeimage (pconfig); if (pconfig->fileName) free (pconfig->fileName); free (pconfig); } return 0; } /* * Free the content specific data of a configuration */ int _iodbcdm_cfg_freeimage (PCONFIG pconfig) { char *saveName; PCFGENTRY e; unsigned int i; if (pconfig->image) free (pconfig->image); if (pconfig->entries) { e = pconfig->entries; for (i = 0; i < pconfig->numEntries; i++, e++) { if (e->flags & CFE_MUST_FREE_SECTION) free (e->section); if (e->flags & CFE_MUST_FREE_ID) free (e->id); if (e->flags & CFE_MUST_FREE_VALUE) free (e->value); if (e->flags & CFE_MUST_FREE_COMMENT) free (e->comment); } free (pconfig->entries); } saveName = pconfig->fileName; memset (pconfig, 0, sizeof (TCONFIG)); pconfig->fileName = saveName; return 0; } /* * This procedure reads an copy of the file into memory * caching the content based on stat */ int _iodbcdm_cfg_refresh (PCONFIG pconfig) { struct stat sb; char *mem; int fd; if (pconfig == NULL || stat (pconfig->fileName, &sb) == -1) return -1; /* * If our image is dirty, ignore all local changes * and force a reread of the image, thus ignoring all mods */ if (pconfig->dirty) _iodbcdm_cfg_freeimage (pconfig); /* * Check to see if our incore image is still valid */ if (pconfig->image && sb.st_size == pconfig->size && sb.st_mtime == pconfig->mtime) return 0; /* * Now read the full image */ if ((fd = open (pconfig->fileName, O_RDONLY | O_BINARY)) == -1) return -1; mem = (char *) malloc (sb.st_size + 1); if (mem == NULL || read (fd, mem, sb.st_size) != sb.st_size) { free (mem); close (fd); return -1; } mem[sb.st_size] = 0; close (fd); /* * Store the new copy */ _iodbcdm_cfg_freeimage (pconfig); pconfig->image = mem; pconfig->size = sb.st_size; pconfig->mtime = sb.st_mtime; if (__iodbcdm_cfg_parse (pconfig) == -1) { _iodbcdm_cfg_freeimage (pconfig); return -1; } return 1; } #define iseolchar(C) (strchr ("\n\r\x1a", C) != NULL) #define iswhite(C) (strchr ("\f\t ", C) != NULL) static char * __iodbcdm_cfg_skipwhite (char *s) { while (*s && iswhite (*s)) s++; return s; } static int __iodbcdm_cfg_getline (char **pCp, char **pLinePtr) { char *start; char *cp = *pCp; while (*cp && iseolchar (*cp)) cp++; start = cp; if (pLinePtr) *pLinePtr = cp; while (*cp && !iseolchar (*cp)) cp++; if (*cp) { *cp++ = 0; *pCp = cp; while (--cp >= start && iswhite (*cp)); cp[1] = 0; } else *pCp = cp; return *start ? 1 : 0; } static char * rtrim (char *str) { char *endPtr; if (str == NULL || *str == '\0') return NULL; for (endPtr = &str[strlen (str) - 1]; endPtr >= str && isspace (*endPtr); endPtr--); endPtr[1] = 0; return endPtr >= str ? endPtr : NULL; } /* * Parse the in-memory copy of the configuration data */ static int __iodbcdm_cfg_parse (PCONFIG pconfig) { int isContinue, inString; char *imgPtr; char *endPtr; char *lp; char *section; char *id; char *value; char *comment; if (_iodbcdm_cfg_valid (pconfig)) return 0; endPtr = pconfig->image + pconfig->size; for (imgPtr = pconfig->image; imgPtr < endPtr;) { if (!__iodbcdm_cfg_getline (&imgPtr, &lp)) continue; section = id = value = comment = NULL; /* * Skip leading spaces */ if (iswhite (*lp)) { lp = __iodbcdm_cfg_skipwhite (lp); isContinue = 1; } else isContinue = 0; /* * Parse Section */ if (*lp == '[') { section = __iodbcdm_cfg_skipwhite (lp + 1); if ((lp = strchr (section, ']')) == NULL) continue; *lp++ = 0; if (rtrim (section) == NULL) { section = NULL; continue; } lp = __iodbcdm_cfg_skipwhite (lp); } else if (*lp != ';' && *lp != '#') { /* Try to parse * 1. Key = Value * 2. Value (iff isContinue) */ if (!isContinue) { /* Parse ` = ..' */ id = lp; if ((lp = strchr (id, '=')) == NULL) continue; *lp++ = 0; rtrim (id); lp = __iodbcdm_cfg_skipwhite (lp); } /* Parse value */ inString = 0; value = lp; while (*lp) { if (inString) { if (*lp == inString) inString = 0; } else if (*lp == '"' || *lp == '\'') inString = *lp; else if ((*lp == ';' || *lp == '#') && iswhite (lp[-1])) { *lp = 0; comment = lp + 1; rtrim (value); break; } lp++; } } /* * Parse Comment */ if (*lp == ';' || *lp == '#') comment = lp + 1; if (_iodbcdm_cfg_storeentry (pconfig, section, id, value, comment, 0) == -1) { pconfig->dirty = 1; return -1; } } pconfig->flags |= CFG_VALID; return 0; } int _iodbcdm_cfg_storeentry ( PCONFIG pconfig, char *section, char *id, char *value, char *comment, int dynamic) { PCFGENTRY data; if ((data = __iodbcdm_cfg_poolalloc (pconfig, 1)) == NULL) return -1; data->flags = 0; if (dynamic) { if (section) section = strdup (section); if (id) id = strdup (id); if (value) value = strdup (value); if (comment) comment = strdup (value); if (section) data->flags |= CFE_MUST_FREE_SECTION; if (id) data->flags |= CFE_MUST_FREE_ID; if (value) data->flags |= CFE_MUST_FREE_VALUE; if (comment) data->flags |= CFE_MUST_FREE_COMMENT; } data->section = section; data->id = id; data->value = value; data->comment = comment; return 0; } static PCFGENTRY __iodbcdm_cfg_poolalloc (PCONFIG p, unsigned int count) { PCFGENTRY newBase; unsigned int newMax; if (p->numEntries + count > p->maxEntries) { newMax = p->maxEntries ? count + p->maxEntries + p->maxEntries / 2 : count + 4096 / sizeof (TCFGENTRY); newBase = (PCFGENTRY) calloc (newMax, sizeof (TCFGENTRY)); if (newBase == NULL) return NULL; if (p->entries) { memcpy (newBase, p->entries, p->numEntries * sizeof (TCFGENTRY)); free (p->entries); } p->entries = newBase; p->maxEntries = newMax; } newBase = &p->entries[p->numEntries]; p->numEntries += count; return newBase; } /*** COMPATIBILITY LAYER ***/ int _iodbcdm_cfg_rewind (PCONFIG pconfig) { if (!_iodbcdm_cfg_valid (pconfig)) return -1; pconfig->flags = CFG_VALID; pconfig->cursor = 0; return 0; } /* * returns: * 0 success * -1 no next entry * * section id value flags meaning * !0 0 !0 SECTION [value] * !0 !0 !0 DEFINE id = value|id="value"|id='value' * !0 0 !0 0 value * 0 0 0 EOF end of file encountered */ int _iodbcdm_cfg_nextentry (PCONFIG pconfig) { PCFGENTRY e; if (!_iodbcdm_cfg_valid (pconfig) || _iodbcdm_cfg_eof (pconfig)) return -1; pconfig->flags &= ~(CFG_TYPEMASK); pconfig->id = pconfig->value = NULL; while (1) { if (pconfig->cursor >= pconfig->numEntries) { pconfig->flags |= CFG_EOF; return -1; } e = &pconfig->entries[pconfig->cursor++]; if (e->section) { pconfig->section = e->section; pconfig->flags |= CFG_SECTION; return 0; } if (e->value) { pconfig->value = e->value; if (e->id) { pconfig->id = e->id; pconfig->flags |= CFG_DEFINE; } else pconfig->flags |= CFG_CONTINUE; return 0; } } } int _iodbcdm_cfg_find (PCONFIG pconfig, char *section, char *id) { int atsection; if (!_iodbcdm_cfg_valid (pconfig) || _iodbcdm_cfg_rewind (pconfig)) return -1; atsection = 0; while (_iodbcdm_cfg_nextentry (pconfig) == 0) { if (atsection) { if (_iodbcdm_cfg_section (pconfig)) return -1; else if (_iodbcdm_cfg_define (pconfig)) { char *szId = _iodbcdm_remove_quotes (pconfig->id); int bSame; if (szId) { bSame = !strcasecmp (szId, id); free (szId); if (bSame) return 0; } } } else if (_iodbcdm_cfg_section (pconfig) && !strcasecmp (pconfig->section, section)) { if (id == NULL) return 0; atsection = 1; } } return -1; } /*** WRITE MODULE ****/ /* * Change the configuration * * section id value action * -------------------------------------------------------------------------- * value value value update '=' in section
* value value NULL delete '' from section
* value NULL NULL delete section
*/ int _iodbcdm_cfg_write ( PCONFIG pconfig, char *section, char *id, char *value) { PCFGENTRY e, e2, eSect; int idx; int i; if (!_iodbcdm_cfg_valid (pconfig) || section == NULL) return -1; /* find the section */ e = pconfig->entries; i = pconfig->numEntries; eSect = 0; while (i--) { if (e->section && !strcasecmp (e->section, section)) { eSect = e; break; } e++; } /* did we find the section? */ if (!eSect) { /* check for delete operation on a nonexisting section */ if (!id || !value) return 0; /* add section first */ if (_iodbcdm_cfg_storeentry (pconfig, section, NULL, NULL, NULL, 1) == -1 || _iodbcdm_cfg_storeentry (pconfig, NULL, id, value, NULL, 1) == -1) return -1; pconfig->dirty = 1; return 0; } /* ok - we have found the section - let's see what we need to do */ if (id) { if (value) { /* add / update a key */ while (i--) { e++; /* break on next section */ if (e->section) { /* insert new entry before e */ idx = e - pconfig->entries; if (__iodbcdm_cfg_poolalloc (pconfig, 1) == NULL) return -1; memmove (e + 1, e, (pconfig->numEntries - idx) * sizeof (TCFGENTRY)); e->section = NULL; e->id = strdup (id); e->value = strdup (value); e->comment = NULL; if (e->id == NULL || e->value == NULL) return -1; e->flags |= CFE_MUST_FREE_ID | CFE_MUST_FREE_VALUE; pconfig->dirty = 1; return 0; } if (e->id && !strcasecmp (e->id, id)) { /* found key - do update */ if (e->value && (e->flags & CFE_MUST_FREE_VALUE)) { e->flags &= ~CFE_MUST_FREE_VALUE; free (e->value); } pconfig->dirty = 1; if ((e->value = strdup (value)) == NULL) return -1; e->flags |= CFE_MUST_FREE_VALUE; return 0; } } /* last section in file - add new entry */ if (_iodbcdm_cfg_storeentry (pconfig, NULL, id, value, NULL, 1) == -1) return -1; pconfig->dirty = 1; return 0; } else { /* delete a key */ while (i--) { e++; /* break on next section */ if (e->section) return 0; /* not found */ if (e->id && !strcasecmp (e->id, id)) { /* found key - do delete */ eSect = e; e++; goto doDelete; } } /* key not found - that' ok */ return 0; } } else { /* delete entire section */ /* find e : next section */ while (i--) { e++; /* break on next section */ if (e->section) break; } if (i < 0) e++; /* move up e while comment */ e2 = e - 1; while (e2->comment && !e2->section && !e2->id && !e2->value && (iswhite (e2->comment[0]) || e2->comment[0] == ';')) e2--; e = e2 + 1; doDelete: /* move up eSect while comment */ e2 = eSect - 1; while (e2->comment && !e2->section && !e2->id && !e2->value && (iswhite (e2->comment[0]) || e2->comment[0] == ';')) e2--; eSect = e2 + 1; /* delete everything between eSect .. e */ for (e2 = eSect; e2 < e; e2++) { if (e2->flags & CFE_MUST_FREE_SECTION) free (e2->section); if (e2->flags & CFE_MUST_FREE_ID) free (e2->id); if (e2->flags & CFE_MUST_FREE_VALUE) free (e2->value); if (e2->flags & CFE_MUST_FREE_COMMENT) free (e2->comment); } idx = e - pconfig->entries; memmove (eSect, e, (pconfig->numEntries - idx) * sizeof (TCFGENTRY)); pconfig->numEntries -= e - eSect; pconfig->dirty = 1; } return 0; } /* * Write a formatted copy of the configuration to a file * * This assumes that the inifile has already been parsed */ static void __iodbcdm_cfg_outputformatted (PCONFIG pconfig, FILE *fd) { PCFGENTRY e = pconfig->entries; int i = pconfig->numEntries; int m = 0; int j, l; int skip = 0; while (i--) { if (e->section) { /* Add extra line before section, unless comment block found */ if (skip) fprintf (fd, "\n"); fprintf (fd, "[%s]", e->section); if (e->comment) fprintf (fd, "\t;%s", e->comment); /* Calculate m, which is the length of the longest key */ m = 0; for (j = 1; j <= i; j++) { if (e[j].section) break; if (e[j].id && (l = strlen (e[j].id)) > m) m = l; } /* Add an extra lf next time around */ skip = 1; } /* * Key = value */ else if (e->id && e->value) { if (m) fprintf (fd, "%-*.*s = %s", m, m, e->id, e->value); else fprintf (fd, "%s = %s", e->id, e->value); if (e->comment) fprintf (fd, "\t;%s", e->comment); } /* * Value only (continuation) */ else if (e->value) { fprintf (fd, " %s", e->value); if (e->comment) fprintf (fd, "\t;%s", e->comment); } /* * Comment only - check if we need an extra lf * * 1. Comment before section gets an extra blank line before * the comment starts. * * previousEntry = value * <<< INSERT BLANK LINE HERE >>> * ; Comment Block * ; Sticks to section below * [new section] * * 2. Exception on 1. for commented out definitions: * (Immediate nonwhitespace after ;) * [some section] * v1 = 1 * ;v2 = 2 << NO EXTRA LINE >> * v3 = 3 * * 3. Exception on 2. for ;; which certainly is a section comment * [some section] * definitions * <<< INSERT BLANK LINE HERE >>> * ;; block comment * [new section] */ else if (e->comment) { if (skip && (iswhite (e->comment[0]) || e->comment[0] == ';')) { for (j = 1; j <= i; j++) { if (e[j].section) { fprintf (fd, "\n"); skip = 0; break; } if (e[j].id || e[j].value) break; } } fprintf (fd, ";%s", e->comment); } fprintf (fd, "\n"); e++; } } /* * Write the changed file back */ int _iodbcdm_cfg_commit (PCONFIG pconfig) { FILE *fp; if (!_iodbcdm_cfg_valid (pconfig)) return -1; if (pconfig->dirty) { if ((fp = fopen (pconfig->fileName, "w")) == NULL) return -1; __iodbcdm_cfg_outputformatted (pconfig, fp); fclose (fp); pconfig->dirty = 0; } return 0; } int _iodbcdm_cfg_next_section(PCONFIG pconfig) { do if (0 != _iodbcdm_cfg_nextentry (pconfig)) return -1; while (!_iodbcdm_cfg_section (pconfig)); return 0; } #if defined(__APPLE__) #define DSN_LST "ODBC Data Sources" #define DRV_LST "ODBC Drivers" typedef struct stat stat_t; /** * return name ini file * for $HOME/.odbc.ini or ~/.odbcinst.ini file * OR * for $HOME/Library/ODBC/odbc.ini or $HOME/Library/ODBC/odbcinst.ini * **/ static char * _getinifilename (char *buf, int size, int bIsInst, int bHome) { int j; char *ptr; j = STRLEN (bIsInst ? "/odbcinst.ini" : "/odbc.ini") + 1; if (size < j) return NULL; if (wSystemDSN == USERDSN_ONLY) { /* * 2b. Check either $HOME/.odbc.ini or ~/.odbc.ini */ if ((ptr = getenv ("HOME")) == NULL) { ptr = (char *) getpwuid (getuid ()); if (ptr != NULL) ptr = ((struct passwd *) ptr)->pw_dir; } if (ptr != NULL) { if (bHome) snprintf (buf, size, bIsInst ? "%s/.odbcinst.ini" : "%s/.odbc.ini", ptr); else snprintf (buf, size, bIsInst ? "%s" ODBCINST_INI_APP : "%s" ODBC_INI_APP, ptr); return buf; } } return NULL; } static int _fix_home_odbc(PCONFIG pconf, char *lib_odbcini, int bIsInst) { char pathbuf[1024]; char *home_odbcini = _getinifilename (pathbuf, sizeof (pathbuf), bIsInst, TRUE); if (home_odbcini && lib_odbcini) { PCONFIG pCfg = NULL; stat_t home_stat; stat_t lib_stat; if (access(home_odbcini, R_OK)!=0) { symlink(lib_odbcini, home_odbcini); return 0; } else { char buf[4096]; int rc; if (stat(home_odbcini, &home_stat)) return -1; /* * if $HOME/.odbc[inst].ini is link * to $HOME/Library/ODBC/odbc[inst].ini */ if ((home_stat.st_mode & S_IFLNK) && (rc = readlink(home_odbcini, buf, sizeof(buf)))>0) { buf[rc]=0; if (strcmp(buf,lib_odbcini)==0) return 0; /* OK $HOME/.odbc.ini is linked to odbc.ini */ } if (stat(lib_odbcini, &lib_stat)) return -1; /* if $HOME/Library/ODBC/odbc[inst].ini is link * to $HOME/.odbc[inst].ini */ if ((lib_stat.st_mode & S_IFLNK) && (rc = readlink(lib_odbcini, buf, sizeof(buf)))>0) { buf[rc]=0; if (strcmp(buf,home_odbcini)==0) return 0; /* OK $HOME/.odbc.ini is linked to odbc.ini */ } } /* * import $HOME/.odbc[inst].ini and replace it with link * to $HOME/Library/ODBC/odbc[inst].ini */ if (!_iodbcdm_cfg_init (&pCfg, home_odbcini, FALSE)) { int len = 0; char root_buf[4096] = {0}; char *proot; char *root_val = NULL; int was_error = FALSE; char *root_lst = bIsInst?DRV_LST:DSN_LST; /* Move DSN/Driver list*/ len = _iodbcdm_list_entries (pCfg, root_lst, root_buf, sizeof(root_buf)); if (len >0) { /* move [ODBC Data Sources] section */ for(proot = root_buf; *proot; proot += STRLEN(proot) + 1) { if (!_iodbcdm_cfg_find (pCfg, root_lst, proot)) root_val = pCfg->value; else root_val = NULL; if (!proot || !root_val) continue; if (_iodbcdm_cfg_write (pconf, root_lst, proot, root_val) || _iodbcdm_cfg_commit (pconf)) { was_error = TRUE; break; } } /* move DSN defines */ for(proot = root_buf; *proot; proot += STRLEN(proot) + 1) { char buffer[4096]; char *pattr; char *pattr_val; len = _iodbcdm_list_entries (pCfg, proot, buffer, sizeof(buffer)); if (len>0) { /* move [DSN] description */ for(pattr = buffer; *pattr; pattr += STRLEN(pattr) + 1) { if (!_iodbcdm_cfg_find (pCfg, proot, pattr)) pattr_val = pCfg->value; else pattr_val = NULL; if (!pattr || !pattr_val) continue; if (_iodbcdm_cfg_write (pconf, proot, pattr, pattr_val) || _iodbcdm_cfg_commit (pconf)) { was_error = TRUE; break; } } } } } if (was_error) return -1; } /* make link */ if (access(home_odbcini, R_OK)==0) { if (unlink(home_odbcini)) return -1; } if (symlink(lib_odbcini, home_odbcini)) return -1; } return 0; } static void _fix_office_access(char *fodbcini, int bIsInst) { char *ptr; char *office_pwd = {"/Library/Containers/com.microsoft.Excel/Data"}; if ((ptr = getenv ("HOME")) == NULL) { ptr = (char *) getpwuid (getuid ()); if (ptr != NULL) ptr = ((struct passwd *) ptr)->pw_dir; } if (ptr != NULL && strcasestr(ptr, office_pwd)==NULL) { stat_t src_stat; stat_t dst_stat; char src[1024]; char dst[1024]; int j; snprintf (dst, sizeof(dst), bIsInst ? "%s%s" ODBCINST_INI_APP : "%s%s" ODBC_INI_APP, ptr, office_pwd); j = STRLEN (bIsInst ? "/odbcinst.ini" : "/odbc.ini"); dst[STRLEN(dst)-j] = 0; mkdir(dst, 0755); /* source ini file */ snprintf (src, sizeof(src), bIsInst ? "%s" ODBCINST_INI_APP : "%s" ODBC_INI_APP, ptr); /* destination ini file */ snprintf (dst, sizeof(dst), bIsInst ? "%s%s" ODBCINST_INI_APP : "%s%s" ODBC_INI_APP, ptr, office_pwd); if (access(src, R_OK)==0 && stat(src, &src_stat)==0) { if (access(dst, R_OK)==0 && stat(dst, &dst_stat)==0) { if (src_stat.st_ino == dst_stat.st_ino) return; /* link existed & OK */ else unlink(dst); } link(src, dst); /* create hardlink for use with MSOffice */ } } } #endif int _iodbcdm_cfg_search_init(PCONFIG *ppconf, const char *filename, int doCreate) { char pathbuf[1024]; int rc; if (strstr (filename, "odbc.ini") || strstr (filename, "ODBC.INI")) { char *fname_odbcini = _iodbcadm_getinifile (pathbuf, sizeof (pathbuf), FALSE, doCreate); #if defined(__APPLE__) if (fname_odbcini && wSystemDSN == USERDSN_ONLY) _fix_office_access(fname_odbcini, FALSE); #endif rc = _iodbcdm_cfg_init (ppconf, fname_odbcini, doCreate); #if defined(__APPLE__) if (!rc && fname_odbcini && wSystemDSN == USERDSN_ONLY) { char buf[1024]; char *lib_odbcini = _getinifilename (buf, sizeof (buf), FALSE, FALSE); /* if we try open ~/Library/ODBC/odbc.ini */ if (lib_odbcini && strcmp(fname_odbcini, lib_odbcini)==0) _fix_home_odbc(*ppconf, fname_odbcini, FALSE); } #endif return rc; } else if (strstr (filename, "odbcinst.ini") || strstr (filename, "ODBCINST.INI")) { char *fname_odbcinst = _iodbcadm_getinifile (pathbuf, sizeof (pathbuf), TRUE, doCreate); #if defined(__APPLE__) if (fname_odbcinst && wSystemDSN == USERDSN_ONLY) _fix_office_access(fname_odbcinst, TRUE); #endif rc = _iodbcdm_cfg_init (ppconf, fname_odbcinst, doCreate); #if defined(__APPLE__) if (!rc && fname_odbcinst && wSystemDSN == USERDSN_ONLY) { char buf[1024]; char *lib_odbcinst = _getinifilename (buf, sizeof (buf), TRUE, FALSE); /* if we try open ~/Library/ODBC/odbcinst.ini */ if (lib_odbcinst && strcmp(fname_odbcinst, lib_odbcinst)==0) _fix_home_odbc(*ppconf, fname_odbcinst, TRUE); } #endif return rc; } else if (doCreate || (!doCreate && access(filename, R_OK) == 0)) return _iodbcdm_cfg_init (ppconf, filename, doCreate); else return -1; } int _iodbcdm_list_sections (PCONFIG pCfg, LPSTR lpszRetBuffer, int cbRetBuffer) { int curr = 0, sect_len = 0; lpszRetBuffer[0] = 0; if (0 == _iodbcdm_cfg_rewind (pCfg)) { while (curr < cbRetBuffer && 0 == _iodbcdm_cfg_next_section (pCfg) && pCfg->section) { sect_len = strlen (pCfg->section) + 1; sect_len = sect_len > cbRetBuffer - curr ? cbRetBuffer - curr : sect_len; memmove (lpszRetBuffer + curr, pCfg->section, sect_len); curr += sect_len; } if (curr < cbRetBuffer) lpszRetBuffer[curr] = 0; return curr; } return 0; } int _iodbcdm_list_entries (PCONFIG pCfg, LPCSTR lpszSection, LPSTR lpszRetBuffer, int cbRetBuffer) { int curr = 0, sect_len = 0; lpszRetBuffer[0] = 0; if (!_iodbcdm_cfg_find (pCfg, (char*)lpszSection, NULL)) { while (curr < cbRetBuffer && 0 == _iodbcdm_cfg_nextentry (pCfg) && pCfg->section) { if (_iodbcdm_cfg_section (pCfg)) break; if (_iodbcdm_cfg_define (pCfg) && pCfg->id) { sect_len = strlen (pCfg->id) + 1; sect_len = sect_len > cbRetBuffer - curr ? cbRetBuffer - curr : sect_len; memmove (lpszRetBuffer + curr, pCfg->id, sect_len); curr += sect_len; } } if (curr < cbRetBuffer) lpszRetBuffer[curr] = 0; return curr; } return 0; } BOOL do_create_dsns (PCONFIG pCfg, PCONFIG pInfCfg, LPSTR szDriver, LPSTR szDSNS, LPSTR szDiz) { char *szValue = strdup (szDSNS), *szCurr = szValue, *szComma; int hasMore = FALSE; BOOL retcode = FALSE; do { szComma = strchr (szCurr, ','); if (szComma) { *szComma = 0; hasMore = TRUE; } else hasMore = FALSE; #ifdef WIN32 if (_iodbcdm_cfg_write (pCfg, "ODBC 32 bit Data Sources", szCurr, szDiz)) #else if (_iodbcdm_cfg_write (pCfg, "ODBC Data Sources", szCurr, szDiz)) #endif goto error; if (!ValidDSN (szCurr) || _iodbcdm_cfg_write (pCfg, szCurr, NULL, NULL)) goto error; if (_iodbcdm_cfg_find (pInfCfg, szCurr, NULL) && !_iodbcdm_cfg_write (pCfg, szCurr, NULL, NULL)) { if (_iodbcdm_cfg_write (pCfg, szCurr, "Driver", szDriver)) goto error; while (!_iodbcdm_cfg_nextentry (pInfCfg) && _iodbcdm_cfg_define (pInfCfg)) { if (_iodbcdm_cfg_write (pCfg, szCurr, pInfCfg->id, pInfCfg->value)) goto error; } } szCurr = szComma + 1; } while (hasMore); retcode = TRUE; error: free (szValue); return retcode; } BOOL install_from_ini (PCONFIG pCfg, PCONFIG pOdbcCfg, LPSTR szInfFile, LPSTR szDriver, BOOL drivers) { PCONFIG pInfCfg; char *szKeysSection = NULL, *szDriverFile = NULL, *szSetupFile = NULL, *szValue = NULL, *szId = NULL, *szComma, *szComma1; BOOL ret = FALSE; if (_iodbcdm_cfg_write (pCfg, szDriver, NULL, NULL)) return ret; if (_iodbcdm_cfg_init (&pInfCfg, szInfFile, FALSE)) return ret; if (_iodbcdm_cfg_find (pInfCfg, drivers ? "ODBC Drivers" : "ODBC Translators", szDriver)) goto error; #ifdef WIN32 if (_iodbcdm_cfg_write (pCfg, drivers ? "ODBC 32 bit Drivers" : "ODBC 32 bit Translators", szDriver, "Installed")) #else if (_iodbcdm_cfg_write (pCfg, drivers ? "ODBC Drivers" : "ODBC Translators", szDriver, "Installed")) #endif goto error; if (_iodbcdm_cfg_find (pInfCfg, szDriver, drivers ? "Driver" : "Translator")) goto error; szComma = strchr (pInfCfg->value, ','); szComma1 = strchr (szComma + 1, ','); if (!szComma || !szComma1 || szComma + 1 == szComma1) goto error; *szComma1 = 0; szDriverFile = strdup (szComma + 1); if (_iodbcdm_cfg_write (pCfg, szDriver, drivers ? "Driver" : "Translator", szDriverFile)) goto error; if (!_iodbcdm_cfg_find (pInfCfg, szDriver, "Setup")) { szComma = strchr (pInfCfg->value, ','); szComma1 = strchr (szComma + 1, ','); if (!szComma || !szComma1 || szComma + 1 == szComma1) goto error; *szComma1 = 0; szSetupFile = strdup (szComma + 1); if (_iodbcdm_cfg_write (pCfg, szDriver, "Setup", szSetupFile)) goto error; } if (!_iodbcdm_cfg_find (pInfCfg, szDriver, NULL)) { while (!_iodbcdm_cfg_nextentry (pInfCfg) && _iodbcdm_cfg_define (pInfCfg)) if (strcmp (pInfCfg->id, drivers ? "\"Driver\"" : "\"Translator\"") && strcmp (pInfCfg->id, "\"Setup\"")) { szComma = strchr (pInfCfg->value, ','); szComma1 = strchr (szComma + 1, ','); if (!szComma || !szComma1 || szComma + 1 == szComma1) szValue = strdup (""); else { *szComma1 = 0; szValue = strdup (szComma + 1); } szComma = strchr (pInfCfg->id, '"'); szComma1 = strchr (szComma + 1, '"'); if (!szComma || !szComma1 || szComma + 1 == szComma1) goto loop_cont; else { *szComma1 = 0; szId = strdup (szComma + 1); } if (_iodbcdm_cfg_write (pCfg, szDriver, szId, szValue)) goto error; loop_cont: if (szValue) { free (szValue); szValue = NULL; } if (szId) { free (szId); szId = NULL; } } } if (!drivers) goto quit; szKeysSection = (char *) calloc (strlen (szDriver) + 6, sizeof (char)); strcpy (szKeysSection, szDriver); strcat (szKeysSection, "-Keys"); if (!_iodbcdm_cfg_find (pInfCfg, szKeysSection, NULL)) { while (!_iodbcdm_cfg_nextentry (pInfCfg) && _iodbcdm_cfg_define (pInfCfg)) { if (strcmp (pInfCfg->id, "CreateDSN")) { if (_iodbcdm_cfg_write (pCfg, szDriver, pInfCfg->id, pInfCfg->value)) goto error; } else if (!do_create_dsns (pOdbcCfg, pCfg, szDriverFile, pInfCfg->value, szDriver)) goto error; } } quit: ret = TRUE; error: if (szKeysSection) free (szKeysSection); if (szDriverFile) free (szDriverFile); if (szSetupFile) free (szSetupFile); if (szValue) free (szValue); if (szId) free (szId); _iodbcdm_cfg_done (pInfCfg); return ret; } int install_from_string (PCONFIG pCfg, PCONFIG pOdbcCfg, LPSTR lpszDriver, BOOL drivers) { char *szCurr = (char *) lpszDriver, *szDiz = lpszDriver; char *szAssignment, *szEqual, *szValue, *szDriver = NULL; if (_iodbcdm_cfg_write (pCfg, lpszDriver, NULL, NULL)) return FALSE; #ifdef WIN32 if (_iodbcdm_cfg_write (pCfg, drivers ? "ODBC 32 bit Drivers" : "ODBC 32 bit Translators", lpszDriver, "Installed")) #else if (_iodbcdm_cfg_write (pCfg, drivers ? "ODBC Drivers" : "ODBC Translators", lpszDriver, "Installed")) #endif return FALSE; for (szCurr = lpszDriver + strlen (lpszDriver) + 1; *szCurr; szCurr += strlen (szCurr) + 1) { szAssignment = strdup (szCurr); szEqual = strchr (szAssignment, '='); szValue = szEqual + 1; if (szEqual) *szEqual = 0; else goto loop_error; if ((drivers && !strcmp (szAssignment, "Driver")) || (!drivers && !strcmp (szAssignment, "Translator"))) { if (szDriver) free (szDriver); szDriver = strdup (szValue); } if (drivers) { if (strcmp (szAssignment, "CreateDSN")) { if (_iodbcdm_cfg_write (pCfg, lpszDriver, szAssignment, szValue)) goto loop_error; } else if (!do_create_dsns (pOdbcCfg, pCfg, szDriver, szValue, szDiz)) goto loop_error; } else if (_iodbcdm_cfg_write (pCfg, lpszDriver, szAssignment, szValue)) goto loop_error; free (szAssignment); continue; loop_error: if (szDriver) free (szDriver); free (szAssignment); return FALSE; } if (szDriver) free (szDriver); else return FALSE; return TRUE; } libiodbc-3.52.16/iodbcinst/SQLRemoveDriverManager.c0000664000175000017500000000676614424170750017013 00000000000000/* * SQLRemoveDriverManager.c * * $Id$ * * These functions intentionally left blank * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include "inifile.h" #include "misc.h" #include "iodbc_error.h" BOOL INSTAPI SQLRemoveDriverManager (LPDWORD lpdwUsageCount) { /* Implementation finished ... very easy ... */ CLEAR_ERROR (); return TRUE; } libiodbc-3.52.16/iodbcinst/iodbcinst.exp0000664000175000017500000000202614013216212015024 00000000000000SQLConfigDataSource SQLConfigDriver SQLCreateDataSource SQLGetConfigMode SQLGetAvailableDrivers SQLGetInstalledDrivers SQLGetPrivateProfileString SQLGetTranslator SQLInstallDriverEx SQLInstallDriver SQLInstallDriverManager SQLInstallerError SQLInstallODBC SQLInstallTranslator SQLInstallTranslatorEx SQLManageDataSources SQLPostInstallerError SQLReadFileDSN SQLRemoveDSNFromIni SQLRemoveDefaultDataSource SQLRemoveDriver SQLRemoveDriverManager SQLRemoveTranslator SQLSetConfigMode SQLValidDSN SQLWriteDSNToIni SQLWriteFileDSN SQLWritePrivateProfileString SQLInstallODBCW SQLCreateDataSourceW SQLGetTranslatorW SQLInstallDriverW SQLInstallDriverManagerW SQLGetInstalledDriversW SQLGetAvailableDriversW SQLConfigDataSourceW SQLWriteDSNToIniW SQLRemoveDSNFromIniW SQLValidDSNW SQLWritePrivateProfileStringW SQLGetPrivateProfileStringW SQLInstallTranslatorW SQLRemoveTranslatorW SQLRemoveDriverW SQLConfigDriverW SQLInstallerErrorW SQLPostInstallerErrorW SQLReadFileDSNW SQLWriteFileDSNW SQLInstallDriverExW SQLInstallTranslatorExW iodbcinst_version libiodbc-3.52.16/iodbcinst/SQLGetConfigMode.c0000664000175000017500000000721214424170750015544 00000000000000/* * SQLGetConfigMode.c * * $Id$ * * These functions intentionally left blank * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include "iodbc_error.h" #include "misc.h" BOOL INSTAPI SQLGetConfigMode (UWORD * pwConfigMode) { BOOL retcode = FALSE; /* Clear errors */ CLEAR_ERROR (); /* Check input parameter */ if (!pwConfigMode) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); } else { *pwConfigMode = configMode; retcode = TRUE; } return retcode; } libiodbc-3.52.16/iodbcinst/misc.c0000664000175000017500000003275714424170750013461 00000000000000/* * misc.c * * $Id$ * * Miscellaneous functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include "inifile.h" #include "misc.h" #ifdef _MAC # include #endif /* endif _MAC */ WORD wSystemDSN = USERDSN_ONLY; WORD configMode = ODBC_BOTH_DSN; #if !defined(WINDOWS) && !defined(WIN32) && !defined(OS2) && !defined(macintosh) # include # define UNIX_PWD #endif /* * Algorithm for resolving an odbc.ini reference * * For UNIX : 1. Check for $ODBCINI variable, if exists return $ODBCINI. * 2. Check for $HOME/.odbc.ini or ~/.odbc.ini file, * if exists return it. * 3. Check for SYS_ODBC_INI build variable, if exists return * it. (ie : /etc/odbc.ini). * 4. No odbc.ini presence, return NULL. * * For WINDOWS, WIN32, OS2 : * 1. Check for the system odbc.ini file, if exists return it. * 2. No odbc.ini presence, return NULL. * * For VMS: 1. Check for $ODBCINI variable, if exists return $ODBCINI. * 2. Check for SYS$LOGIN:ODBC.INI file, if exists return it. * 3. No odbc.ini presence, return NULL. * * For Mac: 1. On powerPC, file is ODBC Preferences PPC * On 68k, file is ODBC Preferences * 2. Check for ...:System Folder:Preferences:ODBC Preferences * file, if exists return it. * 3. No odbc.ini presence, return NULL. * * For MacX: 1. Check for $ODBCINI variable, if exists return $ODBCINI. * 2. Check for $HOME/Library/ODBC/odbc.ini, * if exists return it. * 3. Check for SYS_ODBC_INI build variable, if exists return * it. (ie : /etc/odbc.ini). * 4. Check for /Library/ODBC/odbc.ini * file, if exists return it. * 5. No odbc.ini presence, return NULL. **/ char * _iodbcadm_getinifile (char *buf, int size, int bIsInst, int doCreate) { #ifdef _MAC HParamBlockRec hp; long fldrDid; short fldrRef; OSErr result; #endif /* endif _MAC */ int i, j; char *ptr; #ifdef _MAC # ifdef __POWERPC__ j = STRLEN (bIsInst ? ":ODBC Installer Preferences PPC" : ":ODBC Preferences PPC") + 1; # else j = STRLEN (bIsInst ? ":ODBC Installer Preferences" : ":ODBC Preferences") + 1; # endif /* endif __POWERPC__ */ #else j = STRLEN (bIsInst ? "/odbcinst.ini" : "/odbc.ini") + 1; #endif /* endif _MAC */ if (size < j) return NULL; #if !defined(UNIX_PWD) # ifdef _MAC result = FindFolder (kOnSystemDisk, kPreferencesFolderType, kDontCreateFolder, &fldrRef, &fldrDid); if (result != noErr) return NULL; ptr = get_full_pathname (fldrDid, fldrRef); i = (ptr) ? STRLEN (ptr) : 0; if (i == 0 || i > size - j) { if (ptr) free (ptr); return NULL; } # ifdef __POWERPC__ STRCPY (buf, ptr); STRCAT (buf, bIsInst ? ":ODBC Installer Preferences PPC" : ":ODBC Preferences PPC"); # else STRCPY (buf, ptr); STRCAT (buf, bIsInst ? ":ODBC Installer Preferences" : ":ODBC Preferences"); # endif /* endif __POWERPC__ */ if (doCreate) { hp.fileParam.ioCompletion = NULL; hp.fileParam.ioVRefNum = fldrRef; hp.fileParam.ioDirID = fldrDid; # ifdef __POWERPC__ hp.fileParam.ioNamePtr = bIsInst ? "\pODBC Installer Preferences PPC" : "\pODBC Preferences PPC"; # else hp.fileParam.ioNamePtr = bIsInst ? "\pODBC Installer Preferences" : "\pODBC Preferences"; # endif PBHCreate (&hp, FALSE); } free (ptr); return buf; # else /* else _MAC */ /* * On Windows, there is only one place to look */ i = GetWindowsDirectory ((LPSTR) buf, size); if (i == 0 || i > size - j) return NULL; snprintf (buf + i, size - i, bIsInst ? "/odbcinst.ini" : "/odbc.ini"); return buf; # endif /* endif _MAC */ #else if (wSystemDSN == USERDSN_ONLY) { /* * 1. Check $ODBCINI environment variable */ if ((ptr = getenv (bIsInst ? "ODBCINSTINI" : "ODBCINI")) != NULL) { STRNCPY (buf, ptr, size); if (access (buf, R_OK) == 0) return buf; else if (doCreate) { int f = open ((char *) buf, O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH); if (f != -1) { close (f); return buf; } } } # ifdef VMS /* * 2a. VMS calls this HOME */ STRNCPY (buf, bIsInst ? "SYS$LOGIN:ODBCINST.INI" : "SYS$LOGIN:ODBC.INI", size); if (doCreate || access (buf, R_OK) == 0) return buf; # else /* else VMS */ if ((ptr = getenv ("HOME")) == NULL) { ptr = (char *) getpwuid (getuid ()); if (ptr != NULL) ptr = ((struct passwd *) ptr)->pw_dir; } if (ptr != NULL) { #if defined(__APPLE__) /* * 2b. Try to check the ~/Library/ODBC/odbc.ini */ snprintf (buf, size, bIsInst ? "%s" ODBCINST_INI_APP : "%s" ODBC_INI_APP, ptr); if (access (buf, R_OK) == 0) return buf; else if (doCreate) { int f = open ((char *) buf, O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH); if (f != -1) { close (f); return buf; } } # else /* else __APPLE__ */ /* * 2b. Check either $HOME/.odbc.ini or ~/.odbc.ini */ snprintf (buf, size, bIsInst ? "%s/.odbcinst.ini" : "%s/.odbc.ini", ptr); if (doCreate || access (buf, R_OK) == 0) return buf; # endif /* endif __APPLE__ */ # endif /* endif VMS */ } } /* * 3. Try SYS_ODBC_INI as the last resort */ if (wSystemDSN == SYSTEMDSN_ONLY || bIsInst) { /* * 1. Check $SYSODBCINI environment variable */ if ((ptr = getenv (bIsInst ? "SYSODBCINSTINI" : "SYSODBCINI")) != NULL) { STRNCPY (buf, ptr, size); if (access (buf, R_OK) == 0) return buf; else if (doCreate) { int f = open ((char *) buf, O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH); if (f != -1) { close (f); return buf; } } } #if defined(__APPLE__) /* * Try to check the /Library/ODBC/odbc.ini */ snprintf (buf, size, "%s", bIsInst ? ODBCINST_INI_APP : ODBC_INI_APP); if (access (buf, R_OK) == 0) return buf; else if (doCreate) { int f = open ((char *) buf, O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH); if (f != -1) { close (f); return buf; } } # endif /* endif __APPLE__ */ STRNCPY (buf, bIsInst ? SYS_ODBCINST_INI : SYS_ODBC_INI, size); return buf; } /* * No ini file found or accessible */ return NULL; #endif /* UNIX_PWD */ } const char * _iodbcdm_check_for_string(const char *szList, const char *szString, int bContains) { const char *currP = szList; while (*currP) { if (bContains) { if (strstr (currP, szString)) return currP; } else { if (!strcmp (currP, szString)) return currP; } } return NULL; } char * _iodbcdm_remove_quotes(const char *szString) { char *szWork, *szPtr; while (*szString == '\'' || *szString == '\"') szString += 1; if (!*szString) return NULL; szWork = strdup (szString); szPtr = strchr (szWork, '\''); if (szPtr) *szPtr = 0; szPtr = strchr (szWork, '\"'); if (szPtr) *szPtr = 0; return szWork; } /* * Get FILEDSN file name * * If file name does not contain path component, the default directory for * saving and loading a .dsn file will be defined as follows: * 1. if FILEDSNPATH is set in environment: use environment * 2. if odbcinst.ini [odbc] FILEDSNPATH is set: use this * 3. else use DEFAULT_FILEDSNPATH * * ".dsn" extension is always appended to the resulting filename * (if not already exists). */ void _iodbcdm_getdsnfile(const char *filedsn, char *buf, size_t buf_sz) { char *p; char *default_path; if (strchr (filedsn, '/') != NULL) { /* has path component -- copy as is */ _iodbcdm_strlcpy (buf, filedsn, buf_sz); goto done; } /* get default path */ if ((default_path = getenv ("FILEDSNPATH")) != NULL) _iodbcdm_strlcpy (buf, default_path, buf_sz); else { SQLSetConfigMode (ODBC_BOTH_DSN); if (!SQLGetPrivateProfileString ("ODBC", "FileDSNPath", "", buf, buf_sz, "odbcinst.ini")) _iodbcdm_strlcpy (buf, DEFAULT_FILEDSNPATH, buf_sz); } /* append filedsn file name */ _iodbcdm_strlcat (buf, "/", buf_sz); _iodbcdm_strlcat (buf, filedsn, buf_sz); done: /* append ".dsn" if extension is not ".dsn" */ if ((p = strrchr (buf, '.')) == NULL || strcasecmp (p, ".dsn") != 0) _iodbcdm_strlcat (buf, ".dsn", buf_sz); } /* * Copy src to string dst of size siz. At most siz-1 characters * will be copied. Always NUL terminates (unless siz == 0). * Returns strlen(src); if retval >= siz, truncation occurred. * * Taken from FreeBSD libc. */ size_t _iodbcdm_strlcpy(char *dst, const char *src, size_t siz) { char *d = dst; const char *s = src; size_t n = siz; /* Copy as many bytes as will fit */ if (n != 0 && --n != 0) { do { if ((*d++ = *s++) == 0) break; } while (--n != 0); } /* Not enough room in dst, add NUL and traverse rest of src */ if (n == 0) { if (siz != 0) *d = '\0'; /* NUL-terminate dst */ while (*s++) ; } return(s - src - 1); /* count does not include NUL */ } /* * Appends src to string dst of size siz (unlike strncat, siz is the * full size of dst, not space left). At most siz-1 characters * will be copied. Always NUL terminates (unless siz <= strlen(dst)). * Returns strlen(src) + MIN(siz, strlen(initial dst)). * If retval >= siz, truncation occurred. * * Taken from FreeBSD libc. */ size_t _iodbcdm_strlcat(char *dst, const char *src, size_t siz) { char *d = dst; const char *s = src; size_t n = siz; size_t dlen; /* Find the end of dst and adjust bytes left but don't go past end */ while (n-- != 0 && *d != '\0') d++; dlen = d - dst; n = siz - dlen; if (n == 0) return(dlen + strlen(s)); while (*s != '\0') { if (n != 1) { *d++ = *s; n--; } s++; } *d = '\0'; return(dlen + (s - src)); /* count does not include NUL */ } libiodbc-3.52.16/iodbcinst/SQLGetInstalledDrivers.c0000664000175000017500000001617514424170750017020 00000000000000/* * SQLGetInstalledDrivers.c * * $Id$ * * Get a list of installed drivers * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include "unicode.h" #include "misc.h" #include "iodbc_error.h" #ifdef WIN32 #define SECT1 "ODBC 32 bit Data Sources" #define SECT2 "ODBC 32 bit Drivers" #else #define SECT1 "ODBC Data Sources" #define SECT2 "ODBC Drivers" #endif #define MAX_ENTRIES 1024 extern BOOL GetAvailableDrivers (LPCSTR lpszInfFile, LPSTR lpszBuf, WORD cbBufMax, WORD * pcbBufOut, BOOL infFile); static int SectSorter (const void *p1, const void *p2) { const char **s1 = (const char **) p1; const char **s2 = (const char **) p2; return strcasecmp (*s1, *s2); } BOOL INSTAPI SQLGetInstalledDrivers_Internal (LPSTR lpszBuf, WORD cbBufMax, WORD * pcbBufOut, SQLCHAR waMode) { char buffer[4096], desc[1024], *ptr, *oldBuf = lpszBuf; int len, i, j, usernum = 0, num_entries = 0; void **sect = NULL; SQLUSMALLINT fDir = SQL_FETCH_FIRST_USER; if (pcbBufOut) *pcbBufOut = 0; /* * Allocate the buffer for the list */ if ((sect = (void **) calloc (MAX_ENTRIES, sizeof (void *))) == NULL) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); return SQL_FALSE; } do { SQLSetConfigMode (fDir == SQL_FETCH_FIRST_SYSTEM ? ODBC_SYSTEM_DSN : ODBC_USER_DSN); SQLGetPrivateProfileString (SECT2, NULL, "", buffer, sizeof (buffer) / sizeof (SQLTCHAR), "odbcinst.ini"); /* For each drivers */ for (ptr = buffer, i = 1; *ptr && i; ptr += STRLEN (ptr) + 1) { /* Add this section to the datasources list */ if (fDir == SQL_FETCH_FIRST_SYSTEM) { for (j = 0; j < usernum; j++) { if (STREQ (sect[j], ptr)) j = usernum; } if (j == usernum + 1) continue; } if (num_entries >= MAX_ENTRIES) { i = 0; break; } /* Skip the rest */ /* ... and its description */ SQLSetConfigMode (fDir == SQL_FETCH_FIRST_SYSTEM ? ODBC_SYSTEM_DSN : ODBC_USER_DSN); SQLGetPrivateProfileString (SECT2, ptr, "", desc, sizeof (desc) / sizeof (SQLTCHAR), "odbcinst.ini"); /* Check if the driver is installed */ if (!STRCASEEQ (desc, "Installed")) continue; /* Copy the driver name */ sect[num_entries++] = STRDUP (ptr); } switch (fDir) { case SQL_FETCH_FIRST_USER: fDir = SQL_FETCH_FIRST_SYSTEM; usernum = num_entries; break; case SQL_FETCH_FIRST_SYSTEM: fDir = SQL_FETCH_FIRST; break; } } while (fDir != SQL_FETCH_FIRST); /* * Sort all entries so we can present a nice list */ if (num_entries > 1) { qsort (sect, num_entries, sizeof (char **), SectSorter); } len = cbBufMax; /* Copy back the result as will fit */ for (i = 0; len > 0 && i < num_entries; i++) { int sect_len = STRLEN (sect[i]) + 1; if (sect_len > len) break; if (waMode == 'A') { STRNCPY (lpszBuf, sect[i], sect_len); len -= sect_len; lpszBuf += sect_len; } else { dm_StrCopyOut2_A2W (sect[i], (LPWSTR) lpszBuf, sect_len, NULL); len -= sect_len; lpszBuf += sect_len * sizeof (wchar_t); } } /* put final \0 */ if (waMode == 'A') *lpszBuf = '\0'; else *((wchar_t *) lpszBuf) = L'\0'; /* * Free old section list */ if (sect) { for (i = 0; i < MAX_ENTRIES; i++) if (sect[i]) free (sect[i]); free (sect); } if (pcbBufOut) *pcbBufOut = lpszBuf - oldBuf + (waMode == 'A' ? sizeof (char) : sizeof (wchar_t)); return waMode == 'A' ? (oldBuf[0] ? SQL_TRUE : SQL_FALSE) : (((wchar_t *) oldBuf)[0] ? SQL_TRUE : SQL_FALSE); } BOOL INSTAPI SQLGetInstalledDrivers (LPSTR lpszBuf, WORD cbBufMax, WORD * pcbBufOut) { return SQLGetInstalledDrivers_Internal (lpszBuf, cbBufMax, pcbBufOut, 'A'); } BOOL INSTAPI SQLGetInstalledDriversW (LPWSTR lpszBuf, WORD cbBufMax, WORD FAR * pcbBufOut) { return SQLGetInstalledDrivers_Internal ((LPSTR) lpszBuf, cbBufMax, pcbBufOut, 'W'); } libiodbc-3.52.16/iodbcinst/Info.c0000664000175000017500000000635514424170750013414 00000000000000/* * info.c * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include char *iodbcinst_version = VERSION; libiodbc-3.52.16/iodbcinst/SQLInstallDriver.c0000664000175000017500000002225314424170750015656 00000000000000/* * SQLInstallDriver.c * * $Id$ * * Install a driver * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include "unicode.h" #include "misc.h" #include "inifile.h" #include "iodbc_error.h" #ifdef _MAC # include #endif #if !defined(WINDOWS) && !defined(WIN32) && !defined(OS2) && !defined(macintosh) # include # include # include # include # define UNIX_PWD #endif BOOL InstallDriverPath (LPSTR lpszPath, WORD cbPathMax, WORD * pcbPathOut, LPSTR envname) { #ifdef _MAC OSErr result; long fldrDid; short fldrRef; #endif BOOL retcode = FALSE; char *ptr; lpszPath[cbPathMax - 1] = 0; #if !defined(UNIX_PWD) #ifdef _MAC result = FindFolder (kOnSystemDisk, kExtensionFolderType, kDontCreateFolder, &fldrRef, &fldrDid); if (result != noErr) { PUSH_ERROR (ODBC_ERROR_GENERAL_ERR); goto quit; } ptr = get_full_pathname (fldrDid, fldrRef); STRNCPY (lpszPath, ptr, cbPathMax - 1); free (ptr); if (STRLEN (ptr) >= cbPathMax) { PUSH_ERROR (ODBC_ERROR_INVALID_BUFF_LEN); goto quit; } else goto done; #else /* * On Windows, there is only one place to look */ if (GetWindowsDirectory ((LPSTR) buf, cbPathMax) >= cbPathMax) { PUSH_ERROR (ODBC_ERROR_INVALID_BUFF_LEN); goto quit; } else goto done; #endif #else /* * 1. Check $ODBCDRIVERS environment variable */ if ((ptr = getenv (envname))) if (access (ptr, R_OK | W_OK | X_OK) == 0) { STRNCPY (lpszPath, ptr, cbPathMax - 1); if (STRLEN (ptr) >= cbPathMax) { PUSH_ERROR (ODBC_ERROR_INVALID_BUFF_LEN); goto quit; } else goto done; } /* * 2. Check /usr/local/lib and /usr/lib */ #ifdef _BE STRNCPY (lpszPath, "/boot/beos/system/lib", cbPathMax - 1); if (STRLEN (lpszPath) != STRLEN ("/boot/beos/system/lib")) #else STRNCPY (lpszPath, "/usr/local/lib", cbPathMax - 1); if (STRLEN (lpszPath) != STRLEN ("/usr/local/lib")) #endif { PUSH_ERROR (ODBC_ERROR_INVALID_BUFF_LEN); goto quit; } if (access (lpszPath, R_OK | W_OK | X_OK) == 0) goto done; #ifdef _BE STRNCPY (lpszPath, "/boot/home/config/lib", cbPathMax - 1); if (STRLEN (lpszPath) != STRLEN ("/boot/home/config/lib")) #else STRNCPY (lpszPath, "/usr/lib", cbPathMax - 1); if (STRLEN (lpszPath) != STRLEN ("/usr/lib")) #endif { PUSH_ERROR (ODBC_ERROR_INVALID_BUFF_LEN); goto quit; } if (access (lpszPath, R_OK | W_OK | X_OK) == 0) goto done; /* * 3. Check either $HOME */ if (!(ptr = getenv ("HOME"))) { ptr = (char *) getpwuid (getuid ()); if (ptr) ptr = ((struct passwd *) ptr)->pw_dir; } if (ptr) { #ifdef _BE sprintf (lpszPath, "%s/config/lib", ptr); #else sprintf (lpszPath, "%s/lib", ptr); #endif if (access (lpszPath, R_OK | W_OK | X_OK) == 0) goto done; } if (!mkdir (lpszPath, 0755)) goto done; #endif SQLPostInstallerError (ODBC_ERROR_GENERAL_ERR, "Cannot retrieve a directory where to install the driver or translator."); goto quit; done: retcode = TRUE; quit: if (pcbPathOut) *pcbPathOut = STRLEN (lpszPath); return retcode; } BOOL INSTAPI SQLInstallDriver (LPCSTR lpszInfFile, LPCSTR lpszDriver, LPSTR lpszPath, WORD cbPathMax, WORD * pcbPathOut) { PCONFIG pCfg = NULL, pOdbcCfg = NULL; BOOL retcode = FALSE; /* Check input parameters */ CLEAR_ERROR (); if (!lpszDriver || !STRLEN (lpszDriver)) { PUSH_ERROR (ODBC_ERROR_INVALID_PARAM_SEQUENCE); goto quit; } if (!lpszPath || !cbPathMax) { PUSH_ERROR (ODBC_ERROR_INVALID_BUFF_LEN); goto quit; } /* Write the out path */ if (!InstallDriverPath (lpszPath, cbPathMax, pcbPathOut, "ODBCDRIVERS")) goto quit; /* Else go through user/system odbcinst.ini */ switch (configMode) { case ODBC_BOTH_DSN: case ODBC_USER_DSN: wSystemDSN = USERDSN_ONLY; break; case ODBC_SYSTEM_DSN: wSystemDSN = SYSTEMDSN_ONLY; break; } if (_iodbcdm_cfg_search_init (&pCfg, "odbcinst.ini", TRUE)) { PUSH_ERROR (ODBC_ERROR_GENERAL_ERR); goto quit; } if (_iodbcdm_cfg_search_init (&pOdbcCfg, "odbc.ini", TRUE)) { PUSH_ERROR (ODBC_ERROR_GENERAL_ERR); pOdbcCfg = NULL; goto done; } if (lpszInfFile) { if (!install_from_ini (pCfg, pOdbcCfg, (char *) lpszInfFile, (char *) lpszDriver, TRUE)) { PUSH_ERROR (ODBC_ERROR_INVALID_INF); goto done; } } else if (!install_from_string (pCfg, pOdbcCfg, (char *) lpszDriver, TRUE)) { PUSH_ERROR (ODBC_ERROR_INVALID_KEYWORD_VALUE); goto done; } if (_iodbcdm_cfg_commit (pCfg) || _iodbcdm_cfg_commit (pOdbcCfg)) { PUSH_ERROR (ODBC_ERROR_GENERAL_ERR); goto done; } retcode = TRUE; done: _iodbcdm_cfg_done (pCfg); if (pOdbcCfg) _iodbcdm_cfg_done (pOdbcCfg); quit: wSystemDSN = USERDSN_ONLY; configMode = ODBC_BOTH_DSN; return retcode; } BOOL INSTAPI SQLInstallDriverW (LPCWSTR lpszInfFile, LPCWSTR lpszDriver, LPWSTR lpszPath, WORD cbPathMax, WORD FAR * pcbPathOut) { char *_inf_u8 = NULL; char *_driver_u8 = NULL; char *_path_u8 = NULL; BOOL retcode = FALSE; _inf_u8 = (char *) dm_SQL_WtoU8 ((SQLWCHAR *) lpszInfFile, SQL_NTS); if (_inf_u8 == NULL && lpszInfFile) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } _driver_u8 = (char *) dm_SQL_WtoU8 ((SQLWCHAR *) lpszDriver, SQL_NTS); if (_driver_u8 == NULL && lpszDriver) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } if (cbPathMax > 0) { if ((_path_u8 = malloc (cbPathMax * UTF8_MAX_CHAR_LEN + 1)) == NULL) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } } retcode = SQLInstallDriver (_inf_u8, _driver_u8, _path_u8, cbPathMax * UTF8_MAX_CHAR_LEN, pcbPathOut); if (retcode == TRUE) { dm_StrCopyOut2_U8toW ((SQLCHAR *)_path_u8, lpszPath, cbPathMax, pcbPathOut); } done: MEM_FREE (_inf_u8); MEM_FREE (_driver_u8); MEM_FREE (_path_u8); return retcode; } libiodbc-3.52.16/iodbcinst/dlf.c0000664000175000017500000010325414424170750013262 00000000000000/* * dlf.c * * $Id$ * * Dynamic Library Loader (mapping to SVR4) * * The iODBC driver manager. * * Copyright (C) 1995 Ke Jin * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #ifdef DLDAPI_DEFINED #undef DLDAPI_DEFINED #endif #ifdef DLDAPI_SVR4_DLFCN #define DLDAPI_DEFINED static char sccsid[] = "@(#)dynamic load interface -- SVR4 (dlfcn)"; #endif /********************************* * * HP/UX * *********************************/ #ifdef DLDAPI_HP_SHL #define DLDAPI_DEFINED static char sccsid[] = "@(#)dynamic load interface -- HP/UX (shl)"; #include void * dlopen (char *path, int mode) { return (void *) shl_load ((char *) (path), BIND_IMMEDIATE | BIND_NONFATAL, 0L); } void * dlsym (void *hdll, char *sym) { void *symaddr = 0; int ret; #if 0 /* * iODBC does not need a handle to itself */ if (!hdll) hdll = (void *) PROG_HANDLE; #endif /* Remember, a driver may export calls as function pointers * (i.e. with type TYPE_DATA) rather than as functions * (i.e. with type TYPE_PROCEDURE). Thus, to be safe, we * uses TYPE_UNDEFINED to cover all of them. */ ret = shl_findsym ((shl_t *) & hdll, sym, TYPE_UNDEFINED, &symaddr); if (ret == -1) return 0; return symaddr; } char * dlerror () { extern char *strerror (); return strerror (errno); } int dlclose (void *hdll) { struct shl_descriptor d; /* * As HP/UX does not use a reference counter for unloading, * we can only unload the driver when it is loaded once. */ if (shl_gethandle_r ((shl_t) hdll, &d) < 0 || d.ref_count > 1) { return 0; } return shl_unload ((shl_t) hdll); } #endif /* end of HP/UX Section */ /********************************* * * IBM AIX * *********************************/ #ifdef DLDAPI_AIX_LOAD #define DLDAPI_DEFINED static char sccsid[] = "@(#)dynamic load interface -- AIX (ldr)"; #include #include #include #include #ifndef HTAB_SIZE #define HTAB_SIZE 256 #endif #define FACTOR 0.618039887 /* i.e. (sqrt(5) - 1)/2 */ #ifndef ENTRY_SYM #define ENTRY_SYM ".__start" /* default entry point for aix */ #endif typedef struct slot_s { char *sym; long fdesc[3]; /* 12 bytes function descriptor */ struct slot_s *next; } slot_t; /* Note: on AIX, a function pointer actually points to a * function descriptor, a 12 bytes data. The first 4 bytes * is the virtual address of the function. The next 4 bytes * is the virtual address of TOC (Table of Contents) of the * object module the function belong to. The last 4 bytes * are always 0 for C and Fortran functions. Every object * module has an entry point (which can be specified at link * time by -e ld option). iODBC driver manager requires ODBC * driver shared library always use the default entry point * (so you shouldn't use -e ld option when creating a driver * share library). load() returns the function descriptor of * a module's entry point. From which we can calculate function * descriptors of other functions in the same module by using * the fact that the load() doesn't change the relative * offset of functions to their module entry point(i.e the * offset in memory loaded by load() will be as same as in * the module library file). */ typedef slot_t *hent_t; typedef struct nlist nlist_t; typedef struct stat stat_t; typedef struct obj { int dev; /* device id */ int ino; /* inode number */ char *path; /* file name */ int (*pentry) (); /* entry point of this share library */ int refn; /* number of reference */ hent_t htab[HTAB_SIZE]; struct obj *next; } obj_t; static char *errmsg = 0; static void init_htab (hent_t * ht) /* initialize a hashing table */ { int i; for (i = 0; i < HTAB_SIZE; i++) ht[i] = (slot_t *) 0; return; } static void clean_htab (hent_t * ht) /* free all slots */ { int i; slot_t *ent; slot_t *tent; for (i = 0; i < HTAB_SIZE; i++) { for (ent = ht[i]; ent;) { tent = ent->next; free (ent->sym); free (ent); ent = tent; } ht[i] = 0; } return; } static int hash (char *sym) { int a, key; double f; if (!sym || !*sym) return 0; for (key = *sym; *sym; sym++) { key += *sym; a = key; key = (int) ((a << 8) + (key >> 8)); key = (key > 0) ? key : -key; } f = key * FACTOR; a = (int) f; return (int) ((HTAB_SIZE - 1) * (f - a)); } static hent_t search (hent_t * htab, char *sym) /* search hashing table to find a matched slot */ { int key; slot_t *ent; key = hash (sym); for (ent = htab[key]; ent; ent = ent->next) { if (!strcmp (ent->sym, sym)) return ent; } return 0; /* no match */ } static void insert (hent_t * htab, slot_t * ent) /* insert a new slot to hashing table */ { int key; key = hash (ent->sym); ent->next = htab[key]; htab[key] = ent; return; } static slot_t * slot_alloc (char *sym) /* allocate a new slot with symbol */ { slot_t *ent; ent = (slot_t *) malloc (sizeof (slot_t)); ent->sym = (char *) malloc (STRLEN (sym) + 1); if (!ent->sym) { free (ent); return 0; } STRCPY (ent->sym, sym); return ent; } static obj_t *obj_list = 0; void * dlopen (char *file, int mode) { stat_t st; obj_t *pobj; char buf[1024]; if (!file || !*file) { errno = EINVAL; return 0; } errno = 0; errmsg = 0; if (stat (file, &st)) return 0; for (pobj = obj_list; pobj; pobj = pobj->next) /* find a match object */ { if (pobj->ino == st.st_ino && pobj->dev == st.st_dev) { /* found a match. increase its * reference count and return * its address */ pobj->refn++; return pobj; } } pobj = (obj_t *) malloc (sizeof (obj_t)); if (!pobj) return 0; pobj->path = (char *) malloc (STRLEN (file) + 1); if (!pobj->path) { free (pobj); return 0; } STRCPY (pobj->path, file); pobj->dev = st.st_dev; pobj->ino = st.st_ino; pobj->refn = 1; pobj->pentry = (int (*)()) load (file, 0, 0); if (!pobj->pentry) { free (pobj->path); free (pobj); return 0; } init_htab (pobj->htab); pobj->next = obj_list; obj_list = pobj; return pobj; } int dlclose (void *hobj) { obj_t *pobj = (obj_t *) hobj; obj_t *tpobj; int match = 0; if (!hobj) { errno = EINVAL; return -1; } errno = 0; errmsg = 0; if (pobj == obj_list) { pobj->refn--; if (pobj->refn) return 0; match = 1; obj_list = pobj->next; } for (tpobj = obj_list; !match && tpobj; tpobj = tpobj->next) { if (tpobj->next == pobj) { pobj->refn--; if (pobj->refn) return 0; match = 1; tpobj->next = pobj->next; } } if (match) { unload ((void *) (pobj->pentry)); clean_htab (pobj->htab); free (pobj->path); free (pobj); } return 0; } char * dlerror () { extern char *sys_errlist[]; if (!errmsg || !errmsg[0]) { if (errno >= 0) return sys_errlist[errno]; return ""; } return errmsg; } void * dlsym (void *hdl, char *sym) { nlist_t nl[3]; obj_t *pobj = (obj_t *) hdl; slot_t *ent; int (*fp) (); long lbuf[3]; if (!hdl || !(pobj->htab) || !sym || !*sym) { errno = EINVAL; return 0; } errno = 0; errmsg = 0; ent = search (pobj->htab, sym); if (ent) return ent->fdesc; #define n_name _n._n_name nl[0].n_name = ENTRY_SYM; nl[1].n_name = sym; nl[2].n_name = 0; /* There is a potential problem here. If application * did not pass a full path name, and changed the * working directory after the load(), then nlist() * will be unable to open the original shared library * file to resolve the symbols. there are 3 ways to working * round this: 1. convert to full pathname in driver * manager. 2. applications always pass driver's full * path name. 3. if driver itself don't support * SQLGetFunctions(), call it with SQL_ALL_FUNCTIONS * as flag immediately after SQLConnect(), SQLDriverConnect() * and SQLBrowseConnect() to force the driver manager * resolving all will be used symbols. */ if (nlist (pobj->path, nl) == -1) return 0; if (!nl[0].n_type && !nl[0].n_value) { errmsg = "can't locate module entry symbol"; return 0; } /* Note: On AIX 3.x if the object library is not * built with -g compiling option, .n_type field * is always 0. While on 4.x it will be 32. * On AIX 4.x, if the symbol is a entry point, * n_value will be 0. However, one thing is for sure * that if a symbol does not exists in the file, * both .n_type and .n_value would be 0. */ if (!nl[1].n_type && !nl[1].n_value) { errmsg = "symbol does not exist in this module"; return 0; } ent = slot_alloc (sym); if (!ent) return 0; /* catch it with a slot in the hashing table */ insert (pobj->htab, ent); memcpy (ent->fdesc, pobj->pentry, sizeof (ent->fdesc)); /* now ent->fdesc[0] is the virtual address of entry point * and ent->fdesc[1] is the TOC of the module */ /* let's calculate the virtual address of the symbol * by adding a relative offset getting from the module * file symbol table, i.e * * function virtual address = entry point virtual address + * + ( function offset in file - entry point offset in file ) */ (ent->fdesc)[0] = (ent->fdesc)[0] + (nl[1].n_value - nl[0].n_value); /* return the function descriptor */ return ent->fdesc; } #endif /* end of IBM AIX Section */ /********************************* * * Windows 3.x, 95, NT * *********************************/ #ifdef DLDAPI_WINDOWS #define DLDAPI_DEFINED static char sccsid[] = "@(#)dynamic load interface -- Windows (LoadLibrary)"; #include void * dlopen (char * dll, int mode) { HINSTANCE hint; if (dll == NULL) { return GetWindowWord (NULL, GWW_HINSTANCE); } hint = LoadLibrary (dll); if (hint < HINSTANCE_ERROR) { return NULL; } return (void *) hint; } void * dlsym (void * hdll, char * sym) { return (void *) GetProcAddress (hdll, sym); } char * dlerror () { return 0L; /* unimplemented yet */ } int dlclose (void * hdll) { FreeLibrary ((HINSTANCE) hdll); } #endif /* end of Windows family */ /*********************************** * * VMS * ***********************************/ #ifdef VMS #define DLDAPI_DEFINED #ifdef DLDAPI_VMS_IODBC static char sccsid[] = "@(#)dynamic load interface -- VMS"; #include #include #include #include #include #include #include #include #include #ifndef LIB$M_FIS_MIXCASE #define LIB$M_FIS_MIXCASE 1<<4 #endif typedef struct { struct dsc$descriptor_s filename_d; struct dsc$descriptor_s image_d; char filename[NAM$C_MAXRSS]; /* $PARSEd image name */ } dll_t; /* * The following static int contains the last VMS error returned. It is kept * static so that dlerror() can get it. This method is dangerous if you have * threaded applications, but this is the way the UNIX dlopen() etc * is defined. */ static int saved_status = SS$_NORMAL; static char dlerror_buf[256]; static int iodbc_find_image_symbol ( struct dsc$descriptor_s *filename_d, struct dsc$descriptor_s *symbol_d, void **rp, struct dsc$descriptor_s *image_d, int flag) { lib$establish (lib$sig_to_ret); return lib$find_image_symbol (filename_d, symbol_d, rp, image_d, flag); } void * iodbc_dlopen (char *path, int unused_flag) { int status; dll_t *dll; struct FAB imgfab; struct NAM imgnam; static char defimg[] = "SYS$SHARE:.EXE"; if (path == NULL) { saved_status = SS$_UNSUPPORTED; return NULL; } dll = malloc (sizeof (dll_t)); if (dll == NULL) { saved_status = SS$_INSFMEM; return NULL; } imgfab = cc$rms_fab; imgfab.fab$l_fna = path; imgfab.fab$b_fns = STRLEN (path); imgfab.fab$w_ifi = 0; imgfab.fab$l_dna = defimg; imgfab.fab$b_dns = sizeof (defimg); imgfab.fab$l_fop = FAB$M_NAM; imgfab.fab$l_nam = &imgnam; imgnam = cc$rms_nam; imgnam.nam$l_esa = dll->filename; imgnam.nam$b_ess = NAM$C_MAXRSS; status = sys$parse (&imgfab); if (!(status & 1)) { free (dll); saved_status = status; return NULL; } dll->filename_d.dsc$b_dtype = DSC$K_DTYPE_T; dll->filename_d.dsc$b_class = DSC$K_CLASS_S; dll->filename_d.dsc$a_pointer = imgnam.nam$l_name; dll->filename_d.dsc$w_length = imgnam.nam$b_name; dll->image_d.dsc$b_dtype = DSC$K_DTYPE_T; dll->image_d.dsc$b_class = DSC$K_CLASS_S; dll->image_d.dsc$a_pointer = dll->filename; dll->image_d.dsc$w_length = imgnam.nam$b_esl; /* * VMS does not have the concept of first opening a shared library and then * asking for symbols; the LIB$FIND_IMAGE_SYMBOL routine does both. * Since I want my implementation of dlopen() to return an error if the * shared library can not be loaded, I try to find a dummy symbol in the * library. */ iodbc_dlsym (dll, "THIS_ROUTINE_MIGHT_NOT_EXIST"); if (!((saved_status ^ LIB$_KEYNOTFOU) & ~7)) { saved_status = SS$_NORMAL; } if (saved_status & 1) { return dll; } else { free (dll); return NULL; } } void * iodbc_dlsym (void *hdll, char *sym) { int status; dll_t *dll; struct dsc$descriptor_s symbol_d; void *rp; dll = hdll; if (dll == NULL) return NULL; symbol_d.dsc$b_dtype = DSC$K_DTYPE_T; symbol_d.dsc$b_class = DSC$K_CLASS_S; symbol_d.dsc$a_pointer = sym; symbol_d.dsc$w_length = STRLEN (sym); status = iodbc_find_image_symbol (&dll->filename_d, &symbol_d, &rp, &dll->image_d, 0); if (!((saved_status ^ LIB$_KEYNOTFOU) & ~7)) { status = iodbc_find_image_symbol (&dll->filename_d, &symbol_d, &rp, &dll->image_d, LIB$M_FIS_MIXCASE); } if (status & 1) { return rp; } else { saved_status = status; return NULL; } } char * iodbc_dlerror () { struct dsc$descriptor desc; short outlen; int status; if (saved_status & 1) { return NULL; } desc.dsc$b_dtype = DSC$K_DTYPE_T; desc.dsc$b_class = DSC$K_CLASS_S; desc.dsc$a_pointer = dlerror_buf; desc.dsc$w_length = sizeof (dlerror_buf); status = sys$getmsg (saved_status, &outlen, &desc, 15, 0); if (status & 1) { dlerror_buf[outlen] = '\0'; } else { sprintf (dlerror_buf, "Message number %8X", saved_status); } saved_status = SS$_NORMAL; return (dlerror_buf); } int iodbc_dlclose (void *hdll) { /* * Not really implemented since VMS doesn't support unloading images. * The hdll pointer is released though. */ free (hdll); return 0; } #endif /* DLDAPI_VMS_IODBC */ #endif /* VMS */ /********************************* * * Apple MacOS X Rhapsody * *********************************/ #ifdef DLDAPI_DYLD #define DLDAPI_DEFINED static char sccsid[] = "@(#)dynamic load interface -- Mac OS X (dyld)"; #include #include static void undefined_symbol_handler (const char *symbolName) { fprintf (stderr, "dyld found undefined symbol: %s\n", symbolName); abort (); } static NSModule multiple_symbol_handler (NSSymbol s, NSModule old, NSModule new) { /* * Since we can't unload symbols, we're going to run into this * every time we reload a module. Workaround here is to just * rebind to the new symbol, and forget about the old one. * This is crummy, because it's basically a memory leak. */ return (new); } static void linkEdit_symbol_handler (NSLinkEditErrors c, int errorNumber, const char *fileName, const char *errorString) { fprintf (stderr, "dyld errors during link edit for file %s\n%s\n", fileName, errorString); abort (); } void * dlopen (char *path, int mode) { NSObjectFileImage image; NSLinkEditErrorHandlers handlers; NSModule handle = NULL; int i; /* * Install error handler */ handlers.undefined = undefined_symbol_handler; #if !defined (NSLINKMODULE_OPTION_PRIVATE) handlers.multiple = multiple_symbol_handler; #endif handlers.linkEdit = linkEdit_symbol_handler; NSInstallLinkEditErrorHandlers (&handlers); /* * Load object */ i = NSCreateObjectFileImageFromFile (path, &image); if (i != NSObjectFileImageSuccess) { static char *ErrorStrings[] = { "%s(%d): Object Image Load Failure\n", "%s(%d): Object Image Load Success\n", "%s(%d): Not an recognizable object file\n", "%s(%d): No valid architecture\n", "%s(%d): Object image has an invalid format\n", "%s(%d): Invalid access (permissions?)\n", "%s(%d): Unknown error code from NSCreateObjectFileImageFromFile\n", }; if (i < 0 || i > 6) i = 6; fprintf (stderr, ErrorStrings[i], path, i); } else { #if !defined (NSLINKMODULE_OPTION_PRIVATE) handle = NSLinkModule (image, path, TRUE); #else handle = NSLinkModule (image, path, NSLINKMODULE_OPTION_PRIVATE); #endif } return (void *) handle; } void * dlsym (void *hdll, char *sym) { NSSymbol symbol; #if !defined (NSLINKMODULE_OPTION_PRIVATE) if (NSIsSymbolNameDefined (sym)) { symbol = NSLookupAndBindSymbol (sym); return NSAddressOfSymbol (symbol); } return NULL; #else symbol = NSLookupSymbolInModule ((NSModule) hdll, sym); return NSAddressOfSymbol (symbol); #endif } char * dlerror () { return NULL; } int dlclose (void *hdll) { NSUnLinkModule (hdll, FALSE); return 0; } #endif /* end of Rhapsody Section */ /********************************* * * Apple MacOS X Rhapsody * *********************************/ #ifdef DLDAPI_MACX #define DLDAPI_DEFINED static char sccsid[] = "@(#)dynamic load interface -- Mac OS X 10.x (dyld)"; static struct dlopen_handle *dlopen_handles = NULL; static const struct dlopen_handle main_program_handle = { 0 }; static char *dlerror_pointer = NULL; /* * NSMakePrivateModulePublic() is not part of the public dyld API so we define * it here. The internal dyld function pointer for * __dyld_NSMakePrivateModulePublic is returned so thats all that matters to get * the functionality need to implement the dlopen() interfaces. */ static int NSMakePrivateModulePublic (NSModule module) { static int (*p) (NSModule module) = NULL; if (p == NULL) _dyld_func_lookup ("__dyld_NSMakePrivateModulePublic", (void *) &p); if (p == NULL) { #ifdef DEBUG printf ("_dyld_func_lookup of __dyld_NSMakePrivateModulePublic " "failed\n"); #endif return (FALSE); } return (p (module)); } /* * dlopen() the MacOS X version of the FreeBSD dlopen() interface. */ void * iodbc_dlopen (char * path, int mode) { void *retval; struct stat stat_buf; NSObjectFileImage objectFileImage; NSObjectFileImageReturnCode ofile_result_code; NSModule module; struct dlopen_handle *p; unsigned long options; NSSymbol NSSymbol; void (*init) (void); static char errbuf[640]; dlerror_pointer = NULL; /* * A NULL path is to indicate the caller wants a handle for the * main program. */ if (path == NULL) { retval = (void *) &main_program_handle; return (retval); } /* see if the path exists and if so get the device and inode number */ if (stat (path, &stat_buf) == -1) { dlerror_pointer = strerror (errno); return (NULL); } /* * If we don't want an unshared handle see if we already have a handle * for this path. */ if ((mode & RTLD_UNSHARED) != RTLD_UNSHARED) { p = dlopen_handles; while (p != NULL) { if (p->dev == stat_buf.st_dev && p->ino == stat_buf.st_ino) { /* skip unshared handles */ if ((p->dlopen_mode & RTLD_UNSHARED) == RTLD_UNSHARED) continue; /* * We have already created a handle for this path. The * caller might be trying to promote an RTLD_LOCAL handle * to a RTLD_GLOBAL. Or just looking it up with * RTLD_NOLOAD. */ if ((p->dlopen_mode & RTLD_LOCAL) == RTLD_LOCAL && (mode & RTLD_GLOBAL) == RTLD_GLOBAL) { /* promote the handle */ if (NSMakePrivateModulePublic (p->module) == TRUE) { p->dlopen_mode &= ~RTLD_LOCAL; p->dlopen_mode |= RTLD_GLOBAL; p->dlopen_count++; return (p); } else { dlerror_pointer = "can't promote handle from " "RTLD_LOCAL to RTLD_GLOBAL"; return (NULL); } } p->dlopen_count++; return (p); } p = p->next; } } /* * We do not have a handle for this path if we were just trying to * look it up return NULL to indicate we don't have it. */ if ((mode & RTLD_NOLOAD) == RTLD_NOLOAD) { dlerror_pointer = "no existing handle for path RTLD_NOLOAD test"; return (NULL); } /* try to create an object file image from this path */ ofile_result_code = NSCreateObjectFileImageFromFile (path, &objectFileImage); if (ofile_result_code != NSObjectFileImageSuccess) { switch (ofile_result_code) { case NSObjectFileImageFailure: dlerror_pointer = "object file setup failure"; return (NULL); case NSObjectFileImageInappropriateFile: dlerror_pointer = "not a Mach-O MH_BUNDLE file type"; return (NULL); case NSObjectFileImageArch: dlerror_pointer = "no object for this architecture"; return (NULL); case NSObjectFileImageFormat: dlerror_pointer = "bad object file format"; return (NULL); case NSObjectFileImageAccess: dlerror_pointer = "can't read object file"; return (NULL); default: dlerror_pointer = "unknown error from " "NSCreateObjectFileImageFromFile()"; return (NULL); } } /* try to link in this object file image */ options = NSLINKMODULE_OPTION_NONE | NSLINKMODULE_OPTION_PRIVATE | NSLINKMODULE_OPTION_RETURN_ON_ERROR; if ((mode & RTLD_NOW) == RTLD_NOW) options |= NSLINKMODULE_OPTION_BINDNOW; module = NSLinkModule (objectFileImage, path, options); NSDestroyObjectFileImage (objectFileImage); if (module == NULL) { NSLinkEditErrors lerr; int errNum; const char *fname; const char *errStr; NSLinkEditError(&lerr, &errNum, &fname, &errStr); sprintf(errbuf, "NSLinkModule() failed for dlopen() ([%.256s][%.256s])", fname, errStr); dlerror_pointer = errbuf; return (NULL); } /* * If the handle is to be global promote the handle. It is done this * way to avoid multiply defined symbols. */ if ((mode & RTLD_GLOBAL) == RTLD_GLOBAL) { if (NSMakePrivateModulePublic (module) == FALSE) { dlerror_pointer = "can't promote handle from RTLD_LOCAL to " "RTLD_GLOBAL"; return (NULL); } } p = malloc (sizeof (struct dlopen_handle)); if (p == NULL) { dlerror_pointer = "can't allocate memory for the dlopen handle"; return (NULL); } /* fill in the handle */ p->dev = stat_buf.st_dev; p->ino = stat_buf.st_ino; if (mode & RTLD_GLOBAL) p->dlopen_mode = RTLD_GLOBAL; else p->dlopen_mode = RTLD_LOCAL; p->dlopen_mode |= (mode & RTLD_UNSHARED) | (mode & RTLD_NODELETE) | (mode & RTLD_LAZY_UNDEF); p->dlopen_count = 1; p->module = module; p->prev = NULL; p->next = dlopen_handles; if (dlopen_handles != NULL) dlopen_handles->prev = p; dlopen_handles = p; /* call the init function if one exists */ NSSymbol = NSLookupSymbolInModule (p->module, "__init"); if (NSSymbol != NULL) { init = NSAddressOfSymbol (NSSymbol); init (); } return (p); } /* * dlsym() the MacOS X version of the FreeBSD dlopen() interface. */ void * iodbc_dlsym (void * handle, char * symbol) { struct dlopen_handle *dlopen_handle, *p; char symbol2[1024]; NSSymbol NSSymbol; void *address; symbol2[0] = '_'; strcpy (symbol2 + 1, symbol); dlopen_handle = (struct dlopen_handle *) handle; /* * If this is the handle for the main program do a global lookup. */ if (dlopen_handle == (struct dlopen_handle *) &main_program_handle) { if (NSIsSymbolNameDefined (symbol2) == TRUE) { NSSymbol = NSLookupAndBindSymbol (symbol2); address = NSAddressOfSymbol (NSSymbol); dlerror_pointer = NULL; return (address); } else { dlerror_pointer = "symbol not found"; return (NULL); } } /* * Find this handle and do a lookup in just this module. */ p = dlopen_handles; while (p != NULL) { if (dlopen_handle == p) { NSSymbol = NSLookupSymbolInModule (p->module, symbol2); if (NSSymbol != NULL) { address = NSAddressOfSymbol (NSSymbol); dlerror_pointer = NULL; return (address); } else { dlerror_pointer = "symbol not found"; return (NULL); } } p = p->next; } dlerror_pointer = "bad handle passed to dlsym()"; return (NULL); } /* * dlerror() the MacOS X version of the FreeBSD dlopen() interface. */ char * iodbc_dlerror (void) { const char *p; p = (const char *) dlerror_pointer; dlerror_pointer = NULL; return (char *)(p); } /* * dlclose() the MacOS X version of the FreeBSD dlopen() interface. */ int iodbc_dlclose (void * handle) { struct dlopen_handle *p, *q; unsigned long options; NSSymbol NSSymbol; void (*fini) (void); dlerror_pointer = NULL; q = (struct dlopen_handle *) handle; p = dlopen_handles; while (p != NULL) { if (p == q) { /* if the dlopen() count is not zero we are done */ p->dlopen_count--; if (p->dlopen_count != 0) return (0); /* call the fini function if one exists */ NSSymbol = NSLookupSymbolInModule (p->module, "__fini"); if (NSSymbol != NULL) { fini = NSAddressOfSymbol (NSSymbol); fini (); } /* unlink the module for this handle */ options = 0; if (p->dlopen_mode & RTLD_NODELETE) options |= NSUNLINKMODULE_OPTION_KEEP_MEMORY_MAPPED; if (p->dlopen_mode & RTLD_LAZY_UNDEF) options |= NSUNLINKMODULE_OPTION_RESET_LAZY_REFERENCES; if (NSUnLinkModule (p->module, options) == FALSE) { dlerror_pointer = "NSUnLinkModule() failed for dlclose()"; return (-1); } if (p->prev != NULL) p->prev->next = p->next; if (p->next != NULL) p->next->prev = p->prev; if (dlopen_handles == p) dlopen_handles = p->next; free (p); return (0); } p = p->next; } dlerror_pointer = "invalid handle passed to dlclose()"; return (-1); } #endif /* end of Rhapsody Section */ /********************************* * * Macintosh * *********************************/ #ifdef DLDAPI_MAC static char sccsid[] = "@(#)dynamic load interface -- Mac Classic"; #include #include static char *msg_error = NULL; void * dlopen (char *dll, int mode) { #ifdef __POWERPC__ CFragConnectionID conn_id; Ptr main_addr; Str255 name; OSErr err; if (dll == NULL) { msg_error = "Library name not valid."; return NULL; } if ((err = GetSharedLibrary ((unsigned char *) str_to_Str255 (dll), kPowerPCCFragArch, kLoadCFrag, &conn_id, &main_addr, name)) != noErr) { msg_error = "Library cannot be loaded."; return NULL; } msg_error = NULL; return (void *) conn_id; #else CFragConnectionID conn_id; Ptr main_addr; Str255 name; OSErr err; if (dll == NULL) { msg_error = "Library name not valid."; return NULL; } if ((err = GetSharedLibrary ((unsigned char *) str_to_Str255 (dll), kMotorola68KCFragArch, kLoadCFrag, &conn_id, &main_addr, name)) != noErr) { msg_error = "Library cannot be loaded."; return NULL; } msg_error = NULL; return (void *) conn_id; #endif } void * dlsym (void *hdll, char *sym) { #ifdef __POWERPC__ Ptr symbol; CFragSymbolClass symbol_type; OSErr err; if (sym == NULL) { msg_error = "Symbol name not valid."; return NULL; } if ((err = FindSymbol ((CFragConnectionID) hdll, (unsigned char *) str_to_Str255 (sym), &symbol, &symbol_type)) != noErr) { msg_error = "Symbol cannot be loaded."; return NULL; } msg_error = NULL; return symbol; #else Ptr symbol; CFragSymbolClass symbol_type; if (sym == NULL) { msg_error = "Symbol name not valid."; return NULL; } if (FindSymbol ((CFragConnectionID) hdll, (unsigned char *) str_to_Str255 (sym), &symbol, &symbol_type) != noErr) { msg_error = "Symbol cannot be loaded."; return NULL; } msg_error = NULL; return symbol; #endif } char * dlerror () { return (msg_error) ? msg_error : "No error detected."; } int dlclose (void *hdll) { /* It should be something like that .... */ /* but some applications like Office 2001 */ /* have a problem with that ... just let */ /* the Mac unload the library when the */ /* application stop ... */ #ifdef __POWERPC__ /* if( CloseConnection((CFragConnectionID*)hdll) ) { msg_error = "Library cannot be unloaded."; return 1; } msg_error = NULL; return 0;*/ #else if (CloseConnection ((CFragConnectionID *) hdll)) { msg_error = "Library cannot be unloaded."; return 1; } msg_error = NULL; return 0; #endif } #define DLDAPI_DEFINED #endif /* end of Macintosh family */ /********************************* * * BeOS * *********************************/ #ifdef DLDAPI_BE #define DLDAPI_DEFINED static char sccsid[] = "@(#)dynamic load interface -- BeOS"; #include #include static char *msg_error = NULL; void * dlopen (char *dll, int mode) { image_id dll_id; if (dll == NULL) { msg_error = "Library name not valid."; return NULL; } dll_id = load_add_on (dll); if (dll_id == B_ERROR) { msg_error = "Library cannot be loaded."; return NULL; } msg_error = NULL; return (void *) dll_id; } void * dlsym (void *hdll, char *sym) { void *address = NULL; if (sym == NULL) { msg_error = "Symbol name not valid."; return NULL; } if (get_image_symbol ((image_id) hdll, sym, B_SYMBOL_TYPE_ANY, &address) != B_OK) { msg_error = "Symbol cannot be loaded."; return NULL; } msg_error = NULL; return address; } char * dlerror () { return (msg_error) ? msg_error : "No error detected."; } int dlclose (void *hdll) { if (unload_add_on ((image_id) hdll) != B_OK) { msg_error = "Library cannot be unloaded."; return 1; } msg_error = NULL; return 0; } #endif /* end of BeOS */ /*********************************** * * other platforms * ***********************************/ #ifdef DLDAPI_OS2 #define DLDAPI_DEFINED /* * DosLoadModule(), DosQueryProcAddress(), DosFreeModule(), ... */ #endif #ifdef DLDAPI_NEXT #define DLDAPI_DEFINED #endif #ifndef DLDAPI_DEFINED #error "dynamic load editor undefined" #endif libiodbc-3.52.16/iodbcinst/SQLWriteFileDSN.c0000664000175000017500000001233414424170750015332 00000000000000/* * SQLWriteFileDSN.c * * $Id$ * * These functions intentionally left blank * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include "unicode.h" #include "inifile.h" #include "iodbc_error.h" #include "misc.h" extern BOOL WritePrivateProfileString (LPCSTR lpszSection, LPCSTR lpszEntry, LPCSTR lpszString, LPCSTR lpszFilename); BOOL INSTAPI SQLWriteFileDSN (LPCSTR lpszFileName, LPCSTR lpszAppName, LPCSTR lpszKeyName, LPSTR lpszString) { BOOL retcode = FALSE; char filename[1024]; /* Check input parameters */ CLEAR_ERROR (); /* Is a file is specified */ if (lpszFileName) { _iodbcdm_getdsnfile (lpszFileName, filename, sizeof (filename)); retcode = WritePrivateProfileString (lpszAppName, lpszKeyName, lpszString, filename); goto quit; } PUSH_ERROR (ODBC_ERROR_INVALID_PATH); goto quit; quit: return retcode; } BOOL INSTAPI SQLWriteFileDSNW (LPCWSTR lpszFileName, LPCWSTR lpszAppName, LPCWSTR lpszKeyName, LPWSTR lpszString) { char *_filename_u8 = NULL; char *_appname_u8 = NULL; char *_keyname_u8 = NULL; char *_string_u8 = NULL; BOOL retcode = FALSE; _filename_u8 = (char *) dm_SQL_WtoU8 ((SQLWCHAR *) lpszFileName, SQL_NTS); if (_filename_u8 == NULL && lpszFileName) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } _appname_u8 = (char *) dm_SQL_WtoU8 ((SQLWCHAR *) lpszAppName, SQL_NTS); if (_appname_u8 == NULL && lpszAppName) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } _keyname_u8 = (char *) dm_SQL_WtoU8 ((SQLWCHAR *) lpszKeyName, SQL_NTS); if (_keyname_u8 == NULL && lpszKeyName) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } _string_u8 = (char *) dm_SQL_WtoU8 ((SQLWCHAR *) lpszString, SQL_NTS); if (_string_u8 == NULL && lpszString) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } retcode = SQLWriteFileDSN (_filename_u8, _appname_u8, _keyname_u8, _string_u8); done: MEM_FREE (_filename_u8); MEM_FREE (_appname_u8); MEM_FREE (_keyname_u8); MEM_FREE (_string_u8); return retcode; } libiodbc-3.52.16/iodbcinst/SQLRemoveDefaultDataSource.c0000664000175000017500000000660714424170750017616 00000000000000/* * SQLRemoveDefaultDataSource.c * * $Id$ * * Remove a DSN * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include BOOL INSTAPI SQLRemoveDefaultDataSource (void) { return SQLConfigDataSource (NULL, ODBC_REMOVE_DEFAULT_DSN, NULL, NULL); } libiodbc-3.52.16/iodbcinst/SQLRemoveDriver.c0000664000175000017500000001545614424170750015514 00000000000000/* * SQLRemoveDriver.c * * $Id$ * * Remove a driver * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include "unicode.h" #include "inifile.h" #include "misc.h" #include "iodbc_error.h" BOOL INSTAPI SQLRemoveDriver (LPCSTR lpszDriver, BOOL fRemoveDSN, LPDWORD lpdwUsageCount) { /*char *szDriverFile = NULL; */ BOOL retcode = FALSE; PCONFIG pCfg = NULL, pInstCfg = NULL; LPSTR entries = (LPSTR) malloc (sizeof (char) * 65535), curr; int len = 0, i = 0; /* Check input parameters */ CLEAR_ERROR (); if (!lpszDriver || !STRLEN (lpszDriver)) { PUSH_ERROR (ODBC_ERROR_INVALID_NAME); goto quit; } /* Else go through user/system odbcinst.ini */ switch (configMode) { case ODBC_BOTH_DSN: case ODBC_USER_DSN: wSystemDSN = USERDSN_ONLY; break; case ODBC_SYSTEM_DSN: wSystemDSN = SYSTEMDSN_ONLY; break; } if (_iodbcdm_cfg_search_init (&pCfg, "odbc.ini", FALSE)) { PUSH_ERROR (ODBC_ERROR_GENERAL_ERR); goto done; } if (_iodbcdm_cfg_search_init (&pInstCfg, "odbcinst.ini", FALSE)) { PUSH_ERROR (ODBC_ERROR_GENERAL_ERR); goto done; } if (fRemoveDSN) { #ifdef WIN32 if (entries && (len = _iodbcdm_list_entries (pCfg, "ODBC 32 bit Data Sources", entries, 65535))) #else if (entries && (len = _iodbcdm_list_entries (pCfg, "ODBC Data Sources", entries, 65535))) #endif { for (curr = entries; i < len; i += (STRLEN (curr) + 1), curr += (STRLEN (curr) + 1)) { int nCursor = pCfg->cursor; if (_iodbcdm_cfg_rewind (pCfg)) { PUSH_ERROR (ODBC_ERROR_GENERAL_ERR); goto done; } #ifdef WIN32 if (_iodbcdm_cfg_find (pCfg, "ODBC 32 bit Data Sources", curr)) #else if (_iodbcdm_cfg_find (pCfg, "ODBC Data Sources", curr)) #endif { if (_iodbcdm_cfg_rewind (pCfg)) { PUSH_ERROR (ODBC_ERROR_GENERAL_ERR); goto done; } pCfg->cursor = nCursor; continue; } if (!strcmp (pCfg->value, lpszDriver)) { if (_iodbcdm_cfg_write (pCfg, curr, NULL, NULL)) { PUSH_ERROR (ODBC_ERROR_GENERAL_ERR); goto done; } #ifdef WIN32 if (_iodbcdm_cfg_write (pCfg, "ODBC 32 bit Data Sources", curr, NULL)) #else if (_iodbcdm_cfg_write (pCfg, "ODBC Data Sources", curr, NULL)) #endif { PUSH_ERROR (ODBC_ERROR_GENERAL_ERR); goto done; } } pCfg->cursor = nCursor; } } } if (_iodbcdm_cfg_write (pInstCfg, (char *) lpszDriver, NULL, NULL)) { PUSH_ERROR (ODBC_ERROR_GENERAL_ERR); goto done; } #ifdef WIN32 if (_iodbcdm_cfg_write (pInstCfg, "ODBC 32 bit Drivers", lpszDriver, NULL)) #else if (_iodbcdm_cfg_write (pInstCfg, "ODBC Drivers", (LPSTR) lpszDriver, NULL)) #endif { PUSH_ERROR (ODBC_ERROR_GENERAL_ERR); goto done; } if (_iodbcdm_cfg_commit (pCfg) || _iodbcdm_cfg_commit (pInstCfg)) { PUSH_ERROR (ODBC_ERROR_GENERAL_ERR); goto done; } retcode = TRUE; done: if (pCfg) _iodbcdm_cfg_done (pCfg); if (pInstCfg) _iodbcdm_cfg_done (pInstCfg); if (entries) free (entries); quit: wSystemDSN = USERDSN_ONLY; configMode = ODBC_BOTH_DSN; return retcode; } BOOL INSTAPI SQLRemoveDriverW (LPCWSTR lpszDriver, BOOL fRemoveDSN, LPDWORD lpdwUsageCount) { char *_driver_u8 = NULL; BOOL retcode = FALSE; _driver_u8 = (char *) dm_SQL_WtoU8 ((SQLWCHAR *) lpszDriver, SQL_NTS); if (_driver_u8 == NULL && lpszDriver) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } retcode = SQLRemoveDriver (_driver_u8, fRemoveDSN, lpdwUsageCount); done: MEM_FREE (_driver_u8); return retcode; } libiodbc-3.52.16/iodbcinst/SQLConfigDataSource.c0000664000175000017500000003700414424170750016254 00000000000000/* * SQLConfigDataSource.c * * $Id$ * * Add, modify or delete datasources * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include "unicode.h" #if defined (__APPLE__) && !defined (NO_FRAMEWORKS) # include #endif #include "dlf.h" #include "inifile.h" #include "misc.h" #include "iodbc_error.h" #ifndef WIN32 #include #if defined (__APPLE__) && !defined (NO_FRAMEWORKS) #define CALL_CONFIG_DSN(path) \ if (path) \ { \ char *tmp_path = strdup (path); \ if (tmp_path) \ { \ char *ptr = strstr (tmp_path, "/Contents/MacOS/"); \ if (ptr) \ *ptr = 0; \ liburl = CFURLCreateFromFileSystemRepresentation (NULL, (UInt8 *) tmp_path, strlen (tmp_path), FALSE); \ CFArrayRef arr = CFBundleCopyExecutableArchitecturesForURL (liburl); \ if (arr) \ bundle_dll = CFBundleCreate (NULL, liburl); \ if (arr) \ CFRelease (arr); \ if (liburl) \ CFRelease (liburl); \ } \ MEM_FREE (tmp_path); \ CALL_CONFIG_DSN_BUNDLE (); \ } #define CALL_CONFIG_DSNW(path) \ if (path) \ { \ char *tmp_path = strdup ((const char *)path); \ if (tmp_path) \ { \ char *ptr = strstr (tmp_path, "/Contents/MacOS/"); \ if (ptr) \ *ptr = 0; \ liburl = CFURLCreateFromFileSystemRepresentation (NULL, (UInt8 *) tmp_path, strlen (tmp_path), FALSE); \ CFArrayRef arr = CFBundleCopyExecutableArchitecturesForURL (liburl); \ if (arr) \ bundle_dll = CFBundleCreate (NULL, liburl); \ if (arr) \ CFRelease (arr); \ if (liburl) \ CFRelease (liburl); \ } \ MEM_FREE (tmp_path); \ CALL_CONFIG_DSNW_BUNDLE (); \ } #define CALL_CONFIG_DSN_BUNDLE() \ if (bundle_dll != NULL) \ { \ if ((pConfigDSN = (pConfigDSNFunc) CFBundleGetFunctionPointerForName (bundle_dll, CFSTR ("ConfigDSN"))) != NULL) \ { \ if (pConfigDSN (hwndParent, fRequest, lpszDriver, lpszAttributes)) \ { \ retcode = TRUE; \ goto done; \ } \ else \ { \ PUSH_ERROR (ODBC_ERROR_REQUEST_FAILED); \ retcode = FALSE; \ goto done; \ } \ } \ } #define CALL_CONFIG_DSNW_BUNDLE() \ if (bundle_dll != NULL) \ { \ if ((pConfigDSNW = (pConfigDSNWFunc) CFBundleGetFunctionPointerForName (bundle_dll, CFSTR ("ConfigDSNW"))) != NULL) \ { \ if (pConfigDSNW (hwndParent, fRequest, (SQLWCHAR *) lpszDriver, (SQLWCHAR *) lpszAttributes)) \ { \ retcode = TRUE; \ goto done; \ } \ else \ { \ PUSH_ERROR (ODBC_ERROR_REQUEST_FAILED); \ retcode = FALSE; \ goto done; \ } \ } \ else if ((pConfigDSN = (pConfigDSNFunc) CFBundleGetFunctionPointerForName (bundle_dll, CFSTR ("ConfigDSN"))) != NULL) \ { \ char *_attrs_u8, *ptr_u8; \ wchar_t *ptr; \ int length; \ for (length = 0, ptr = lpszAttributes; *ptr; length += WCSLEN (ptr) + 1, ptr += WCSLEN (ptr) + 1); \ if (length > 0) \ { \ if ((_attrs_u8 = malloc (length * UTF8_MAX_CHAR_LEN + 1)) != NULL) \ { \ for (ptr = lpszAttributes, ptr_u8 = _attrs_u8; *ptr; ptr += WCSLEN (ptr) + 1, ptr_u8 += STRLEN (ptr_u8) + 1) \ dm_StrCopyOut2_W2A (ptr, (SQLCHAR *)ptr_u8, WCSLEN (ptr) * UTF8_MAX_CHAR_LEN, NULL); \ *ptr_u8 = '\0'; \ } \ } \ else \ _attrs_u8 = (char *) dm_SQL_WtoU8 ((SQLWCHAR *) lpszAttributes, SQL_NTS); \ if (_attrs_u8 == NULL && lpszAttributes) \ { \ PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); \ retcode = FALSE; \ goto done; \ } \ if (pConfigDSN (hwndParent, fRequest, _drv_u8, _attrs_u8)) \ { \ MEM_FREE (_attrs_u8); \ retcode = TRUE; \ goto done; \ } \ else \ { \ MEM_FREE (_attrs_u8); \ PUSH_ERROR (ODBC_ERROR_REQUEST_FAILED); \ retcode = FALSE; \ goto done; \ } \ } \ } #else #define CALL_CONFIG_DSN(path) \ if ((handle = DLL_OPEN (path)) != NULL) \ { \ if ((pConfigDSN = (pConfigDSNFunc) DLL_PROC (handle, "ConfigDSN")) != NULL) \ { \ if (pConfigDSN (hwndParent, fRequest, lpszDriver, lpszAttributes)) \ { \ DLL_CLOSE (handle); \ retcode = TRUE; \ goto done; \ } \ else \ { \ PUSH_ERROR (ODBC_ERROR_REQUEST_FAILED); \ DLL_CLOSE (handle); \ retcode = FALSE; \ goto done; \ } \ } \ DLL_CLOSE (handle); \ } #define CALL_CONFIG_DSNW(path) \ if ((handle = DLL_OPEN (path)) != NULL) \ { \ if ((pConfigDSNW = (pConfigDSNWFunc) DLL_PROC (handle, "ConfigDSNW")) != NULL) \ { \ if (pConfigDSNW (hwndParent, fRequest, (SQLWCHAR *) lpszDriver, (SQLWCHAR *) lpszAttributes)) \ { \ DLL_CLOSE (handle); \ retcode = TRUE; \ goto done; \ } \ else \ { \ PUSH_ERROR (ODBC_ERROR_REQUEST_FAILED); \ DLL_CLOSE (handle); \ retcode = FALSE; \ goto done; \ } \ } \ else if ((pConfigDSN = (pConfigDSNFunc) DLL_PROC (handle, "ConfigDSN")) != NULL) \ { \ char *_attrs_u8, *ptr_u8; \ wchar_t *ptr; \ int length; \ for (length = 0, ptr = lpszAttributes; *ptr; length += WCSLEN (ptr) + 1, ptr += WCSLEN (ptr) + 1); \ if (length > 0) \ { \ if ((_attrs_u8 = malloc (length * UTF8_MAX_CHAR_LEN + 1)) != NULL) \ { \ for (ptr = lpszAttributes, ptr_u8 = _attrs_u8; *ptr; ptr += WCSLEN (ptr) + 1, ptr_u8 += STRLEN (ptr_u8) + 1) \ dm_StrCopyOut2_W2A (ptr, ptr_u8, WCSLEN (ptr) * UTF8_MAX_CHAR_LEN, NULL); \ *ptr_u8 = '\0'; \ } \ } \ else \ _attrs_u8 = (char *) dm_SQL_WtoU8 ((SQLWCHAR *) lpszAttributes, SQL_NTS); \ if (_attrs_u8 == NULL && lpszAttributes) \ { \ PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); \ DLL_CLOSE (handle); \ retcode = FALSE; \ goto done; \ } \ if (pConfigDSN (hwndParent, fRequest, _drv_u8, _attrs_u8)) \ { \ MEM_FREE (_attrs_u8); \ DLL_CLOSE (handle); \ retcode = TRUE; \ goto done; \ } \ else \ { \ MEM_FREE (_attrs_u8); \ PUSH_ERROR (ODBC_ERROR_REQUEST_FAILED); \ DLL_CLOSE (handle); \ retcode = FALSE; \ goto done; \ } \ } \ DLL_CLOSE (handle); \ } #endif #endif extern BOOL RemoveDSNFromIni (LPCSTR lpszDSN, SQLCHAR waMode); BOOL RemoveDefaultDataSource (void) { BOOL retcode = FALSE; PCONFIG pCfg = NULL; /* removes the default dsn */ if (!RemoveDSNFromIni ("Default", 'A')) { PUSH_ERROR (ODBC_ERROR_REQUEST_FAILED); goto quit; } /* removes the default driver not regarding the current config mode */ if (_iodbcdm_cfg_search_init (&pCfg, "odbcinst.ini", TRUE)) { PUSH_ERROR (ODBC_ERROR_REQUEST_FAILED); goto quit; } _iodbcdm_cfg_write (pCfg, "Default", NULL, NULL); if (!_iodbcdm_cfg_commit (pCfg)) retcode = TRUE; else { PUSH_ERROR (ODBC_ERROR_REQUEST_FAILED); goto quit; } /* check now the system only if it was the user first checked */ if (wSystemDSN != SYSTEMDSN_ONLY) { if (pCfg) { _iodbcdm_cfg_done (pCfg); pCfg = NULL; } wSystemDSN = SYSTEMDSN_ONLY; if (_iodbcdm_cfg_search_init (&pCfg, "odbcinst.ini", TRUE)) goto quit; _iodbcdm_cfg_write (pCfg, "Default", NULL, NULL); _iodbcdm_cfg_commit (pCfg); } quit: if (pCfg) _iodbcdm_cfg_done (pCfg); return retcode; } BOOL INSTAPI SQLConfigDataSource_Internal (HWND hwndParent, WORD fRequest, SQLPOINTER lpszDriver, SQLPOINTER lpszAttributes, SQLCHAR waMode) { PCONFIG pCfg = NULL; BOOL retcode = FALSE; void *handle; pConfigDSNFunc pConfigDSN; pConfigDSNWFunc pConfigDSNW; #if defined (__APPLE__) && !defined (NO_FRAMEWORKS) CFBundleRef bundle = NULL; CFBundleRef bundle_dll = NULL; CFURLRef liburl; #endif char *_drv_u8 = NULL; /* Check input parameters */ CLEAR_ERROR (); /* Map the request User/System */ switch (fRequest) { case ODBC_ADD_DSN: case ODBC_CONFIG_DSN: case ODBC_REMOVE_DSN: configMode = ODBC_USER_DSN; break; case ODBC_ADD_SYS_DSN: case ODBC_CONFIG_SYS_DSN: case ODBC_REMOVE_SYS_DSN: configMode = ODBC_SYSTEM_DSN; fRequest = fRequest - ODBC_ADD_SYS_DSN + ODBC_ADD_DSN; break; case ODBC_REMOVE_DEFAULT_DSN: retcode = RemoveDefaultDataSource (); goto resetdsnmode; default: PUSH_ERROR (ODBC_ERROR_INVALID_REQUEST_TYPE); goto resetdsnmode; } if (waMode == 'W') { _drv_u8 = (char *) dm_SQL_WtoU8 ((SQLWCHAR *) lpszDriver, SQL_NTS); if (_drv_u8 == NULL && lpszDriver) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto resetdsnmode; } } else _drv_u8 = (char *) lpszDriver; if (!_drv_u8 || !STRLEN (_drv_u8)) { PUSH_ERROR (ODBC_ERROR_INVALID_NAME); goto resetdsnmode; } /* Get it from the user odbcinst file */ wSystemDSN = USERDSN_ONLY; if (!_iodbcdm_cfg_search_init (&pCfg, "odbcinst.ini", TRUE)) { if (!_iodbcdm_cfg_find (pCfg, (char *) _drv_u8, "Setup")) { if (waMode == 'A') { CALL_CONFIG_DSN (pCfg->value); } else { CALL_CONFIG_DSNW (pCfg->value); } } if (!_iodbcdm_cfg_find (pCfg, (char *) _drv_u8, "Driver")) { if (waMode == 'A') { CALL_CONFIG_DSN (pCfg->value); } else { CALL_CONFIG_DSNW (pCfg->value); } } if (!access (_drv_u8, X_OK)) { if (waMode == 'A') { CALL_CONFIG_DSN (_drv_u8); } else { CALL_CONFIG_DSNW (_drv_u8); } } if (!_iodbcdm_cfg_find (pCfg, "Default", "Setup")) { if (waMode == 'A') { CALL_CONFIG_DSN (pCfg->value); } else { CALL_CONFIG_DSNW (pCfg->value); } } if (!_iodbcdm_cfg_find (pCfg, "Default", "Driver")) { if (waMode == 'A') { CALL_CONFIG_DSN (pCfg->value); } else { CALL_CONFIG_DSNW (pCfg->value); } } } /* Get it from the system odbcinst file */ if (pCfg) { _iodbcdm_cfg_done (pCfg); pCfg = NULL; } wSystemDSN = SYSTEMDSN_ONLY; if (!_iodbcdm_cfg_search_init (&pCfg, "odbcinst.ini", TRUE)) { if (!_iodbcdm_cfg_find (pCfg, (char *) _drv_u8, "Setup")) { if (waMode == 'A') { CALL_CONFIG_DSN (pCfg->value); } else { CALL_CONFIG_DSNW (pCfg->value); } } if (!_iodbcdm_cfg_find (pCfg, (char *) _drv_u8, "Driver")) { if (waMode == 'A') { CALL_CONFIG_DSN (pCfg->value); } else { CALL_CONFIG_DSNW (pCfg->value); } } if (!access (_drv_u8, X_OK)) { if (waMode == 'A') { CALL_CONFIG_DSN (_drv_u8); } else { CALL_CONFIG_DSNW (_drv_u8); } } if (!_iodbcdm_cfg_find (pCfg, "Default", "Setup")) { if (waMode == 'A') { CALL_CONFIG_DSN (pCfg->value); } else { CALL_CONFIG_DSNW (pCfg->value); } } if (!_iodbcdm_cfg_find (pCfg, "Default", "Driver")) { if (waMode == 'A') { CALL_CONFIG_DSN (pCfg->value); } else { CALL_CONFIG_DSNW (pCfg->value); } } } /* The last ressort, a proxy driver */ #if defined (__APPLE__) # if !defined(NO_FRAMEWORKS) bundle = CFBundleGetBundleWithIdentifier (CFSTR ("org.iodbc.core")); if (bundle) { /* Search for the drvproxy library */ liburl = CFBundleCopyResourceURL (bundle, CFSTR ("iODBCdrvproxy.bundle"), NULL, NULL); if (liburl) { bundle_dll = CFBundleCreate (NULL, liburl); CFRelease (liburl); if (waMode == 'A') { CALL_CONFIG_DSN_BUNDLE (); } else { CALL_CONFIG_DSNW_BUNDLE (); } } } # endif #else if (waMode == 'A') { CALL_CONFIG_DSN ("libdrvproxy.so.2"); } else { CALL_CONFIG_DSNW ("libdrvproxy.so.2"); } #endif /* Error : ConfigDSN could no be found */ PUSH_ERROR (ODBC_ERROR_LOAD_LIB_FAILED); done: if (pCfg) _iodbcdm_cfg_done (pCfg); resetdsnmode: if (_drv_u8 != lpszDriver) MEM_FREE (_drv_u8); wSystemDSN = USERDSN_ONLY; configMode = ODBC_BOTH_DSN; return retcode; } BOOL INSTAPI SQLConfigDataSource (HWND hwndParent, WORD fRequest, LPCSTR lpszDriver, LPCSTR lpszAttributes) { return SQLConfigDataSource_Internal (hwndParent, fRequest, (SQLPOINTER) lpszDriver, (SQLPOINTER) lpszAttributes, 'A'); } BOOL INSTAPI SQLConfigDataSourceW (HWND hwndParent, WORD fRequest, LPCWSTR lpszDriver, LPCWSTR lpszAttributes) { return SQLConfigDataSource_Internal (hwndParent, fRequest, (SQLPOINTER) lpszDriver, (SQLPOINTER) lpszAttributes, 'W'); } libiodbc-3.52.16/iodbcinst/iodbc_error.h0000664000175000017500000000746014424170750015015 00000000000000/* * iodbc_error.h * * $Id$ * * Misc support functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef _IODBC_ERROR_H #define _IODBC_ERROR_H /* Definition of the error code array */ #define ERROR_NUM 8 extern DWORD ierror[ERROR_NUM]; extern LPSTR errormsg[ERROR_NUM]; extern SWORD numerrors; #define CLEAR_ERROR() \ numerrors = -1; #define PUSH_ERROR(error) \ if(numerrors < ERROR_NUM) \ { \ ierror[++numerrors] = (error); \ errormsg[numerrors] = NULL; \ } #define POP_ERROR(error) \ if(numerrors != -1) \ { \ errormsg[numerrors] = NULL; \ (error) = ierror[numerrors--]; \ } #ifdef IS_ERROR # undef IS_ERROR #endif #define IS_ERROR() \ (numerrors != -1) ? 1 : 0 #endif libiodbc-3.52.16/iodbcinst/SQLReadFileDSN.c0000664000175000017500000001376114424170750015120 00000000000000/* * SQLReadFileDSN.c * * $Id$ * * These functions intentionally left blank * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include "unicode.h" #include "inifile.h" #include "iodbc_error.h" #include "misc.h" extern int GetPrivateProfileString (LPCSTR lpszSection, LPCSTR lpszEntry, LPCSTR lpszDefault, LPSTR lpszRetBuffer, int cbRetBuffer, LPCSTR lpszFilename); BOOL INSTAPI SQLReadFileDSN (LPCSTR lpszFileName, LPCSTR lpszAppName, LPCSTR lpszKeyName, LPSTR lpszString, WORD cbString, WORD * pcbString) { BOOL retcode = FALSE; WORD len = 0, i; char filename[1024]; /* Check input parameters */ CLEAR_ERROR (); if (!lpszString || !cbString) { PUSH_ERROR (ODBC_ERROR_INVALID_BUFF_LEN); goto quit; } if (!lpszAppName && lpszKeyName) { PUSH_ERROR (ODBC_ERROR_INVALID_REQUEST_TYPE); goto quit; } /* Is a file is specified */ if (lpszFileName) { _iodbcdm_getdsnfile (lpszFileName, filename, sizeof (filename)); len = GetPrivateProfileString (lpszAppName, lpszKeyName, "", lpszString, cbString, filename); if (numerrors == -1) retcode = TRUE; goto quit; } PUSH_ERROR (ODBC_ERROR_INVALID_PATH); goto quit; quit: for (i = 0; i < len; i++) if (!lpszString[i]) lpszString[i] = ';'; if (pcbString) *pcbString = len; if (len == cbString - 1) { PUSH_ERROR (ODBC_ERROR_OUTPUT_STRING_TRUNCATED); retcode = FALSE; } return retcode; } BOOL INSTAPI SQLReadFileDSNW (LPCWSTR lpszFileName, LPCWSTR lpszAppName, LPCWSTR lpszKeyName, LPWSTR lpszString, WORD cbString, WORD * pcbString) { char *_filename_u8 = NULL; char *_appname_u8 = NULL; char *_keyname_u8 = NULL; char *_string_u8 = NULL; BOOL retcode = FALSE; _filename_u8 = (char *) dm_SQL_WtoU8 ((SQLWCHAR *) lpszFileName, SQL_NTS); if (_filename_u8 == NULL && lpszFileName) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } _appname_u8 = (char *) dm_SQL_WtoU8 ((SQLWCHAR *) lpszAppName, SQL_NTS); if (_appname_u8 == NULL && lpszAppName) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } _keyname_u8 = (char *) dm_SQL_WtoU8 ((SQLWCHAR *) lpszKeyName, SQL_NTS); if (_keyname_u8 == NULL && lpszKeyName) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } if (cbString > 0) { if ((_string_u8 = malloc (cbString * UTF8_MAX_CHAR_LEN + 1)) == NULL) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } } retcode = SQLReadFileDSN (_filename_u8, _appname_u8, _keyname_u8, _string_u8, cbString * UTF8_MAX_CHAR_LEN, pcbString); if (retcode == TRUE) { dm_StrCopyOut2_U8toW ((SQLCHAR *)_string_u8, lpszString, cbString, pcbString); } done: MEM_FREE (_filename_u8); MEM_FREE (_appname_u8); MEM_FREE (_keyname_u8); MEM_FREE (_string_u8); return retcode; } libiodbc-3.52.16/iodbcinst/unicode.h0000664000175000017500000002003714424170750014145 00000000000000/* * unicode.h * * $Id$ * * ODBC unicode support * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef _UNICODE_H #define _UNICODE_H #include #include #if defined (HAVE_WCHAR_H) #include #endif typedef unsigned char utf8_t; typedef unsigned short ucs2_t; typedef unsigned int ucs4_t; typedef enum { CP_UCS4 = SQL_DM_CP_UCS4, CP_UTF16 = SQL_DM_CP_UTF16, CP_UTF8 = SQL_DM_CP_UTF8 } IODBC_CHARSET; #if defined(SIZEOF_WCHAR) # if (SIZEOF_WCHAR == 2) # define CP_DEF CP_UTF16 # else # define CP_DEF CP_UCS4 # endif #else # define CP_DEF CP_UCS4 #endif #define WCHAR_MAXSIZE 4 typedef struct _dm_conv { IODBC_CHARSET dm_cp; IODBC_CHARSET drv_cp; } DM_CONV; typedef enum { CD_NONE = 0, CD_A2W = 1, CD_W2A = 2, CD_W2W = 3 } CONV_DIRECT; /* * Max length of a UTF-8 encoded character sequence */ #define UTF8_MAX_CHAR_LEN 4 /* According to RFC3629 */ #ifndef MB_CUR_MAX #define MB_CUR_MAX UTF8_MAX_CHAR_LEN #endif /* * Function Prototypes */ SQLCHAR *dm_SQL_W2A (SQLWCHAR * inStr, int size); SQLCHAR *dm_SQL_WtoU8 (SQLWCHAR * inStr, int size); SQLCHAR *dm_strcpy_W2A (SQLCHAR * destStr, SQLWCHAR * sourStr); SQLWCHAR *dm_SQL_A2W (SQLCHAR * inStr, int size); SQLWCHAR *dm_SQL_U8toW (SQLCHAR * inStr, int size); SQLWCHAR *dm_strcpy_A2W (SQLWCHAR * destStr, SQLCHAR * sourStr); int dm_StrCopyOut2_A2W (SQLCHAR * inStr, SQLWCHAR * outStr, SQLSMALLINT size, WORD * result); int dm_StrCopyOut2_U8toW (SQLCHAR * inStr, SQLWCHAR * outStr, int size, WORD * result); int dm_StrCopyOut2_W2A (SQLWCHAR * inStr, SQLCHAR * outStr, SQLSMALLINT size, WORD * result); # ifdef WIN32 #define OPL_W2A(w, a, cb) \ WideCharToMultiByte(CP_ACP, 0, w, cb, a, cb, NULL, NULL) #define OPL_A2W(a, w, cb) \ MultiByteToWideChar(CP_ACP, 0, a, cb, w, cb) # else #define OPL_W2A(XW, XA, SIZE) wcstombs((char *) XA, (wchar_t *) XW, SIZE) #define OPL_A2W(XA, XW, SIZE) mbstowcs((wchar_t *) XW, (char *) XA, SIZE) # endif int dm_conv_W2W(void *inStr, int len, void *outStr, int size, IODBC_CHARSET icharset, IODBC_CHARSET ocharset); int dm_conv_W2A(void *inStr, int inLen, char *outStr, int size, IODBC_CHARSET charset); int dm_conv_A2W(char *inStr, int inLen, void *outStr, int size, IODBC_CHARSET charset); void DM_strcpy_U8toW (DM_CONV *conv, void *dest, SQLCHAR *sour); size_t DRV_WCHARSIZE(DM_CONV *conv); size_t DM_WCHARSIZE(DM_CONV *conv); size_t DRV_WCHARSIZE_ALLOC(DM_CONV *conv); size_t DM_WCHARSIZE_ALLOC(DM_CONV *conv); void *DM_A2W(DM_CONV *conv, SQLCHAR * inStr, int size); SQLCHAR *DM_W2A(DM_CONV *conv, void * inStr, int size); SQLCHAR *DRV_W2A(DM_CONV *conv, void * inStr, int size); void DM_SetWCharAt(DM_CONV *conv, void *str, int pos, int ch); void DRV_SetWCharAt(DM_CONV *conv, void *str, int pos, int ch); SQLWCHAR DM_GetWCharAt(DM_CONV *conv, void *str, int pos); void *DM_WCSCPY(DM_CONV *conv, void *dest, void *sour); void *DM_WCSNCPY(DM_CONV *conv, void *dest, void *sour, size_t count); void *DRV_WCSNCPY(DM_CONV *conv, void *dest, void *sour, size_t count); size_t DM_WCSLEN(DM_CONV *conv, void *str); size_t DRV_WCSLEN(DM_CONV *conv, void *str); SQLCHAR *DM_WtoU8(DM_CONV *conv, void *inStr, int size); SQLCHAR *DRV_WtoU8(DM_CONV *conv, void *inStr, int size); void *DM_U8toW(DM_CONV *conv, SQLCHAR *inStr, int size); int dm_StrCopyOut2_A2W_d2m (DM_CONV *conv, SQLCHAR *inStr, void *outStr, int size, SQLSMALLINT *result, int *copied); int dm_StrCopyOut2_W2A_d2m (DM_CONV *conv, void *inStr, SQLCHAR *outStr, int size, SQLSMALLINT *result, int *copied); int dm_StrCopyOut2_U8toW_d2m (DM_CONV *conv, SQLCHAR *inStr, void *outStr, int size, SQLSMALLINT *result, int *copied); int dm_StrCopyOut2_W2W_d2m (DM_CONV *conv, void *inStr, void *outStr, int size, SQLSMALLINT *result, int *copied); int dm_StrCopyOut2_W2A_m2d (DM_CONV *conv, void *inStr, SQLCHAR *outStr, int size, SQLSMALLINT *result, int *copied); int dm_StrCopyOut2_W2W_m2d (DM_CONV *conv, void *inStr, void *outStr, int size, SQLSMALLINT *result, int *copied); void *conv_text_d2m(DM_CONV *conv, void *inStr, int size, CONV_DIRECT direct); void *conv_text_m2d(DM_CONV *conv, void *inStr, int size, CONV_DIRECT direct); void * conv_text_m2d_W2W(DM_CONV *conv, void *inStr, SQLLEN size, SQLLEN *copied); /* * Replacement functions */ #if !defined(HAVE_WCSLEN) size_t wcslen (const wchar_t * wcs); #endif #if !defined(HAVE_WCSCPY) wchar_t * wcscpy (wchar_t * wcd, const wchar_t * wcs); #endif #if !defined(HAVE_WCSNCPY) wchar_t * wcsncpy (wchar_t * wcd, const wchar_t * wcs, size_t n); #endif #if !defined(HAVE_WCSCHR) wchar_t* wcschr(const wchar_t *wcs, const wchar_t wc); #endif #if !defined(HAVE_WCSCAT) wchar_t* wcscat(wchar_t *dest, const wchar_t *src); #endif #if !defined(HAVE_WCSCMP) int wcscmp (const wchar_t* s1, const wchar_t* s2); #endif #if !defined(HAVE_WCSNCASECMP) int wcsncasecmp (const wchar_t* s1, const wchar_t* s2, size_t n); #endif #endif /* _UNICODE_H */ libiodbc-3.52.16/iodbcinst/SQLWritePrivateProfileString.c0000664000175000017500000002016214424170750020226 00000000000000/* * SQLWritePrivateProfileString.c * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include "unicode.h" #include "inifile.h" #include "iodbc_error.h" #include "misc.h" #ifndef WIN32 BOOL WritePrivateProfileString (LPCSTR lpszSection, LPCSTR lpszEntry, LPCSTR lpszString, LPCSTR lpszFilename) { BOOL retcode = FALSE; PCONFIG pCfg = NULL; /* Check Input parameters */ if (lpszSection == NULL || *lpszSection == '\0') { PUSH_ERROR (ODBC_ERROR_INVALID_REQUEST_TYPE); goto fail; } /* If error during reading the file */ if (_iodbcdm_cfg_search_init (&pCfg, lpszFilename, TRUE)) { PUSH_ERROR (ODBC_ERROR_GENERAL_ERR); goto fail; } /* Check if the section must be deleted */ if (!lpszEntry) { _iodbcdm_cfg_write (pCfg, (LPSTR) lpszSection, NULL, NULL); goto done; } /* Check if the entry must be deleted */ if (!lpszString) { _iodbcdm_cfg_write (pCfg, (LPSTR) lpszSection, (LPSTR) lpszEntry, NULL); goto done; } /* Else add the entry */ _iodbcdm_cfg_write (pCfg, (LPSTR) lpszSection, (LPSTR) lpszEntry, (LPSTR) lpszString); done: if (!_iodbcdm_cfg_commit (pCfg)) retcode = TRUE; else { PUSH_ERROR (ODBC_ERROR_REQUEST_FAILED); goto fail; } fail: if (pCfg) _iodbcdm_cfg_done (pCfg); return retcode; } #endif BOOL INSTAPI SQLWritePrivateProfileString (LPCSTR lpszSection, LPCSTR lpszEntry, LPCSTR lpszString, LPCSTR lpszFilename) { char pathbuf[1024]; BOOL retcode = FALSE; /* Check input parameters */ CLEAR_ERROR (); /* Else go through user/system odbc.ini */ switch (configMode) { case ODBC_USER_DSN: wSystemDSN = USERDSN_ONLY; if (lpszFilename) { retcode = WritePrivateProfileString (lpszSection, lpszEntry, lpszString, lpszFilename); goto quit; } if (_iodbcadm_getinifile (pathbuf, sizeof (pathbuf), FALSE, TRUE)) retcode = WritePrivateProfileString (lpszSection, lpszEntry, lpszString, pathbuf); goto quit; case ODBC_SYSTEM_DSN: wSystemDSN = SYSTEMDSN_ONLY; if (lpszFilename) { retcode = WritePrivateProfileString (lpszSection, lpszEntry, lpszString, lpszFilename); goto quit; } if (_iodbcadm_getinifile (pathbuf, sizeof (pathbuf), FALSE, TRUE)) retcode = WritePrivateProfileString (lpszSection, lpszEntry, lpszString, pathbuf); goto quit; case ODBC_BOTH_DSN: wSystemDSN = USERDSN_ONLY; if (lpszFilename) { retcode = WritePrivateProfileString (lpszSection, lpszEntry, lpszString, lpszFilename); if (!retcode) { CLEAR_ERROR (); wSystemDSN = SYSTEMDSN_ONLY; retcode = WritePrivateProfileString (lpszSection, lpszEntry, lpszString, lpszFilename); } goto quit; } if (_iodbcadm_getinifile (pathbuf, sizeof (pathbuf), FALSE, TRUE)) retcode = WritePrivateProfileString (lpszSection, lpszEntry, lpszString, pathbuf); else { CLEAR_ERROR (); wSystemDSN = SYSTEMDSN_ONLY; if (_iodbcadm_getinifile (pathbuf, sizeof (pathbuf), FALSE, TRUE)) retcode = WritePrivateProfileString (lpszSection, lpszEntry, lpszString, pathbuf); } goto quit; } PUSH_ERROR (ODBC_ERROR_GENERAL_ERR); goto quit; quit: wSystemDSN = USERDSN_ONLY; configMode = ODBC_BOTH_DSN; return retcode; } BOOL INSTAPI SQLWritePrivateProfileStringW (LPCWSTR lpszSection, LPCWSTR lpszEntry, LPCWSTR lpszString, LPCWSTR lpszFilename) { char *_section_u8 = NULL; char *_entry_u8 = NULL; char *_string_u8 = NULL; char *_filename_u8 = NULL; BOOL retcode = FALSE; _section_u8 = (char *) dm_SQL_WtoU8 ((SQLWCHAR *) lpszSection, SQL_NTS); if (_section_u8 == NULL && lpszSection) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } _entry_u8 = (char *) dm_SQL_WtoU8 ((SQLWCHAR *) lpszEntry, SQL_NTS); if (_entry_u8 == NULL && lpszEntry) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } _string_u8 = (char *) dm_SQL_WtoU8 ((SQLWCHAR *) lpszString, SQL_NTS); if (_string_u8 == NULL && lpszString) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } _filename_u8 = (char *) dm_SQL_WtoU8 ((SQLWCHAR *) lpszFilename, SQL_NTS); if (_filename_u8 == NULL && lpszFilename) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } retcode = SQLWritePrivateProfileString (_section_u8, _entry_u8, _string_u8, _filename_u8); done: MEM_FREE (_section_u8); MEM_FREE (_entry_u8); MEM_FREE (_string_u8); MEM_FREE (_filename_u8); return retcode; } BOOL INSTAPI SQLSetKeywordValue (LPCSTR lpszSection, LPCSTR lpszEntry, LPSTR lpszString, int cbString) { return SQLWritePrivateProfileString (lpszSection, lpszEntry, lpszString, "odbc.ini"); } BOOL INSTAPI SQLSetKeywordValueW (LPCWSTR lpszSection, LPCWSTR lpszEntry, LPWSTR lpszString, int cbString) { return SQLWritePrivateProfileStringW (lpszSection, lpszEntry, lpszString, L"odbc.ini"); } libiodbc-3.52.16/iodbcinst/SQLValidDSN.c0000664000175000017500000001061714424170750014501 00000000000000/* * SQLValidDSN.c * * $Id$ * * Validate a DSN name * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include "unicode.h" #include "iodbc_error.h" #define INVALID_CHARS "[]{}(),;?*=!@\\" #define INVALID_CHARSW L"[]{}(),;?*=!@\\" BOOL ValidDSN (LPCSTR lpszDSN) { char *currp = (char *) lpszDSN; while (*currp) { if (strchr (INVALID_CHARS, *currp)) return FALSE; else currp++; } return TRUE; } BOOL ValidDSNW (LPCWSTR lpszDSN) { wchar_t *currp = (wchar_t *) lpszDSN; while (*currp) { if (wcschr (INVALID_CHARSW, *currp)) return FALSE; else currp++; } return TRUE; } BOOL INSTAPI SQLValidDSN (LPCSTR lpszDSN) { BOOL retcode = FALSE; /* Check dsn */ CLEAR_ERROR (); if (!lpszDSN || !STRLEN (lpszDSN) || STRLEN (lpszDSN) >= SQL_MAX_DSN_LENGTH) { PUSH_ERROR (ODBC_ERROR_GENERAL_ERR); goto quit; } retcode = ValidDSN (lpszDSN); quit: return retcode; } BOOL INSTAPI SQLValidDSNW (LPCWSTR lpszDSN) { BOOL retcode = FALSE; /* Check dsn */ CLEAR_ERROR (); if (!lpszDSN || !WCSLEN (lpszDSN) || WCSLEN (lpszDSN) >= SQL_MAX_DSN_LENGTH) { PUSH_ERROR (ODBC_ERROR_GENERAL_ERR); goto quit; } retcode = ValidDSNW (lpszDSN); quit: return retcode; } libiodbc-3.52.16/iodbcinst/SQLInstallDriverEx.c0000664000175000017500000002332514424170750016154 00000000000000/* * SQLInstallDriverEx.c * * $Id$ * * These functions intentionally left blank * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include "unicode.h" #include "misc.h" #include "inifile.h" #include "iodbc_error.h" #ifdef _MAC # include #endif #if !defined(WINDOWS) && !defined(WIN32) && !defined(OS2) && !defined(macintosh) # include # include # include # include # define UNIX_PWD #endif extern BOOL InstallDriverPath (LPSTR lpszPath, WORD cbPathMax, WORD * pcbPathOut, LPSTR envname); BOOL InstallDriverPathLength (WORD * pcbPathOut, LPSTR envname) { #ifdef _MAC OSErr result; long fldrDid; short fldrRef; #endif BOOL retcode = FALSE; WORD len = 0; char path[1024]; char *ptr; #if !defined(UNIX_PWD) #ifdef _MAC result = FindFolder (kOnSystemDisk, kExtensionFolderType, kDontCreateFolder, &fldrRef, &fldrDid); if (result != noErr) { PUSH_ERROR (ODBC_ERROR_GENERAL_ERR); goto quit; } ptr = get_full_pathname (fldrDid, fldrRef); len = STRLEN (ptr); free (ptr); goto done; #else /* * On Windows, there is only one place to look */ len = GetWindowsDirectory (path, sizeof (path)); goto done; #endif #else /* * 1. Check $ODBCDRIVERS environment variable */ if ((ptr = getenv (envname)) && access (ptr, R_OK | W_OK | X_OK) == 0) { len = STRLEN (ptr); goto done; } /* * 2. Check /usr/local/lib and /usr/lib */ #ifdef _BE if (access ("/boot/beos/system/lib", R_OK | W_OK | X_OK) == 0) { len = STRLEN ("/boot/beos/system/lib"); goto done; } #else if (access ("/usr/local/lib", R_OK | W_OK | X_OK) == 0) { len = STRLEN ("/usr/local/lib"); goto done; } #endif #ifdef _BE if (access ("/boot/home/config/lib", R_OK | W_OK | X_OK) == 0) { len = STRLEN ("/boot/home/config/lib"); goto done; } #else if (access ("/usr/lib", R_OK | W_OK | X_OK) == 0) { len = STRLEN ("/usr/lib"); goto done; } #endif /* * 3. Check either $HOME */ if (!(ptr = getenv ("HOME"))) { ptr = (char *) getpwuid (getuid ()); if (ptr) ptr = ((struct passwd *) ptr)->pw_dir; } if (ptr) { #ifdef _BE sprintf (path, "%s/config/lib", ptr); #else sprintf (path, "%s/lib", ptr); #endif if (access (path, R_OK | W_OK | X_OK) == 0) { len = STRLEN (path); goto done; } } if (!mkdir (path, 0755)) goto done; #endif SQLPostInstallerError (ODBC_ERROR_GENERAL_ERR, "Cannot retrieve a directory where to install the driver or translator."); goto quit; done: retcode = TRUE; quit: if (pcbPathOut) *pcbPathOut = len; return retcode; } BOOL INSTAPI SQLInstallDriverEx (LPCSTR lpszDriver, LPCSTR lpszPathIn, LPSTR lpszPathOut, WORD cbPathOutMax, WORD * pcbPathOut, WORD fRequest, LPDWORD lpdwUsageCount) { PCONFIG pCfg = NULL, pOdbcCfg = NULL; BOOL retcode = FALSE; CLEAR_ERROR (); if (lpszPathIn && access (lpszPathIn, R_OK | X_OK)) { PUSH_ERROR (ODBC_ERROR_INVALID_PATH); goto quit; } switch (fRequest) { case ODBC_INSTALL_INQUIRY: if (lpszPathIn) { if (pcbPathOut) *pcbPathOut = STRLEN (lpszPathIn); retcode = TRUE; } else retcode = InstallDriverPathLength (pcbPathOut, "ODBCDRIVERS"); goto quit; case ODBC_INSTALL_COMPLETE: break; default: PUSH_ERROR (ODBC_ERROR_INVALID_REQUEST_TYPE); goto quit; } /* Check input parameters */ if (!lpszDriver || !STRLEN (lpszDriver)) { PUSH_ERROR (ODBC_ERROR_INVALID_PARAM_SEQUENCE); goto quit; } if (!lpszPathOut || !cbPathOutMax) { PUSH_ERROR (ODBC_ERROR_INVALID_BUFF_LEN); goto quit; } /* Write the out path */ if (!InstallDriverPath (lpszPathOut, cbPathOutMax, pcbPathOut, "ODBCDRIVERS")) goto quit; /* Else go through user/system odbcinst.ini */ switch (configMode) { case ODBC_BOTH_DSN: case ODBC_USER_DSN: wSystemDSN = USERDSN_ONLY; break; case ODBC_SYSTEM_DSN: wSystemDSN = SYSTEMDSN_ONLY; break; } if (_iodbcdm_cfg_search_init (&pCfg, "odbcinst.ini", TRUE)) { PUSH_ERROR (ODBC_ERROR_GENERAL_ERR); goto quit; } if (_iodbcdm_cfg_search_init (&pOdbcCfg, "odbc.ini", TRUE)) { PUSH_ERROR (ODBC_ERROR_GENERAL_ERR); pOdbcCfg = NULL; goto done; } if (!install_from_string (pCfg, pOdbcCfg, (char *) lpszDriver, TRUE)) { PUSH_ERROR (ODBC_ERROR_INVALID_KEYWORD_VALUE); goto done; } if (_iodbcdm_cfg_commit (pCfg) || _iodbcdm_cfg_commit (pOdbcCfg)) { PUSH_ERROR (ODBC_ERROR_GENERAL_ERR); goto done; } retcode = TRUE; done: _iodbcdm_cfg_done (pCfg); if (pOdbcCfg) _iodbcdm_cfg_done (pOdbcCfg); quit: wSystemDSN = USERDSN_ONLY; configMode = ODBC_BOTH_DSN; return retcode; } BOOL INSTAPI SQLInstallDriverExW (LPCWSTR lpszDriver, LPCWSTR lpszPathIn, LPWSTR lpszPathOut, WORD cbPathOutMax, WORD * pcbPathOut, WORD fRequest, LPDWORD lpdwUsageCount) { char *_driver_u8 = NULL; char *_pathin_u8 = NULL; char *_pathout_u8 = NULL; BOOL retcode = FALSE; int length; SQLWCHAR *ptr; char *ptr_u8; for (length = 0, ptr = (SQLWCHAR *) lpszDriver; *ptr; length += WCSLEN (ptr) + 1, ptr += WCSLEN (ptr) + 1); if (length > 0) { if ((_driver_u8 = malloc (length * UTF8_MAX_CHAR_LEN + 1)) != NULL) { for (ptr = (SQLWCHAR *) lpszDriver, ptr_u8 = _driver_u8; *ptr; ptr += WCSLEN (ptr) + 1, ptr_u8 += STRLEN (ptr_u8) + 1) dm_StrCopyOut2_W2A (ptr, (SQLCHAR *)ptr_u8, WCSLEN (ptr) * UTF8_MAX_CHAR_LEN, NULL); *ptr_u8 = '\0'; } } else _driver_u8 = (char *) dm_SQL_WtoU8 ((SQLWCHAR *) lpszDriver, SQL_NTS); if (_driver_u8 == NULL && lpszDriver) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } _pathin_u8 = (char *) dm_SQL_WtoU8 ((SQLWCHAR *) lpszPathIn, SQL_NTS); if (_pathin_u8 == NULL && lpszPathIn) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } if (cbPathOutMax > 0) { if ((_pathout_u8 = malloc (cbPathOutMax * UTF8_MAX_CHAR_LEN + 1)) == NULL) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } } retcode = SQLInstallDriverEx (_driver_u8, _pathin_u8, _pathout_u8, cbPathOutMax * UTF8_MAX_CHAR_LEN, pcbPathOut, fRequest, lpdwUsageCount); if (retcode == TRUE) { dm_StrCopyOut2_U8toW ((SQLCHAR *)_pathout_u8, lpszPathOut, cbPathOutMax, pcbPathOut); } done: MEM_FREE (_driver_u8); MEM_FREE (_pathin_u8); MEM_FREE (_pathout_u8); return retcode; } libiodbc-3.52.16/iodbcinst/SQLSetConfigMode.c0000664000175000017500000000753314424170750015566 00000000000000/* * SQLSetConfigMode.c * * $Id$ * * These functions intentionally left blank * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include "iodbc_error.h" #include "misc.h" BOOL INSTAPI SQLSetConfigMode (UWORD wConfigMode) { BOOL retcode = FALSE; /* Check input parameters */ CLEAR_ERROR (); switch (wConfigMode) { case ODBC_BOTH_DSN: case ODBC_USER_DSN: wSystemDSN = USERDSN_ONLY; goto configmode; case ODBC_SYSTEM_DSN: wSystemDSN = SYSTEMDSN_ONLY; configmode: configMode = wConfigMode; wSystemDSN = USERDSN_ONLY; retcode = TRUE; break; default: PUSH_ERROR (ODBC_ERROR_INVALID_PARAM_SEQUENCE); } return retcode; } libiodbc-3.52.16/iodbcinst/SQLConfigDriver.c0000664000175000017500000003504614424170750015461 00000000000000/* * SQLConfigDriver.c * * $Id$ * * Load the appropriate driver setup DLL and calls the ConfigDriver * function. * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include "unicode.h" #if defined (__APPLE__) && !defined (NO_FRAMEWORKS) # include #endif #include "dlf.h" #include "inifile.h" #include "misc.h" #include "iodbc_error.h" #ifndef WIN32 #include #if defined (__APPLE__) && !defined (NO_FRAMEWORKS) #define CALL_CONFIG_DRIVER(path) \ if (path) \ { \ char *tmp_path = strdup (path); \ if (tmp_path) \ { \ char *ptr = strstr (tmp_path, "/Contents/MacOS/"); \ if (ptr) \ *ptr = 0; \ liburl = CFURLCreateFromFileSystemRepresentation (NULL, (UInt8 *) tmp_path, strlen (tmp_path), FALSE); \ CFArrayRef arr = CFBundleCopyExecutableArchitecturesForURL (liburl); \ if (arr) \ bundle_dll = CFBundleCreate (NULL, liburl); \ if (arr) \ CFRelease (arr); \ if (liburl) \ CFRelease (liburl); \ } \ MEM_FREE (tmp_path); \ CALL_CONFIG_DRIVER_BUNDLE (); \ } #define CALL_CONFIG_DRIVERW(path) \ if (path) \ { \ char *tmp_path = strdup (path); \ if (tmp_path) \ { \ char *ptr = strstr (tmp_path, "/Contents/MacOS/"); \ if (ptr) \ *ptr = 0; \ liburl = CFURLCreateFromFileSystemRepresentation (NULL, (UInt8 *) tmp_path, strlen (tmp_path), FALSE); \ CFArrayRef arr = CFBundleCopyExecutableArchitecturesForURL (liburl); \ if (arr) \ bundle_dll = CFBundleCreate (NULL, liburl); \ if (arr) \ CFRelease (arr); \ if (liburl) \ CFRelease (liburl); \ } \ MEM_FREE (tmp_path); \ CALL_CONFIG_DRIVERW_BUNDLE (); \ } #define CALL_CONFIG_DRIVER_BUNDLE() \ if (bundle_dll != NULL) \ { \ if ((pConfigDriver = (pConfigDriverFunc) CFBundleGetFunctionPointerForName (bundle_dll, CFSTR ("ConfigDriver"))) != NULL) \ { \ if (pConfigDriver (hwndParent, fRequest, lpszDriver, lpszArgs, lpszMsg, cbMsgMax, pcbMsgOut)) \ { \ retcode = TRUE; \ goto done; \ } \ else \ { \ PUSH_ERROR (ODBC_ERROR_REQUEST_FAILED); \ retcode = FALSE; \ goto done; \ } \ } \ } #define CALL_CONFIG_DRIVERW_BUNDLE(driverpath) \ if (bundle_dll != NULL) \ { \ if ((pConfigDriverW = (pConfigDriverWFunc) CFBundleGetFunctionPointerForName (bundle_dll, CFSTR ("ConfigDriverW"))) != NULL) \ { \ if (pConfigDriverW (hwndParent, fRequest, (SQLWCHAR *) lpszDriver, (SQLWCHAR *) lpszArgs, (SQLWCHAR *) lpszMsg, cbMsgMax, pcbMsgOut)) \ { \ retcode = TRUE; \ goto done; \ } \ else \ { \ PUSH_ERROR (ODBC_ERROR_REQUEST_FAILED); \ retcode = FALSE; \ goto done; \ } \ } \ else if ((pConfigDriver = (pConfigDriverFunc) CFBundleGetFunctionPointerForName (bundle_dll, CFSTR ("ConfigDriver"))) != NULL) \ { \ char *_args_u8 = (char *) dm_SQL_WtoU8 ((SQLWCHAR *) lpszArgs, SQL_NTS); \ char *_msg_u8 = (char *) dm_SQL_WtoU8 ((SQLWCHAR *) lpszMsg, SQL_NTS); \ if ((_args_u8 == NULL && lpszArgs) || (_msg_u8 == NULL && lpszMsg)) \ { \ PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); \ retcode = FALSE; \ goto done; \ } \ if (pConfigDriver (hwndParent, fRequest, _drv_u8, _args_u8, _msg_u8, STRLEN (_msg_u8), pcbMsgOut)) \ { \ MEM_FREE (_args_u8); \ MEM_FREE (_msg_u8); \ retcode = TRUE; \ goto done; \ } \ else \ { \ MEM_FREE (_args_u8); \ MEM_FREE (_msg_u8); \ PUSH_ERROR (ODBC_ERROR_REQUEST_FAILED); \ retcode = FALSE; \ goto done; \ } \ } \ } #else #define CALL_CONFIG_DRIVER(driverpath) \ if ((handle = DLL_OPEN ((driverpath))) != NULL) \ { \ if ((pConfigDriver = (pConfigDriverFunc) DLL_PROC (handle, "ConfigDriver")) != NULL) \ { \ if (pConfigDriver (hwndParent, fRequest, lpszDriver, lpszArgs, lpszMsg, cbMsgMax, pcbMsgOut)) \ { \ DLL_CLOSE (handle); \ retcode = TRUE; \ goto done; \ } \ else \ { \ PUSH_ERROR (ODBC_ERROR_REQUEST_FAILED); \ DLL_CLOSE (handle); \ retcode = FALSE; \ goto done; \ } \ } \ DLL_CLOSE (handle); \ } #define CALL_CONFIG_DRIVERW(driverpath) \ if ((handle = DLL_OPEN ((driverpath))) != NULL) \ { \ if ((pConfigDriverW = (pConfigDriverWFunc) DLL_PROC (handle, "ConfigDriverW")) != NULL) \ { \ if (pConfigDriverW (hwndParent, fRequest, (SQLWCHAR *) lpszDriver, (SQLWCHAR *) lpszArgs, (SQLWCHAR *) lpszMsg, cbMsgMax, pcbMsgOut)) \ { \ DLL_CLOSE (handle); \ retcode = TRUE; \ goto done; \ } \ else \ { \ PUSH_ERROR (ODBC_ERROR_REQUEST_FAILED); \ DLL_CLOSE (handle); \ retcode = FALSE; \ goto done; \ } \ } \ else if ((pConfigDriver = (pConfigDriverFunc) DLL_PROC (handle, "ConfigDriver")) != NULL) \ { \ char *_args_u8 = (char *) dm_SQL_WtoU8 ((SQLWCHAR *) lpszArgs, SQL_NTS); \ char *_msg_u8 = (char *) dm_SQL_WtoU8 ((SQLWCHAR *) lpszMsg, SQL_NTS); \ if ((_args_u8 == NULL && lpszArgs) || (_msg_u8 == NULL && lpszMsg)) \ { \ PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); \ DLL_CLOSE (handle); \ retcode = FALSE; \ goto done; \ } \ if (pConfigDriver (hwndParent, fRequest, _drv_u8, _args_u8, _msg_u8, STRLEN (_msg_u8), pcbMsgOut)) \ { \ MEM_FREE (_args_u8); \ MEM_FREE (_msg_u8); \ DLL_CLOSE (handle); \ retcode = TRUE; \ goto done; \ } \ else \ { \ MEM_FREE (_args_u8); \ MEM_FREE (_msg_u8); \ PUSH_ERROR (ODBC_ERROR_REQUEST_FAILED); \ DLL_CLOSE (handle); \ retcode = FALSE; \ goto done; \ } \ } \ DLL_CLOSE (handle); \ } #endif #endif BOOL INSTAPI SQLConfigDriver_Internal (HWND hwndParent, WORD fRequest, LPCSTR lpszDriver, LPCSTR lpszArgs, LPSTR lpszMsg, WORD cbMsgMax, WORD FAR * pcbMsgOut, SQLCHAR waMode) { PCONFIG pCfg; BOOL retcode = FALSE; void *handle; pConfigDriverFunc pConfigDriver; pConfigDriverWFunc pConfigDriverW; #if defined (__APPLE__) && !defined (NO_FRAMEWORKS) CFBundleRef bundle = NULL; CFBundleRef bundle_dll = NULL; CFURLRef liburl; #endif char *_drv_u8 = NULL; /* Check input parameters */ CLEAR_ERROR (); if (waMode == 'W') { _drv_u8 = (char *) dm_SQL_WtoU8 ((SQLWCHAR *) lpszDriver, SQL_NTS); if (_drv_u8 == NULL && lpszDriver) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto quit; } } else _drv_u8 = (char *) lpszDriver; if (!_drv_u8 || !STRLEN (_drv_u8)) { PUSH_ERROR (ODBC_ERROR_INVALID_NAME); goto quit; } /* Map the request User/System */ if (fRequest < ODBC_INSTALL_DRIVER || fRequest > ODBC_CONFIG_DRIVER_MAX) { PUSH_ERROR (ODBC_ERROR_INVALID_REQUEST_TYPE); goto quit; } /* Get it from the user odbcinst file */ wSystemDSN = USERDSN_ONLY; if (!_iodbcdm_cfg_search_init (&pCfg, "odbcinst.ini", TRUE)) { if (!_iodbcdm_cfg_find (pCfg, (char *) _drv_u8, "Setup")) { if (waMode == 'A') { CALL_CONFIG_DRIVER (pCfg->value); } else { CALL_CONFIG_DRIVERW (pCfg->value); } } if (!_iodbcdm_cfg_find (pCfg, (char *) _drv_u8, "Driver")) { if (waMode == 'A') { CALL_CONFIG_DRIVER (pCfg->value); } else { CALL_CONFIG_DRIVERW (pCfg->value); } } if (!access (_drv_u8, X_OK)) { if (waMode == 'A') { CALL_CONFIG_DRIVER (_drv_u8); } else { CALL_CONFIG_DRIVERW (_drv_u8); } } if (!_iodbcdm_cfg_find (pCfg, "Default", "Setup")) { if (waMode == 'A') { CALL_CONFIG_DRIVER (pCfg->value); } else { CALL_CONFIG_DRIVERW (pCfg->value); } } if (!_iodbcdm_cfg_find (pCfg, "Default", "Driver")) { if (waMode == 'A') { CALL_CONFIG_DRIVER (pCfg->value); } else { CALL_CONFIG_DRIVERW (pCfg->value); } } } /* Get it from the system odbcinst file */ if (pCfg) { _iodbcdm_cfg_done (pCfg); pCfg = NULL; } wSystemDSN = SYSTEMDSN_ONLY; if (!_iodbcdm_cfg_search_init (&pCfg, "odbcinst.ini", TRUE)) { if (!_iodbcdm_cfg_find (pCfg, (char *) _drv_u8, "Setup")) { if (waMode == 'A') { CALL_CONFIG_DRIVER (pCfg->value); } else { CALL_CONFIG_DRIVERW (pCfg->value); } } if (!_iodbcdm_cfg_find (pCfg, (char *) _drv_u8, "Driver")) { if (waMode == 'A') { CALL_CONFIG_DRIVER (pCfg->value); } else { CALL_CONFIG_DRIVERW (pCfg->value); } } if (!access (_drv_u8, X_OK)) { if (waMode == 'A') { CALL_CONFIG_DRIVER (_drv_u8); } else { CALL_CONFIG_DRIVERW (_drv_u8); } } if (!_iodbcdm_cfg_find (pCfg, "Default", "Setup")) { if (waMode == 'A') { CALL_CONFIG_DRIVER (pCfg->value); } else { CALL_CONFIG_DRIVERW (pCfg->value); } } if (!_iodbcdm_cfg_find (pCfg, "Default", "Driver")) { if (waMode == 'A') { CALL_CONFIG_DRIVER (pCfg->value); } else { CALL_CONFIG_DRIVERW (pCfg->value); } } } /* The last ressort, a proxy driver */ #if defined (__APPLE__) # if !defined(NO_FRAMEWORKS) bundle = CFBundleGetBundleWithIdentifier (CFSTR ("org.iodbc.core")); if (bundle) { /* Search for the drvproxy library */ liburl = CFBundleCopyResourceURL (bundle, CFSTR ("iODBCdrvproxy.bundle"), NULL, NULL); if (liburl) { bundle_dll = CFBundleCreate (NULL, liburl); CFRelease (liburl); if (waMode == 'A') { CALL_CONFIG_DRIVER_BUNDLE (); } else { CALL_CONFIG_DRIVERW_BUNDLE (); } } } # endif #else if (waMode == 'A') { CALL_CONFIG_DRIVER ("libdrvproxy.so.2"); } else { CALL_CONFIG_DRIVERW ("libdrvproxy.so.2"); } #endif #if defined (__APPLE__) # if !defined (NO_FRAMEWORKS) bundle = CFBundleGetBundleWithIdentifier (CFSTR ("org.iodbc.core")); if (bundle) { /* Search for the drvproxy library */ liburl = CFBundleCopyResourceURL (bundle, CFSTR ("iODBCdrvproxy.bundle"), NULL, NULL); if (liburl) { bundle_dll = CFBundleCreate (NULL, liburl); if (waMode == 'A') { CALL_CONFIG_DRIVER_BUNDLE (); } else { CALL_CONFIG_DRIVERW_BUNDLE (); } } if (liburl) CFRelease (liburl); } # endif #else if (waMode == 'A') { CALL_CONFIG_DRIVER ("libdrvproxy.so.2"); } else { CALL_CONFIG_DRIVERW ("libdrvproxy.so.2"); } #endif /* Error : ConfigDriver could no be found */ PUSH_ERROR (ODBC_ERROR_LOAD_LIB_FAILED); done: if (pCfg) _iodbcdm_cfg_done (pCfg); quit: if (_drv_u8 != lpszDriver) MEM_FREE (_drv_u8); wSystemDSN = USERDSN_ONLY; configMode = ODBC_BOTH_DSN; if (pcbMsgOut) *pcbMsgOut = 0; return retcode; } BOOL INSTAPI SQLConfigDriver (HWND hwndParent, WORD fRequest, LPCSTR lpszDriver, LPCSTR lpszArgs, LPSTR lpszMsg, WORD cbMsgMax, WORD FAR * pcbMsgOut) { return SQLConfigDriver_Internal (hwndParent, fRequest, (SQLPOINTER) lpszDriver, (SQLPOINTER) lpszArgs, (SQLPOINTER) lpszMsg, cbMsgMax, pcbMsgOut, 'A'); } BOOL INSTAPI SQLConfigDriverW (HWND hwndParent, WORD fRequest, LPCWSTR lpszDriver, LPCWSTR lpszArgs, LPWSTR lpszMsg, WORD cbMsgMax, WORD FAR * pcbMsgOut) { return SQLConfigDriver_Internal (hwndParent, fRequest, (SQLPOINTER) lpszDriver, (SQLPOINTER) lpszArgs, (SQLPOINTER) lpszMsg, cbMsgMax, pcbMsgOut, 'W'); } libiodbc-3.52.16/iodbcinst/misc.h0000664000175000017500000000733714424170750013462 00000000000000/* * misc.h * * $Id$ * * Misc support functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef _MISC_H #define _MISC_H char *_iodbcadm_getinifile (char *buf, int size, int bIsInst, int doCreate); void _iodbcdm_getdsnfile(const char *filedsn, char *buf, size_t buf_sz); const char *_iodbcdm_check_for_string (const char *szList, const char *szString, int bContains); char *_iodbcdm_remove_quotes (const char *szString); size_t _iodbcdm_strlcpy(char *dst, const char *src, size_t siz); size_t _iodbcdm_strlcat(char *dst, const char *src, size_t siz); extern WORD wSystemDSN; extern WORD configMode; #endif libiodbc-3.52.16/iodbcinst/SQLWriteDSNToIni.c0000664000175000017500000001674714424170750015511 00000000000000/* * SQLWriteDSNToIni.c * * $Id$ * * Write a DSN connect string to a file * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include "unicode.h" #include "inifile.h" #include "misc.h" #include "iodbc_error.h" extern BOOL ValidDSN (LPCSTR lpszDSN); extern BOOL ValidDSNW (LPCWSTR lpszDSN); extern int GetPrivateProfileString (LPCSTR lpszSection, LPCSTR lpszEntry, LPCSTR lpszDefault, LPSTR lpszRetBuffer, int cbRetBuffer, LPCSTR lpszFilename); BOOL WriteDSNToIni (LPCSTR lpszDSN, LPCSTR lpszDriver) { char szBuffer[4096]; BOOL retcode = FALSE; PCONFIG pCfg = NULL; if (_iodbcdm_cfg_search_init (&pCfg, "odbc.ini", TRUE)) { PUSH_ERROR (ODBC_ERROR_REQUEST_FAILED); goto done; } if (strcmp (lpszDSN, "Default")) { /* adds a DSN=Driver to the [ODBC data sources] section */ #ifdef WIN32 if (_iodbcdm_cfg_write (pCfg, "ODBC 32 bit Data Sources", (LPSTR) lpszDSN, (LPSTR) lpszDriver)) #else if (_iodbcdm_cfg_write (pCfg, "ODBC Data Sources", (LPSTR) lpszDSN, (LPSTR) lpszDriver)) #endif { PUSH_ERROR (ODBC_ERROR_REQUEST_FAILED); goto done; } } /* deletes the DSN section in odbc.ini */ if (_iodbcdm_cfg_write (pCfg, (LPSTR) lpszDSN, NULL, NULL)) { PUSH_ERROR (ODBC_ERROR_REQUEST_FAILED); goto done; } /* gets the file of the driver if lpszDriver is a valid description */ wSystemDSN = USERDSN_ONLY; if (!GetPrivateProfileString ((LPSTR) lpszDriver, "Driver", "", szBuffer, sizeof (szBuffer) - 1, "odbcinst.ini")) { wSystemDSN = SYSTEMDSN_ONLY; if (!GetPrivateProfileString ((LPSTR) lpszDriver, "Driver", "", szBuffer, sizeof (szBuffer) - 1, "odbcinst.ini")) { PUSH_ERROR (ODBC_ERROR_INVALID_NAME); goto done; } } /* adds a [DSN] section with Driver key */ if (_iodbcdm_cfg_write (pCfg, (LPSTR) lpszDSN, "Driver", szBuffer) || _iodbcdm_cfg_commit (pCfg)) { PUSH_ERROR (ODBC_ERROR_REQUEST_FAILED); goto done; } retcode = TRUE; done: wSystemDSN = USERDSN_ONLY; configMode = ODBC_BOTH_DSN; if (pCfg) _iodbcdm_cfg_done (pCfg); return retcode; } BOOL INSTAPI SQLWriteDSNToIni_Internal (SQLPOINTER lpszDSN, SQLPOINTER lpszDriver, SQLCHAR waMode) { char *_driver_u8 = NULL; char *_dsn_u8 = NULL; BOOL retcode = FALSE; /* Check input parameters */ CLEAR_ERROR (); if (waMode == 'A') { if (!lpszDSN || !ValidDSN (lpszDSN) || !STRLEN (lpszDSN)) { PUSH_ERROR (ODBC_ERROR_INVALID_DSN); goto quit; } } else { if (!lpszDSN || !ValidDSNW (lpszDSN) || !WCSLEN (lpszDSN)) { PUSH_ERROR (ODBC_ERROR_INVALID_DSN); goto quit; } } if (waMode == 'W') { _dsn_u8 = (char *) dm_SQL_WtoU8 ((SQLWCHAR *) lpszDSN, SQL_NTS); if (_dsn_u8 == NULL && lpszDSN) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto quit; } } else _dsn_u8 = (char *) lpszDSN; if (waMode == 'W') { _driver_u8 = (char *) dm_SQL_WtoU8 ((SQLWCHAR *) lpszDriver, SQL_NTS); if (_driver_u8 == NULL && lpszDriver) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto quit; } } else _driver_u8 = (char *) lpszDriver; if (!_driver_u8 || !STRLEN (_driver_u8)) { PUSH_ERROR (ODBC_ERROR_INVALID_NAME); goto quit; } switch (configMode) { case ODBC_USER_DSN: wSystemDSN = USERDSN_ONLY; retcode = WriteDSNToIni (_dsn_u8, _driver_u8); goto quit; case ODBC_SYSTEM_DSN: wSystemDSN = SYSTEMDSN_ONLY; retcode = WriteDSNToIni (_dsn_u8, _driver_u8); goto quit; case ODBC_BOTH_DSN: wSystemDSN = USERDSN_ONLY; retcode = WriteDSNToIni (_dsn_u8, _driver_u8); if (!retcode) { CLEAR_ERROR (); wSystemDSN = SYSTEMDSN_ONLY; retcode = WriteDSNToIni (_dsn_u8, _driver_u8); } goto quit; } PUSH_ERROR (ODBC_ERROR_GENERAL_ERR); goto quit; quit: if (_dsn_u8 != lpszDSN) MEM_FREE (_dsn_u8); if (_driver_u8 != lpszDriver) MEM_FREE (_driver_u8); wSystemDSN = USERDSN_ONLY; configMode = ODBC_BOTH_DSN; return retcode; } BOOL INSTAPI SQLWriteDSNToIni (LPCSTR lpszDSN, LPCSTR lpszDriver) { return SQLWriteDSNToIni_Internal ((SQLPOINTER) lpszDSN, (SQLPOINTER) lpszDriver, 'A'); } BOOL INSTAPI SQLWriteDSNToIniW (LPCWSTR lpszDSN, LPCWSTR lpszDriver) { return SQLWriteDSNToIni_Internal ((SQLPOINTER) lpszDSN, (SQLPOINTER) lpszDriver, 'W'); } libiodbc-3.52.16/iodbcinst/dlf.h0000664000175000017500000002102614424170750013263 00000000000000/* * dlf.h * * $Id$ * * Dynamic Library Loader (mapping to SVR4) * * The iODBC driver manager. * * Copyright (C) 1995 Ke Jin * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef _DLF_H #define _DLF_H #include #if defined(HAVE_SHL_LOAD) #define DLDAPI_HP_SHL #elif defined(HAVE_LIBDL) #define DLDAPI_SVR4_DLFCN #elif defined(HAVE_DYLD) #define DLDAPI_MACX #endif #if defined(DLDAPI_SVR4_DLFCN) #include #elif defined(DLDAPI_AIX_LOAD) #include #endif #if !defined(DLDAPI_SVR4_DLFCN) /* * Create internal namespace for dlopen functions */ #define dlopen iodbc_dlopen #define dlsym iodbc_dlsym #define dlerror iodbc_dlerror #define dlclose iodbc_dlclose extern void *dlopen (char * path, int mode); extern void *dlsym (void * hdll, char * sym); extern char *dlerror (); extern int dlclose (void * hdll); #endif #ifdef DLDAPI_MACX #include #include #include #include #include #include #include "mach-o/dyld.h" #define RTLD_LAZY 0x1 #define RTLD_NOW 0x2 #define RTLD_LOCAL 0x4 #define RTLD_GLOBAL 0x8 #define RTLD_NOLOAD 0x10 #define RTLD_SHARED 0x20 /* not used, the default */ #define RTLD_UNSHARED 0x40 #define RTLD_NODELETE 0x80 #define RTLD_LAZY_UNDEF 0x100 enum ofile_type { OFILE_UNKNOWN, OFILE_FAT, OFILE_ARCHIVE, OFILE_Mach_O }; enum byte_sex { UNKNOWN_BYTE_SEX, BIG_ENDIAN_BYTE_SEX, LITTLE_ENDIAN_BYTE_SEX }; /* * The structure describing an architecture flag with the string of the flag * name, and the cputype and cpusubtype. */ struct arch_flag { char *name; cpu_type_t cputype; cpu_subtype_t cpusubtype; }; /* * The structure used by ofile_*() routines for object files. */ struct ofile { char *file_name; /* pointer to name malloc'ed by ofile_map */ char *file_addr; /* pointer to vm_allocate'ed memory */ unsigned long file_size; /* size of vm_allocate'ed memory */ enum ofile_type file_type; /* type of the file */ struct fat_header *fat_header; /* If a fat file these are filled in and */ struct fat_arch *fat_archs; /* if needed converted to host byte sex */ /* * If this is a fat file then these are valid and filled in */ unsigned long narch; /* the current architecture */ enum ofile_type arch_type; /* the type of file for this arch. */ struct arch_flag arch_flag; /* the arch_flag for this arch, the name */ /* field is pointing at space malloc'ed */ /* by ofile_map. */ /* * If this structure is currently referencing an archive member or * an object file that is an archive member these are valid and filled in. */ unsigned long member_offset; /* logical offset to the member starting */ char *member_addr; /* pointer to the member contents */ unsigned long member_size; /* actual size of the member (not rounded)*/ struct ar_hdr *member_ar_hdr; /* pointer to the ar_hdr for this member */ char *member_name; /* name of this member */ unsigned long member_name_size; /* size of the member name */ enum ofile_type member_type; /* the type of file for this member */ cpu_type_t archive_cputype; /* if the archive contains objects then */ cpu_subtype_t /* these two fields reflect the object */ archive_cpusubtype; /* at are in the archive. */ /* * If this structure is currently referencing a dynamic library module * these are valid and filled in. */ struct dylib_module *modtab; /* the module table */ unsigned long nmodtab; /* the number of module table entries */ struct dylib_module /* pointer to the dylib_module for this */ *dylib_module; /* module */ char *dylib_module_name; /* the name of the module */ /* * If this structure is currently referencing an object file these are * valid and filled in. The mach_header and load commands have been * converted to the host byte sex if needed */ char *object_addr; /* the address of the object file */ unsigned long object_size; /* the size of the object file */ enum byte_sex object_byte_sex; /* the byte sex of the object file */ struct mach_header *mh; /* the mach_header of the object file */ struct load_command /* the start of the load commands */ *load_commands; }; /* * The structure of a dlopen() handle. */ struct dlopen_handle { dev_t dev; /* the path's device and inode number from stat(2) */ ino_t ino; int dlopen_mode; /* current dlopen mode for this handle */ int dlopen_count; /* number of times dlopen() called on this handle */ NSModule module; /* the NSModule returned by NSLinkModule() */ struct dlopen_handle *prev; struct dlopen_handle *next; }; #endif /* DLDAPI_MACX */ #ifndef RTLD_LOCAL #define RTLD_LOCAL 0 /* Only if not defined by dlfcn.h */ #endif #ifndef RTLD_LAZY #define RTLD_LAZY 1 #endif #ifdef RTLD_NOW #define OPL_DL_MODE (RTLD_NOW | RTLD_LOCAL) #else #define OPL_DL_MODE (RTLD_LAZY | RTLD_LOCAL) #endif #define DLL_OPEN(dll) (void*)dlopen((char*)(dll), OPL_DL_MODE) #define DLL_PROC(hdll, sym) (void*)dlsym((void*)(hdll), (char*)sym) #define DLL_ERROR() (char*)dlerror() #define DLL_CLOSE(hdll) dlclose((void*)(hdll)) #endif /* _DLF_H */ libiodbc-3.52.16/iodbcinst/SQLGetAvailableDrivers.c0000664000175000017500000001522514424170750016754 00000000000000/* * SQLGetAvailableDrivers.c * * $Id$ * * Get a list of all available drivers * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include "unicode.h" #include "misc.h" #include "inifile.h" #include "iodbc_error.h" BOOL GetAvailableDrivers (LPCSTR lpszInfFile, LPSTR lpszBuf, WORD cbBufMax, WORD * pcbBufOut, BOOL infFile) { int sect_len = 0; WORD curr = 0; BOOL retcode = FALSE; PCONFIG pCfg; char *szId; if (!lpszBuf || !cbBufMax) { PUSH_ERROR (ODBC_ERROR_INVALID_BUFF_LEN); goto quit; } /* Open the file to read from */ if (_iodbcdm_cfg_init (&pCfg, lpszInfFile, FALSE)) { PUSH_ERROR (ODBC_ERROR_COMPONENT_NOT_FOUND); goto quit; } /* Get the ODBC Drivers section */ #ifdef WIN32 if (_iodbcdm_cfg_find (pCfg, "ODBC 32 bit Drivers", NULL)) #else if (_iodbcdm_cfg_find (pCfg, "ODBC Drivers", NULL)) #endif { PUSH_ERROR (ODBC_ERROR_COMPONENT_NOT_FOUND); goto done; } while (curr < cbBufMax && 0 == _iodbcdm_cfg_nextentry (pCfg)) { if (_iodbcdm_cfg_section (pCfg)) break; if (_iodbcdm_cfg_define (pCfg) && pCfg->id) { szId = pCfg->id; while (infFile && *szId == '"') szId++; sect_len = STRLEN (szId); if (!sect_len) { PUSH_ERROR (ODBC_ERROR_INVALID_INF); goto done; } while (infFile && *(szId + sect_len - 1) == '"') sect_len -= 1; sect_len = sect_len > cbBufMax - curr ? cbBufMax - curr : sect_len; if (sect_len) memmove (lpszBuf + curr, szId, sect_len); else { PUSH_ERROR (ODBC_ERROR_INVALID_INF); goto done; } curr += sect_len; lpszBuf[curr++] = 0; } } if (curr < cbBufMax) lpszBuf[curr + 1] = 0; if (pcbBufOut) *pcbBufOut = curr; retcode = TRUE; done: _iodbcdm_cfg_done (pCfg); quit: return retcode; } BOOL INSTAPI SQLGetAvailableDrivers (LPCSTR lpszInfFile, LPSTR lpszBuf, WORD cbBufMax, WORD * pcbBufOut) { BOOL retcode = FALSE; WORD lenBufOut; /* Get from the user files */ CLEAR_ERROR (); switch (configMode) { case ODBC_BOTH_DSN: case ODBC_USER_DSN: wSystemDSN = USERDSN_ONLY; break; case ODBC_SYSTEM_DSN: wSystemDSN = SYSTEMDSN_ONLY; break; } retcode = GetAvailableDrivers (lpszInfFile, lpszBuf, cbBufMax, &lenBufOut, FALSE); if (pcbBufOut) *pcbBufOut = lenBufOut; wSystemDSN = USERDSN_ONLY; configMode = ODBC_BOTH_DSN; return retcode; } BOOL INSTAPI SQLGetAvailableDriversW (LPCWSTR lpszInfFile, LPWSTR lpszBuf, WORD cbBufMax, WORD FAR * pcbBufOut) { BOOL retcode = FALSE; char *_inf_u8 = NULL; char *_buffer_u8 = NULL; SQLCHAR *ptr; SQLWCHAR *ptrW; WORD len = 0, length; _inf_u8 = (char *) dm_SQL_WtoU8 ((SQLWCHAR *) lpszInfFile, SQL_NTS); if (_inf_u8 == NULL && lpszInfFile) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } if (cbBufMax > 0) { if ((_buffer_u8 = malloc (cbBufMax * UTF8_MAX_CHAR_LEN + 1)) == NULL) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } } retcode = SQLGetAvailableDrivers (_inf_u8, _buffer_u8, cbBufMax * UTF8_MAX_CHAR_LEN, pcbBufOut); if (retcode == TRUE) { length = 0; for (ptr = (SQLCHAR *)_buffer_u8, ptrW = lpszBuf; *ptr; ptr += STRLEN (ptr) + 1, ptrW += WCSLEN (ptrW) + 1) { dm_StrCopyOut2_U8toW (ptr, ptrW, cbBufMax - 1, &len); length += len; } *ptrW = L'\0'; if (pcbBufOut) *pcbBufOut = length + 1; } done: MEM_FREE (_inf_u8); MEM_FREE (_buffer_u8); return retcode; } libiodbc-3.52.16/iodbcinst/SQLManageDataSource.c0000664000175000017500000001211514424170750016233 00000000000000/* * SQLManageDataSource.c * * $Id$ * * Add, modify or delete datasources * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include "iodbc_error.h" #include "dlf.h" #if defined (__APPLE__) && !defined (NO_FRAMEWORKS) #include #endif #if defined (__APPLE__) #define CALL_ADMIN_DIALBOX() \ if (bundle_dll != NULL) \ { \ if ((pAdminBox = (pAdminBoxFunc) CFBundleGetFunctionPointerForName (bundle_dll, CFSTR ("_iodbcdm_admin_dialbox"))) != NULL) \ if (pAdminBox (hwndParent) == SQL_SUCCESS) \ retcode = TRUE; \ } #else #define CALL_ADMIN_DIALBOX(path) \ if ((handle = DLL_OPEN (path)) != NULL) \ { \ if ((pAdminBox = (pAdminBoxFunc) DLL_PROC (handle, "_iodbcdm_admin_dialbox")) != NULL) \ if (pAdminBox (hwndParent) == SQL_SUCCESS) \ retcode = TRUE; \ DLL_CLOSE (handle); \ } #endif BOOL ManageDataSources (HWND hwndParent) { void *handle; pAdminBoxFunc pAdminBox; BOOL retcode = FALSE; #if defined (__APPLE__) && !defined (NO_FRAMEWORKS) CFBundleRef bundle = NULL; CFBundleRef bundle_dll = NULL; CFURLRef liburl; #endif /* Load the Admin dialbox function */ #if defined (__APPLE__) # if !defined(NO_FRAMEWORKS) bundle = CFBundleGetBundleWithIdentifier (CFSTR ("org.iodbc.core")); if (bundle) { /* Search for the iODBCadm library */ liburl = CFBundleCopyResourceURL (bundle, CFSTR ("iODBCadm.bundle"), NULL, NULL); if (liburl) { bundle_dll = CFBundleCreate (NULL, liburl); CFRelease (liburl); CALL_ADMIN_DIALBOX (); } } # endif #else CALL_ADMIN_DIALBOX ("libiodbcadm.so.2"); #endif return retcode; } BOOL INSTAPI SQLManageDataSources (HWND hwndParent) { BOOL retcode = FALSE; /* Check input parameters */ CLEAR_ERROR (); if (!hwndParent) { PUSH_ERROR (ODBC_ERROR_INVALID_HWND); goto quit; } retcode = ManageDataSources (hwndParent); quit: return retcode; } libiodbc-3.52.16/iodbcinst/SQLInstallerError.c0000664000175000017500000001335614424170750016047 00000000000000/* * SQLInstallerError.c * * $Id$ * * These functions intentionally left blank * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include "unicode.h" #include "iodbc_error.h" LPSTR errortable[] = { "", "General installer error", "Invalid buffer length", "Invalid window handle", "Invalid string parameter", "Invalid type of request", "Component not found", "Invalid driver or translator name", "Invalid keyword-value pairs", "Invalid DSN", "Invalid .INF file", "Request failed", "Invalid install path.", "Could not load the driver or translator setup library", "Invalid parameter sequence", "Invalid log file name.", "Operation canceled on user request", "Could not increment or decrement the component usage count", "Creation of the DSN failed", "Error during writing system information", "Deletion of the DSN failed", "Out of memory", "Output string truncated due to a buffer not large enough", "Driver- or translator-specific error", }; RETCODE INSTAPI SQLInstallerError (WORD iError, DWORD * pfErrorCode, LPSTR lpszErrorMsg, WORD cbErrorMsgMax, WORD * pcbErrorMsg) { LPSTR message; RETCODE retcode = SQL_ERROR; /* Check if the index is valid to retrieve an error */ if ((iError - 1) > numerrors) { retcode = SQL_NO_DATA; goto quit; } if (!lpszErrorMsg || !cbErrorMsgMax) goto quit; lpszErrorMsg[cbErrorMsgMax - 1] = 0; /* Copy the message error */ message = (errormsg[iError - 1]) ? errormsg[iError - 1] : errortable[ierror[iError - 1]]; if (STRLEN (message) >= cbErrorMsgMax - 1) { STRNCPY (lpszErrorMsg, message, cbErrorMsgMax - 1); retcode = SQL_SUCCESS_WITH_INFO; goto quit; } else STRCPY (lpszErrorMsg, message); if (pfErrorCode) *pfErrorCode = ierror[iError - 1]; if (pcbErrorMsg) *pcbErrorMsg = STRLEN (lpszErrorMsg); retcode = SQL_SUCCESS; quit: return retcode; } RETCODE INSTAPI SQLInstallerErrorW (WORD iError, DWORD * pfErrorCode, LPWSTR lpszErrorMsg, WORD cbErrorMsgMax, WORD * pcbErrorMsg) { char *_errormsg_u8 = NULL; RETCODE retcode = SQL_ERROR; if (cbErrorMsgMax > 0) { if ((_errormsg_u8 = malloc (cbErrorMsgMax * UTF8_MAX_CHAR_LEN + 1)) == NULL) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } } retcode = SQLInstallerError (iError, pfErrorCode, _errormsg_u8, cbErrorMsgMax * UTF8_MAX_CHAR_LEN, pcbErrorMsg); if (retcode != SQL_ERROR) { dm_StrCopyOut2_U8toW ((SQLCHAR *)_errormsg_u8, lpszErrorMsg, cbErrorMsgMax, pcbErrorMsg); } done: MEM_FREE (_errormsg_u8); return retcode; } libiodbc-3.52.16/iodbcinst/inifile.h0000664000175000017500000001434114424170750014137 00000000000000/* * inifile.h * * $Id$ * * Read/Write .ini files * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef _INIFILE_H #define _INIFILE_H #include #ifndef _MAC #include #endif /* configuration file entry */ typedef struct TCFGENTRY { char *section; char *id; char *value; char *comment; unsigned short flags; } TCFGENTRY, *PCFGENTRY; /* values for flags */ #define CFE_MUST_FREE_SECTION 0x8000 #define CFE_MUST_FREE_ID 0x4000 #define CFE_MUST_FREE_VALUE 0x2000 #define CFE_MUST_FREE_COMMENT 0x1000 /* configuration file */ typedef struct TCFGDATA { char *fileName; /* Current file name */ int dirty; /* Did we make modifications? */ char *image; /* In-memory copy of the file */ size_t size; /* Size of this copy (excl. \0) */ time_t mtime; /* Modification time */ unsigned int numEntries; unsigned int maxEntries; PCFGENTRY entries; /* Compatibility */ unsigned int cursor; char *section; char *id; char *value; char *comment; unsigned short flags; } TCONFIG, *PCONFIG; #define CFG_VALID 0x8000 #define CFG_EOF 0x4000 #define CFG_ERROR 0x0000 #define CFG_SECTION 0x0001 #define CFG_DEFINE 0x0002 #define CFG_CONTINUE 0x0003 #define CFG_TYPEMASK 0x000F #define CFG_TYPE(X) ((X) & CFG_TYPEMASK) #define _iodbcdm_cfg_valid(X) ((X) != NULL && ((X)->flags & CFG_VALID)) #define _iodbcdm_cfg_eof(X) ((X)->flags & CFG_EOF) #define _iodbcdm_cfg_section(X) (CFG_TYPE((X)->flags) == CFG_SECTION) #define _iodbcdm_cfg_define(X) (CFG_TYPE((X)->flags) == CFG_DEFINE) #define _iodbcdm_cfg_cont(X) (CFG_TYPE((X)->flags) == CFG_CONTINUE) int _iodbcdm_cfg_init (PCONFIG * ppconf, const char *filename, int doCreate); int _iodbcdm_cfg_done (PCONFIG pconfig); int _iodbcdm_cfg_freeimage (PCONFIG pconfig); int _iodbcdm_cfg_refresh (PCONFIG pconfig); int _iodbcdm_cfg_storeentry (PCONFIG pconfig, char *section, char *id, char *value, char *comment, int dynamic); int _iodbcdm_cfg_rewind (PCONFIG pconfig); int _iodbcdm_cfg_nextentry (PCONFIG pconfig); int _iodbcdm_cfg_find (PCONFIG pconfig, char *section, char *id); int _iodbcdm_cfg_next_section (PCONFIG pconfig); int _iodbcdm_cfg_write (PCONFIG pconfig, char *section, char *id, char *value); int _iodbcdm_cfg_commit (PCONFIG pconfig); int _iodbcdm_cfg_getstring (PCONFIG pconfig, char *section, char *id, char **valptr); int _iodbcdm_cfg_getlong (PCONFIG pconfig, char *section, char *id, long *valptr); int _iodbcdm_cfg_getshort (PCONFIG pconfig, char *section, char *id, short *valptr); int _iodbcdm_cfg_search_init (PCONFIG * ppconf, const char *filename, int doCreate); int _iodbcdm_list_entries (PCONFIG pCfg, LPCSTR lpszSection, LPSTR lpszRetBuffer, int cbRetBuffer); int _iodbcdm_list_sections (PCONFIG pCfg, LPSTR lpszRetBuffer, int cbRetBuffer); BOOL do_create_dsns (PCONFIG pCfg, PCONFIG pInfCfg, LPSTR szDriver, LPSTR szDSNS, LPSTR szDiz); BOOL install_from_ini (PCONFIG pCfg, PCONFIG pOdbcCfg, LPSTR szInfFile, LPSTR szDriver, BOOL drivers); int install_from_string (PCONFIG pCfg, PCONFIG pOdbcCfg, LPSTR lpszDriver, BOOL drivers); #endif /* _INIFILE_H */ libiodbc-3.52.16/iodbcinst/Makefile.am0000664000175000017500000001121514424170750014400 00000000000000# # Makefile.am # # The iODBC driver manager. # # Copyright (C) 1996-2023 OpenLink Software # All Rights Reserved. # # This software is released under the terms of either of the following # licenses: # # - GNU Library General Public License (see LICENSE.LGPL) # - The BSD License (see LICENSE.BSD). # # Note that the only valid version of the LGPL license as far as this # project is concerned is the original GNU Library General Public License # Version 2, dated June 1991. # # While not mandated by the BSD license, any patches you make to the # iODBC source code may be contributed back into the iODBC project # at your discretion. Contributions will benefit the Open Source and # Data Access community as a whole. Submissions may be made at: # # http://www.iodbc.org # # # GNU Library Generic Public License Version 2 # ============================================ # 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; only # Version 2 of the License dated June 1991. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # The BSD License # =============== # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. Neither the name of OpenLink Software Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # noinst_LTLIBRARIES = libiodbc_common.la lib_LTLIBRARIES = libiodbcinst.la AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/iodbc \ -I$(top_srcdir)/iodbcinst \ -I$(top_srcdir)/iodbcadm libiodbc_common_la_SOURCES = \ SQLGetConfigMode.c \ SQLGetPrivateProfileString.c \ SQLSetConfigMode.c \ SQLValidDSN.c \ SQLWritePrivateProfileString.c \ SQLReadFileDSN.c \ SQLWriteFileDSN.c \ dlf.c \ inifile.c \ iodbc_error.c \ misc.c \ unicode.c libiodbcinst_la_LDFLAGS = -version-info @lib_version@ \ -export-symbols $(srcdir)/iodbcinst.exp libiodbcinst_la_LIBADD = libiodbc_common.la $(LIBADD_DL) libiodbcinst_la_SOURCES = \ SQLConfigDataSource.c \ SQLConfigDriver.c \ SQLGetAvailableDrivers.c \ SQLGetInstalledDrivers.c \ SQLInstallDriver.c \ SQLRemoveDSNFromIni.c \ SQLRemoveDriver.c \ SQLWriteDSNToIni.c \ SQLInstallDriverEx.c \ SQLInstallODBC.c \ SQLInstallTranslator.c \ SQLCreateDataSource.c \ SQLManageDataSource.c \ SQLRemoveTranslator.c \ SQLRemoveDefaultDataSource.c \ SQLInstallDriverManager.c \ SQLRemoveDriverManager.c \ SQLInstallTranslatorEx.c \ SQLInstallerError.c \ SQLPostInstallerError.c \ SQLGetTranslator.c \ Info.c noinst_HEADERS = \ dlf.h \ inifile.h \ iodbc_error.h \ unicode.h \ misc.h if DARWIN libiodbcinst.la: $(libiodbcinst_la_OBJECTS) $(libiodbcinst_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libiodbcinst_la_LDFLAGS) $(libiodbcinst_la_OBJECTS) $(libiodbcinst_la_LIBADD) $(LIBS) -$(STRIP) -s $(top_srcdir)/mac/iodbcinst.exp -u .libs/*.dylib endif EXTRA_DIST = $(srcdir)/iodbcinst.exp libiodbc-3.52.16/iodbcinst/SQLGetPrivateProfileString.c0000664000175000017500000002647414424170750017667 00000000000000/* * SQLGetProfileString.c * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include "unicode.h" #include "inifile.h" #include "iodbc_error.h" #include "misc.h" #ifndef WIN32 int GetPrivateProfileString (LPCSTR lpszSection, LPCSTR lpszEntry, LPCSTR lpszDefault, LPSTR lpszRetBuffer, int cbRetBuffer, LPCSTR lpszFilename) { char *defval = (char *) lpszDefault, *value = NULL; int len = 0; PCONFIG pCfg; lpszRetBuffer[0] = 0; /* If error during reading the file */ if (_iodbcdm_cfg_search_init (&pCfg, lpszFilename, FALSE)) { if (lpszDefault) STRNCPY (lpszRetBuffer, lpszDefault, cbRetBuffer - 1); PUSH_ERROR (ODBC_ERROR_INVALID_PATH); goto fail; } /* List all sections from the ini file */ if (lpszSection == NULL || *lpszSection == '\0') { len = _iodbcdm_list_sections (pCfg, lpszRetBuffer, cbRetBuffer); goto done; } /* List all the entries of the specified section */ if (lpszEntry == NULL || *lpszEntry == '\0') { len = _iodbcdm_list_entries (pCfg, lpszSection, lpszRetBuffer, cbRetBuffer); goto done; } /* * Sorry for this one -- Windows cannot handle a default value of * "" in GetPrivateProfileString, so it is passed as " " instead. */ if (defval == NULL || *defval == '\0') defval = " "; /* * Check whether someone else has modified the odbc.ini file */ _iodbcdm_cfg_refresh (pCfg); if (!_iodbcdm_cfg_find (pCfg, (LPSTR) lpszSection, (LPSTR) lpszEntry)) value = pCfg->value; if (value == NULL) { value = defval; if (value[0] == ' ' && value[1] == '\0') value = ""; } STRNCPY (lpszRetBuffer, value, cbRetBuffer - 1); done: _iodbcdm_cfg_done (pCfg); fail: if (!len) len = STRLEN (lpszRetBuffer); if (len == cbRetBuffer - 1) PUSH_ERROR (ODBC_ERROR_INVALID_BUFF_LEN); return len; } #endif int INSTAPI SQLGetPrivateProfileString (LPCSTR lpszSection, LPCSTR lpszEntry, LPCSTR lpszDefault, LPSTR lpszRetBuffer, int cbRetBuffer, LPCSTR lpszFilename) { char pathbuf[1024]; int len = 0; /* Check input parameters */ CLEAR_ERROR (); if (!lpszRetBuffer || !cbRetBuffer) { PUSH_ERROR (ODBC_ERROR_INVALID_BUFF_LEN); goto quit; } if (!lpszDefault) { PUSH_ERROR (ODBC_ERROR_GENERAL_ERR); goto quit; } /* Else go through user/system odbc.ini */ switch (configMode) { case ODBC_USER_DSN: wSystemDSN = USERDSN_ONLY; if (lpszFilename) { len = GetPrivateProfileString (lpszSection, lpszEntry, lpszDefault, lpszRetBuffer, cbRetBuffer, lpszFilename); goto quit; } if (_iodbcadm_getinifile (pathbuf, sizeof (pathbuf), FALSE, FALSE)) len = GetPrivateProfileString (lpszSection, lpszEntry, lpszDefault, lpszRetBuffer, cbRetBuffer, pathbuf); goto quit; case ODBC_SYSTEM_DSN: wSystemDSN = SYSTEMDSN_ONLY; if (lpszFilename) { len = GetPrivateProfileString (lpszSection, lpszEntry, lpszDefault, lpszRetBuffer, cbRetBuffer, lpszFilename); goto quit; } if (_iodbcadm_getinifile (pathbuf, sizeof (pathbuf), FALSE, FALSE)) len = GetPrivateProfileString (lpszSection, lpszEntry, lpszDefault, lpszRetBuffer, cbRetBuffer, pathbuf); goto quit; case ODBC_BOTH_DSN: wSystemDSN = USERDSN_ONLY; if (lpszFilename) { len = GetPrivateProfileString (lpszSection, lpszEntry, lpszDefault, lpszRetBuffer, cbRetBuffer, lpszFilename); if (!len) { CLEAR_ERROR (); wSystemDSN = SYSTEMDSN_ONLY; len = GetPrivateProfileString (lpszSection, lpszEntry, lpszDefault, lpszRetBuffer, cbRetBuffer, lpszFilename); } goto quit; } if (_iodbcadm_getinifile (pathbuf, sizeof (pathbuf), FALSE, FALSE)) { len = GetPrivateProfileString (lpszSection, lpszEntry, lpszDefault, lpszRetBuffer, cbRetBuffer, pathbuf); if (len) goto quit; } CLEAR_ERROR (); wSystemDSN = SYSTEMDSN_ONLY; if (_iodbcadm_getinifile (pathbuf, sizeof (pathbuf), FALSE, FALSE)) { len = GetPrivateProfileString (lpszSection, lpszEntry, lpszDefault, lpszRetBuffer, cbRetBuffer, pathbuf); } goto quit; } PUSH_ERROR (ODBC_ERROR_GENERAL_ERR); goto quit; quit: wSystemDSN = USERDSN_ONLY; configMode = ODBC_BOTH_DSN; return len; } static IODBC_CHARSET detectCharset(void *str) { char *ch = (char *) str; IODBC_CHARSET cp = CP_UCS4; #ifdef WORDS_BIGENDIAN if (ch[0]==0 && ch[1]!=0 && ch[2]==0) cp = CP_UTF16; else if (ch[0]==0 && ch[1]==0 && ch[2]==0 && ch[3]!=0) cp = CP_UCS4; else cp = CP_UTF8; #else if (ch[0]!=0 && ch[1]==0 && ch[2]!=0) cp = CP_UTF16; else if (ch[0]!=0 && ch[1]==0 && ch[2]==0 && ch[3]==0) cp = CP_UCS4; else cp = CP_UTF8; #endif return cp; } int INSTAPI SQLGetPrivateProfileStringW (LPCWSTR lpszSection, LPCWSTR lpszEntry, LPCWSTR lpszDefault, LPWSTR lpszRetBuffer, int cbRetBuffer, LPCWSTR lpszFilename) { char *_section_u8 = NULL; char *_entry_u8 = NULL; char *_default_u8 = NULL; char *_buffer_u8 = NULL; char *_filename_u8 = NULL; WORD length, len; DM_CONV conv; conv.drv_cp = conv.dm_cp = CP_UCS4; if (lpszFilename) conv.dm_cp = detectCharset((void *)lpszFilename); else if (lpszEntry) conv.dm_cp = detectCharset((void *)lpszEntry); length = 0; _section_u8 = (char *) DM_WtoU8(&conv, (void *)lpszSection, SQL_NTS); if (_section_u8 == NULL && lpszSection) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } _entry_u8 = (char *) DM_WtoU8(&conv, (void *)lpszEntry, SQL_NTS); if (_entry_u8 == NULL && lpszEntry) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } _default_u8 = (char *) DM_WtoU8(&conv, (void *)lpszDefault, SQL_NTS); if (_default_u8 == NULL && lpszDefault) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } _filename_u8 = (char *) DM_WtoU8(&conv, (void *)lpszFilename, SQL_NTS); if (_filename_u8 == NULL && lpszFilename) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } if (cbRetBuffer > 0) { if ((_buffer_u8 = malloc (cbRetBuffer * UTF8_MAX_CHAR_LEN + 1)) == NULL) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } } length = SQLGetPrivateProfileString (_section_u8, _entry_u8, _default_u8, _buffer_u8, cbRetBuffer * UTF8_MAX_CHAR_LEN, _filename_u8); if (length > 0) { if (lpszSection == NULL || lpszEntry == NULL || lpszSection[0] == '\0' || lpszEntry[0] == '\0') { SQLCHAR *ptr; void *ptrW; length = 0; for (ptr = (SQLCHAR *)_buffer_u8, ptrW = lpszRetBuffer; *ptr; ) { dm_StrCopyOut2_U8toW_d2m (&conv, ptr, ptrW, (cbRetBuffer - length - 1) * DM_WCHARSIZE(&conv), &len, NULL); length += len; ptr += STRLEN (ptr) + 1; ptrW += (DM_WCSLEN (&conv, ptrW) + 1) * DM_WCHARSIZE(&conv); } if (conv.dm_cp == CP_UCS4) *(ucs4_t *) ptrW = 0; else if (conv.dm_cp == CP_UTF16) *(ucs2_t *) ptrW = 0; else *(SQLCHAR *) ptrW = 0; length++; } else { dm_StrCopyOut2_U8toW_d2m (&conv, (SQLCHAR *)_buffer_u8, lpszRetBuffer, cbRetBuffer*DM_WCHARSIZE(&conv), &length, NULL); } } else { dm_StrCopyOut2_U8toW_d2m (&conv, (SQLCHAR *)_buffer_u8, lpszRetBuffer, cbRetBuffer*DM_WCHARSIZE(&conv), &length, NULL); } done: MEM_FREE (_section_u8); MEM_FREE (_entry_u8); MEM_FREE (_default_u8); MEM_FREE (_buffer_u8); MEM_FREE (_filename_u8); return length; } BOOL INSTAPI SQLGetKeywordValue (LPCSTR lpszSection, LPCSTR lpszEntry, LPSTR lpszBuffer, int cbBuffer, int *pcbBufOut) { int ret = SQLGetPrivateProfileString (lpszSection, lpszEntry, "", lpszBuffer, cbBuffer, "odbc.ini"); if (pcbBufOut) *pcbBufOut = ret; return (ret != 0); } BOOL INSTAPI SQLGetKeywordValueW (LPCWSTR lpszSection, LPCWSTR lpszEntry, LPWSTR lpszBuffer, int cbBuffer, int *pcbBufOut) { int ret = SQLGetPrivateProfileStringW (lpszSection, lpszEntry, L"", lpszBuffer, cbBuffer, L"odbc.ini"); if (pcbBufOut) *pcbBufOut = ret; return (ret != 0); } libiodbc-3.52.16/iodbcinst/SQLInstallTranslatorEx.c0000664000175000017500000001722714424170750017056 00000000000000/* * SQLInstallTranslatorEx.c * * $Id$ * * These functions intentionally left blank * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include "unicode.h" #include "misc.h" #include "inifile.h" #include "iodbc_error.h" #if !defined(WINDOWS) && !defined(WIN32) && !defined(OS2) && !defined(macintosh) # include # include # define UNIX_PWD #endif extern BOOL InstallDriverPath (LPSTR lpszPath, WORD cbPathMax, WORD * pcbPathOut, LPSTR envname); extern BOOL InstallDriverPathLength (WORD * pcbPathOut, LPSTR envname); BOOL INSTAPI SQLInstallTranslatorEx (LPCSTR lpszTranslator, LPCSTR lpszPathIn, LPSTR lpszPathOut, WORD cbPathOutMax, WORD * pcbPathOut, WORD fRequest, LPDWORD lpdwUsageCount) { PCONFIG pCfg = NULL, pOdbcCfg = NULL; BOOL retcode = FALSE; CLEAR_ERROR (); if (lpszPathIn && access (lpszPathIn, R_OK | W_OK | X_OK)) { PUSH_ERROR (ODBC_ERROR_INVALID_PATH); goto quit; } switch (fRequest) { case ODBC_INSTALL_INQUIRY: if (lpszPathIn) { if (pcbPathOut) *pcbPathOut = STRLEN (lpszPathIn); retcode = TRUE; } else retcode = InstallDriverPathLength (pcbPathOut, "ODBCTRANSLATORS"); goto quit; case ODBC_INSTALL_COMPLETE: break; default: PUSH_ERROR (ODBC_ERROR_INVALID_REQUEST_TYPE); goto quit; } /* Check input parameters */ if (!lpszTranslator || !STRLEN (lpszTranslator)) { PUSH_ERROR (ODBC_ERROR_INVALID_PARAM_SEQUENCE); goto quit; } if (!lpszPathOut || !cbPathOutMax) { PUSH_ERROR (ODBC_ERROR_INVALID_BUFF_LEN); goto quit; } /* Write the out path */ if (!InstallDriverPath (lpszPathOut, cbPathOutMax, pcbPathOut, "ODBCTRANSLATORS")) goto quit; /* Else go through user/system odbcinst.ini */ switch (configMode) { case ODBC_BOTH_DSN: case ODBC_USER_DSN: wSystemDSN = USERDSN_ONLY; break; case ODBC_SYSTEM_DSN: wSystemDSN = SYSTEMDSN_ONLY; break; } if (_iodbcdm_cfg_search_init (&pCfg, "odbcinst.ini", TRUE)) { PUSH_ERROR (ODBC_ERROR_GENERAL_ERR); goto quit; } if (_iodbcdm_cfg_search_init (&pOdbcCfg, "odbc.ini", TRUE)) { PUSH_ERROR (ODBC_ERROR_GENERAL_ERR); pOdbcCfg = NULL; goto done; } if (!install_from_string (pCfg, pOdbcCfg, (char *) lpszTranslator, FALSE)) { PUSH_ERROR (ODBC_ERROR_INVALID_KEYWORD_VALUE); goto done; } if (_iodbcdm_cfg_commit (pCfg) || _iodbcdm_cfg_commit (pOdbcCfg)) { PUSH_ERROR (ODBC_ERROR_GENERAL_ERR); goto done; } retcode = TRUE; done: _iodbcdm_cfg_done (pCfg); if (pOdbcCfg) _iodbcdm_cfg_done (pOdbcCfg); quit: wSystemDSN = USERDSN_ONLY; configMode = ODBC_BOTH_DSN; return retcode; } BOOL INSTAPI SQLInstallTranslatorExW (LPCWSTR lpszTranslator, LPCWSTR lpszPathIn, LPWSTR lpszPathOut, WORD cbPathOutMax, WORD * pcbPathOut, WORD fRequest, LPDWORD lpdwUsageCount) { char *_translator_u8 = NULL; char *_pathin_u8 = NULL; char *_pathout_u8 = NULL; BOOL retcode = FALSE; int length; SQLWCHAR *ptr; char *ptr_u8; for (length = 0, ptr = (SQLWCHAR *) lpszTranslator; *ptr; length += WCSLEN (ptr) + 1, ptr += WCSLEN (ptr) + 1); if (length > 0) { if ((_translator_u8 = malloc (length * UTF8_MAX_CHAR_LEN + 1)) != NULL) { for (ptr = (SQLWCHAR *) lpszTranslator, ptr_u8 = _translator_u8; *ptr; ptr += WCSLEN (ptr) + 1, ptr_u8 += STRLEN (ptr_u8) + 1) dm_StrCopyOut2_W2A (ptr, (SQLCHAR *)ptr_u8, WCSLEN (ptr) * UTF8_MAX_CHAR_LEN, NULL); *ptr_u8 = '\0'; } } else _translator_u8 = (char *) dm_SQL_WtoU8 ((SQLWCHAR *) lpszTranslator, SQL_NTS); if (_translator_u8 == NULL && lpszTranslator) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } _pathin_u8 = (char *) dm_SQL_WtoU8 ((SQLWCHAR *) lpszPathIn, SQL_NTS); if (_pathin_u8 == NULL && lpszPathIn) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } if (cbPathOutMax > 0) { if ((_pathout_u8 = malloc (cbPathOutMax * UTF8_MAX_CHAR_LEN + 1)) == NULL) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } } retcode = SQLInstallTranslatorEx (_translator_u8, _pathin_u8, _pathout_u8, cbPathOutMax * UTF8_MAX_CHAR_LEN, pcbPathOut, fRequest, lpdwUsageCount); if (retcode == TRUE) { dm_StrCopyOut2_U8toW ((SQLCHAR *)_pathout_u8, lpszPathOut, cbPathOutMax, pcbPathOut); } done: MEM_FREE (_translator_u8); MEM_FREE (_pathin_u8); MEM_FREE (_pathout_u8); return retcode; } libiodbc-3.52.16/iodbcinst/SQLInstallODBC.c0000664000175000017500000001162014424170750015126 00000000000000/* * SQLInstallODBC.c * * $Id$ * * These functions intentionally left blank * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include "unicode.h" #include "iodbc_error.h" BOOL InstallODBC (HWND hwndParent, LPCSTR lpszInfFile, LPCSTR lpszSrcPath, LPCSTR lpszDrivers) { return FALSE; } BOOL INSTAPI SQLInstallODBC (HWND hwndParent, LPCSTR lpszInfFile, LPCSTR lpszSrcPath, LPCSTR lpszDrivers) { BOOL retcode = FALSE; /* Check input parameters */ CLEAR_ERROR (); if (!lpszDrivers || !STRLEN (lpszDrivers)) { PUSH_ERROR (ODBC_ERROR_INVALID_NAME); goto quit; } if (!lpszInfFile || !STRLEN (lpszInfFile)) { PUSH_ERROR (ODBC_ERROR_INVALID_INF); goto quit; } retcode = InstallODBC (hwndParent, lpszInfFile, lpszSrcPath, lpszDrivers); quit: return retcode; } BOOL INSTAPI SQLInstallODBCW (HWND hwndParent, LPCWSTR lpszInfFile, LPCWSTR lpszSrcPath, LPCWSTR lpszDrivers) { char *_inf_u8 = NULL; char *_srcpath_u8 = NULL; char *_drivers_u8 = NULL; BOOL retcode = FALSE; _inf_u8 = (char *) dm_SQL_WtoU8 ((SQLWCHAR *) lpszInfFile, SQL_NTS); if (_inf_u8 == NULL && lpszInfFile) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } _srcpath_u8 = (char *) dm_SQL_WtoU8 ((SQLWCHAR *) lpszSrcPath, SQL_NTS); if (_srcpath_u8 == NULL && lpszSrcPath) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } _drivers_u8 = (char *) dm_SQL_WtoU8 ((SQLWCHAR *) lpszDrivers, SQL_NTS); if (_drivers_u8 == NULL && lpszDrivers) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } retcode = SQLInstallODBC (hwndParent, _inf_u8, _srcpath_u8, _drivers_u8); done: MEM_FREE (_inf_u8); MEM_FREE (_srcpath_u8); MEM_FREE (_drivers_u8); return retcode; } libiodbc-3.52.16/iodbcinst/SQLPostInstallerError.c0000664000175000017500000001032014424170750016701 00000000000000/* * SQLPostInstallerError.c * * $Id$ * * These functions intentionally left blank * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include "unicode.h" #include "iodbc_error.h" RETCODE INSTAPI SQLPostInstallerError (DWORD fErrorCode, LPSTR szErrorMsg) { RETCODE retcode = SQL_ERROR; /* Check if the index is valid to retrieve an error */ if (fErrorCode < ODBC_ERROR_GENERAL_ERR || fErrorCode > ODBC_ERROR_DRIVER_SPECIFIC) goto quit; if (numerrors < ERROR_NUM) { ierror[++numerrors] = fErrorCode; errormsg[numerrors] = szErrorMsg;; } retcode = SQL_SUCCESS; quit: return retcode; } RETCODE INSTAPI SQLPostInstallerErrorW (DWORD fErrorCode, LPWSTR szErrorMsg) { char *_errormsg_u8 = NULL; RETCODE retcode = SQL_ERROR; _errormsg_u8 = (char *) dm_SQL_WtoU8 ((SQLWCHAR *) szErrorMsg, SQL_NTS); if (_errormsg_u8 == NULL && szErrorMsg) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } retcode = SQLPostInstallerError (fErrorCode, _errormsg_u8); done: MEM_FREE (_errormsg_u8); return retcode; } libiodbc-3.52.16/iodbcinst/SQLRemoveDSNFromIni.c0000664000175000017500000001461314424170750016163 00000000000000/* * SQLRemoveDSNFromIni.c * * $Id$ * * Remove a DSN * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include "unicode.h" #include "inifile.h" #include "misc.h" #include "iodbc_error.h" extern BOOL ValidDSN (LPCSTR); extern BOOL ValidDSNW (LPCSTR); BOOL RemoveDSNFromIni (SQLPOINTER lpszDSN, SQLCHAR waMode) { BOOL retcode = FALSE; char *_dsn_u8 = NULL; PCONFIG pCfg; /* Check dsn */ if (waMode == 'A') { if (!lpszDSN || !ValidDSN (lpszDSN) || !STRLEN (lpszDSN)) { PUSH_ERROR (ODBC_ERROR_INVALID_DSN); goto quit; } _dsn_u8 = lpszDSN; } else { if (!lpszDSN || !ValidDSNW (lpszDSN) || !WCSLEN (lpszDSN)) { PUSH_ERROR (ODBC_ERROR_INVALID_DSN); goto quit; } _dsn_u8 = (char *) dm_SQL_WtoU8 ((SQLWCHAR *) lpszDSN, SQL_NTS); if (_dsn_u8 == NULL && lpszDSN) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto quit; } } if (_iodbcdm_cfg_search_init (&pCfg, "odbc.ini", TRUE)) { PUSH_ERROR (ODBC_ERROR_REQUEST_FAILED); goto quit; } if (strcmp (_dsn_u8, "Default")) { /* deletes a DSN from [ODBC data sources] section */ #ifdef WIN32 _iodbcdm_cfg_write (pCfg, "ODBC 32 bit Data Sources", (LPSTR) _dsn_u8, NULL); #else _iodbcdm_cfg_write (pCfg, "ODBC Data Sources", (LPSTR) _dsn_u8, NULL); #endif } /* deletes the DSN section in odbc.ini */ _iodbcdm_cfg_write (pCfg, (LPSTR) _dsn_u8, NULL, NULL); if (_iodbcdm_cfg_commit (pCfg)) { PUSH_ERROR (ODBC_ERROR_REQUEST_FAILED); goto done; } retcode = TRUE; done: _iodbcdm_cfg_done (pCfg); quit: if (_dsn_u8 != lpszDSN) MEM_FREE (_dsn_u8); return retcode; } BOOL INSTAPI SQLRemoveDSNFromIni (LPCSTR lpszDSN) { BOOL retcode = FALSE; CLEAR_ERROR (); switch (configMode) { case ODBC_USER_DSN: wSystemDSN = USERDSN_ONLY; retcode = RemoveDSNFromIni ((SQLPOINTER) lpszDSN, 'A'); goto quit; case ODBC_SYSTEM_DSN: wSystemDSN = SYSTEMDSN_ONLY; retcode = RemoveDSNFromIni ((SQLPOINTER) lpszDSN, 'A'); goto quit; case ODBC_BOTH_DSN: wSystemDSN = USERDSN_ONLY; retcode = RemoveDSNFromIni ((SQLPOINTER) lpszDSN, 'A'); if (!retcode) { CLEAR_ERROR (); wSystemDSN = SYSTEMDSN_ONLY; retcode = RemoveDSNFromIni ((SQLPOINTER) lpszDSN, 'A'); } goto quit; } PUSH_ERROR (ODBC_ERROR_GENERAL_ERR); goto quit; quit: wSystemDSN = USERDSN_ONLY; configMode = ODBC_BOTH_DSN; return retcode; } BOOL INSTAPI SQLRemoveDSNFromIniW (LPCWSTR lpszDSN) { BOOL retcode = FALSE; CLEAR_ERROR (); switch (configMode) { case ODBC_USER_DSN: wSystemDSN = USERDSN_ONLY; retcode = RemoveDSNFromIni ((SQLPOINTER) lpszDSN, 'W'); goto quit; case ODBC_SYSTEM_DSN: wSystemDSN = SYSTEMDSN_ONLY; retcode = RemoveDSNFromIni ((SQLPOINTER) lpszDSN, 'W'); goto quit; case ODBC_BOTH_DSN: wSystemDSN = USERDSN_ONLY; retcode = RemoveDSNFromIni ((SQLPOINTER) lpszDSN, 'W'); if (!retcode) { CLEAR_ERROR (); wSystemDSN = SYSTEMDSN_ONLY; retcode = RemoveDSNFromIni ((SQLPOINTER) lpszDSN, 'W'); } goto quit; } PUSH_ERROR (ODBC_ERROR_GENERAL_ERR); goto quit; quit: wSystemDSN = USERDSN_ONLY; configMode = ODBC_BOTH_DSN; return retcode; } libiodbc-3.52.16/iodbcinst/iodbc_error.c0000664000175000017500000000656514424170750015015 00000000000000/* * iodbc_error.h * * $Id$ * * Misc support functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include "iodbc_error.h" DWORD ierror[ERROR_NUM] = {0}; LPSTR errormsg[ERROR_NUM] = {0}; SWORD numerrors = -1; libiodbc-3.52.16/iodbcinst/SQLRemoveTranslator.c0000664000175000017500000001116014424170750016376 00000000000000/* * SQLRemoveTranslator.c * * $Id$ * * These functions intentionally left blank * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include "unicode.h" #include "inifile.h" #include "misc.h" #include "iodbc_error.h" BOOL INSTAPI SQLRemoveTranslator (LPCSTR lpszTranslator, LPDWORD lpdwUsageCount) { BOOL retcode = FALSE; PCONFIG pCfg; /* Check input parameter */ CLEAR_ERROR (); if (!lpszTranslator || !STRLEN (lpszTranslator)) { PUSH_ERROR (ODBC_ERROR_INVALID_NAME); goto quit; } if (_iodbcdm_cfg_search_init (&pCfg, "odbcinst.ini", FALSE)) { PUSH_ERROR (ODBC_ERROR_REQUEST_FAILED); goto quit; } /* deletes the translator */ _iodbcdm_cfg_write (pCfg, "ODBC Translators", (LPSTR) lpszTranslator, NULL); _iodbcdm_cfg_write (pCfg, (LPSTR) lpszTranslator, NULL, NULL); if (_iodbcdm_cfg_commit (pCfg)) { PUSH_ERROR (ODBC_ERROR_REQUEST_FAILED); goto done; } retcode = TRUE; done: _iodbcdm_cfg_done (pCfg); quit: return retcode; } BOOL INSTAPI SQLRemoveTranslatorW (LPCWSTR lpszTranslator, LPDWORD lpdwUsageCount) { char *_translator_u8 = NULL; BOOL retcode = FALSE; _translator_u8 = (char *) dm_SQL_WtoU8 ((SQLWCHAR *) lpszTranslator, SQL_NTS); if (_translator_u8 == NULL && lpszTranslator) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } retcode = SQLRemoveTranslator (_translator_u8, lpdwUsageCount); done: MEM_FREE (_translator_u8); return retcode; } libiodbc-3.52.16/iodbcinst/SQLGetTranslator.c0000664000175000017500000002670214424170750015670 00000000000000/* * SQLGetTranslator.c * * $Id$ * * These functions intentionally left blank * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include "unicode.h" #include "dlf.h" #include "inifile.h" #include "misc.h" #include "iodbc_error.h" #if defined (__APPLE__) && !defined (NO_FRAMEWORKS) #include #endif #ifndef WIN32 #include #if defined (__APPLE__) && !defined (NO_FRAMEWORKS) #define CALL_CONFIG_TRANSLATOR(path) \ if (path) \ { \ char *tmp_path = strdup (path); \ if (tmp_path) \ { \ char *ptr = strstr (tmp_path, "/Contents/MacOS/"); \ if (ptr) \ *ptr = 0; \ liburl = CFURLCreateFromFileSystemRepresentation (NULL, (UInt8 *) tmp_path, strlen (tmp_path), FALSE); \ CFArrayRef arr = CFBundleCopyExecutableArchitecturesForURL (liburl); \ if (arr) \ bundle_dll = CFBundleCreate (NULL, liburl); \ if (arr) \ CFRelease (arr); \ if (liburl) \ CFRelease (liburl); \ } \ MEM_FREE (tmp_path); \ CALL_CONFIG_TRANSLATOR_BUNDLE (); \ } #define CALL_CONFIG_TRANSLATOR_BUNDLE() \ if (bundle_dll != NULL) \ { \ if ((pConfigTranslator = (pConfigTranslatorFunc) CFBundleGetFunctionPointerForName (bundle_dll, CFSTR ("ConfigTranslator"))) != NULL) \ { \ if (pConfigTranslator (hwndParent, pvOption)) \ { \ finish = retcode = TRUE; \ goto done; \ } \ else \ { \ PUSH_ERROR (ODBC_ERROR_GENERAL_ERR); \ retcode = FALSE; \ goto done; \ } \ } \ } #define CALL_TRSCHOOSE_DIALBOX(path) \ if (path) \ { \ char *tmp_path = strdup (path); \ if (tmp_path) \ { \ char *ptr = strstr (tmp_path, "/Contents/MacOS/"); \ if (ptr) \ *ptr = 0; \ liburl = CFURLCreateFromFileSystemRepresentation (NULL, (UInt8 *) tmp_path, strlen (tmp_path), FALSE); \ CFArrayRef arr = CFBundleCopyExecutableArchitecturesForURL (liburl); \ if (arr) \ bundle_dll = CFBundleCreate (NULL, liburl); \ if (arr) \ CFRelease (arr); \ if (liburl) \ CFRelease (liburl); \ } \ MEM_FREE (tmp_path); \ CALL_TRSCHOOSE_DIALBOX_BUNDLE (); \ } #define CALL_TRSCHOOSE_DIALBOX_BUNDLE() \ if (bundle_dll != NULL) \ { \ if ((pTrsChoose = (pTrsChooseFunc) CFBundleGetFunctionPointerForName (bundle_dll, CFSTR ("_iodbcdm_trschoose_dialbox"))) != NULL) \ ret = pTrsChoose (hwndParent, translator, sizeof (translator), NULL); \ else \ ret = SQL_NO_DATA; \ } \ else \ ret = SQL_NO_DATA; #else #define CALL_CONFIG_TRANSLATOR(path) \ if ((handle = DLL_OPEN (path)) != NULL) \ { \ if ((pConfigTranslator = (pConfigTranslatorFunc) DLL_PROC (handle, "ConfigTranslator")) != NULL) \ { \ if (pConfigTranslator (hwndParent, pvOption)) \ { \ DLL_CLOSE (handle); \ finish = retcode = TRUE; \ goto done; \ } \ else \ { \ PUSH_ERROR (ODBC_ERROR_GENERAL_ERR); \ DLL_CLOSE (handle); \ retcode = FALSE; \ goto done; \ } \ } \ DLL_CLOSE (handle); \ } #define CALL_TRSCHOOSE_DIALBOX(path) \ if ((handle = DLL_OPEN (path)) != NULL) \ { \ if ((pTrsChoose = (pTrsChooseFunc) DLL_PROC (handle, "_iodbcdm_trschoose_dialbox")) != NULL) \ ret = pTrsChoose (hwndParent, translator, sizeof (translator), NULL); \ else \ ret = SQL_NO_DATA; \ DLL_CLOSE (handle); \ } \ else \ ret = SQL_NO_DATA; #endif #endif extern SQLRETURN _iodbcdm_trschoose_dialbox (HWND, LPSTR, DWORD, int *); BOOL INSTAPI GetTranslator (HWND hwndParent, LPSTR lpszName, WORD cbNameMax, WORD * pcbNameOut, LPSTR lpszPath, WORD cbPathMax, WORD * pcbPathOut, DWORD * pvOption) { pConfigTranslatorFunc pConfigTranslator; pTrsChooseFunc pTrsChoose; BOOL retcode = FALSE, finish = FALSE; PCONFIG pCfg; UWORD configMode; RETCODE ret = SQL_NO_DATA; void *handle; char translator[1024]; #if defined (__APPLE__) && !defined (NO_FRAMEWORKS) CFBundleRef bundle = NULL; CFBundleRef bundle_dll = NULL; CFURLRef liburl; #endif do { /* Load the Admin dialbox function */ #if defined (__APPLE__) # if !defined(NO_FRAMEWORKS) bundle = CFBundleGetBundleWithIdentifier (CFSTR ("org.iodbc.core")); if (bundle) { /* Search for the iODBCadm library */ liburl = CFBundleCopyResourceURL (bundle, CFSTR ("iODBCadm.bundle"), NULL, NULL); if (liburl) { bundle_dll = CFBundleCreate (NULL, liburl); CFRelease (liburl); CALL_TRSCHOOSE_DIALBOX_BUNDLE (); } } # endif #else CALL_TRSCHOOSE_DIALBOX ("libiodbcadm.so.2"); #endif if (ret == SQL_NO_DATA) { if (pcbNameOut) *pcbNameOut = 0; if (pcbPathOut) *pcbPathOut = 0; finish = TRUE; } if (ret == SQL_SUCCESS) { STRNCPY (lpszName, translator + STRLEN ("TranslationName="), cbNameMax - 1); if (pcbNameOut) *pcbNameOut = STRLEN (lpszName); /* Get it from the user odbcinst file */ wSystemDSN = USERDSN_ONLY; if (!_iodbcdm_cfg_search_init (&pCfg, "odbcinst.ini", TRUE)) { if (!_iodbcdm_cfg_find (pCfg, (char *) lpszName, "Setup")) CALL_CONFIG_TRANSLATOR (pCfg->value); if (!_iodbcdm_cfg_find (pCfg, (char *) lpszName, "Translator")) CALL_CONFIG_TRANSLATOR (pCfg->value); if (!access (lpszName, X_OK)) CALL_CONFIG_TRANSLATOR (lpszName); if (!_iodbcdm_cfg_find (pCfg, "Default", "Setup")) CALL_CONFIG_TRANSLATOR (pCfg->value); if (!_iodbcdm_cfg_find (pCfg, "Default", "Translator")) CALL_CONFIG_TRANSLATOR (pCfg->value); } /* Get it from the system odbcinst file */ if (pCfg) { _iodbcdm_cfg_done (pCfg); pCfg = NULL; } wSystemDSN = SYSTEMDSN_ONLY; if (!_iodbcdm_cfg_search_init (&pCfg, "odbcinst.ini", TRUE)) { if (!_iodbcdm_cfg_find (pCfg, (char *) lpszName, "Setup")) CALL_CONFIG_TRANSLATOR (pCfg->value); if (!_iodbcdm_cfg_find (pCfg, (char *) lpszName, "Translator")) CALL_CONFIG_TRANSLATOR (pCfg->value); if (!access (lpszName, X_OK)) CALL_CONFIG_TRANSLATOR (lpszName); if (!_iodbcdm_cfg_find (pCfg, "Default", "Setup")) CALL_CONFIG_TRANSLATOR (pCfg->value); if (!_iodbcdm_cfg_find (pCfg, "Default", "Translator")) CALL_CONFIG_TRANSLATOR (pCfg->value); } /* The last ressort, a proxy driver */ CALL_CONFIG_TRANSLATOR ("libtranslator.so.2"); /* Error : ConfigDSN could no be found */ PUSH_ERROR (ODBC_ERROR_LOAD_LIB_FAILED); done: STRNCPY (lpszPath, pCfg->fileName, cbPathMax - 1); if (pcbPathOut) *pcbPathOut = STRLEN (lpszPath); _iodbcdm_cfg_done (pCfg); } } while (!finish); retcode = TRUE; wSystemDSN = USERDSN_ONLY; configMode = ODBC_BOTH_DSN; return retcode; } BOOL INSTAPI SQLGetTranslator (HWND hwnd, LPSTR lpszName, WORD cbNameMax, WORD * pcbNameOut, LPSTR lpszPath, WORD cbPathMax, WORD * pcbPathOut, DWORD * pvOption) { BOOL retcode = FALSE; /* Check input parameters */ CLEAR_ERROR (); if (!hwnd) { PUSH_ERROR (ODBC_ERROR_INVALID_HWND); goto quit; } if (!lpszName || !lpszPath || cbNameMax < 1 || cbPathMax < 1) { PUSH_ERROR (ODBC_ERROR_INVALID_BUFF_LEN); goto quit; } retcode = GetTranslator (hwnd, lpszName, cbNameMax, pcbNameOut, lpszPath, cbPathMax, pcbPathOut, pvOption); quit: return retcode; } BOOL INSTAPI SQLGetTranslatorW (HWND hwnd, LPWSTR lpszName, WORD cbNameMax, WORD FAR * pcbNameOut, LPWSTR lpszPath, WORD cbPathMax, WORD FAR * pcbPathOut, DWORD FAR * pvOption) { char *_name_u8 = NULL; char *_path_u8 = NULL; BOOL retcode = FALSE; if (cbNameMax > 0) { if ((_name_u8 = malloc (cbNameMax * UTF8_MAX_CHAR_LEN + 1)) == NULL) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } } if (cbPathMax > 0) { if ((_path_u8 = malloc (cbPathMax * UTF8_MAX_CHAR_LEN + 1)) == NULL) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } } retcode = SQLGetTranslator (hwnd, _name_u8, cbNameMax * UTF8_MAX_CHAR_LEN, pcbNameOut, _path_u8, cbPathMax * UTF8_MAX_CHAR_LEN, pcbPathOut, pvOption); if (retcode == TRUE) { dm_StrCopyOut2_U8toW ((SQLCHAR *)_name_u8, lpszName, cbNameMax, pcbNameOut); dm_StrCopyOut2_U8toW ((SQLCHAR *)_path_u8, lpszPath, cbPathMax, pcbPathOut); } done: MEM_FREE (_name_u8); MEM_FREE (_path_u8); return retcode; } libiodbc-3.52.16/iodbcinst/unicode.c0000664000175000017500000015737214424170750014155 00000000000000/* * unicode.c * * $Id$ * * ODBC unicode functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #define UNICODE #include #include #include #include #include #include #ifdef WIN32 #if _MSC_VER < 1300 #include #endif #include #endif #include "unicode.h" #ifndef UNICHAR_DEFINED #define UNICHAR_DEFINED typedef int unichar; /*!< 31-bit unicode values, negative ones are invalid */ #endif #define UNICHAR_EOD ((unichar)(-2)) /*!< End of source buffer reached, no data to convert */ #define UNICHAR_NO_DATA ((unichar)(-3)) /*!< Source buffer is too short, but nonempty (contains part of a char) */ #define UNICHAR_NO_ROOM ((unichar)(-4)) /*!< Target buffer is too short */ #define UNICHAR_BAD_ENCODING ((unichar)(-5)) /*!< Invalid character decoded from invalid string */ #define UNICHAR_OUT_OF_WCHAR ((unichar)(-6)) /*!< The encoded data are valid but the encoded character is out of 16-bit range and will not fit 2-byte wchar_t. */ typedef const char *__constcharptr; static unichar eh_decode_char__UTF16BE (__constcharptr *src_begin_ptr, const char *src_buf_end, ...); static char *eh_encode_char__UTF16BE (unichar char_to_put, char *tgt_buf, char *tgt_buf_end, ...); static unichar eh_decode_char__UTF16LE (__constcharptr *src_begin_ptr, const char *src_buf_end, ...); static char *eh_encode_char__UTF16LE (unichar char_to_put, char *tgt_buf, char *tgt_buf_end, ...); static size_t _calc_len_for_utf8 (IODBC_CHARSET charset, void * str, int size); static size_t _wcxtoutf8 (IODBC_CHARSET charset, void * wstr, char * ustr, int size); static size_t _wcxntoutf8 (IODBC_CHARSET charset, void * wstr, char *ustr, int wlen, int size, int * converted); static size_t _utf8towcx (IODBC_CHARSET charset, char * ustr, void * wstr, int size); static size_t _WCSLEN(IODBC_CHARSET charset, void *str); static size_t dm_UWtoA(wchar_t *src, int ilen, char *dest, int olen); static size_t dm_AtoUW(char *src, int ilen, wchar_t *dest, size_t olen); #ifndef MAX # define MAX(X,Y) (X > Y ? X : Y) # define MIN(X,Y) (X < Y ? X : Y) #endif #if !defined(HAVE_WCSLEN) size_t wcslen (const wchar_t * wcs) { size_t len = 0; while (*wcs++ != L'\0') len++; return len; } #endif #if !defined(HAVE_WCSCPY) wchar_t * wcscpy (wchar_t * wcd, const wchar_t * wcs) { wchar_t *dst = wcd; while ((*dst++ = *wcs++) != L'\0') ; return wcd; } #endif #if !defined (HAVE_WCSNCPY) wchar_t * wcsncpy (wchar_t * wcd, const wchar_t * wcs, size_t n) { wchar_t *dst = wcd; size_t len = 0; while ( len < n && (*dst++ = *wcs++) != L'\0') len++; for (; len < n; len++) *dst++ = L'\0'; return wcd; } #endif #if !defined(HAVE_WCSCHR) wchar_t* wcschr(const wchar_t *wcs, const wchar_t wc) { do if(*wcs == wc) return (wchar_t*) wcs; while(*wcs++ != L'\0'); return NULL; } #endif #if !defined(HAVE_WCSCAT) wchar_t* wcscat(wchar_t *dest, const wchar_t *src) { wchar_t *s1 = dest; const wchar_t *s2 = src; wchar_t c; do c = *s1 ++; while(c != L'\0'); s1 -= 2; do { c = *s2 ++; *++s1 = c; } while(c != L'\0'); return dest; } #endif #if !defined(HAVE_WCSCMP) int wcscmp (const wchar_t* s1, const wchar_t* s2) { wchar_t c1, c2; if (s1 == s2) return 0; do { c1 = *s1++; c2 = *s2++; if(c1 == L'\0') break; } while (c1 == c2); return c1 - c2; } #endif #if !defined(HAVE_TOWLOWER) #if (defined (__APPLE__) && !(defined (NO_FRAMEWORKS) || defined (_LP64))) #include wchar_t towlower (wchar_t wc) { CFMutableStringRef strRef = CFStringCreateMutable (NULL, 0); UniChar c = (UniChar) wc; wchar_t wcs; CFStringAppendCharacters (strRef, &c, 1); CFStringLowercase (strRef, NULL); wcs = CFStringGetCharacterAtIndex (strRef, 0); CFRelease (strRef); return wcs; } #else /* Use dummy function */ wchar_t towlower (wchar_t wc) { return wc; } #endif /* __APPLE__ */ #endif /* !HAVE_TOWLOWER */ #if !defined(HAVE_WCSNCASECMP) int wcsncasecmp (const wchar_t* s1, const wchar_t* s2, size_t n) { wchar_t c1, c2; if (s1 == s2 || n ==0) return 0; do { c1 = towlower(*s1++); c2 = towlower(*s2++); if(c1 == L'\0' || c1 != c2) return c1 - c2; } while (--n > 0); return c1 - c2; } #endif /* UTF-16BE */ static unichar eh_decode_char__UTF16BE (__constcharptr *src_begin_ptr, const char *src_buf_end, ...) { /* As is in RFC 2781... U' = yyyyyyyyyyxxxxxxxxxx W1 = 110110yyyyyyyyyy W2 = 110111xxxxxxxxxx */ unsigned char *src_begin = (unsigned char *)(src_begin_ptr[0]); unsigned char hi, lo, hiaddon, loaddon; unichar acc /* W1 */, accaddon /* W2 */; if (src_begin >= (unsigned char *)src_buf_end) return UNICHAR_EOD; if (src_begin+1 >= (unsigned char *)src_buf_end) return UNICHAR_NO_DATA; hi = src_begin[0]; lo = src_begin[1]; acc = (hi << 8) | lo; if (0xFFFE == acc) return UNICHAR_BAD_ENCODING; /* Maybe UTF16LE ? */ switch (acc & 0xFC00) { case 0xD800: if (src_begin+3 >= (unsigned char *)src_buf_end) return UNICHAR_NO_DATA; hiaddon = src_begin[2]; loaddon = src_begin[3]; accaddon = (hiaddon << 8) | loaddon; if (0xDC00 != (accaddon & 0xFC00)) return UNICHAR_BAD_ENCODING; /* No low-half after hi-half ? */ src_begin_ptr[0] += 4; return 0x10000 + (((acc & 0x3FF) << 10) | (accaddon & 0x3FF)); case 0xDC00: return UNICHAR_BAD_ENCODING; /* Low-half first ? */ default: src_begin_ptr[0] += 2; return acc; } } static char * eh_encode_char__UTF16BE (unichar char_to_put, char *tgt_buf, char *tgt_buf_end, ...) { if (char_to_put < 0) return tgt_buf; if (char_to_put & ~0xFFFF) { if (tgt_buf+4 > tgt_buf_end) return (char *)UNICHAR_NO_ROOM; char_to_put -= 0x10000; tgt_buf[0] = (unsigned char)(0xD8 | ((char_to_put >> 18) & 0x03)); tgt_buf[1] = (unsigned char)((char_to_put >> 10) & 0xFF); tgt_buf[2] = (unsigned char)(0xDC | ((char_to_put >> 8) & 0x03)); tgt_buf[3] = (unsigned char)(char_to_put & 0xFF); return tgt_buf+4; } if (0xD800 == (char_to_put & 0xF800)) return tgt_buf; if (tgt_buf+2 > tgt_buf_end) return (char *)UNICHAR_NO_ROOM; tgt_buf[0] = (unsigned char)(char_to_put >> 8); tgt_buf[1] = (unsigned char)(char_to_put & 0xFF); return tgt_buf+2; } /* UTF-16LE */ static unichar eh_decode_char__UTF16LE (__constcharptr *src_begin_ptr, const char *src_buf_end, ...) { /* As is in RFC 2781... U' = yyyyyyyyyyxxxxxxxxxx W1 = 110110yyyyyyyyyy W2 = 110111xxxxxxxxxx */ unsigned char *src_begin = (unsigned char *)(src_begin_ptr[0]); unsigned char hi, lo, hiaddon, loaddon; unichar acc /* W1 */, accaddon /* W2 */; if (src_begin >= (unsigned char *)src_buf_end) return UNICHAR_EOD; if (src_begin+1 >= (unsigned char *)src_buf_end) return UNICHAR_NO_DATA; hi = src_begin[1]; lo = src_begin[0]; acc = (hi << 8) | lo; if (0xFFFE == acc) return UNICHAR_BAD_ENCODING; /* Maybe UTF16BE ? */ switch (acc & 0xFC00) { case 0xD800: if (src_begin+3 >= (unsigned char *)src_buf_end) return UNICHAR_NO_DATA; hiaddon = src_begin[3]; loaddon = src_begin[2]; accaddon = (hiaddon << 8) | loaddon; if (0xDC00 != (accaddon & 0xFC00)) return UNICHAR_BAD_ENCODING; /* No low-half after hi-half ? */ src_begin_ptr[0] += 4; return 0x10000 + (((acc & 0x3FF) << 10) | (accaddon & 0x3FF)); case 0xDC00: return UNICHAR_BAD_ENCODING; /* Low-half first ? */ default: src_begin_ptr[0] += 2; return acc; } } static char * eh_encode_char__UTF16LE (unichar char_to_put, char *tgt_buf, char *tgt_buf_end, ...) { if (char_to_put < 0) return tgt_buf; if (char_to_put & ~0xFFFF) { if (tgt_buf+4 > tgt_buf_end) return (char *)UNICHAR_NO_ROOM; char_to_put -= 0x10000; tgt_buf[1] = (unsigned char)(0xD8 | ((char_to_put >> 18) & 0x03)); tgt_buf[0] = (unsigned char)((char_to_put >> 10) & 0xFF); tgt_buf[3] = (unsigned char)(0xDC | ((char_to_put >> 8) & 0x03)); tgt_buf[2] = (unsigned char)(char_to_put & 0xFF); return tgt_buf+4; } if (0xD800 == (char_to_put & 0xF800)) return tgt_buf; if (tgt_buf+2 > tgt_buf_end) return (char *)UNICHAR_NO_ROOM; tgt_buf[1] = (unsigned char)(char_to_put >> 8); tgt_buf[0] = (unsigned char)(char_to_put & 0xFF); return tgt_buf+2; } SQLCHAR * dm_SQL_W2A (SQLWCHAR * inStr, int size) { SQLCHAR *outStr = NULL; size_t len; if (inStr == NULL) return NULL; if (size == SQL_NTS) len = wcslen (inStr); else if (size < 0) return NULL; else len = (size_t)size; # ifdef WIN32 if ((outStr = (SQLCHAR *) calloc (len * UTF8_MAX_CHAR_LEN + 1, 1)) != NULL) { if (len > 0) OPL_W2A (inStr, outStr, len); outStr[len] = '\0'; } #else if ((outStr = (SQLCHAR *) calloc (len * MB_CUR_MAX + 1, 1)) != NULL) { if (len > 0) dm_UWtoA(inStr, len, outStr, len * MB_CUR_MAX); } #endif return outStr; } SQLWCHAR * dm_SQL_A2W (SQLCHAR * inStr, int size) { SQLWCHAR *outStr = NULL; size_t len; if (inStr == NULL) return NULL; if (size == SQL_NTS) len = strlen ((char *) inStr); else if (size < 0) return NULL; else len = (size_t)size; if ((outStr = (SQLWCHAR *) calloc (len + 1, sizeof (SQLWCHAR))) != NULL) { if (len > 0) dm_AtoUW(inStr, len, outStr, len); } return outStr; } int dm_StrCopyOut2_A2W ( SQLCHAR * inStr, SQLWCHAR * outStr, SQLSMALLINT size, WORD * result) { size_t length; if (!inStr) return -1; length = strlen ((char *) inStr); if (result) *result = (SQLSMALLINT) length; if (!outStr) return 0; if (size >= length + 1) { if (length > 0) length = dm_AtoUW(inStr, length, outStr, length); outStr[length] = L'\0'; return 0; } if (size > 0) { length = dm_AtoUW(inStr, length, outStr, size); outStr[length] = L'\0'; } return -1; } int dm_StrCopyOut2_W2A ( SQLWCHAR * inStr, SQLCHAR * outStr, SQLSMALLINT size, WORD * result) { size_t length; if (!inStr) return -1; length = wcslen (inStr); if (result) *result = (SQLSMALLINT) length; if (!outStr) return 0; if (size >= length + 1) { if (length > 0) length = dm_UWtoA(inStr, length, outStr, length); outStr[length] = '\0'; return 0; } if (size > 0) { length = dm_UWtoA(inStr, length, outStr, size); outStr[length] = '\0'; } return -1; } SQLWCHAR * dm_strcpy_A2W (SQLWCHAR * destStr, SQLCHAR * sourStr) { size_t length; if (!sourStr || !destStr) return destStr; length = strlen ((char *) sourStr); if (length > 0) length = dm_AtoUW(sourStr, length, destStr, length); destStr[length] = L'\0'; return destStr; } SQLCHAR * dm_strcpy_W2A (SQLCHAR * destStr, SQLWCHAR * sourStr) { size_t length; if (!sourStr || !destStr) return destStr; length = wcslen (sourStr); if (length > 0) length = dm_UWtoA(sourStr, length, destStr, length); destStr[length] = '\0'; return destStr; } /* encode */ #define LEN_FOR_UTF8(Char, Len) \ if (Char < 0x80) \ { \ Len = 1; \ } \ else if (Char < 0x800) \ { \ Len = 2; \ } \ else if (Char < 0x10000) \ { \ Len = 3; \ } \ else if (Char < 0x110000) \ { \ Len = 4; \ } \ else \ { \ Len = 1; \ } #define CONV_TO_UTF8(Char, Len, First) \ if (Char < 0x80) \ { \ Len = 1; \ First = 0; \ } \ else if (Char < 0x800) \ { \ Len = 2; \ First = 0xC0; \ } \ else if (Char < 0x10000) \ { \ Len = 3; \ First = 0xE0; \ } \ else if (Char < 0x110000) \ { \ Len = 4; \ First = 0xf0; \ } \ else \ { \ Len = 1; \ First = 0; \ Char = '?'; \ } /* decode */ #define UTF8_COMPUTE(Char, Mask, Len) \ if (Char < 128) \ { \ Len = 1; \ Mask = 0x7f; \ } \ else if ((Char & 0xe0) == 0xc0) \ { \ Len = 2; \ Mask = 0x1f; \ } \ else if ((Char & 0xf0) == 0xe0) \ { \ Len = 3; \ Mask = 0x0f; \ } \ else if ((Char & 0xf8) == 0xf0) \ { \ Len = 4; \ Mask = 0x07; \ } \ else \ Len = -1; static size_t _WCHARSIZE(IODBC_CHARSET charset) { switch(charset) { case CP_UTF8: return 1; case CP_UTF16: return sizeof(ucs2_t); case CP_UCS4: default: return sizeof(ucs4_t); } } static size_t _WCHARSIZE_ALLOC(IODBC_CHARSET charset) { switch(charset) { case CP_UTF8: return UTF8_MAX_CHAR_LEN; case CP_UTF16: return sizeof(ucs2_t) * 2; case CP_UCS4: default: return sizeof(ucs4_t); } } static size_t _utf16_calc_len_for_utf8 (ucs2_t *str, int size) { size_t len = 0; ucs4_t wc; char *us = (char *) str; char *us_end; size_t utf8_len = 0; if (!str) return len; us_end = (char *)(str + size); while (size > 0) { #ifdef WORDS_BIGENDIAN wc = (ucs4_t) eh_decode_char__UTF16BE((__constcharptr *) &us, us_end); #else wc = (ucs4_t) eh_decode_char__UTF16LE((__constcharptr *) &us, us_end); #endif if (wc == UNICHAR_EOD || wc == UNICHAR_NO_DATA || wc == UNICHAR_BAD_ENCODING) break; LEN_FOR_UTF8(wc, utf8_len); len += utf8_len; size--; } return len; } static size_t _ucs4_calc_len_for_utf8 (ucs4_t *str, int size) { size_t len = 0; ucs4_t wc; size_t utf8_len = 0; if (!str) return len; while (size > 0) { wc = *str; LEN_FOR_UTF8(wc, utf8_len); len += utf8_len; str++; size--; } return len; } static size_t _calc_len_for_utf8 (IODBC_CHARSET charset, void * str, int size) { if (!str) return 0; if (size == SQL_NTS) size = _WCSLEN (charset, str); if (charset == CP_UTF16) return _utf16_calc_len_for_utf8 ((ucs2_t*)str, size); else return _ucs4_calc_len_for_utf8 ((ucs4_t*)str, size); } static size_t utf8_len (SQLCHAR * p, int size) { size_t len = 0; if (!*p) return 0; if (size == SQL_NTS) while (*p) { for (p++; (*p & 0xC0) == 0x80; p++) ; len++; } else while (size > 0) { for (p++, size--; (size > 0) && ((*p & 0xC0) == 0x80); p++, size--) ; len++; } return len; } /* * size - size of buffer for output utf8 string in bytes * return - length of output utf8 string */ static size_t wcstoutf8 (wchar_t *wstr, char *ustr, int size_bytes) { return _wcxtoutf8 (CP_DEF, (void *)wstr, ustr, size_bytes); } static size_t _utf16ntoutf8 (ucs2_t *wstr, char *ustr, int wlen, int size_bytes, int *converted) { int len; ucs4_t wc; int first; int i; int count = 0; char *us0 = (char *) wstr; char *us = (char *) wstr; char *us_end; int _converted = 0; if (!wstr) return 0; us_end = (char *)(wstr + wlen); while(_converted < wlen && count < size_bytes) { #ifdef WORDS_BIGENDIAN wc = (ucs4_t) eh_decode_char__UTF16BE((__constcharptr *) &us, us_end); #else wc = (ucs4_t) eh_decode_char__UTF16LE((__constcharptr *) &us, us_end); #endif if (wc == UNICHAR_EOD || wc == UNICHAR_NO_DATA || wc == UNICHAR_BAD_ENCODING) break; CONV_TO_UTF8(wc, len, first); if (size_bytes - count < len) { if (converted) *converted = _converted; return count; } for (i = len - 1; i > 0; --i) { ustr[i] = (wc & 0x3f) | 0x80; wc >>= 6; } ustr[0] = wc | first; ustr += len; count += len; _converted = (us - us0) / sizeof(ucs2_t); } if (converted) *converted = _converted; return count; } /* * wlen - length of input *wstr string in symbols(for utf8 in bytes) * size - size of buffer ( *ustr string) in bytes * converted - number of converted symbols from *wstr(for utf8 in bytes) * * Return - length of output utf8 string */ static size_t _wcxntoutf8 ( IODBC_CHARSET charset, void * wstr, char * ustr, int wlen, int size_bytes, int * converted) { int len; ucs4_t c; int first; int i; int count = 0; int _converted = 0; ucs4_t *u4str = (ucs4_t *)wstr; wchar_t *sstr = (wchar_t *)wstr; if (!wstr) return 0; if (charset == CP_UTF8) { unsigned char *u8str = (unsigned char*)wstr; int mask; while (_converted < wlen && count < size_bytes) { UTF8_COMPUTE(*u8str, mask, len); if (size_bytes - count < len) { if (converted) *converted = _converted; return count; } for (i = 0; i < len; i++) *ustr++ = *u8str++; count += len; _converted+=len; } if (converted) *converted = _converted; return count; } else if (charset == CP_UTF16) { return _utf16ntoutf8 ((ucs2_t *) wstr, ustr, wlen, size_bytes, converted); } else { while (_converted < wlen && count < size_bytes) { switch(charset) { case CP_UCS4: c = (ucs4_t)*u4str; break; default: c = (ucs4_t)*sstr; break; } CONV_TO_UTF8(c, len, first); if (size_bytes - count < len) { if (converted) *converted = _converted; return count; } for (i = len - 1; i > 0; --i) { ustr[i] = (c & 0x3f) | 0x80; c >>= 6; } ustr[0] = c | first; ustr += len; count += len; _converted++; switch(charset) { case CP_UCS4: u4str++; break; default: sstr++; break; } } if (converted) *converted = _converted; return count; } } /* * size - size of buffer for output utf8 string in bytes * return - length of output utf8 string in bytes */ static size_t _wcxtoutf8 (IODBC_CHARSET charset, void * wstr, char * ustr, int size_bytes) { if (!wstr) return 0; return _wcxntoutf8 (charset, wstr, ustr, _WCSLEN(charset, wstr), size_bytes, NULL); } /* * wlen - length of input *wstr string in symbols * size - size of buffer ( *ustr string) in bytes * converted - number of converted symbols from *wstr * * Return - length of output utf8 string */ static size_t wcsntoutf8 (wchar_t *wstr, char *ustr, int wlen, int size, int *converted) { if (!wstr) return 0; return _wcxntoutf8 (CP_DEF, (void*)wstr, ustr, wlen, size, converted); } static SQLCHAR * strdup_WtoU8 (SQLWCHAR * str) { SQLCHAR *ret; int len; if (!str) return NULL; len = _calc_len_for_utf8 (CP_DEF, str, SQL_NTS); if ((ret = (SQLCHAR *) malloc (len + 1)) == NULL) return NULL; len = wcstoutf8 (str, (char *)ret, len); ret[len] = '\0'; return ret; } /* * size - size of buffer for output string in symbols (SQLWCHAR) * return - length of output SQLWCHAR string */ static size_t utf8towcs (char *ustr, SQLWCHAR *wstr, int size) { return _utf8towcx (CP_DEF, ustr, (void *)wstr, size); } /* * ulen - length of input *ustr string in bytes * size - size of buffer ( *wstr string) in symbols * converted - number of converted bytes from *ustr * * Return - length of output wcs string */ static size_t _utf8ntoutf16 ( char * ustr, ucs2_t * wstr, int ulen, int size, int * converted) { int i; int mask = 0; int len; SQLCHAR c; ucs4_t wc; int count = 0; int _converted = 0; char *rc; char *us = (char*) wstr; char *us_end = (char*) (wstr + size); if (!ustr) return 0; while ((_converted < ulen) && (count < size)) { c = *ustr; UTF8_COMPUTE (c, mask, len); if ((len == -1) || (_converted + len > ulen)) { if (converted) *converted = _converted; return count; } wc = c & mask; for (i = 1; i < len; i++) { if ((ustr[i] & 0xC0) != 0x80) { if (converted) *converted = _converted; return count; } wc <<= 6; wc |= (ustr[i] & 0x3F); } #ifdef WORDS_BIGENDIAN rc = eh_encode_char__UTF16BE ((unichar)wc, us, us_end); #else rc = eh_encode_char__UTF16LE ((unichar)wc, us, us_end); #endif if ((char *)UNICHAR_NO_ROOM == rc) break; count += (rc - us) / sizeof(ucs2_t); us = rc; ustr += len; _converted += len; } if (converted) *converted = _converted; return count; } /* * ulen - length of input *ustr string in bytes * size - size of buffer ( *wstr string) in symbols * converted - number of converted bytes from *ustr * * Return - length of output wcs string */ static size_t _utf8ntowcx ( IODBC_CHARSET charset, char * ustr, void * wstr, int ulen, int size, int * converted) { int i; int mask = 0; int len; unsigned char c; ucs4_t wc; int count = 0; int _converted = 0; ucs4_t *u4str = (ucs4_t *)wstr; char *u8str = (char*)wstr; if (!ustr) return 0; if (charset == CP_UTF16) return _utf8ntoutf16 (ustr, wstr, ulen, size, converted); while ((_converted < ulen) && (count < size)) { c = (unsigned char)*ustr; UTF8_COMPUTE (c, mask, len); if ((len == -1) || (_converted + len > ulen)) { if (converted) *converted = _converted; return count; } if (charset == CP_UTF8) { for (i = 0; i < len; i++) *u8str++ = *ustr++; count += len; _converted += len; } else /* CP_UCS4 */ { wc = c & mask; for (i = 1; i < len; i++) { if ((ustr[i] & 0xC0) != 0x80) { if (converted) *converted = _converted; return count; } wc <<= 6; wc |= (ustr[i] & 0x3F); } *u4str = (ucs4_t)wc; u4str++; ustr += len; count++; _converted += len; } } if (converted) *converted = _converted; return count; } /* * size - size of buffer for output string in symbols * return - length of output SQLWCHAR string in bytes */ static size_t _utf8towcx (IODBC_CHARSET charset, char * ustr, void * wstr, int size) { if (!ustr) return 0; return _utf8ntowcx (charset, ustr, wstr, strlen(ustr), size, NULL); } /* * ulen - length of input *ustr string in bytes * size - size of buffer ( *wstr string) in symbols * converted - number of converted bytes from *ustr * * Return - length of output wcs string */ static size_t utf8ntowcs ( SQLCHAR * ustr, SQLWCHAR * wstr, int ulen, int size, int * converted) { int i; int mask = 0; int len; SQLCHAR c; SQLWCHAR wc; int count = 0; int _converted = 0; if (!ustr) return 0; while ((_converted < ulen) && (count < size)) { c = (SQLCHAR) *ustr; UTF8_COMPUTE (c, mask, len); if ((len == -1) || (_converted + len > ulen)) { if (converted) *converted = _converted; return count; } wc = c & mask; for (i = 1; i < len; i++) { if ((ustr[i] & 0xC0) != 0x80) { if (converted) *converted = _converted; return count; } wc <<= 6; wc |= (ustr[i] & 0x3F); } *wstr = wc; ustr += len; wstr++; count++; _converted += len; } if (converted) *converted = _converted; return count; } static SQLWCHAR * strdup_U8toW (SQLCHAR * str) { SQLWCHAR *ret; int len; if (!str) return NULL; len = utf8_len (str, SQL_NTS); if ((ret = (SQLWCHAR *) malloc ((len + 1) * sizeof (SQLWCHAR))) == NULL) return NULL; len = utf8towcs ((char *)str, ret, len); ret[len] = L'\0'; return ret; } SQLCHAR * dm_SQL_WtoU8 (SQLWCHAR * inStr, int size) { SQLCHAR *outStr = NULL; int len; if (inStr == NULL) return NULL; if (size == SQL_NTS) { outStr = strdup_WtoU8 (inStr); } else { len = _calc_len_for_utf8 (CP_DEF, inStr, size); if ((outStr = (SQLCHAR *) malloc (len + 1)) != NULL) { len = wcsntoutf8 (inStr, (char*)outStr, size, len, NULL); outStr[len] = '\0'; } } return outStr; } SQLWCHAR * dm_SQL_U8toW (SQLCHAR * inStr, int size) { SQLWCHAR *outStr = NULL; int len; if (inStr == NULL) return NULL; if (size == SQL_NTS) { outStr = strdup_U8toW (inStr); } else { len = utf8_len (inStr, size); if ((outStr = (SQLWCHAR *) calloc (len + 1, sizeof (SQLWCHAR))) != NULL) utf8ntowcs (inStr, outStr, size, len, NULL); } return outStr; } int dm_StrCopyOut2_U8toW ( SQLCHAR * inStr, SQLWCHAR * outStr, int size, WORD * result) { int length; if (!inStr) return -1; length = utf8_len (inStr, SQL_NTS); if (result) *result = (SQLSMALLINT) length; if (!outStr) return 0; if (size >= length + 1) { length = utf8towcs ((char *)inStr, outStr, size); outStr[length] = L'\0'; return 0; } if (size > 0) { length = utf8towcs ((char *)inStr, outStr, size - 1); outStr[length] = L'\0'; } return -1; } static size_t _WCSLEN(IODBC_CHARSET charset, void *str) { size_t len = 0; ucs4_t *u4str = (ucs4_t *)str; ucs2_t *u2str = (ucs2_t *)str; if (!str) return 0; switch(charset) { case CP_UTF8: return utf8_len((SQLCHAR *)str, SQL_NTS); case CP_UTF16: while (*u2str++ != 0) len++; break; case CP_UCS4: while (*u4str++ != 0) len++; break; } return len; } /* * ilen - length of inStr in SQL Ind format * olen - size of outStr buffer in symbols * return length of copied data in symbols */ static size_t dm_U2toU4(ucs2_t *inStr, int ilen, ucs4_t *outStr, int olen) { size_t n = 0; char *us = (char *) inStr; char *us_end = (char *)(inStr + ilen); ucs4_t wc; int count = 0; while(n < ilen) { #ifdef WORDS_BIGENDIAN wc = (ucs4_t) eh_decode_char__UTF16BE((__constcharptr *) &us, us_end); #else wc = (ucs4_t) eh_decode_char__UTF16LE((__constcharptr *) &us, us_end); #endif if (wc == UNICHAR_EOD || wc == UNICHAR_NO_DATA || wc == UNICHAR_BAD_ENCODING) break; if (count + 1 > olen) break; *outStr = wc; n++; outStr++; count ++; } return count; } static size_t dm_U4toU2(ucs4_t *inStr, int ilen, ucs2_t *outStr, int olen) { size_t n = 0; char *rc; char *us = (char*) outStr; char *us_end = (char*) (outStr + olen); while (n < ilen && us < us_end) { #ifdef WORDS_BIGENDIAN rc = eh_encode_char__UTF16BE (*inStr, us, us_end); #else rc = eh_encode_char__UTF16LE (*inStr, us, us_end); #endif if ((char *)UNICHAR_NO_ROOM == rc) break; us = rc; n++; inStr++; if (!*inStr) break; } return (us - (char *)outStr) / sizeof(ucs2_t); } static size_t dm_AtoU2(char *src, int ilen, ucs2_t *dest, int olen) { size_t n = 0; wchar_t wc; char *rc; char *us = (char*) dest; char *us_end = (char*)(dest + olen); mbstate_t st; memset (&st, 0, sizeof (st)); while (n < ilen && us < us_end) { size_t sz = mbrtowc (&wc, src, ilen - n, &st); if (((long) sz) > 0) { n += sz - 1; src += sz - 1; } else if (((long) sz) < 0) { wc = 0xFFFD; } #ifdef WORDS_BIGENDIAN rc = eh_encode_char__UTF16BE (wc, us, us_end); #else rc = eh_encode_char__UTF16LE (wc, us, us_end); #endif if ((char *)UNICHAR_NO_ROOM == rc) break; us = rc; n++; if (!*src) break; src++; } return (us - (char *)dest) / sizeof(ucs2_t); } static size_t dm_AtoU4(char *src, int ilen, ucs4_t *dest, size_t olen) { size_t n = 0; wchar_t wc; ucs4_t *us = dest; int count = 0; mbstate_t st; memset (&st, 0, sizeof (st)); while (n < ilen && count < olen) { size_t sz = mbrtowc (&wc, src, ilen - n, &st); if (((long) sz) > 0) { n += sz - 1; src += sz - 1; } else if (((long) sz) < 0) { wc = 0xFFFD; } *us = wc; n++; us++; count++; if (!*src) break; src++; } return count; } static size_t dm_AtoUW(char *src, int ilen, wchar_t *dest, size_t olen) { size_t n = 0; wchar_t wc; ucs4_t *us = dest; int count = 0; mbstate_t st; memset (&st, 0, sizeof (st)); while (n < ilen && count < olen) { size_t sz = mbrtowc (&wc, src, ilen - n, &st); if (((long) sz) > 0) { n += sz - 1; src += sz - 1; } else if (((long) sz) < 0) { wc = 0xFFFD; } *us = wc; n++; us++; count++; if (!*src) break; src++; } return count; } static size_t dm_U2toA(ucs2_t *src, int ilen, char *dest, int olen) { size_t n = 0; char *us = (char *) src; char *us_end = (char*)(src + ilen); wchar_t wc; mbstate_t st; if (!*src) return 0; while (n < olen) { char temp[MB_CUR_MAX]; size_t sz, sz_written = 0; #ifdef WORDS_BIGENDIAN wc = eh_decode_char__UTF16BE((__constcharptr *) &us, us_end); #else wc = eh_decode_char__UTF16LE((__constcharptr *) &us, us_end); #endif if (wc == UNICHAR_EOD || wc == UNICHAR_NO_DATA || wc == UNICHAR_BAD_ENCODING) break; memset (&st, 0, sizeof (st)); sz = wcrtomb (temp, wc, &st); if (((long) sz) > 0) { if (sz > olen - n) break; memcpy (dest, temp, sz); n += sz - 1; dest += sz - 1; } else *dest = '?'; n++; dest++; } return n; } static size_t dm_U4toA(ucs4_t *src, int ilen, char *dest, int olen) { int n = 0; wchar_t wc; int count = 0; mbstate_t st; if (!*src) return 0; while (n < ilen && count < olen) { char temp[MB_CUR_MAX]; size_t sz, sz_written = 0; memset (&st, 0, sizeof (st)); wc = *src; sz = wcrtomb (temp, wc, &st); if (((long) sz) > 0) { if (sz > olen - count) break; memcpy (dest, temp, sz); count += sz - 1; dest += sz - 1; } else *dest = '?'; src++; count++; n++; dest++; } return n; } static size_t dm_UWtoA(wchar_t *src, int ilen, char *dest, int olen) { int n = 0; wchar_t wc; int count = 0; mbstate_t st; if (!*src) return 0; while (n < ilen && count < olen) { char temp[MB_CUR_MAX]; size_t sz, sz_written = 0; memset (&st, 0, sizeof (st)); wc = *src; sz = wcrtomb (temp, wc, &st); if (((long) sz) > 0) { if (sz > olen - count) break; memcpy (dest, temp, sz); count += sz - 1; dest += sz - 1; } else *dest = '?'; src++; count++; n++; dest++; } return n; } /* * len - length of inStr in SQL Ind format * size - size of outStr buffer in bytes * return length of copied data in bytes */ int dm_conv_W2W(void *inStr, int len, void *outStr, int size, IODBC_CHARSET icharset, IODBC_CHARSET ocharset) { int count = 0; int o_wchar_size = _WCHARSIZE(ocharset); size /= o_wchar_size; if (icharset == CP_UTF8) { if (len == SQL_NTS) len = strlen((char*)inStr); count = _utf8ntowcx(ocharset, (char*)inStr, outStr, len, size, NULL); return count * o_wchar_size; } else if (ocharset == CP_UTF8) { if (len == SQL_NTS) len = (icharset==CP_UTF8)?strlen((char*)inStr):_WCSLEN(icharset, inStr); return _wcxntoutf8(icharset, inStr, (char*)outStr, len, size, NULL); } else { if (len == SQL_NTS) len = _WCSLEN(icharset, inStr); if (icharset == CP_UTF16) { if (ocharset == CP_UCS4) { count = dm_U2toU4((ucs2_t *)inStr, len, (ucs4_t *)outStr, size); return count * o_wchar_size; } else { ucs2_t *u2i = (ucs2_t *) inStr; ucs2_t *u2o = (ucs2_t *) outStr; while(len > 0 && count < size) { *u2o = *u2i; u2o++; u2i++; len--; count++; } return count * o_wchar_size; } } else /* CP_UCS4 */ { if (ocharset == CP_UTF16) { count = dm_U4toU2((ucs4_t *)inStr, len, (ucs2_t *)outStr, size); return count * o_wchar_size; } else { ucs4_t *u4i = (ucs4_t *) inStr; ucs4_t *u4o = (ucs4_t *) outStr; while(len > 0 && count < size) { *u4o = *u4i; u4o++; u4i++; len--; count++; } return count * o_wchar_size; } } } } /* * len - length of inStr in SQL Ind format * size - size of buffer for output string in bytes * return length of copied data in bytes */ int dm_conv_W2A(void *inStr, int inLen, char *outStr, int size, IODBC_CHARSET charset) { SQLWCHAR wc; int count = 0; if (inLen == SQL_NTS) { inLen = (charset == CP_UTF8) ? strlen((char*)inStr) : _WCSLEN(charset, inStr); } if (size > 0) { if (charset == CP_UTF8) { SQLCHAR *u8 = (SQLCHAR *)inStr; SQLCHAR c; int len, mask, i; char temp[MB_CUR_MAX]; mbstate_t st; size_t rc; while((c = *u8) && size > 0 && inLen > 0) { UTF8_COMPUTE (c, mask, len); if (len == -1) return count; wc = c & mask; for(i = 1; i < len; i++) { if ((u8[i] & 0xC0) != 0x80) return count; wc <<= 6; wc |= (u8[i] & 0x3F); } memset (&st, 0, sizeof (st)); rc = wcrtomb (temp, wc, &st); if (((ssize_t)rc) > 0) { rc = MIN(rc, MB_CUR_MAX); if (rc > size) break; memcpy(outStr, temp, rc); size -= rc -1; outStr += rc - 1; count += rc - 1; } else if (rc == 0) { *outStr = 0; } else { *outStr = '?'; } size --; outStr ++; count ++; u8 += len; inLen -= len; } } else if (charset == CP_UTF16) { count = dm_U2toA((ucs2_t *)inStr, inLen, outStr, size); } else if (charset == CP_UCS4) { count = dm_U4toA((ucs4_t *)inStr, inLen, outStr, size); } } return count; } /* * len - length of inStr in SQL Ind format * size - size of buffer for output string in bytes * return length of copied data in bytes */ int dm_conv_A2W(char *inStr, int inLen, void *outStr, int size, IODBC_CHARSET charset) { SQLWCHAR wc; int count = 0; int o_wchar_size = _WCHARSIZE(charset); if (inLen == SQL_NTS) inLen = strlen(inStr); if (size > 0) { if (charset == CP_UTF8) { SQLCHAR *u8 = (SQLCHAR*)outStr; int len,first,i; mbstate_t st; memset (&st, 0, sizeof (st)); while(*inStr && size>0 && inLen > 0) { size_t rc; rc = mbrtowc (&wc, inStr, (size_t)inLen, &st); if (((ssize_t)rc) > 0) { inLen -= rc - 1; inStr += rc - 1; } else if (((ssize_t)rc) < 0) { wc = 0xFFFD; } CONV_TO_UTF8(wc, len, first); for(i = len-1; i > 0; --i) { u8[i] = (wc & 0x3F) | 0x80; wc >>= 6; } u8[0] = wc | first; u8 += len; size -= len; count += len; inStr++; inLen--; } } else if (charset == CP_UTF16) { count = dm_AtoU2(inStr, inLen, (ucs2_t *)outStr, size/o_wchar_size); count *= o_wchar_size; } else if (charset == CP_UCS4) { count = dm_AtoU4(inStr, inLen, (ucs4_t *)outStr, size/o_wchar_size); count *= o_wchar_size; } } return count; } static void _SetWCharAt(IODBC_CHARSET charset, void *str, int pos, int ch) { ucs4_t *u4 = (ucs4_t *)str; ucs2_t *u2 = (ucs2_t *)str; if (!str) return; switch(charset) { case CP_UTF8: { int i=0; SQLCHAR *u8str = (SQLCHAR*)str; while(i < pos) { int mask, len; UTF8_COMPUTE(*u8str, mask, len); if (len == -1) break; u8str += len; i++; } *u8str = (SQLCHAR)ch; } break; case CP_UTF16: u2[pos] = (ucs4_t)ch; break; case CP_UCS4: u4[pos] = (ucs4_t)ch; break; } } void DM_strcpy_U8toW (DM_CONV *conv, void *dest, SQLCHAR *sour) { IODBC_CHARSET charset = (conv) ? conv->dm_cp : CP_DEF; int len; if (!sour) return; if (charset == CP_UTF16 || charset == CP_UCS4) { len = utf8_len(sour, SQL_NTS) * _WCHARSIZE(charset); _utf8towcx(charset, (char *)sour, dest, len); } else strcpy(dest, (char *)sour); } size_t DRV_WCHARSIZE(DM_CONV *conv) { IODBC_CHARSET charset = (conv) ? conv->drv_cp : CP_DEF; return _WCHARSIZE(charset); } size_t DM_WCHARSIZE(DM_CONV *conv) { IODBC_CHARSET charset = (conv) ? conv->dm_cp : CP_DEF; return _WCHARSIZE(charset); } size_t DRV_WCHARSIZE_ALLOC(DM_CONV *conv) { IODBC_CHARSET charset = (conv) ? conv->drv_cp : CP_DEF; return _WCHARSIZE_ALLOC(charset); } size_t DM_WCHARSIZE_ALLOC(DM_CONV *conv) { IODBC_CHARSET charset = (conv) ? conv->dm_cp : CP_DEF; return _WCHARSIZE_ALLOC(charset); } void * DM_A2W(DM_CONV *conv, SQLCHAR * inStr, int size) { IODBC_CHARSET charset = (conv) ? conv->dm_cp : CP_DEF; SQLWCHAR *outStr = NULL; ssize_t len; if (size == SQL_NTS) len = strlen((char *) inStr); else len = size; if (len < 0) return NULL; outStr = (SQLWCHAR *) calloc(len + 1, DM_WCHARSIZE_ALLOC(conv)); if (!outStr) return NULL; dm_conv_A2W((char *)inStr, size, outStr, len*DM_WCHARSIZE_ALLOC(conv), charset); return outStr; } static SQLCHAR * __W2A(IODBC_CHARSET charset, void * inStr, int size) { SQLCHAR *outStr = NULL; ssize_t len; if (size == SQL_NTS) len = _WCSLEN(charset, inStr); else len = size; if (len < 0) return NULL; outStr = (SQLCHAR *) calloc (len * MB_CUR_MAX + 1, 1); if (!outStr) return NULL; dm_conv_W2A(inStr, size, (char *)outStr, len, charset); return outStr; } SQLCHAR * DM_W2A(DM_CONV *conv, void * inStr, int size) { IODBC_CHARSET charset = (conv) ? conv->dm_cp : CP_DEF; return __W2A(charset, inStr, size); } SQLCHAR * DRV_W2A(DM_CONV *conv, void * inStr, int size) { IODBC_CHARSET charset = (conv) ? conv->drv_cp : CP_DEF; return __W2A(charset, inStr, size); } void DM_SetWCharAt(DM_CONV *conv, void *str, int pos, int ch) { IODBC_CHARSET charset = (conv) ? conv->dm_cp : CP_DEF; _SetWCharAt(charset, str, pos, ch); } void DRV_SetWCharAt(DM_CONV *conv, void *str, int pos, int ch) { IODBC_CHARSET charset = (conv) ? conv->drv_cp : CP_DEF; _SetWCharAt(charset, str, pos, ch); } SQLWCHAR DM_GetWCharAt(DM_CONV *conv, void *str, int pos) { IODBC_CHARSET charset = (conv) ? conv->dm_cp : CP_DEF; ucs4_t *u4 = (ucs4_t *)str; ucs2_t *u2 = (ucs2_t *)str; if (!str) return 0; switch(charset) { case CP_UTF8: { int mask, len, i=0; SQLWCHAR wc = 0; SQLCHAR *u8str = (SQLCHAR*)str; while(i < pos) { UTF8_COMPUTE(*u8str, mask, len); if (len == -1) break; u8str += len; i++; } UTF8_COMPUTE(*u8str, mask, len); wc = (*u8str)&mask; for(i=1; i < len; i++) { if ((u8str[i] & 0xC0) != 0x80) return 0; wc <<= 6; wc |= (u8str[i] & 0x3F); } return wc; } case CP_UTF16: return (SQLWCHAR)u2[pos]; case CP_UCS4: default: return (SQLWCHAR)u4[pos]; } } static void * _WCSCPY(IODBC_CHARSET charset, void *dest, void *sour) { ucs4_t *u4dst = (ucs4_t *)dest; ucs2_t *u2dst = (ucs2_t *)dest; ucs4_t *u4src = (ucs4_t *)sour; ucs2_t *u2src = (ucs2_t *)sour; switch(charset) { case CP_UTF8: strcpy((char*)dest, (char*)sour); break; case CP_UTF16: while ((*u2dst++ = *u2src++) != 0) ; *u2dst = 0; break; case CP_UCS4: while ((*u4dst++ = *u4src++) != 0) ; *u4dst = 0; break; } return dest; } static void * _WCSNCPY(IODBC_CHARSET charset, void *dest, void *sour, size_t count) { size_t len = 0; ucs4_t *u4dst = (ucs4_t *)dest; ucs2_t *u2dst = (ucs2_t *)dest; ucs4_t *u4src = (ucs4_t *)sour; ucs2_t *u2src = (ucs2_t *)sour; switch(charset) { case CP_UTF8: strncpy((char*)dest, (char*)sour, count); break; case CP_UTF16: while (len < count && *u2src != 0) { *u2dst++ = *u2src++; len++; } if (len < count) *u2dst = 0; break; case CP_UCS4: while (len < count && *u4src != 0) { *u4dst++ = *u4src++; len++; } if (len < count) *u4dst = 0; break; } return dest; } void * DM_WCSCPY(DM_CONV *conv, void *dest, void *sour) { IODBC_CHARSET charset = (conv) ? conv->dm_cp : CP_DEF; return _WCSCPY(charset, dest, sour); } void * DM_WCSNCPY(DM_CONV *conv, void *dest, void *sour, size_t count) { IODBC_CHARSET charset = (conv) ? conv->dm_cp : CP_DEF; return _WCSNCPY(charset, dest, sour, count); } void * DRV_WCSNCPY(DM_CONV *conv, void *dest, void *sour, size_t count) { IODBC_CHARSET charset = (conv) ? conv->drv_cp : CP_DEF; return _WCSNCPY(charset, dest, sour, count); } size_t DM_WCSLEN(DM_CONV *conv, void *str) { IODBC_CHARSET charset = (conv) ? conv->dm_cp : CP_DEF; return _WCSLEN(charset, str); } size_t DRV_WCSLEN(DM_CONV *conv, void *str) { IODBC_CHARSET charset = (conv) ? conv->drv_cp : CP_DEF; return _WCSLEN(charset, str); } static SQLCHAR * __WtoU8(IODBC_CHARSET charset, void *inStr, int size) { SQLCHAR *outStr = NULL; int len; if (inStr == NULL) return NULL; len = _calc_len_for_utf8(charset, inStr, size); if (!(outStr = (SQLCHAR *) calloc (len + 1, sizeof(char)))) return NULL; if (size == SQL_NTS) _wcxtoutf8 (charset, inStr, (char *)outStr, len); else _wcxntoutf8 (charset, inStr, (char *)outStr, size, len, NULL); return outStr; } SQLCHAR * DM_WtoU8(DM_CONV *conv, void *inStr, int size) { IODBC_CHARSET charset = (conv) ? conv->dm_cp : CP_DEF; return __WtoU8(charset, inStr, size); } SQLCHAR * DRV_WtoU8(DM_CONV *conv, void *inStr, int size) { IODBC_CHARSET charset = (conv) ? conv->drv_cp : CP_DEF; return __WtoU8(charset, inStr, size); } void * DM_U8toW(DM_CONV *conv, SQLCHAR *inStr, int size) { IODBC_CHARSET charset = (conv) ? conv->dm_cp : CP_DEF; void *outStr = NULL; int len = 0; if (inStr == NULL) return NULL; len = utf8_len (inStr, size); outStr = (void *) calloc (len + 1, _WCHARSIZE_ALLOC(charset)); if (size == SQL_NTS) _utf8towcx(charset, (char *)inStr, outStr, len); else _utf8ntowcx(charset, (char *)inStr, outStr, size, len, NULL); return outStr; } /* drv => dm * * size - size of outStr in bytes * result - length in symbols * copied - count of copied in bytes */ int dm_StrCopyOut2_A2W_d2m (DM_CONV *conv, SQLCHAR *inStr, void *outStr, int size, SQLSMALLINT *result, int *copied) { IODBC_CHARSET o_charset = (conv) ? conv->dm_cp : CP_DEF; int length, count; int ret = 0; if (!inStr) return -1; length = strlen ((char *) inStr); if (result) *result = (SQLSMALLINT) length; if (!outStr) return 0; size -= DM_WCHARSIZE(conv); if (size <= 0) return -1; count = dm_conv_A2W((char *)inStr, SQL_NTS, outStr, size, o_charset); if (o_charset == CP_UTF16 || o_charset == CP_UCS4) _SetWCharAt(o_charset, outStr, count/_WCHARSIZE(o_charset), 0); else *(char*)(outStr + count) = 0; if (_WCSLEN(o_charset, outStr) < length) ret = -1; if (copied) *copied = count; return ret; } /* drv => dm */ int dm_StrCopyOut2_W2A_d2m (DM_CONV *conv, void *inStr, SQLCHAR *outStr, int size, SQLSMALLINT *result, int *copied) { IODBC_CHARSET i_charset = (conv) ? conv->drv_cp : CP_DEF; int length, count; int ret = 0; if (!inStr) return -1; length = _WCSLEN(i_charset, inStr); if (result) *result = (SQLSMALLINT) length; if (!outStr) return 0; size--; if (size < 0) return -1; count = dm_conv_W2A(inStr, SQL_NTS, (char *)outStr, size, i_charset); outStr[count] = '\0'; if (count < length) ret = -1; if (copied) *copied = count; return ret; } /* dm => drv */ int dm_StrCopyOut2_W2A_m2d (DM_CONV *conv, void *inStr, SQLCHAR *outStr, int size, SQLSMALLINT *result, int *copied) { IODBC_CHARSET i_charset = (conv) ? conv->dm_cp : CP_DEF; int length, count; int ret = 0; if (!inStr) return -1; length = _WCSLEN(i_charset, inStr); if (result) *result = (SQLSMALLINT) length; if (!outStr) return 0; size--; if (size < 0) return -1; count = dm_conv_W2A(inStr, SQL_NTS, (char *)outStr, size, i_charset); outStr[count] = '\0'; if (count < length) ret = -1; if (copied) *copied = count; return ret; } /* drv => dm * * size - size of outStr in bytes * result - length in symbols * copied - count of copied in bytes */ int dm_StrCopyOut2_U8toW_d2m (DM_CONV *conv, SQLCHAR *inStr, void *outStr, int size, SQLSMALLINT *result, int *copied) { IODBC_CHARSET o_charset = (conv) ? conv->dm_cp : CP_DEF; int length; int ret = 0; int count = 0; if (!inStr) return -1; length = utf8_len ((SQLCHAR *) inStr, SQL_NTS); if (result) *result = (SQLSMALLINT) length; if (!outStr) return 0; size -= _WCHARSIZE(o_charset); if (size < 0) return -1; count = dm_conv_W2W(inStr, SQL_NTS, outStr, size, CP_UTF8, o_charset); if (o_charset == CP_UTF16 || o_charset == CP_UCS4) _SetWCharAt(o_charset, outStr, count/_WCHARSIZE(o_charset), 0); else *(char*)(outStr + count) = 0; if (_WCSLEN(o_charset, outStr) < length) ret = -1; if (copied) *copied = count; return ret; } /* drv => dm * * size - size of outStr in bytes * result - length in symbols * copied - count of copied in bytes */ int dm_StrCopyOut2_W2W_d2m (DM_CONV *conv, void *inStr, void *outStr, int size, SQLSMALLINT *result, int *copied) { IODBC_CHARSET o_charset = (conv) ? conv->dm_cp : CP_DEF; IODBC_CHARSET i_charset = (conv) ? conv->drv_cp : CP_DEF; int length; int ret = 0; int count = 0; if (!inStr) return -1; length = _WCSLEN(i_charset, inStr); if (result) *result = (SQLSMALLINT) length; if (!outStr) return 0; size -= _WCHARSIZE(o_charset); if (size <= 0) return -1; count = dm_conv_W2W(inStr, SQL_NTS, outStr, size, i_charset, o_charset); if (o_charset == CP_UTF16 || o_charset == CP_UCS4) _SetWCharAt(o_charset, outStr, count/_WCHARSIZE(o_charset), 0); else *(char*)(outStr + count) = 0; if (_WCSLEN(o_charset, outStr) < length) ret = -1; if (copied) *copied = count; return ret; } /* dm => drv * * size - size of outStr in bytes * result - length in symbols * copied - count of copied in bytes */ int dm_StrCopyOut2_W2W_m2d (DM_CONV *conv, void *inStr, void *outStr, int size, SQLSMALLINT *result, int *copied) { IODBC_CHARSET o_charset = (conv) ? conv->drv_cp : CP_DEF; IODBC_CHARSET i_charset = (conv) ? conv->dm_cp : CP_DEF; int length; int ret = 0; int count = 0; if (!inStr) return -1; length = _WCSLEN(i_charset, inStr); if (result) *result = (SQLSMALLINT) length; if (!outStr) return 0; size -= _WCHARSIZE(o_charset); if (size <= 0) return -1; count = dm_conv_W2W(inStr, SQL_NTS, outStr, size, i_charset, o_charset); if (o_charset == CP_UTF16 || o_charset == CP_UCS4) _SetWCharAt(o_charset, outStr, count/_WCHARSIZE(o_charset), 0); else *(char*)(outStr + count) = 0; if (_WCSLEN(o_charset, outStr) < length) ret = -1; if (copied) *copied = count; return ret; } /* drv => dm */ void * conv_text_d2m(DM_CONV *conv, void *inStr, int size, CONV_DIRECT direct) { IODBC_CHARSET m_charset = (conv) ? conv->dm_cp : CP_DEF; IODBC_CHARSET d_charset = (conv) ? conv->drv_cp : CP_DEF; void *outStr = NULL; int len; if (inStr == NULL) return NULL; if (size == SQL_NTS) { if (direct == CD_W2A || direct == CD_W2W) len = DRV_WCSLEN(conv, inStr); else len = strlen ((char *)inStr); } else len = size; if (len < 0) return NULL; if (direct == CD_W2A) outStr = calloc (len * MB_CUR_MAX + 1, 1); else outStr = calloc(len + 1, DM_WCHARSIZE_ALLOC(conv)); if (outStr) { if (direct == CD_A2W) { dm_conv_A2W((char *)inStr, size, outStr, len*DM_WCHARSIZE_ALLOC(conv),m_charset); } else if (direct == CD_W2A) { dm_conv_W2A(inStr, size, (char *)outStr, len, d_charset); } else /* CD_W2W */ { dm_conv_W2W(inStr, size, outStr, len*DM_WCHARSIZE_ALLOC(conv), d_charset, m_charset); } } return outStr; } /* dm => drv */ void * conv_text_m2d(DM_CONV *conv, void *inStr, int size, CONV_DIRECT direct) { IODBC_CHARSET m_charset = (conv) ? conv->dm_cp : CP_DEF; IODBC_CHARSET d_charset = (conv) ? conv->drv_cp : CP_DEF; void *outStr = NULL; int len; if (inStr == NULL) return NULL; if (size == SQL_NTS) { if (direct == CD_W2A || direct == CD_W2W) len = DM_WCSLEN(conv, inStr); else len = strlen ((char *)inStr); } else len = size; if (len < 0) return NULL; if (direct == CD_W2A) outStr = calloc (len * MB_CUR_MAX + 1, 1); else outStr = calloc(len + 1, DRV_WCHARSIZE_ALLOC(conv)); if (outStr) { if (direct == CD_A2W) { dm_conv_A2W((char *)inStr, size, outStr, len*DRV_WCHARSIZE_ALLOC(conv), d_charset); } else if (direct == CD_W2A) { dm_conv_W2A(inStr, size, (char *)outStr, len, m_charset); } else /* CD_W2W */ { dm_conv_W2W(inStr, size, outStr, len*DRV_WCHARSIZE_ALLOC(conv), m_charset, d_charset); } } return outStr; } void * conv_text_m2d_W2W(DM_CONV *conv, void *inStr, SQLLEN size, SQLLEN *copied) { IODBC_CHARSET m_charset = (conv) ? conv->dm_cp : CP_DEF; IODBC_CHARSET d_charset = (conv) ? conv->drv_cp : CP_DEF; void *outStr = NULL; int len; int rc; if (inStr == NULL) return NULL; len = size / DM_WCHARSIZE(conv); if (len < 0) return NULL; outStr = calloc(len + 1, DRV_WCHARSIZE_ALLOC(conv)); if (outStr) { rc = dm_conv_W2W(inStr, len, outStr, len*DRV_WCHARSIZE_ALLOC(conv), m_charset, d_charset); if (copied) *copied = rc; } return outStr; } libiodbc-3.52.16/iodbcinst/SQLInstallTranslator.c0000664000175000017500000001717614424170750016564 00000000000000/* * SQLInstallTranslator.c * * $Id$ * * These functions intentionally left blank * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include "unicode.h" #include "misc.h" #include "inifile.h" #include "iodbc_error.h" #if !defined(WINDOWS) && !defined(WIN32) && !defined(OS2) && !defined(macintosh) # include # include # define UNIX_PWD #endif extern BOOL InstallDriverPath (LPSTR lpszPath, WORD cbPathMax, WORD * pcbPathOut, LPSTR envname); extern BOOL InstallDriverPathLength (WORD * pcbPathOut, LPSTR envname); BOOL INSTAPI SQLInstallTranslator (LPCSTR lpszInfFile, LPCSTR lpszTranslator, LPCSTR lpszPathIn, LPSTR lpszPathOut, WORD cbPathOutMax, WORD * pcbPathOut, WORD fRequest, LPDWORD lpdwUsageCount) { PCONFIG pCfg = NULL, pOdbcCfg = NULL; BOOL retcode = FALSE; /* Check input parameters */ CLEAR_ERROR (); if (lpszPathIn && access (lpszPathIn, R_OK | W_OK | X_OK)) { PUSH_ERROR (ODBC_ERROR_INVALID_PATH); goto quit; } switch (fRequest) { case ODBC_INSTALL_INQUIRY: if (lpszPathIn) { if (pcbPathOut) *pcbPathOut = STRLEN (lpszPathIn); retcode = TRUE; } else retcode = InstallDriverPathLength (pcbPathOut, "ODBCTRANSLATORS"); goto quit; case ODBC_INSTALL_COMPLETE: break; default: PUSH_ERROR (ODBC_ERROR_INVALID_REQUEST_TYPE); goto quit; } /* Check input parameters */ if (!lpszTranslator || !STRLEN (lpszTranslator)) { PUSH_ERROR (ODBC_ERROR_INVALID_PARAM_SEQUENCE); goto quit; } if (!lpszPathOut || !cbPathOutMax) { PUSH_ERROR (ODBC_ERROR_INVALID_BUFF_LEN); goto quit; } /* Write the out path */ if (!InstallDriverPath (lpszPathOut, cbPathOutMax, pcbPathOut, "ODBCTRANSLATORS")) goto quit; /* Else go through user/system odbcinst.ini */ switch (configMode) { case ODBC_BOTH_DSN: case ODBC_USER_DSN: wSystemDSN = USERDSN_ONLY; break; case ODBC_SYSTEM_DSN: wSystemDSN = SYSTEMDSN_ONLY; break; } if (_iodbcdm_cfg_search_init (&pCfg, "odbcinst.ini", TRUE)) { PUSH_ERROR (ODBC_ERROR_GENERAL_ERR); goto quit; } if (_iodbcdm_cfg_search_init (&pOdbcCfg, "odbc.ini", TRUE)) { PUSH_ERROR (ODBC_ERROR_GENERAL_ERR); pOdbcCfg = NULL; goto done; } if (lpszInfFile) { if (!install_from_ini (pCfg, pOdbcCfg, (char *) lpszInfFile, (char *) lpszTranslator, FALSE)) { PUSH_ERROR (ODBC_ERROR_INVALID_INF); goto done; } } else if (!install_from_string (pCfg, pOdbcCfg, (char *) lpszTranslator, FALSE)) { PUSH_ERROR (ODBC_ERROR_INVALID_KEYWORD_VALUE); goto done; } if (_iodbcdm_cfg_commit (pCfg) || _iodbcdm_cfg_commit (pOdbcCfg)) { PUSH_ERROR (ODBC_ERROR_GENERAL_ERR); goto done; } retcode = TRUE; done: _iodbcdm_cfg_done (pCfg); if (pOdbcCfg) _iodbcdm_cfg_done (pOdbcCfg); quit: wSystemDSN = USERDSN_ONLY; configMode = ODBC_BOTH_DSN; return retcode; } BOOL INSTAPI SQLInstallTranslatorW (LPCWSTR lpszInfFile, LPCWSTR lpszTranslator, LPCWSTR lpszPathIn, LPWSTR lpszPathOut, WORD cbPathOutMax, WORD FAR * pcbPathOut, WORD fRequest, LPDWORD lpdwUsageCount) { char *_inf_u8 = NULL; char *_translator_u8 = NULL; char *_pathin_u8 = NULL; char *_pathout_u8 = NULL; BOOL retcode = FALSE; _inf_u8 = (char *) dm_SQL_WtoU8 ((SQLWCHAR *) lpszInfFile, SQL_NTS); if (_inf_u8 == NULL && lpszInfFile) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } _translator_u8 = (char *) dm_SQL_WtoU8 ((SQLWCHAR *) lpszTranslator, SQL_NTS); if (_translator_u8 == NULL && lpszTranslator) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } _pathin_u8 = (char *) dm_SQL_WtoU8 ((SQLWCHAR *) lpszPathIn, SQL_NTS); if (_pathin_u8 == NULL && lpszPathIn) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } if (cbPathOutMax > 0) { if ((_pathout_u8 = malloc (cbPathOutMax * UTF8_MAX_CHAR_LEN + 1)) == NULL) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } } retcode = SQLInstallTranslator (_inf_u8, _translator_u8, _pathin_u8, _pathout_u8, cbPathOutMax * UTF8_MAX_CHAR_LEN, pcbPathOut, fRequest, lpdwUsageCount); if (retcode == TRUE) { dm_StrCopyOut2_U8toW ((SQLCHAR *)_pathout_u8, lpszPathOut, cbPathOutMax, pcbPathOut); } done: MEM_FREE (_inf_u8); MEM_FREE (_translator_u8); MEM_FREE (_pathin_u8); MEM_FREE (_pathout_u8); return retcode; } libiodbc-3.52.16/iodbcinst/Makefile.in0000664000175000017500000007203514424171020014407 00000000000000# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 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@ # # Makefile.am # # The iODBC driver manager. # # Copyright (C) 1996-2023 OpenLink Software # All Rights Reserved. # # This software is released under the terms of either of the following # licenses: # # - GNU Library General Public License (see LICENSE.LGPL) # - The BSD License (see LICENSE.BSD). # # Note that the only valid version of the LGPL license as far as this # project is concerned is the original GNU Library General Public License # Version 2, dated June 1991. # # While not mandated by the BSD license, any patches you make to the # iODBC source code may be contributed back into the iODBC project # at your discretion. Contributions will benefit the Open Source and # Data Access community as a whole. Submissions may be made at: # # http://www.iodbc.org # # # GNU Library Generic Public License Version 2 # ============================================ # 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; only # Version 2 of the License dated June 1991. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # The BSD License # =============== # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. Neither the name of OpenLink Software Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = iodbcinst ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/admin/gtk-2.0.m4 \ $(top_srcdir)/admin/gtk.m4 $(top_srcdir)/admin/libtool.m4 \ $(top_srcdir)/admin/ltoptions.m4 \ $(top_srcdir)/admin/ltsugar.m4 \ $(top_srcdir)/admin/ltversion.m4 \ $(top_srcdir)/admin/lt~obsolete.m4 \ $(top_srcdir)/admin/openlink.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) libiodbc_common_la_LIBADD = am_libiodbc_common_la_OBJECTS = SQLGetConfigMode.lo \ SQLGetPrivateProfileString.lo SQLSetConfigMode.lo \ SQLValidDSN.lo SQLWritePrivateProfileString.lo \ SQLReadFileDSN.lo SQLWriteFileDSN.lo dlf.lo inifile.lo \ iodbc_error.lo misc.lo unicode.lo libiodbc_common_la_OBJECTS = $(am_libiodbc_common_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = am__DEPENDENCIES_1 = libiodbcinst_la_DEPENDENCIES = libiodbc_common.la \ $(am__DEPENDENCIES_1) am_libiodbcinst_la_OBJECTS = SQLConfigDataSource.lo SQLConfigDriver.lo \ SQLGetAvailableDrivers.lo SQLGetInstalledDrivers.lo \ SQLInstallDriver.lo SQLRemoveDSNFromIni.lo SQLRemoveDriver.lo \ SQLWriteDSNToIni.lo SQLInstallDriverEx.lo SQLInstallODBC.lo \ SQLInstallTranslator.lo SQLCreateDataSource.lo \ SQLManageDataSource.lo SQLRemoveTranslator.lo \ SQLRemoveDefaultDataSource.lo SQLInstallDriverManager.lo \ SQLRemoveDriverManager.lo SQLInstallTranslatorEx.lo \ SQLInstallerError.lo SQLPostInstallerError.lo \ SQLGetTranslator.lo Info.lo libiodbcinst_la_OBJECTS = $(am_libiodbcinst_la_OBJECTS) libiodbcinst_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libiodbcinst_la_LDFLAGS) $(LDFLAGS) \ -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/admin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libiodbc_common_la_SOURCES) $(libiodbcinst_la_SOURCES) DIST_SOURCES = $(libiodbc_common_la_SOURCES) \ $(libiodbcinst_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/admin/depcomp \ $(top_srcdir)/admin/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_CONFIG = @GTK_CONFIG@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBADD_DL = @LIBADD_DL@ LIBADD_OS = @LIBADD_OS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ filedsnpath = @filedsnpath@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ inidir = @inidir@ install_sh = @install_sh@ lib_version = @lib_version@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ odbcmode = @odbcmode@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libiodbc_common.la lib_LTLIBRARIES = libiodbcinst.la AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/iodbc \ -I$(top_srcdir)/iodbcinst \ -I$(top_srcdir)/iodbcadm libiodbc_common_la_SOURCES = \ SQLGetConfigMode.c \ SQLGetPrivateProfileString.c \ SQLSetConfigMode.c \ SQLValidDSN.c \ SQLWritePrivateProfileString.c \ SQLReadFileDSN.c \ SQLWriteFileDSN.c \ dlf.c \ inifile.c \ iodbc_error.c \ misc.c \ unicode.c libiodbcinst_la_LDFLAGS = -version-info @lib_version@ \ -export-symbols $(srcdir)/iodbcinst.exp libiodbcinst_la_LIBADD = libiodbc_common.la $(LIBADD_DL) libiodbcinst_la_SOURCES = \ SQLConfigDataSource.c \ SQLConfigDriver.c \ SQLGetAvailableDrivers.c \ SQLGetInstalledDrivers.c \ SQLInstallDriver.c \ SQLRemoveDSNFromIni.c \ SQLRemoveDriver.c \ SQLWriteDSNToIni.c \ SQLInstallDriverEx.c \ SQLInstallODBC.c \ SQLInstallTranslator.c \ SQLCreateDataSource.c \ SQLManageDataSource.c \ SQLRemoveTranslator.c \ SQLRemoveDefaultDataSource.c \ SQLInstallDriverManager.c \ SQLRemoveDriverManager.c \ SQLInstallTranslatorEx.c \ SQLInstallerError.c \ SQLPostInstallerError.c \ SQLGetTranslator.c \ Info.c noinst_HEADERS = \ dlf.h \ inifile.h \ iodbc_error.h \ unicode.h \ misc.h EXTRA_DIST = $(srcdir)/iodbcinst.exp all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu iodbcinst/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu iodbcinst/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libiodbc_common.la: $(libiodbc_common_la_OBJECTS) $(libiodbc_common_la_DEPENDENCIES) $(EXTRA_libiodbc_common_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libiodbc_common_la_OBJECTS) $(libiodbc_common_la_LIBADD) $(LIBS) @DARWIN_FALSE@libiodbcinst.la: $(libiodbcinst_la_OBJECTS) $(libiodbcinst_la_DEPENDENCIES) $(EXTRA_libiodbcinst_la_DEPENDENCIES) @DARWIN_FALSE@ $(AM_V_CCLD)$(libiodbcinst_la_LINK) -rpath $(libdir) $(libiodbcinst_la_OBJECTS) $(libiodbcinst_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Info.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)/SQLInstallDriver.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)/SQLInstallTranslator.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)/SQLManageDataSource.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)/SQLRemoveDefaultDataSource.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)/dlf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inifile.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iodbc_error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unicode.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-libLTLIBRARIES \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-libLTLIBRARIES .PRECIOUS: Makefile @DARWIN_TRUE@libiodbcinst.la: $(libiodbcinst_la_OBJECTS) $(libiodbcinst_la_DEPENDENCIES) @DARWIN_TRUE@ $(LINK) -rpath $(libdir) $(libiodbcinst_la_LDFLAGS) $(libiodbcinst_la_OBJECTS) $(libiodbcinst_la_LIBADD) $(LIBS) @DARWIN_TRUE@ -$(STRIP) -s $(top_srcdir)/mac/iodbcinst.exp -u .libs/*.dylib # 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: libiodbc-3.52.16/iodbcinst/SQLCreateDataSource.c0000664000175000017500000001564414424170750016260 00000000000000/* * SQLCreateDataSource.c * * $Id$ * * Add, modify or delete datasources * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include "unicode.h" #include "iodbc_error.h" #include "dlf.h" #if defined (__APPLE__) && !defined (NO_FRAMEWORKS) #include #endif extern BOOL ValidDSN (LPCSTR lpszDSN); extern BOOL ValidDSNW (LPCWSTR lpszDSN); #if defined (__APPLE__) #define CALL_DRVCONN_DIALBOX() \ if (bundle_dll != NULL) \ { \ if ((pDrvConn = (pDrvConnFunc) CFBundleGetFunctionPointerForName (bundle_dll, CFSTR ("iodbcdm_drvconn_dialbox"))) != NULL) \ pDrvConn (parent, dsn, sizeof (dsn), NULL, SQL_DRIVER_PROMPT, &config); \ retcode = TRUE; \ } #define CALL_DRVCONN_DIALBOXW() \ if (bundle_dll != NULL) \ { \ if ((pDrvConnW = (pDrvConnWFunc) CFBundleGetFunctionPointerForName (bundle_dll, CFSTR ("iodbcdm_drvconn_dialboxw"))) != NULL) \ pDrvConnW (parent, (LPWSTR) dsn, sizeof (dsn) / sizeof (wchar_t), NULL, SQL_DRIVER_PROMPT, &config); \ retcode = TRUE; \ } #else #define CALL_DRVCONN_DIALBOX(path) \ if ((handle = DLL_OPEN (path)) != NULL) \ { \ if ((pDrvConn = (pDrvConnFunc) DLL_PROC (handle, "iodbcdm_drvconn_dialbox")) != NULL) \ pDrvConn (parent, dsn, sizeof (dsn), NULL, SQL_DRIVER_PROMPT, &config); \ retcode = TRUE; \ DLL_CLOSE (handle); \ } #define CALL_DRVCONN_DIALBOXW(path) \ if ((handle = DLL_OPEN (path)) != NULL) \ { \ if ((pDrvConnW = (pDrvConnWFunc) DLL_PROC (handle, "iodbcdm_drvconn_dialboxw")) != NULL) \ pDrvConnW (parent, (LPWSTR) dsn, sizeof (dsn) / sizeof (wchar_t), NULL, SQL_DRIVER_PROMPT, &config); \ retcode = TRUE; \ DLL_CLOSE (handle); \ } #endif BOOL CreateDataSource (HWND parent, LPCSTR lpszDSN, SQLCHAR waMode) { char dsn[1024] = { 0 }; UWORD config = ODBC_USER_DSN; BOOL retcode = FALSE; void *handle; pDrvConnFunc pDrvConn = NULL; pDrvConnWFunc pDrvConnW = NULL; #if defined (__APPLE__) && !defined (NO_FRAMEWORKS) CFBundleRef bundle = NULL; CFBundleRef bundle_dll = NULL; CFURLRef liburl; #endif /* Load the Admin dialbox function */ #if defined (__APPLE__) # if !defined(NO_FRAMEWORKS) bundle = CFBundleGetBundleWithIdentifier (CFSTR ("org.iodbc.core")); if (bundle) { /* Search for the iODBCadm library */ liburl = CFBundleCopyResourceURL (bundle, CFSTR ("iODBCadm.bundle"), NULL, NULL); if (liburl) { bundle_dll = CFBundleCreate (NULL, liburl); CFRelease (liburl); if (waMode == 'A') { CALL_DRVCONN_DIALBOX (); } else { CALL_DRVCONN_DIALBOXW (); } } } # endif #else if (waMode == 'A') { CALL_DRVCONN_DIALBOX ("libiodbcadm.so.2"); } else { CALL_DRVCONN_DIALBOXW ("libiodbcadm.so.2"); } #endif return retcode; } BOOL INSTAPI SQLCreateDataSource_Internal (HWND hwndParent, SQLPOINTER lpszDSN, SQLCHAR waMode) { BOOL retcode = FALSE; /* Check input parameters */ CLEAR_ERROR (); if (!hwndParent) { PUSH_ERROR (ODBC_ERROR_INVALID_HWND); goto quit; } if (waMode == 'A') { if ((!lpszDSN && !ValidDSN (lpszDSN)) || (!lpszDSN && !STRLEN (lpszDSN))) { PUSH_ERROR (ODBC_ERROR_INVALID_DSN); goto quit; } } else { if ((!lpszDSN && !ValidDSNW (lpszDSN)) || (!lpszDSN && !WCSLEN (lpszDSN))) { PUSH_ERROR (ODBC_ERROR_INVALID_DSN); goto quit; } } retcode = CreateDataSource (hwndParent, lpszDSN, waMode); quit: return retcode; } BOOL INSTAPI SQLCreateDataSource (HWND hwndParent, LPCSTR lpszDSN) { return SQLCreateDataSource_Internal (hwndParent, (SQLPOINTER) lpszDSN, 'A'); } BOOL INSTAPI SQLCreateDataSourceW (HWND hwndParent, LPCWSTR lpszDSN) { return SQLCreateDataSource_Internal (hwndParent, (SQLPOINTER) lpszDSN, 'W'); } libiodbc-3.52.16/iodbc/0000775000175000017500000000000014424171427011530 500000000000000libiodbc-3.52.16/iodbc/main.c0000664000175000017500000000652514424170750012546 00000000000000/* * main.c * * $Id$ * * Entry function used to build a share library on AIX * * The iODBC driver manager. * * Copyright (C) 1995 Ke Jin * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include int __start () { return 0; } libiodbc-3.52.16/iodbc/hdbc.h0000664000175000017500000001524614424170750012527 00000000000000/* * hdbc.h * * $Id$ * * Data source connect object management functions * * The iODBC driver manager. * * Copyright (C) 1995 Ke Jin * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef _HDBC_H #define _HDBC_H #if (ODBCVER >= 0x0300) #include "hdesc.h" #endif typedef struct _drvopt { SQLUSMALLINT Option; SQLULEN Param; SQLCHAR waMode; struct _drvopt *next; } DRVOPT; typedef struct DBC { int type; /* must be 1st field */ HERR herr; SQLRETURN rc; struct DBC * next; HENV genv; /* back point to global env object */ HDBC dhdbc; /* driver's private dbc */ HENV henv; /* back point to instant env object */ HSTMT hstmt; /* list of statement object handle(s) */ #if (ODBCVER >= 0x300) HDESC hdesc; /* list of connection descriptors */ struct DBC * cp_pdbc; /* pooled connection */ BOOL cp_in_use; /* connection in pool is in use */ time_t cp_timeout; /* CPTimeout parameter */ time_t cp_expiry_time; /* expiration time (abs time value) */ time_t cp_retry_wait; /* timeout before retry (abs time value) */ char *cp_probe; /* CPProbe -- probe SQL statement */ char *cp_dsn; char *cp_uid; char *cp_pwd; char *cp_connstr; #endif int state; /* options */ UDWORD access_mode; UDWORD autocommit; UDWORD login_timeout; UDWORD odbc_cursors; UDWORD packet_size; UDWORD quiet_mode; UDWORD txn_isolation; SWORD cb_commit; SWORD cb_rollback; wchar_t * current_qualifier; char current_qualifier_WA; SWORD dbc_cip; /* Call in Progress flag */ DRVOPT *drvopt; /* Driver specific connect options */ SQLSMALLINT err_rec; DM_CONV conv; } DBC_t; #define IS_VALID_HDBC(x) \ ((x) != SQL_NULL_HDBC && ((DBC_t *)(x))->type == SQL_HANDLE_DBC) #define ENTER_HDBC(hdbc, holdlock, trace) \ CONN(pdbc, hdbc); \ SQLRETURN retcode = SQL_SUCCESS; \ ODBC_LOCK();\ TRACE(trace); \ if (!IS_VALID_HDBC (pdbc)) \ { \ retcode = SQL_INVALID_HANDLE; \ goto done; \ } \ else if (pdbc->dbc_cip) \ { \ PUSHSQLERR (pdbc->herr, en_S1010); \ retcode = SQL_ERROR; \ goto done; \ } \ pdbc->dbc_cip = 1; \ CLEAR_ERRORS (pdbc); \ if (!holdlock) \ ODBC_UNLOCK() #define LEAVE_HDBC(hdbc, holdlock, trace) \ if (!holdlock) \ ODBC_LOCK (); \ pdbc->dbc_cip = 0; \ done: \ TRACE(trace); \ ODBC_UNLOCK (); \ return (retcode) /* * Note: * - ODBC applications can see address of driver manager's * connection object, i.e connection handle -- a void pointer, * but not detail of it. ODBC applications can neither see * detail driver's connection object nor its address. * * - ODBC driver manager knows its own connection objects and * exposes their address to an ODBC application. Driver manager * also knows address of driver's connection objects and keeps * it via dhdbc field in driver manager's connection object. * * - ODBC driver exposes address of its own connection object to * driver manager without detail. * * - Applications can get driver's connection object handle by * SQLGetInfo() with fInfoType equals to SQL_DRIVER_HDBC. */ enum { en_dbc_allocated, en_dbc_needdata, en_dbc_connected, en_dbc_hstmt }; /* * Internal prototypes */ SQLRETURN SQL_API _iodbcdm_SetConnectOption ( SQLHDBC hdbc, SQLUSMALLINT fOption, SQLULEN vParam, SQLCHAR waMode); SQLRETURN SQL_API _iodbcdm_GetConnectOption ( SQLHDBC hdbc, SQLUSMALLINT fOption, SQLPOINTER pvParam, SQLCHAR waMode); #endif libiodbc-3.52.16/iodbc/vmscompile.com0000664000175000017500000000716214013216212014316 00000000000000$ ! To compile iODBC for VMS, just type $ @VMSCOMPILE or $ @VMSCOMPILE DEBUG $ ! Compile *.c, and remember all object files created. $ ! Create a shared library from all the created object files. $ !--------------------------------------------------------------------------- $ debug=0 $ if p1 .eqs. "DEBUG" then debug=1 $ ! Find version number by searching the configure. file $ search/exact/out=x.tmp configure. "VERSION=" $ version="" $ open/read fi x.tmp $ read/end=CLOSEFILE fi version $ CLOSEFILE: $ close fi $ version=version-"VERSION=" $ if version .eqs. "" $ then $ version="1.1" $ write sys$output "Could not find the version number of iODBC in CONFIGURE." $ endif $ write sys$output "Creating iODBC version ''version'" $ stdopts="/INCLUDE=SYS$DISK:[]/PREFIX=ALL/NOLIS" $ configure="/DEFINE=(""VERSION=""""''version'"""""")" $ debugopt="" $ if debug then debugopt="/DEBUG" $ if debug then stdopts=stdopts+"/NOOPT" $ objects="" $ NEXTFILE: $ file=f$search("*.c") $ if file .eqs. "" then goto LINKIT $ filename=f$parse(file,,,"name") $ objects=objects+filename+"," $ write sys$output "$ cc''debugopt' ''filename'" $ cc'stdopts' 'configure' 'debugopt' 'filename' $ goto NEXTFILE $ LINKIT: $ write sys$output "$ LINK''debugopt' IODBC.EXE" $ open/write fo x.opt $ sversion=version-"." $ write fo "GSMATCH=LEQ,1,"+sversion $ close fo $ link/share=IODBC 'debugopt' 'objects' x/opt,sys$input/opt SYMBOL_VECTOR=(SQLTables=PROCEDURE) SYMBOL_VECTOR=(SQLColumns=PROCEDURE) SYMBOL_VECTOR=(SQLStatistics=PROCEDURE) SYMBOL_VECTOR=(SQLTablePrivileges=PROCEDURE) SYMBOL_VECTOR=(SQLColumnPrivileges=PROCEDURE) SYMBOL_VECTOR=(SQLSpecialColumns=PROCEDURE) SYMBOL_VECTOR=(SQLPrimaryKeys=PROCEDURE) SYMBOL_VECTOR=(SQLForeignKeys=PROCEDURE) SYMBOL_VECTOR=(SQLProcedures=PROCEDURE) SYMBOL_VECTOR=(SQLProcedureColumns=PROCEDURE) SYMBOL_VECTOR=(SQLAllocEnv=PROCEDURE) SYMBOL_VECTOR=(SQLAllocConnect=PROCEDURE) SYMBOL_VECTOR=(SQLConnect=PROCEDURE) SYMBOL_VECTOR=(SQLDriverConnect=PROCEDURE) SYMBOL_VECTOR=(SQLBrowseConnect=PROCEDURE) SYMBOL_VECTOR=(SQLDisconnect=PROCEDURE) SYMBOL_VECTOR=(SQLFreeConnect=PROCEDURE) SYMBOL_VECTOR=(SQLFreeEnv=PROCEDURE) SYMBOL_VECTOR=(SQLExecute=PROCEDURE) SYMBOL_VECTOR=(SQLExecDirect=PROCEDURE) SYMBOL_VECTOR=(SQLNativeSql=PROCEDURE) SYMBOL_VECTOR=(SQLParamData=PROCEDURE) SYMBOL_VECTOR=(SQLPutData=PROCEDURE) SYMBOL_VECTOR=(SQLCancel=PROCEDURE) SYMBOL_VECTOR=(SQLGetFunctions=PROCEDURE) SYMBOL_VECTOR=(SQLGetInfo=PROCEDURE) SYMBOL_VECTOR=(SQLGetTypeInfo=PROCEDURE) SYMBOL_VECTOR=(SQLSetConnectOption=PROCEDURE) SYMBOL_VECTOR=(SQLSetStmtOption=PROCEDURE) SYMBOL_VECTOR=(SQLGetConnectOption=PROCEDURE) SYMBOL_VECTOR=(SQLGetStmtOption=PROCEDURE) SYMBOL_VECTOR=(SQLAllocStmt=PROCEDURE) SYMBOL_VECTOR=(SQLFreeStmt=PROCEDURE) SYMBOL_VECTOR=(SQLPrepare=PROCEDURE) SYMBOL_VECTOR=(SQLSetParam=PROCEDURE) SYMBOL_VECTOR=(SQLBindParameter=PROCEDURE) SYMBOL_VECTOR=(SQLDescribeParam=PROCEDURE) SYMBOL_VECTOR=(SQLParamOptions=PROCEDURE) SYMBOL_VECTOR=(SQLNumParams=PROCEDURE) SYMBOL_VECTOR=(SQLSetScrollOptions=PROCEDURE) SYMBOL_VECTOR=(SQLSetCursorName=PROCEDURE) SYMBOL_VECTOR=(SQLGetCursorName=PROCEDURE) SYMBOL_VECTOR=(SQLNumResultCols=PROCEDURE) SYMBOL_VECTOR=(SQLDescribeCol=PROCEDURE) SYMBOL_VECTOR=(SQLColAttributes=PROCEDURE) SYMBOL_VECTOR=(SQLBindCol=PROCEDURE) SYMBOL_VECTOR=(SQLFetch=PROCEDURE) SYMBOL_VECTOR=(SQLGetData=PROCEDURE) SYMBOL_VECTOR=(SQLMoreResults=PROCEDURE) SYMBOL_VECTOR=(SQLRowCount=PROCEDURE) SYMBOL_VECTOR=(SQLSetPos=PROCEDURE) SYMBOL_VECTOR=(SQLExtendedFetch=PROCEDURE) SYMBOL_VECTOR=(SQLError=PROCEDURE) SYMBOL_VECTOR=(SQLTransact=PROCEDURE) SYMBOL_VECTOR=(SQLDataSources=PROCEDURE) SYMBOL_VECTOR=(SQLDrivers=PROCEDURE) $ delete x.opt.* $ exit libiodbc-3.52.16/iodbc/iodbc.exp0000664000175000017500000000450014013216212013227 00000000000000iodbc_version SQLAllocConnect SQLAllocEnv SQLAllocHandle SQLAllocStmt SQLBindCol SQLBindParam SQLBindParameter SQLBrowseConnect SQLBrowseConnectA SQLBrowseConnectW SQLBulkOperations SQLCancel SQLCloseCursor SQLColAttribute SQLColAttributeA SQLColAttributeW SQLColAttributes SQLColAttributesA SQLColAttributesW SQLColumnPrivileges SQLColumnPrivilegesA SQLColumnPrivilegesW SQLColumns SQLColumnsA SQLColumnsW SQLConnect SQLConnectA SQLConnectW SQLCopyDesc SQLDataSources SQLDataSourcesA SQLDataSourcesW SQLDescribeCol SQLDescribeColA SQLDescribeColW SQLDescribeParam SQLDisconnect SQLDriverConnect SQLDriverConnectA SQLDriverConnectW SQLDrivers SQLDriversA SQLDriversW SQLEndTran SQLError SQLErrorA SQLErrorW SQLExecDirect SQLExecDirectA SQLExecDirectW SQLExecute SQLExtendedFetch SQLFetch SQLFetchScroll SQLForeignKeys SQLForeignKeysA SQLForeignKeysW SQLFreeConnect SQLFreeEnv SQLFreeHandle SQLFreeStmt SQLGetConnectAttr SQLGetConnectAttrA SQLGetConnectAttrW SQLGetConnectOption SQLGetConnectOptionA SQLGetConnectOptionW SQLGetCursorName SQLGetCursorNameA SQLGetCursorNameW SQLGetData SQLGetDescField SQLGetDescFieldA SQLGetDescFieldW SQLGetDescRec SQLGetDescRecA SQLGetDescRecW SQLGetDiagField SQLGetDiagFieldA SQLGetDiagFieldW SQLGetDiagRec SQLGetDiagRecA SQLGetDiagRecW SQLGetEnvAttr SQLGetFunctions SQLGetInfo SQLGetInfoA SQLGetInfoW SQLGetStmtAttr SQLGetStmtAttrA SQLGetStmtAttrW SQLGetStmtOption SQLGetStmtOptionA SQLGetTypeInfo SQLGetTypeInfoA SQLGetTypeInfoW SQLMoreResults SQLNativeSql SQLNativeSqlA SQLNativeSqlW SQLNumParams SQLNumResultCols SQLParamData SQLParamOptions SQLPrepare SQLPrepareA SQLPrepareW SQLPrimaryKeys SQLPrimaryKeysA SQLPrimaryKeysW SQLProcedureColumns SQLProcedureColumnsA SQLProcedureColumnsW SQLProcedures SQLProceduresA SQLProceduresW SQLPutData SQLRowCount SQLSetConnectAttr SQLSetConnectAttrA SQLSetConnectAttrW SQLSetConnectOption SQLSetConnectOptionA SQLSetConnectOptionW SQLSetCursorName SQLSetCursorNameA SQLSetCursorNameW SQLSetDescField SQLSetDescFieldA SQLSetDescFieldW SQLSetDescRec SQLSetEnvAttr SQLSetParam SQLSetPos SQLSetScrollOptions SQLSetStmtAttr SQLSetStmtAttrA SQLSetStmtAttrW SQLSetStmtOption SQLSetStmtOptionA SQLSpecialColumns SQLSpecialColumnsA SQLSpecialColumnsW SQLStatistics SQLStatisticsA SQLStatisticsW SQLTablePrivileges SQLTablePrivilegesA SQLTablePrivilegesW SQLTables SQLTablesA SQLTablesW SQLTransact libiodbc-3.52.16/iodbc/iodbc.def0000664000175000017500000001111414424170750013204 00000000000000; ; iodbc.def ; ; $Id$ ; ; DLL link script ; ; The iODBC driver manager. ; ; Copyright (C) 1995 Ke Jin ; Copyright (C) 1996-2023 OpenLink Software ; All Rights Reserved. ; ; This software is released under the terms of either of the following ; licenses: ; ; - GNU Library General Public License (see LICENSE.LGPL) ; - The BSD License (see LICENSE.BSD). ; ; Note that the only valid version of the LGPL license as far as this ; project is concerned is the original GNU Library General Public License ; Version 2, dated June 1991. ; ; While not mandated by the BSD license, any patches you make to the ; iODBC source code may be contributed back into the iODBC project ; at your discretion. Contributions will benefit the Open Source and ; Data Access community as a whole. Submissions may be made at: ; ; http://www.iodbc.org ; ; ; GNU Library Generic Public License Version 2 ; ============================================ ; 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; only ; Version 2 of the License dated June 1991. ; ; 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 ; Library General Public License for more details. ; ; You should have received a copy of the GNU Library General Public ; License along with this library; if not, write to the Free ; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ; ; ; The BSD License ; =============== ; Redistribution and use in source and binary forms, with or without ; modification, are permitted provided that the following conditions ; are met: ; ; 1. Redistributions of source code must retain the above copyright ; notice, this list of conditions and the following disclaimer. ; 2. Redistributions in binary form must reproduce the above copyright ; notice, this list of conditions and the following disclaimer in ; the documentation and/or other materials provided with the ; distribution. ; 3. Neither the name of OpenLink Software Inc. nor the names of its ; contributors may be used to endorse or promote products derived ; from this software without specific prior written permission. ; ; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR ; CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ; EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ; PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ; LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ; LIBRARY IODBC.DLL DESCRIPTION 'iODBC Driver Manager V2.50 (LGPL)' CODE MOVEABLE DISCARDABLE DATA MOVEABLE MULTIPLE HEAPSIZE 10000 EXPORTS SQLAllocConnect @1 SQLAllocEnv @2 SQLAllocStmt @3 SQLBindCol @4 SQLCancel @5 SQLColAttributes @6 SQLConnect @7 SQLDescribeCol @8 SQLDisconnect @9 SQLError @10 SQLExecDirect @11 SQLExecute @12 SQLFetch @13 SQLFreeConnect @14 SQLFreeEnv @15 SQLFreeStmt @16 SQLGetCursorName @17 SQLNumResultCols @18 SQLPrepare @19 SQLRowCount @20 SQLSetCursorName @21 SQLSetParam @22 SQLTransact @23 SQLColumns @40 SQLDriverConnect @41 SQLGetConnectOption @42 SQLGetData @43 SQLGetFunctions @44 SQLGetInfo @45 SQLGetStmtOption @46 SQLGetTypeInfo @47 SQLParamData @48 SQLPutData @49 SQLSetConnectOption @50 SQLSetStmtOption @51 SQLSpecialColumns @52 SQLStatistics @53 SQLTables @54 SQLBrowseConnect @55 SQLColumnPrivileges @56 SQLDataSources @57 SQLDescribeParam @58 SQLExtendedFetch @59 SQLForeignKeys @60 SQLMoreResults @61 SQLNativeSql @62 SQLNumParams @63 SQLParamOptions @64 SQLPrimaryKeys @65 SQLProcedureColumns @66 SQLProcedures @67 SQLSetPos @68 SQLSetScrollOptions @69 SQLTablePrivileges @70 SQLDrivers @71 SQLBindParameter @72 LoadByOrdinal @199 libiodbc-3.52.16/iodbc/trace/0000775000175000017500000000000014424171427012626 500000000000000libiodbc-3.52.16/iodbc/trace/Execute.c0000664000175000017500000000672514424170750014324 00000000000000/* * Execute.c * * $Id$ * * SQLExecute trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void trace_SQLExecute (int trace_leave, int retcode, SQLHSTMT hstmt) { /* Trace function */ _trace_print_function (en_Execute, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, hstmt); } libiodbc-3.52.16/iodbc/trace/SetConnectOption.c0000664000175000017500000000772714424170750016163 00000000000000/* * SetConnectOption.c * * $Id$ * * SQLSetConnectOption trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void trace_SQLSetConnectOption (int trace_leave, int retcode, SQLHDBC hdbc, SQLUSMALLINT fOption, SQLULEN vParam) { /* Trace function */ _trace_print_function (en_SetConnectOption, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_DBC, hdbc); _trace_connopt_type (fOption); _trace_ulen (vParam); } #if ODBCVER >= 0x0300 void trace_SQLSetConnectOptionW (int trace_leave, int retcode, SQLHDBC hdbc, SQLUSMALLINT fOption, SQLULEN vParam) { /* Trace function */ _trace_print_function (en_SetConnectOptionW, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_DBC, hdbc); _trace_connopt_type (fOption); _trace_ulen (vParam); } #endif libiodbc-3.52.16/iodbc/trace/AllocStmt.c0000664000175000017500000000704614424170750014621 00000000000000/* * AllocStmt.c * * $Id$ * * SQLAllocStmt trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void trace_SQLAllocStmt(int trace_leave, int retcode, SQLHDBC hdbc, SQLHSTMT *phstmt) { /* Trace function */ _trace_print_function (en_AllocStmt, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_DBC, hdbc); _trace_handle_p (SQL_HANDLE_STMT, phstmt, TRACE_OUTPUT_SUCCESS); } libiodbc-3.52.16/iodbc/trace/Cancel.c0000664000175000017500000000674414424170750014110 00000000000000/* * Cancel.c * * $Id$ * * SQLCancel trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void trace_SQLCancel (int trace_leave, int retcode, SQLHSTMT StatementHandle) { /* Trace function */ _trace_print_function (en_Cancel, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, StatementHandle); } libiodbc-3.52.16/iodbc/trace/NativeSql.c0000664000175000017500000001140214424170750014614 00000000000000/* * NativeSql.c * * $Id$ * * SQLNativeSql trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void trace_SQLNativeSql (int trace_leave, int retcode, SQLHDBC hdbc, SQLCHAR * InStatementText, SQLINTEGER TextLength1, SQLCHAR * OutStatementText, SQLINTEGER BufferLength, SQLINTEGER * TextLength2Ptr) { SQLSMALLINT len = 0; if (TextLength2Ptr) len = *TextLength2Ptr; /* Trace function */ _trace_print_function (en_NativeSql, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_DBC, hdbc); _trace_string (InStatementText, TextLength1, NULL, TRACE_INPUT); _trace_stringlen ("SQLINTEGER", TextLength1); _trace_string (OutStatementText, BufferLength, &len, TRACE_OUTPUT_SUCCESS); _trace_stringlen ("SQLINTEGER", BufferLength); _trace_integer_p (TextLength2Ptr, TRACE_OUTPUT_SUCCESS); } #if ODBCVER >= 0x0300 void trace_SQLNativeSqlW (int trace_leave, int retcode, SQLHDBC hdbc, SQLWCHAR * InStatementText, SQLINTEGER TextLength1, SQLWCHAR * OutStatementText, SQLINTEGER BufferLength, SQLINTEGER * TextLength2Ptr) { SQLSMALLINT len = 0; if (TextLength2Ptr) len = *TextLength2Ptr; /* Trace function */ _trace_print_function (en_NativeSqlW, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_DBC, hdbc); _trace_string_w (InStatementText, TextLength1, NULL, TRACE_INPUT); _trace_stringlen ("SQLINTEGER", TextLength1); _trace_string_w (OutStatementText, BufferLength, &len, TRACE_OUTPUT_SUCCESS); _trace_stringlen ("SQLINTEGER", BufferLength); _trace_integer_p (TextLength2Ptr, TRACE_OUTPUT_SUCCESS); } #endif libiodbc-3.52.16/iodbc/trace/SetConnectAttr.c0000664000175000017500000001023014424170750015604 00000000000000/* * SetConnectAttr.c * * $Id$ * * SQLSetConnectAttr trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" #if ODBCVER >= 0x0300 void trace_SQLSetConnectAttr (int trace_leave, int retcode, SQLHDBC ConnectionHandle, SQLINTEGER Attribute, SQLPOINTER ValuePtr, SQLINTEGER StringLength) { /* Trace function */ _trace_print_function (en_SetConnectAttr, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_DBC, ConnectionHandle); _trace_connattr_type (Attribute); _trace_pointer (ValuePtr); _trace_bufferlen (StringLength); } void trace_SQLSetConnectAttrW (int trace_leave, int retcode, SQLHDBC ConnectionHandle, SQLINTEGER Attribute, SQLPOINTER ValuePtr, SQLINTEGER StringLength) { /* Trace function */ _trace_print_function (en_SetConnectAttrW, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_DBC, ConnectionHandle); _trace_connattr_type (Attribute); _trace_pointer (ValuePtr); _trace_bufferlen (StringLength); } #endif libiodbc-3.52.16/iodbc/trace/GetStmtAttr.c0000664000175000017500000001320714424170750015135 00000000000000/* * GetStmtAttr.c * * $Id$ * * SQLGetStmtAttr trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" #if ODBCVER >= 0x0300 void _trace_stmtattr_type (SQLINTEGER type) { char *ptr = "unknown statement attribute"; switch (type) { _S (SQL_ATTR_APP_PARAM_DESC); _S (SQL_ATTR_APP_ROW_DESC); _S (SQL_ATTR_ASYNC_ENABLE); _S (SQL_ATTR_CONCURRENCY); _S (SQL_ATTR_CURSOR_SCROLLABLE); _S (SQL_ATTR_CURSOR_SENSITIVITY); _S (SQL_ATTR_CURSOR_TYPE); _S (SQL_ATTR_ENABLE_AUTO_IPD); _S (SQL_ATTR_FETCH_BOOKMARK_PTR); _S (SQL_ATTR_IMP_PARAM_DESC); _S (SQL_ATTR_IMP_ROW_DESC); _S (SQL_ATTR_KEYSET_SIZE); _S (SQL_ATTR_MAX_LENGTH); _S (SQL_ATTR_MAX_ROWS); _S (SQL_ATTR_NOSCAN); _S (SQL_ATTR_PARAMSET_SIZE); _S (SQL_ATTR_PARAMS_PROCESSED_PTR); _S (SQL_ATTR_PARAM_BIND_OFFSET_PTR); _S (SQL_ATTR_PARAM_BIND_TYPE); _S (SQL_ATTR_PARAM_OPERATION_PTR); _S (SQL_ATTR_PARAM_STATUS_PTR); _S (SQL_ATTR_QUERY_TIMEOUT); _S (SQL_ATTR_RETRIEVE_DATA); _S (SQL_ATTR_ROWS_FETCHED_PTR); _S (SQL_ATTR_ROW_ARRAY_SIZE); _S (SQL_ATTR_ROW_BIND_OFFSET_PTR); _S (SQL_ATTR_ROW_BIND_TYPE); _S (SQL_ATTR_ROW_NUMBER); _S (SQL_ATTR_ROW_OPERATION_PTR); _S (SQL_ATTR_ROW_STATUS_PTR); _S (SQL_ATTR_SIMULATE_CURSOR); _S (SQL_ATTR_USE_BOOKMARKS); } trace_emit ("\t\t%-15.15s %d (%s)\n", "SQLINTEGER ", (int) type, ptr); } void trace_SQLGetStmtAttr (int trace_leave, int retcode, SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLPOINTER ValuePtr, SQLINTEGER BufferLength, SQLINTEGER * StringLengthPtr) { /* Trace function */ _trace_print_function (en_GetStmtAttr, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, StatementHandle); _trace_stmtattr_type (Attribute); _trace_pointer (ValuePtr); _trace_bufferlen (BufferLength); _trace_integer_p (StringLengthPtr, TRACE_OUTPUT_SUCCESS); } void trace_SQLGetStmtAttrW (int trace_leave, int retcode, SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLPOINTER ValuePtr, SQLINTEGER BufferLength, SQLINTEGER * StringLengthPtr) { /* Trace function */ _trace_print_function (en_GetStmtAttrW, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, StatementHandle); _trace_stmtattr_type (Attribute); _trace_pointer (ValuePtr); _trace_bufferlen (BufferLength); _trace_integer_p (StringLengthPtr, trace_leave); } #endif libiodbc-3.52.16/iodbc/trace/Makefile.am0000664000175000017500000001104214424170750014576 00000000000000# # Makefile.am # # The iODBC driver manager. # # Copyright (C) 1996-2023 OpenLink Software # All Rights Reserved. # # This software is released under the terms of either of the following # licenses: # # - GNU Library General Public License (see LICENSE.LGPL) # - The BSD License (see LICENSE.BSD). # # Note that the only valid version of the LGPL license as far as this # project is concerned is the original GNU Library General Public License # Version 2, dated June 1991. # # While not mandated by the BSD license, any patches you make to the # iODBC source code may be contributed back into the iODBC project # at your discretion. Contributions will benefit the Open Source and # Data Access community as a whole. Submissions may be made at: # # http://www.iodbc.org # # # GNU Library Generic Public License Version 2 # ============================================ # 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; only # Version 2 of the License dated June 1991. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # The BSD License # =============== # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. Neither the name of OpenLink Software Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # noinst_LTLIBRARIES = libiodbctrace.la AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/iodbc \ -I$(top_srcdir)/iodbcinst libiodbctrace_la_LDFLAGS = #-static libiodbctrace_la_SOURCES = \ AllocConnect.c \ AllocEnv.c \ AllocHandle.c \ AllocStmt.c \ BindCol.c \ BindParameter.c \ BrowseConnect.c \ BulkOperations.c \ Cancel.c \ CloseCursor.c \ ColAttribute.c \ ColumnPrivileges.c \ Columns.c \ Connect.c \ CopyDesc.c \ DataSources.c \ DescribeCol.c \ DescribeParam.c \ Disconnect.c \ DriverConnect.c \ Drivers.c \ EndTran.c \ Error.c \ ExecDirect.c \ Execute.c \ ExtendedFetch.c \ Fetch.c \ FetchScroll.c \ ForeignKeys.c \ FreeConnect.c \ FreeEnv.c \ FreeHandle.c \ FreeStmt.c \ GetConnectAttr.c \ GetConnectOption.c \ GetCursorName.c \ GetData.c \ GetDescField.c \ GetDescRec.c \ GetDiagField.c \ GetDiagRec.c \ GetEnvAttr.c \ GetFunctions.c \ GetStmtAttr.c \ GetStmtOption.c \ GetTypeInfo.c \ Info.c \ MoreResults.c \ NativeSql.c \ NumParams.c \ NumResultCols.c \ ParamData.c \ ParamOptions.c \ Prepare.c \ PrimaryKeys.c \ ProcedureColumns.c \ Procedures.c \ PutData.c \ RowCount.c \ SetConnectAttr.c \ SetConnectOption.c \ SetCursorName.c \ SetDescField.c \ SetDescRec.c \ SetEnvAttr.c \ SetPos.c \ SetScrollOptions.c \ SetStmtAttr.c \ SetStmtOption.c \ SpecialColumns.c \ Statistics.c \ TablePrivileges.c \ Tables.c \ Transact.c \ trace.c noinst_HEADERS = proto.h trace.h libiodbc-3.52.16/iodbc/trace/AllocConnect.c0000664000175000017500000000707314424170750015263 00000000000000/* * AllocConnect.c * * $Id$ * * SQLAllocConnect trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void trace_SQLAllocConnect (int trace_leave, int retcode, SQLHENV henv, SQLHDBC * phdbc) { /* Trace function */ _trace_print_function (en_AllocConnect, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_ENV, henv); _trace_handle_p (SQL_HANDLE_DBC, phdbc, TRACE_OUTPUT_SUCCESS); } libiodbc-3.52.16/iodbc/trace/SetEnvAttr.c0000664000175000017500000000731014424170750014750 00000000000000/* * SetEnvAttr.c * * $Id$ * * SQLSetEnvAttr trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" #if ODBCVER >= 0x0300 void trace_SQLSetEnvAttr (int trace_leave, int retcode, SQLHENV EnvironmentHandle, SQLINTEGER Attribute, SQLPOINTER ValuePtr, SQLINTEGER StringLength) { /* Trace function */ _trace_print_function (en_SetEnvAttr, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_ENV, EnvironmentHandle); _trace_envattr_type (Attribute); _trace_pointer (ValuePtr); _trace_bufferlen (StringLength); } #endif libiodbc-3.52.16/iodbc/trace/DataSources.c0000664000175000017500000001256314424170750015134 00000000000000/* * DataSources.c * * $Id$ * * SQLDataSources trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void _trace_direction (SQLUSMALLINT dir) { char *ptr = "unknown direction"; switch (dir) { _S (SQL_FETCH_FIRST); _S (SQL_FETCH_NEXT); #if ODBCVER >= 0x0300 _S (SQL_FETCH_FIRST_USER); _S (SQL_FETCH_FIRST_SYSTEM); #endif } trace_emit ("\t\t%-15.15s %d (%s)\n", "SQLUSMALLINT ", (int) dir, ptr); } void trace_SQLDataSources (int trace_leave, int retcode, SQLHENV EnvironmentHandle, SQLUSMALLINT Direction, SQLCHAR * ServerName, SQLSMALLINT BufferLength1, SQLSMALLINT * NameLength1Ptr, SQLCHAR * Description, SQLSMALLINT BufferLength2, SQLSMALLINT * NameLength2Ptr) { /* Trace function */ _trace_print_function (en_DataSources, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_ENV, EnvironmentHandle); _trace_direction (Direction); _trace_string (ServerName, BufferLength1, NameLength1Ptr, TRACE_OUTPUT_SUCCESS); _trace_stringlen ("SQLSMALLINT", BufferLength1); _trace_smallint_p (NameLength1Ptr, TRACE_OUTPUT_SUCCESS); _trace_string (Description, BufferLength2, NameLength2Ptr, TRACE_OUTPUT_SUCCESS); _trace_stringlen ("SQLSMALLINT", BufferLength2); _trace_smallint_p (NameLength2Ptr, TRACE_OUTPUT_SUCCESS); } #if ODBCVER >= 0x0300 void trace_SQLDataSourcesW (int trace_leave, int retcode, SQLHENV EnvironmentHandle, SQLUSMALLINT Direction, SQLWCHAR * ServerName, SQLSMALLINT BufferLength1, SQLSMALLINT * NameLength1Ptr, SQLWCHAR * Description, SQLSMALLINT BufferLength2, SQLSMALLINT * NameLength2Ptr) { /* Trace function */ _trace_print_function (en_DataSourcesW, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_ENV, EnvironmentHandle); _trace_direction (Direction); _trace_string_w (ServerName, BufferLength1, NameLength1Ptr, TRACE_OUTPUT_SUCCESS); _trace_stringlen ("SQLSMALLINT", BufferLength1); _trace_smallint_p (NameLength1Ptr, trace_leave); _trace_string_w (Description, BufferLength2, NameLength2Ptr, TRACE_OUTPUT_SUCCESS); _trace_stringlen ("SQLSMALLINT", BufferLength2); _trace_smallint_p (NameLength2Ptr, TRACE_OUTPUT_SUCCESS); } #endif libiodbc-3.52.16/iodbc/trace/FetchScroll.c0000664000175000017500000000722414424170750015125 00000000000000/* * FetchScroll.c * * $Id$ * * SQLFetchScroll trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" #if ODBCVER >= 0x0300 void trace_SQLFetchScroll (int trace_leave, int retcode, SQLHSTMT StatementHandle, SQLSMALLINT FetchOrientation, SQLLEN FetchOffset) { /* Trace function */ _trace_print_function (en_FetchScroll, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, StatementHandle); _trace_fetchtype (FetchOrientation); _trace_len (FetchOffset); } #endif libiodbc-3.52.16/iodbc/trace/ParamData.c0000664000175000017500000000703014424170750014542 00000000000000/* * ParamData.c * * $Id$ * * SQLParamData trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void trace_SQLParamData (int trace_leave, int retcode, SQLHSTMT hstmt, SQLPOINTER * prgbValue) { /* Trace function */ _trace_print_function (en_ParamData, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, hstmt); _trace_pointer (prgbValue); } libiodbc-3.52.16/iodbc/trace/Prepare.c0000664000175000017500000001012314424170750014303 00000000000000/* * Prepare.c * * $Id$ * * SQLPrepare trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void trace_SQLPrepare (int trace_leave, int retcode, SQLHSTMT StatementHandle, SQLCHAR * StatementText, SQLINTEGER TextLength) { /* Trace function */ _trace_print_function (en_Prepare, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, StatementHandle); _trace_string (StatementText, TextLength, NULL, TRACE_INPUT); _trace_stringlen ("SQLINTEGER", TextLength); } #if ODBCVER >= 0x0300 void trace_SQLPrepareW (int trace_leave, int retcode, SQLHSTMT StatementHandle, SQLWCHAR * StatementText, SQLINTEGER TextLength) { /* Trace function */ _trace_print_function (en_PrepareW, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, StatementHandle); _trace_string_w (StatementText, TextLength, NULL, TRACE_INPUT); _trace_stringlen ("SQLINTEGER", TextLength); } #endif libiodbc-3.52.16/iodbc/trace/FreeStmt.c0000664000175000017500000000746414424170750014454 00000000000000/* * FreeStmt.c * * $Id$ * * SQLFreeStmt trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void _trace_freestmt_option (int option) { char *ptr = "invalid option"; switch (option) { _S (SQL_CLOSE); _S (SQL_DROP); _S (SQL_UNBIND); _S (SQL_RESET_PARAMS); } trace_emit ("\t\t%-15.15s %d (%s)\n", "SQLUSMALLINT", (int) option, ptr); } void trace_SQLFreeStmt (int trace_leave, int retcode, SQLHSTMT hstmt, SQLUSMALLINT Option) { /* Trace function */ _trace_print_function (en_FreeStmt, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, hstmt); _trace_freestmt_option (Option); } libiodbc-3.52.16/iodbc/trace/TablePrivileges.c0000664000175000017500000001150514424170750015773 00000000000000/* * TablePrivileges.c * * $Id$ * * SQLTablePrivileges trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void trace_SQLTablePrivileges (int trace_leave, int retcode, SQLHSTMT hstmt, SQLCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLCHAR * szTableName, SQLSMALLINT cbTableName) { /* Trace function */ _trace_print_function (en_Tables, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, hstmt); _trace_string (szTableQualifier, cbTableQualifier, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableQualifier); _trace_string (szTableOwner, cbTableOwner, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableOwner); _trace_string (szTableName, cbTableName, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableName); } #if ODBCVER >= 0x0300 void trace_SQLTablePrivilegesW (int trace_leave, int retcode, SQLHSTMT hstmt, SQLWCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLWCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLWCHAR * szTableName, SQLSMALLINT cbTableName) { /* Trace function */ _trace_print_function (en_TablesW, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, hstmt); _trace_string_w (szTableQualifier, cbTableQualifier, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableQualifier); _trace_string_w (szTableOwner, cbTableOwner, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableOwner); _trace_string_w (szTableName, cbTableName, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableName); } #endif libiodbc-3.52.16/iodbc/trace/SetScrollOptions.c0000664000175000017500000000777114424170750016212 00000000000000/* * SetScrollOptions.c * * $Id$ * * SQLSetScrollOptions trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void _trace_scrollopt_type (SQLUSMALLINT type) { char *ptr = "unknown scroll option"; switch (type) { _S (SQL_CONCUR_READ_ONLY); _S (SQL_CONCUR_LOCK); _S (SQL_CONCUR_ROWVER); _S (SQL_CONCUR_VALUES); } trace_emit ("\t\t%-15.15s %d (%s)\n", "SQLUSMALLINT ", (int) type, ptr); } void trace_SQLSetScrollOptions (int trace_leave, int retcode, SQLHSTMT hstmt, SQLUSMALLINT fConcurrency, SQLINTEGER crowKeyset, SQLUSMALLINT crowRowset) { /* Trace function */ _trace_print_function (en_SetScrollOptions, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, hstmt); _trace_scrollopt_type (fConcurrency); _trace_integer (crowKeyset); _trace_usmallint (crowRowset); } libiodbc-3.52.16/iodbc/trace/Procedures.c0000664000175000017500000001143314424170750015025 00000000000000/* * Procedures.c * * $Id$ * * SQLProcedures trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void trace_SQLProcedures (int trace_leave, int retcode, SQLHSTMT hstmt, SQLCHAR * szProcQualifier, SQLSMALLINT cbProcQualifier, SQLCHAR * szProcOwner, SQLSMALLINT cbProcOwner, SQLCHAR * szProcName, SQLSMALLINT cbProcName) { /* Trace function */ _trace_print_function (en_Procedures, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, hstmt); _trace_string (szProcQualifier, cbProcQualifier, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbProcQualifier); _trace_string (szProcOwner, cbProcOwner, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbProcOwner); _trace_string (szProcName, cbProcName, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbProcName); } #if ODBCVER >= 0x0300 void trace_SQLProceduresW (int trace_leave, int retcode, SQLHSTMT hstmt, SQLWCHAR * szProcQualifier, SQLSMALLINT cbProcQualifier, SQLWCHAR * szProcOwner, SQLSMALLINT cbProcOwner, SQLWCHAR * szProcName, SQLSMALLINT cbProcName) { /* Trace function */ _trace_print_function (en_ProceduresW, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, hstmt); _trace_string_w (szProcQualifier, cbProcQualifier, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbProcQualifier); _trace_string_w (szProcOwner, cbProcOwner, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbProcOwner); _trace_string_w (szProcName, cbProcName, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbProcName); } #endif libiodbc-3.52.16/iodbc/trace/Connect.c0000664000175000017500000001132114424170750014277 00000000000000/* * Connect.c * * $Id$ * * SQLConnect trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void trace_SQLConnect (int trace_leave, int retcode, SQLHDBC hdbc, SQLCHAR * szDSN, SQLSMALLINT cbDSN, SQLCHAR * szUID, SQLSMALLINT cbUID, SQLCHAR * szAuthStr, SQLSMALLINT cbAuthStr) { /* Trace function */ _trace_print_function (en_Connect, trace_leave, retcode); /* Hide plaintext passwords */ szAuthStr = (SQLCHAR *) "****"; /* Trace Arguments */ _trace_handle (SQL_HANDLE_DBC, hdbc); _trace_string (szDSN, cbDSN, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbDSN); _trace_string (szUID, cbUID, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbDSN); _trace_string (szAuthStr, SQL_NTS, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbAuthStr); } #if ODBCVER >= 0x0300 void trace_SQLConnectW (int trace_leave, int retcode, SQLHDBC hdbc, SQLWCHAR * szDSN, SQLSMALLINT cbDSN, SQLWCHAR * szUID, SQLSMALLINT cbUID, SQLWCHAR * szAuthStr, SQLSMALLINT cbAuthStr) { /* Trace function */ _trace_print_function (en_ConnectW, trace_leave, retcode); /* Hide plaintext passwords */ szAuthStr = (SQLWCHAR *) L"****"; /* Trace Arguments */ _trace_handle (SQL_HANDLE_DBC, hdbc); _trace_string_w (szDSN, cbDSN, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbDSN); _trace_string_w (szUID, cbUID, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbDSN); _trace_string_w (szAuthStr, SQL_NTS, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbAuthStr); } #endif libiodbc-3.52.16/iodbc/trace/GetCursorName.c0000664000175000017500000001051714424170750015432 00000000000000/* * GetCursorName.c * * $Id$ * * SQLGetCursorName trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void trace_SQLGetCursorName (int trace_leave, int retcode, SQLHSTMT StatementHandle, SQLCHAR * CursorName, SQLSMALLINT BufferLength, SQLSMALLINT * NameLengthPtr) { /* Trace function */ _trace_print_function (en_GetCursorName, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, StatementHandle); _trace_string (CursorName, BufferLength, NameLengthPtr, TRACE_OUTPUT_SUCCESS); _trace_stringlen ("SQLSMALLINT", BufferLength); _trace_smallint_p (NameLengthPtr, trace_leave); } #if ODBCVER >= 0x0300 void trace_SQLGetCursorNameW (int trace_leave, int retcode, SQLHSTMT StatementHandle, SQLWCHAR * CursorName, SQLSMALLINT BufferLength, SQLSMALLINT * NameLengthPtr) { /* Trace function */ _trace_print_function (en_GetCursorNameW, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, StatementHandle); _trace_string_w (CursorName, BufferLength, NameLengthPtr, TRACE_OUTPUT_SUCCESS); _trace_stringlen ("SQLSMALLINT", BufferLength); _trace_smallint_p (NameLengthPtr, trace_leave); } #endif libiodbc-3.52.16/iodbc/trace/GetTypeInfo.c0000664000175000017500000001154014424170750015106 00000000000000/* * GetTypeInfo.c * * $Id$ * * SQLGetTypeInfo trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void _trace_typeinfo (SQLSMALLINT type) { char *ptr = "unknown type"; switch (type) { _S (SQL_ALL_TYPES); _S (SQL_BIGINT); _S (SQL_BINARY); _S (SQL_BIT); _S (SQL_CHAR); #if (ODBCVER < 0x0300) _S (SQL_DATE); #else _S (SQL_DATETIME); #endif _S (SQL_DECIMAL); _S (SQL_DOUBLE); _S (SQL_FLOAT); #if (ODBCVER >= 0x0350) _S (SQL_GUID); #endif _S (SQL_INTEGER); _S (SQL_LONGVARBINARY); _S (SQL_LONGVARCHAR); _S (SQL_NUMERIC); _S (SQL_REAL); _S (SQL_SMALLINT); #if (ODBCVER < 0x0300) _S (SQL_TIME); #else _S (SQL_INTERVAL); #endif _S (SQL_TIMESTAMP); _S (SQL_TINYINT); #if ODBCVER >= 0x0300 _S (SQL_TYPE_DATE); _S (SQL_TYPE_TIME); _S (SQL_TYPE_TIMESTAMP); #endif _S (SQL_VARBINARY); _S (SQL_VARCHAR); _S (SQL_WCHAR); _S (SQL_WLONGVARCHAR); _S (SQL_WVARCHAR); } trace_emit ("\t\t%-15.15s %d (%s)\n", "SQLSMALLINT ", (int) type, ptr); } void trace_SQLGetTypeInfo (int trace_leave, int retcode, SQLHSTMT hstmt, SQLSMALLINT fSqlType) { /* Trace function */ _trace_print_function (en_GetTypeInfo, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, hstmt); _trace_typeinfo (fSqlType); } #if ODBCVER >= 0x0300 void trace_SQLGetTypeInfoW (int trace_leave, int retcode, SQLHSTMT hstmt, SQLSMALLINT fSqlType) { /* Trace function */ _trace_print_function (en_GetTypeInfoW, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, hstmt); _trace_typeinfo (fSqlType); } #endif libiodbc-3.52.16/iodbc/trace/GetFunctions.c0000664000175000017500000001663014424170750015326 00000000000000/* * GetFunctions.c * * $Id$ * * SQLGetFunctions trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" static void _trace_func_name (SQLUSMALLINT fFunc, int format) { char *ptr = "unknown function"; switch (fFunc) { /* All ODBC 2.x functions */ _S (SQL_API_ALL_FUNCTIONS); /* ODBC 2.x */ _S (SQL_API_SQLALLOCCONNECT); _S (SQL_API_SQLALLOCENV); _S (SQL_API_SQLALLOCSTMT); _S (SQL_API_SQLBINDCOL); _S (SQL_API_SQLBINDPARAMETER); _S (SQL_API_SQLBROWSECONNECT); _S (SQL_API_SQLCANCEL); #if (ODBCVER < 0x0300) _S (SQL_API_SQLCOLATTRIBUTES); #endif _S (SQL_API_SQLCOLUMNPRIVILEGES); _S (SQL_API_SQLCOLUMNS); _S (SQL_API_SQLCONNECT); _S (SQL_API_SQLDATASOURCES); _S (SQL_API_SQLDESCRIBECOL); _S (SQL_API_SQLDESCRIBEPARAM); _S (SQL_API_SQLDISCONNECT); _S (SQL_API_SQLDRIVERCONNECT); _S (SQL_API_SQLDRIVERS); _S (SQL_API_SQLERROR); _S (SQL_API_SQLEXECDIRECT); _S (SQL_API_SQLEXECUTE); _S (SQL_API_SQLEXTENDEDFETCH); _S (SQL_API_SQLFETCH); _S (SQL_API_SQLFOREIGNKEYS); _S (SQL_API_SQLFREECONNECT); _S (SQL_API_SQLFREEENV); _S (SQL_API_SQLFREESTMT); _S (SQL_API_SQLGETCONNECTOPTION); _S (SQL_API_SQLGETCURSORNAME); _S (SQL_API_SQLGETDATA); _S (SQL_API_SQLGETFUNCTIONS); _S (SQL_API_SQLGETINFO); _S (SQL_API_SQLGETSTMTOPTION); _S (SQL_API_SQLGETTYPEINFO); _S (SQL_API_SQLMORERESULTS); _S (SQL_API_SQLNATIVESQL); _S (SQL_API_SQLNUMPARAMS); _S (SQL_API_SQLNUMRESULTCOLS); _S (SQL_API_SQLPARAMDATA); _S (SQL_API_SQLPARAMOPTIONS); _S (SQL_API_SQLPREPARE); _S (SQL_API_SQLPRIMARYKEYS); _S (SQL_API_SQLPROCEDURECOLUMNS); _S (SQL_API_SQLPROCEDURES); _S (SQL_API_SQLPUTDATA); _S (SQL_API_SQLROWCOUNT); _S (SQL_API_SQLSETCONNECTOPTION); _S (SQL_API_SQLSETCURSORNAME); _S (SQL_API_SQLSETPARAM); _S (SQL_API_SQLSETPOS); _S (SQL_API_SQLSETSCROLLOPTIONS); _S (SQL_API_SQLSETSTMTOPTION); _S (SQL_API_SQLSPECIALCOLUMNS); _S (SQL_API_SQLSTATISTICS); _S (SQL_API_SQLTABLEPRIVILEGES); _S (SQL_API_SQLTABLES); _S (SQL_API_SQLTRANSACT); #if (ODBCVER >= 0x0300) /* All ODBC 2.x functions */ _S (SQL_API_ODBC3_ALL_FUNCTIONS); /* ODBC 3.x */ _S (SQL_API_SQLALLOCHANDLE); _S (SQL_API_SQLALLOCHANDLESTD); _S (SQL_API_SQLBINDPARAM); _S (SQL_API_SQLBULKOPERATIONS); _S (SQL_API_SQLCLOSECURSOR); _S (SQL_API_SQLCOLATTRIBUTE); _S (SQL_API_SQLCOPYDESC); _S (SQL_API_SQLENDTRAN); _S (SQL_API_SQLFETCHSCROLL); _S (SQL_API_SQLFREEHANDLE); _S (SQL_API_SQLGETCONNECTATTR); _S (SQL_API_SQLGETDESCFIELD); _S (SQL_API_SQLGETDESCREC); _S (SQL_API_SQLGETDIAGFIELD); _S (SQL_API_SQLGETDIAGREC); _S (SQL_API_SQLGETENVATTR); _S (SQL_API_SQLGETSTMTATTR); _S (SQL_API_SQLSETCONNECTATTR); _S (SQL_API_SQLSETDESCFIELD); _S (SQL_API_SQLSETDESCREC); _S (SQL_API_SQLSETENVATTR); _S (SQL_API_SQLSETSTMTATTR); #endif } if (format) trace_emit ("\t\t%-15.15s %d (%s)\n", "SQLUSMALLINT", (int) fFunc, ptr); else trace_emit_string ((SQLCHAR *)ptr, SQL_NTS, 0); } void _trace_func_result ( SQLUSMALLINT fFunc, SQLUSMALLINT * pfExists, int output) { int i; if (fFunc == SQL_API_ALL_FUNCTIONS) { _trace_usmallint_p (pfExists, 0); if (!output) return; for (i = 1; i < 100; i++) if (pfExists[i]) _trace_func_name (i, 0); } #if (ODBCVER >= 0x0300) else if (fFunc == SQL_API_ODBC3_ALL_FUNCTIONS) { if (!output) return; _trace_usmallint_p (pfExists, 0); for (i = 1; i < SQL_API_ODBC3_ALL_FUNCTIONS; i++) if (SQL_FUNC_EXISTS (pfExists, i)) _trace_func_name (i, 0); } #endif else { _trace_usmallint_p (pfExists, output); } } void trace_SQLGetFunctions (int trace_leave, int retcode, SQLHDBC hdbc, SQLUSMALLINT fFunc, SQLUSMALLINT * pfExists) { /* Trace function */ _trace_print_function (en_GetFunctions, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_DBC, hdbc); _trace_func_name (fFunc, 1); _trace_func_result (fFunc, pfExists, trace_leave); } libiodbc-3.52.16/iodbc/trace/Makefile.in0000664000175000017500000007161114424171020014606 00000000000000# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 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@ # # Makefile.am # # The iODBC driver manager. # # Copyright (C) 1996-2023 OpenLink Software # All Rights Reserved. # # This software is released under the terms of either of the following # licenses: # # - GNU Library General Public License (see LICENSE.LGPL) # - The BSD License (see LICENSE.BSD). # # Note that the only valid version of the LGPL license as far as this # project is concerned is the original GNU Library General Public License # Version 2, dated June 1991. # # While not mandated by the BSD license, any patches you make to the # iODBC source code may be contributed back into the iODBC project # at your discretion. Contributions will benefit the Open Source and # Data Access community as a whole. Submissions may be made at: # # http://www.iodbc.org # # # GNU Library Generic Public License Version 2 # ============================================ # 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; only # Version 2 of the License dated June 1991. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # The BSD License # =============== # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. Neither the name of OpenLink Software Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = iodbc/trace ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/admin/gtk-2.0.m4 \ $(top_srcdir)/admin/gtk.m4 $(top_srcdir)/admin/libtool.m4 \ $(top_srcdir)/admin/ltoptions.m4 \ $(top_srcdir)/admin/ltsugar.m4 \ $(top_srcdir)/admin/ltversion.m4 \ $(top_srcdir)/admin/lt~obsolete.m4 \ $(top_srcdir)/admin/openlink.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libiodbctrace_la_LIBADD = am_libiodbctrace_la_OBJECTS = AllocConnect.lo AllocEnv.lo \ AllocHandle.lo AllocStmt.lo BindCol.lo BindParameter.lo \ BrowseConnect.lo BulkOperations.lo Cancel.lo CloseCursor.lo \ ColAttribute.lo ColumnPrivileges.lo Columns.lo Connect.lo \ CopyDesc.lo DataSources.lo DescribeCol.lo DescribeParam.lo \ Disconnect.lo DriverConnect.lo Drivers.lo EndTran.lo Error.lo \ ExecDirect.lo Execute.lo ExtendedFetch.lo Fetch.lo \ FetchScroll.lo ForeignKeys.lo FreeConnect.lo FreeEnv.lo \ FreeHandle.lo FreeStmt.lo GetConnectAttr.lo \ GetConnectOption.lo GetCursorName.lo GetData.lo \ GetDescField.lo GetDescRec.lo GetDiagField.lo GetDiagRec.lo \ GetEnvAttr.lo GetFunctions.lo GetStmtAttr.lo GetStmtOption.lo \ GetTypeInfo.lo Info.lo MoreResults.lo NativeSql.lo \ NumParams.lo NumResultCols.lo ParamData.lo ParamOptions.lo \ Prepare.lo PrimaryKeys.lo ProcedureColumns.lo Procedures.lo \ PutData.lo RowCount.lo SetConnectAttr.lo SetConnectOption.lo \ SetCursorName.lo SetDescField.lo SetDescRec.lo SetEnvAttr.lo \ SetPos.lo SetScrollOptions.lo SetStmtAttr.lo SetStmtOption.lo \ SpecialColumns.lo Statistics.lo TablePrivileges.lo Tables.lo \ Transact.lo trace.lo libiodbctrace_la_OBJECTS = $(am_libiodbctrace_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libiodbctrace_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libiodbctrace_la_LDFLAGS) $(LDFLAGS) \ -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/admin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libiodbctrace_la_SOURCES) DIST_SOURCES = $(libiodbctrace_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/admin/depcomp \ $(top_srcdir)/admin/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_CONFIG = @GTK_CONFIG@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBADD_DL = @LIBADD_DL@ LIBADD_OS = @LIBADD_OS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ filedsnpath = @filedsnpath@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ inidir = @inidir@ install_sh = @install_sh@ lib_version = @lib_version@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ odbcmode = @odbcmode@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libiodbctrace.la AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/iodbc \ -I$(top_srcdir)/iodbcinst libiodbctrace_la_LDFLAGS = #-static libiodbctrace_la_SOURCES = \ AllocConnect.c \ AllocEnv.c \ AllocHandle.c \ AllocStmt.c \ BindCol.c \ BindParameter.c \ BrowseConnect.c \ BulkOperations.c \ Cancel.c \ CloseCursor.c \ ColAttribute.c \ ColumnPrivileges.c \ Columns.c \ Connect.c \ CopyDesc.c \ DataSources.c \ DescribeCol.c \ DescribeParam.c \ Disconnect.c \ DriverConnect.c \ Drivers.c \ EndTran.c \ Error.c \ ExecDirect.c \ Execute.c \ ExtendedFetch.c \ Fetch.c \ FetchScroll.c \ ForeignKeys.c \ FreeConnect.c \ FreeEnv.c \ FreeHandle.c \ FreeStmt.c \ GetConnectAttr.c \ GetConnectOption.c \ GetCursorName.c \ GetData.c \ GetDescField.c \ GetDescRec.c \ GetDiagField.c \ GetDiagRec.c \ GetEnvAttr.c \ GetFunctions.c \ GetStmtAttr.c \ GetStmtOption.c \ GetTypeInfo.c \ Info.c \ MoreResults.c \ NativeSql.c \ NumParams.c \ NumResultCols.c \ ParamData.c \ ParamOptions.c \ Prepare.c \ PrimaryKeys.c \ ProcedureColumns.c \ Procedures.c \ PutData.c \ RowCount.c \ SetConnectAttr.c \ SetConnectOption.c \ SetCursorName.c \ SetDescField.c \ SetDescRec.c \ SetEnvAttr.c \ SetPos.c \ SetScrollOptions.c \ SetStmtAttr.c \ SetStmtOption.c \ SpecialColumns.c \ Statistics.c \ TablePrivileges.c \ Tables.c \ Transact.c \ trace.c noinst_HEADERS = proto.h trace.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu iodbc/trace/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu iodbc/trace/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libiodbctrace.la: $(libiodbctrace_la_OBJECTS) $(libiodbctrace_la_DEPENDENCIES) $(EXTRA_libiodbctrace_la_DEPENDENCIES) $(AM_V_CCLD)$(libiodbctrace_la_LINK) $(libiodbctrace_la_OBJECTS) $(libiodbctrace_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @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)/AllocHandle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AllocStmt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BindCol.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BindParameter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BrowseConnect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BulkOperations.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Cancel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CloseCursor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ColAttribute.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ColumnPrivileges.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Columns.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Connect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CopyDesc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DataSources.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DescribeCol.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DescribeParam.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Disconnect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DriverConnect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Drivers.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/EndTran.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ExecDirect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Execute.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ExtendedFetch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Fetch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FetchScroll.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ForeignKeys.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FreeConnect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FreeEnv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FreeHandle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FreeStmt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GetConnectAttr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GetConnectOption.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GetCursorName.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GetData.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GetDescField.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GetDescRec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GetDiagField.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GetDiagRec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GetEnvAttr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GetFunctions.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GetStmtAttr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GetStmtOption.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GetTypeInfo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Info.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MoreResults.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NativeSql.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NumParams.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NumResultCols.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ParamData.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ParamOptions.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Prepare.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PrimaryKeys.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ProcedureColumns.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Procedures.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PutData.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RowCount.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SetConnectAttr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SetConnectOption.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SetCursorName.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SetDescField.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SetDescRec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SetEnvAttr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SetPos.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SetScrollOptions.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SetStmtAttr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SetStmtOption.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SpecialColumns.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Statistics.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TablePrivileges.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Tables.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Transact.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trace.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # 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: libiodbc-3.52.16/iodbc/trace/Drivers.c0000664000175000017500000001220214424170750014323 00000000000000/* * Drivers.c * * $Id$ * * SQLDrivers trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void trace_SQLDrivers (int trace_leave, int retcode, SQLHENV EnvironmentHandle, SQLUSMALLINT Direction, SQLCHAR * DriverDescription, SQLSMALLINT BufferLength1, SQLSMALLINT * DescriptionLengthPtr, SQLCHAR * DriverAttributes, SQLSMALLINT BufferLength2, SQLSMALLINT * AttributesLengthPtr) { /* Trace function */ _trace_print_function (en_Drivers, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_ENV, EnvironmentHandle); _trace_direction (Direction); _trace_string (DriverDescription, BufferLength1, DescriptionLengthPtr, TRACE_OUTPUT_SUCCESS); _trace_stringlen ("SQLSMALLINT", BufferLength1); _trace_smallint_p (DescriptionLengthPtr, TRACE_OUTPUT_SUCCESS); _trace_string (DriverAttributes, BufferLength2, AttributesLengthPtr, TRACE_OUTPUT_SUCCESS); _trace_stringlen ("SQLSMALLINT", BufferLength2); _trace_smallint_p (AttributesLengthPtr, TRACE_OUTPUT_SUCCESS); } #if ODBCVER >= 0x0300 void trace_SQLDriversW (int trace_leave, int retcode, SQLHENV EnvironmentHandle, SQLUSMALLINT Direction, SQLWCHAR * DriverDescription, SQLSMALLINT BufferLength1, SQLSMALLINT * DescriptionLengthPtr, SQLWCHAR * DriverAttributes, SQLSMALLINT BufferLength2, SQLSMALLINT * AttributesLengthPtr) { /* Trace function */ _trace_print_function (en_DriversW, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_ENV, EnvironmentHandle); _trace_direction (Direction); _trace_string_w (DriverDescription, BufferLength1, DescriptionLengthPtr, TRACE_OUTPUT_SUCCESS); _trace_stringlen ("SQLSMALLINT", BufferLength1); _trace_smallint_p (DescriptionLengthPtr, TRACE_OUTPUT_SUCCESS); _trace_string_w (DriverAttributes, BufferLength2, AttributesLengthPtr, TRACE_OUTPUT_SUCCESS); _trace_stringlen ("SQLSMALLINT", BufferLength2); _trace_smallint_p (AttributesLengthPtr, TRACE_OUTPUT_SUCCESS); } #endif libiodbc-3.52.16/iodbc/trace/SetDescField.c0000664000175000017500000001044214424170750015207 00000000000000/* * SetDescField.c * * $Id$ * * SQLSetDescField trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" #if ODBCVER >= 0x0300 void trace_SQLSetDescField (int trace_leave, int retcode, SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER ValuePtr, SQLINTEGER BufferLength) { /* Trace function */ _trace_print_function (en_SetDescField, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_DESC, DescriptorHandle); _trace_smallint (RecNumber); _trace_descfield_type (FieldIdentifier); _trace_pointer (ValuePtr); _trace_bufferlen (BufferLength); } void trace_SQLSetDescFieldW (int trace_leave, int retcode, SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER ValuePtr, SQLINTEGER BufferLength) { /* Trace function */ _trace_print_function (en_SetDescFieldW, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_DESC, DescriptorHandle); _trace_smallint (RecNumber); _trace_descfield_type (FieldIdentifier); _trace_pointer (ValuePtr); _trace_bufferlen (BufferLength); } #endif libiodbc-3.52.16/iodbc/trace/MoreResults.c0000664000175000017500000000674414424170750015207 00000000000000/* * MoreResults.c * * $Id$ * * SQLMoreResults trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void trace_SQLMoreResults (int trace_leave, int retcode, SQLHSTMT hstmt) { /* Trace function */ _trace_print_function (en_MoreResults, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, hstmt); } libiodbc-3.52.16/iodbc/trace/DescribeParam.c0000664000175000017500000000755414424170750015424 00000000000000/* * DescribeParam.c * * $Id$ * * SQLDescribeParam trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void trace_SQLDescribeParam (int trace_leave, int retcode, SQLHSTMT hstmt, SQLUSMALLINT ipar, SQLSMALLINT * pfSqlType, SQLULEN * pcbColDef, SQLSMALLINT * pibScale, SQLSMALLINT * pfNullable) { /* Trace function */ _trace_print_function (en_DescribeParam, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, hstmt); _trace_usmallint (ipar); _trace_sql_type_p (pfSqlType, TRACE_OUTPUT_SUCCESS); _trace_ulen_p (pcbColDef, TRACE_OUTPUT_SUCCESS); _trace_smallint_p (pibScale, TRACE_OUTPUT_SUCCESS); _trace_smallint_p (pfNullable, TRACE_OUTPUT_SUCCESS); } libiodbc-3.52.16/iodbc/trace/trace.h0000664000175000017500000001036214424170750014015 00000000000000/* * trace.h * * $Id$ * * Trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef _IODBCDM_TRACE_H #define _IODBCDM_TRACE_H #include #include #include #include #include #include #include #include #include #include "unicode.h" #include "herr.h" #include "henv.h" #include "ithread.h" #ifdef __cplusplus extern "C" { #endif /* * Useful constants and macros */ #define MAX_EMIT_STRING 40000L /* = 1000 lines in output */ #define MAX_EMIT_BINARY 10000L /* = 1000 lines in output */ #define TRACE_ENTER 0 #define TRACE_LEAVE 1 #undef _S #define _S(X) case X: ptr = #X; break /* * Is the argument and input or output parameter or both */ #define TRACE_NEVER (0) #define TRACE_INPUT (trace_leave == TRACE_ENTER) #define TRACE_OUTPUT (trace_leave == TRACE_LEAVE) #define TRACE_INPUT_OUTPUT (1) #define TRACE_OUTPUT_SUCCESS (trace_leave == TRACE_LEAVE && \ (retcode == SQL_SUCCESS || \ retcode == SQL_SUCCESS_WITH_INFO)) /* Prototypes */ #include "proto.h" #ifdef __cplusplus } #endif #endif /*_IODBCDM_TRACE_H */ libiodbc-3.52.16/iodbc/trace/NumParams.c0000664000175000017500000000705214424170750014617 00000000000000/* * NumParams.c * * $Id$ * * SQLNumParams trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void trace_SQLNumParams (int trace_leave, int retcode, SQLHSTMT hstmt, SQLSMALLINT * pcpar) { /* Trace function */ _trace_print_function (en_NumParams, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, hstmt); _trace_smallint_p (pcpar, TRACE_OUTPUT_SUCCESS); } libiodbc-3.52.16/iodbc/trace/Error.c0000664000175000017500000001152414424170750014004 00000000000000/* * Error.c * * $Id$ * * SQLError trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void trace_SQLError (int trace_leave, int retcode, SQLHENV henv, SQLHDBC hdbc, SQLHSTMT hstmt, SQLCHAR * szSqlstate, SQLINTEGER * pfNativeError, SQLCHAR * szErrorMsg, SQLSMALLINT cbErrorMsgMax, SQLSMALLINT * pcbErrorMsg) { /* Trace function */ _trace_print_function (en_Error, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_ENV, henv); _trace_handle (SQL_HANDLE_DBC, hdbc); _trace_handle (SQL_HANDLE_STMT, hstmt); _trace_string (szSqlstate, SQL_NTS, NULL, TRACE_OUTPUT_SUCCESS); _trace_integer_p (pfNativeError, TRACE_OUTPUT_SUCCESS); _trace_string (szErrorMsg, cbErrorMsgMax, pcbErrorMsg, TRACE_OUTPUT_SUCCESS); _trace_stringlen ("SQLSMALLINT", cbErrorMsgMax); _trace_smallint_p (pcbErrorMsg, TRACE_OUTPUT_SUCCESS); } #if ODBCVER >= 0x0300 void trace_SQLErrorW (int trace_leave, int retcode, SQLHENV henv, SQLHDBC hdbc, SQLHSTMT hstmt, SQLWCHAR * szSqlstate, SQLINTEGER * pfNativeError, SQLWCHAR * szErrorMsg, SQLSMALLINT cbErrorMsgMax, SQLSMALLINT * pcbErrorMsg) { /* Trace function */ _trace_print_function (en_Error, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_ENV, henv); _trace_handle (SQL_HANDLE_DBC, hdbc); _trace_handle (SQL_HANDLE_STMT, hstmt); _trace_string_w (szSqlstate, SQL_NTS, NULL, TRACE_OUTPUT_SUCCESS); _trace_integer_p (pfNativeError, trace_leave); _trace_string_w (szErrorMsg, cbErrorMsgMax, pcbErrorMsg, TRACE_OUTPUT_SUCCESS); _trace_stringlen ("SQLSMALLINT", cbErrorMsgMax); _trace_smallint_p (pcbErrorMsg, TRACE_OUTPUT_SUCCESS); } #endif libiodbc-3.52.16/iodbc/trace/BindCol.c0000664000175000017500000000750214424170750014226 00000000000000/* * BindCol.c * * $Id$ * * SQLBindCol trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void trace_SQLBindCol (int trace_leave, int retcode, SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLSMALLINT TargetType, SQLPOINTER TargetValuePtr, SQLLEN BufferLength, SQLLEN * Strlen_or_IndPtr) { /* Trace function */ _trace_print_function (en_BindCol, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, StatementHandle); _trace_usmallint (ColumnNumber); _trace_c_type (TargetType); _trace_pointer (TargetValuePtr); _trace_len (BufferLength); _trace_len_p (Strlen_or_IndPtr, TRACE_OUTPUT_SUCCESS); } libiodbc-3.52.16/iodbc/trace/AllocHandle.c0000664000175000017500000000724114424170750015062 00000000000000/* * AllocHandle.c * * $Id$ * * SQLAllocHandle trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" #if ODBCVER >= 0x0300 void trace_SQLAllocHandle(int trace_leave, int retcode, SQLSMALLINT HandleType, SQLHANDLE InputHandle, SQLHANDLE * OutputHandlePtr) { /* Trace function */ _trace_print_function (en_AllocHandle, trace_leave, retcode); /* Trace Arguments */ _trace_handletype (HandleType); _trace_handle (0, InputHandle); _trace_handle_p (0, OutputHandlePtr, TRACE_OUTPUT_SUCCESS); } #endif libiodbc-3.52.16/iodbc/trace/SetCursorName.c0000664000175000017500000001006214424170750015441 00000000000000/* * SetCursorName.c * * $Id$ * * SQLSetCursorName trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void trace_SQLSetCursorName (int trace_leave, int retcode, SQLHSTMT hstmt, SQLCHAR * szCursor, SQLSMALLINT cbCursor) { /* Trace function */ _trace_print_function (en_SetCursorName, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, hstmt); _trace_string (szCursor, cbCursor, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbCursor); } #if ODBCVER >= 0x0300 void trace_SQLSetCursorNameW (int trace_leave, int retcode, SQLHSTMT hstmt, SQLWCHAR * szCursor, SQLSMALLINT cbCursor) { /* Trace function */ _trace_print_function (en_SetCursorNameW, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, hstmt); _trace_string_w (szCursor, cbCursor, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbCursor); } #endif libiodbc-3.52.16/iodbc/trace/DriverConnect.c0000664000175000017500000001676014424170750015467 00000000000000/* * DriverConnect.c * * $Id$ * * SQLDriverConnect trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" /* * Never print plaintext passwords * * NOTE: This function modifies the original string * */ static void _trace_connstr_hidepwd (SQLCHAR *str) { SQLCHAR *ptr; int state = 0; for (ptr = str; *ptr;) { switch (state) { case -1: if (strchr ("\'\"}", *ptr)) state = 0; break; case 0: if (toupper(*ptr) == 'P') state = 1; else if (strchr ("\'\"{", *ptr)) state = -1; /* in string */ break; case 1: if (toupper(*ptr) == 'W') state = 2; else state = 0; break; case 2: if (toupper(*ptr) == 'D') state = 3; else state = 0; break; case 3: if (*ptr == '=') state = 4; /* goto password mode */ else state = 0; break; case 4: if (*ptr == ';') { state = 0; /* go back to normal mode */ } else *ptr = '*'; break; } ptr++; } } static void _trace_connstr ( SQLCHAR * str, SQLSMALLINT len, SQLSMALLINT * lenptr, int output) { SQLCHAR *dup; ssize_t length; if (!str) { trace_emit ("\t\t%-15.15s * 0x0\n", "SQLCHAR"); return; } trace_emit ("\t\t%-15.15s * %p\n", "SQLCHAR", str); if (!output) return; /* * Calculate string length */ if (lenptr ) length = *lenptr; else length = len; if (length == SQL_NTS) length = STRLEN (str); /* * Make a copy of the string */ if ((dup = (SQLCHAR *) malloc (length + 1)) == NULL) return; memcpy (dup, str, length); dup[length] = '\0'; /* * Emit the string */ _trace_connstr_hidepwd (dup); trace_emit_string (dup, length, 0); free (dup); } static void _trace_connstr_w ( SQLWCHAR * str, SQLSMALLINT len, SQLSMALLINT * lenptr, int output) { SQLCHAR *dup; long length; if (!str) { trace_emit ("\t\t%-15.15s * 0x0\n", "SQLWCHAR"); return; } trace_emit ("\t\t%-15.15s * %p\n", "SQLWCHAR", str); if (!output) return; /* * Calculate string length */ if (lenptr) length = *lenptr; else length = len; /* * Emit the string */ dup = dm_SQL_W2A (str, length); _trace_connstr_hidepwd (dup); trace_emit_string (dup, SQL_NTS, 1); free (dup); } static void _trace_drvcn_completion(SQLUSMALLINT fDriverCompletion) { char *ptr = "invalid completion value"; switch (fDriverCompletion) { _S (SQL_DRIVER_PROMPT); _S (SQL_DRIVER_COMPLETE); _S (SQL_DRIVER_COMPLETE_REQUIRED); _S (SQL_DRIVER_NOPROMPT); } trace_emit ("\t\t%-15.15s %d (%s)\n", "SQLUSMALLINT", (int) fDriverCompletion, ptr); } void trace_SQLDriverConnect (int trace_leave, int retcode, SQLHDBC hdbc, SQLHWND hwnd, SQLCHAR * szConnStrIn, SQLSMALLINT cbConnStrIn, SQLCHAR * szConnStrOut, SQLSMALLINT cbConnStrOutMax, SQLSMALLINT * pcbConnStrOut, SQLUSMALLINT fDriverCompletion) { /* Trace function */ _trace_print_function (en_DriverConnect, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_DBC, hdbc); _trace_pointer (hwnd); _trace_connstr (szConnStrIn, cbConnStrIn, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbConnStrIn); _trace_connstr (szConnStrOut, cbConnStrOutMax, pcbConnStrOut, TRACE_OUTPUT_SUCCESS); _trace_stringlen ("SQLSMALLINT", cbConnStrOutMax); _trace_smallint_p (pcbConnStrOut, TRACE_OUTPUT_SUCCESS); _trace_drvcn_completion (fDriverCompletion); } #if ODBCVER >= 0x0300 void trace_SQLDriverConnectW (int trace_leave, int retcode, SQLHDBC hdbc, SQLHWND hwnd, SQLWCHAR * szConnStrIn, SQLSMALLINT cbConnStrIn, SQLWCHAR * szConnStrOut, SQLSMALLINT cbConnStrOutMax, SQLSMALLINT * pcbConnStrOut, SQLUSMALLINT fDriverCompletion) { /* Trace function */ _trace_print_function (en_DriverConnectW, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_DBC, hdbc); _trace_pointer (hwnd); _trace_connstr_w (szConnStrIn, cbConnStrIn, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbConnStrIn); _trace_connstr_w (szConnStrOut, cbConnStrOutMax, pcbConnStrOut, TRACE_OUTPUT_SUCCESS); _trace_stringlen ("SQLSMALLINT", cbConnStrOutMax); _trace_smallint_p (pcbConnStrOut, TRACE_OUTPUT_SUCCESS); _trace_drvcn_completion (fDriverCompletion); } #endif libiodbc-3.52.16/iodbc/trace/Transact.c0000664000175000017500000000761014424170750014473 00000000000000/* * Transact.c * * $Id$ * * SQLTransact trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void _trace_tran_completion (SQLSMALLINT option) { char *ptr = "invalid completion type"; switch (option) { _S (SQL_COMMIT); _S (SQL_ROLLBACK); } trace_emit ("\t\t%-15.15s %d (%s)\n", "SQLSMALLINT", (int) option, ptr); } void trace_SQLTransact (int trace_leave, int retcode, SQLHENV EnvironmentHandle, SQLHDBC ConnectionHandle, SQLSMALLINT CompletionType) { /* Trace function */ _trace_print_function (en_Transact, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_ENV, EnvironmentHandle); _trace_handle (SQL_HANDLE_DBC, ConnectionHandle); _trace_tran_completion (CompletionType); } libiodbc-3.52.16/iodbc/trace/GetEnvAttr.c0000664000175000017500000001013314424170750014731 00000000000000/* * GetEnvAttr.c * * $Id$ * * SQLAllocConnect trace functions * * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" #if ODBCVER >= 0x0300 void _trace_envattr_type (SQLINTEGER type) { char *ptr = "unknown environment attribute"; switch (type) { _S (SQL_ATTR_CONNECTION_POOLING); _S (SQL_ATTR_CP_MATCH); _S (SQL_ATTR_ODBC_VERSION); _S (SQL_ATTR_OUTPUT_NTS); } trace_emit ("\t\t%-15.15s %d (%s)\n", "SQLINTEGER ", (int) type, ptr); } void trace_SQLGetEnvAttr (int trace_leave, int retcode, SQLHENV EnvironmentHandle, SQLINTEGER Attribute, SQLPOINTER ValuePtr, SQLINTEGER BufferLength, SQLINTEGER * StringLengthPtr) { /* Trace function */ _trace_print_function (en_GetEnvAttr, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_ENV, EnvironmentHandle); _trace_envattr_type (Attribute); _trace_pointer (ValuePtr); _trace_bufferlen (BufferLength); _trace_integer_p (StringLengthPtr, TRACE_OUTPUT_SUCCESS); } #endif libiodbc-3.52.16/iodbc/trace/GetData.c0000664000175000017500000003071114424170750014223 00000000000000/* * GetData.c * * $Id$ * * SQLGetData trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void _trace_data ( SQLSMALLINT fCType, SQLPOINTER rgbValue, SQLLEN cbValueMax, SQLLEN * pcbValue, int output) { char buf[1024]; /* Temp buffer */ if (!rgbValue) { trace_emit ("\t\t%-15.15s 0x0\n", "SQLPOINTER"); return; } trace_emit ("\t\t%-15.15s %p\n", "SQLPOINTER", rgbValue); if (!output) return; /* Only print buffer content on leave */ switch (fCType) { case SQL_C_BINARY: { ssize_t len = cbValueMax; if (pcbValue) len = *pcbValue; if (len > cbValueMax) len = cbValueMax; trace_emit_binary ((unsigned char *) rgbValue, len); } break; case SQL_C_BIT: { int i = (int) *(char *) rgbValue; sprintf (buf, "%d", i > 0 ? 1 : 0); trace_emit_string ((SQLCHAR *) buf, SQL_NTS, 0); } break; case SQL_C_CHAR: { ssize_t len = cbValueMax; if (pcbValue) len = (long) *pcbValue; if (len > cbValueMax) len = cbValueMax; trace_emit_string ((SQLCHAR *) rgbValue, len, 0); } break; case SQL_C_DATE: #if ODBCVER >= 0x0300 case SQL_C_TYPE_DATE: #endif { DATE_STRUCT *d = (DATE_STRUCT *) rgbValue; sprintf (buf, "%04d-%02d-%02d", d->year, d->month, d->day); trace_emit_string ((SQLCHAR *) buf, SQL_NTS, 0); } break; case SQL_C_DEFAULT: /* * Not enough information to dump the content of the buffer */ return; case SQL_C_DOUBLE: { double d = *(double *) rgbValue; sprintf (buf, "%f", d); trace_emit_string ((SQLCHAR *) buf, SQL_NTS, 0); } break; case SQL_C_FLOAT: { float f = *(float *) rgbValue; sprintf (buf, "%f", f); trace_emit_string ((SQLCHAR *) buf, SQL_NTS, 0); } break; #if (ODBCVER >= 0x0350) case SQL_C_GUID: { SQLGUID *g = (SQLGUID *) rgbValue; sprintf (buf, "%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X", (unsigned long) g->Data1, g->Data2, g->Data3, g->Data4[0], g->Data4[1], g->Data4[2], g->Data4[3], g->Data4[4], g->Data4[5], g->Data4[6], g->Data4[7]); trace_emit_string ((SQLCHAR *) buf, SQL_NTS, 0); } break; #endif #if ODBCVER >= 0x0300 case SQL_C_INTERVAL_DAY: { SQL_INTERVAL_STRUCT *i = (SQL_INTERVAL_STRUCT *) rgbValue; sprintf (buf, "%lu days", (unsigned long) i->intval.day_second.day); trace_emit_string ((SQLCHAR *) buf, SQL_NTS, 0); } break; case SQL_C_INTERVAL_DAY_TO_HOUR: { SQL_INTERVAL_STRUCT *i = (SQL_INTERVAL_STRUCT *) rgbValue; sprintf (buf, "%lu days %lu hours", (unsigned long) i->intval.day_second.day, (unsigned long) i->intval.day_second.hour); trace_emit_string ((SQLCHAR *) buf, SQL_NTS, 0); } break; case SQL_C_INTERVAL_DAY_TO_MINUTE: { SQL_INTERVAL_STRUCT *i = (SQL_INTERVAL_STRUCT *) rgbValue; sprintf (buf, "%lu days %lu hours %lu minutes", (unsigned long) i->intval.day_second.day, (unsigned long) i->intval.day_second.hour, (unsigned long) i->intval.day_second.minute); trace_emit_string ((SQLCHAR *) buf, SQL_NTS, 0); } break; case SQL_C_INTERVAL_DAY_TO_SECOND: { SQL_INTERVAL_STRUCT *i = (SQL_INTERVAL_STRUCT *) rgbValue; sprintf (buf, "%lu days %lu hours %lu minutes %lu seconds", (unsigned long) i->intval.day_second.day, (unsigned long) i->intval.day_second.hour, (unsigned long) i->intval.day_second.minute, (unsigned long) i->intval.day_second.second); trace_emit_string ((SQLCHAR *) buf, SQL_NTS, 0); } break; case SQL_C_INTERVAL_HOUR: { SQL_INTERVAL_STRUCT *i = (SQL_INTERVAL_STRUCT *) rgbValue; sprintf (buf, "%lu hours", (unsigned long) i->intval.day_second.hour); trace_emit_string ((SQLCHAR *) buf, SQL_NTS, 0); } break; case SQL_C_INTERVAL_HOUR_TO_MINUTE: { SQL_INTERVAL_STRUCT *i = (SQL_INTERVAL_STRUCT *) rgbValue; sprintf (buf, "%lu hours %lu minutes", (unsigned long) i->intval.day_second.hour, (unsigned long) i->intval.day_second.minute); trace_emit_string ((SQLCHAR *) buf, SQL_NTS, 0); } break; case SQL_C_INTERVAL_HOUR_TO_SECOND: { SQL_INTERVAL_STRUCT *i = (SQL_INTERVAL_STRUCT *) rgbValue; sprintf (buf, "%lu hours %lu minutes %lu seconds", (unsigned long) i->intval.day_second.hour, (unsigned long) i->intval.day_second.minute, (unsigned long) i->intval.day_second.second); trace_emit_string ((SQLCHAR *) buf, SQL_NTS, 0); } break; case SQL_C_INTERVAL_MINUTE: { SQL_INTERVAL_STRUCT *i = (SQL_INTERVAL_STRUCT *) rgbValue; sprintf (buf, "%lu minutes", (unsigned long) i->intval.day_second.minute); trace_emit_string ((SQLCHAR *) buf, SQL_NTS, 0); } break; case SQL_C_INTERVAL_MINUTE_TO_SECOND: { SQL_INTERVAL_STRUCT *i = (SQL_INTERVAL_STRUCT *) rgbValue; sprintf (buf, "%lu minutes %lu seconds", (unsigned long) i->intval.day_second.minute, (unsigned long) i->intval.day_second.second); trace_emit_string ((SQLCHAR *) buf, SQL_NTS, 0); } break; case SQL_C_INTERVAL_MONTH: { SQL_INTERVAL_STRUCT *i = (SQL_INTERVAL_STRUCT *) rgbValue; sprintf (buf, "%lu months", (unsigned long) i->intval.year_month.month); trace_emit_string ((SQLCHAR *) buf, SQL_NTS, 0); } break; case SQL_C_INTERVAL_SECOND: { SQL_INTERVAL_STRUCT *i = (SQL_INTERVAL_STRUCT *) rgbValue; sprintf (buf, "%lu seconds", (unsigned long) i->intval.day_second.second); trace_emit_string ((SQLCHAR *) buf, SQL_NTS, 0); } break; case SQL_C_INTERVAL_YEAR: { SQL_INTERVAL_STRUCT *i = (SQL_INTERVAL_STRUCT *) rgbValue; sprintf (buf, "%lu years", (unsigned long) i->intval.year_month.year); trace_emit_string ((SQLCHAR *) buf, SQL_NTS, 0); } break; case SQL_C_INTERVAL_YEAR_TO_MONTH: { SQL_INTERVAL_STRUCT *i = (SQL_INTERVAL_STRUCT *) rgbValue; sprintf (buf, "%lu years %lu months", (unsigned long) i->intval.year_month.year, (unsigned long) i->intval.year_month.month); trace_emit_string ((SQLCHAR *) buf, SQL_NTS, 0); } break; #endif case SQL_C_LONG: case SQL_C_SLONG: { long l = *(long *) rgbValue; sprintf (buf, "%ld", l); trace_emit_string ((SQLCHAR *) buf, SQL_NTS, 0); } break; case SQL_C_ULONG: { unsigned long l = *(unsigned long *) rgbValue; sprintf (buf, "%lu", l); trace_emit_string ((SQLCHAR *) buf, SQL_NTS, 0); } break; #if ODBCVER >= 0x0300 case SQL_C_NUMERIC: /* NOT YET */ break; #endif #if ODBCVER >= 0x0300 case SQL_C_SBIGINT: #if defined (ODBCINT64) { ODBCINT64 l = *(ODBCINT64 *) rgbValue; sprintf (buf, "%lld", (long long int)l); trace_emit_string ((SQLCHAR *) buf, SQL_NTS, 0); } #endif break; case SQL_C_UBIGINT: #if defined (ODBCINT64) { unsigned ODBCINT64 l = *(unsigned ODBCINT64 *) rgbValue; sprintf (buf, "%llu", (long long unsigned int)l); trace_emit_string ((SQLCHAR *) buf, SQL_NTS, 0); } #endif break; #endif case SQL_C_SHORT: case SQL_C_SSHORT: { int i = (int) *(short *) rgbValue; sprintf (buf, "%d", i); trace_emit_string ((SQLCHAR *) buf, SQL_NTS, 0); } break; case SQL_C_USHORT: { unsigned int i = (unsigned int) *(unsigned short *) rgbValue; sprintf (buf, "%u", i); trace_emit_string ((SQLCHAR *) buf, SQL_NTS, 0); } break; case SQL_C_TIME: #if ODBCVER >= 0x0300 case SQL_C_TYPE_TIME: #endif { TIME_STRUCT *t = (TIME_STRUCT *) rgbValue; sprintf (buf, "%02d:%02d:%02d", t->hour, t->minute, t->second); trace_emit_string ((SQLCHAR *) buf, SQL_NTS, 0); } break; case SQL_C_TIMESTAMP: #if ODBCVER >= 0x0300 case SQL_C_TYPE_TIMESTAMP: #endif { TIMESTAMP_STRUCT *t = (TIMESTAMP_STRUCT *) rgbValue; sprintf (buf, "%04d-%02d-%02d %02d:%02d:%02d.%06ld", t->year, t->month, t->day, t->hour, t->minute, t->second, (long) t->fraction); trace_emit_string ((SQLCHAR *) buf, SQL_NTS, 0); } break; case SQL_C_TINYINT: case SQL_C_STINYINT: { int i = (int) *(char *) rgbValue; sprintf (buf, "%d", i); trace_emit_string ((SQLCHAR *) buf, SQL_NTS, 0); } break; case SQL_C_UTINYINT: { unsigned int i = (unsigned int) *(unsigned char *) rgbValue; sprintf (buf, "%u", i); trace_emit_string ((SQLCHAR *) buf, SQL_NTS, 0); } break; case SQL_C_WCHAR: { SQLCHAR *wstr; ssize_t len = 0; if (pcbValue) len = (ssize_t) *pcbValue; if (len > cbValueMax) len = cbValueMax; wstr = dm_SQL_W2A ((wchar_t *) rgbValue, len); trace_emit_string (wstr, SQL_NTS, 1); free (wstr); } break; default: /* * Unhandled/Unknown datatype */ break; } return; } void trace_SQLGetData (int trace_leave, int retcode, SQLHSTMT hstmt, SQLUSMALLINT icol, SQLSMALLINT fCType, SQLPOINTER rgbValue, SQLLEN cbValueMax, SQLLEN * pcbValue) { /* Trace function */ _trace_print_function (en_GetData, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, hstmt); _trace_usmallint (icol); _trace_c_type (fCType); _trace_data (fCType, rgbValue, cbValueMax, pcbValue, TRACE_OUTPUT_SUCCESS); _trace_len (cbValueMax); _trace_len_p (pcbValue, TRACE_OUTPUT_SUCCESS); } libiodbc-3.52.16/iodbc/trace/PutData.c0000664000175000017500000000706714424170750014264 00000000000000/* * PutData.c * * $Id$ * * SQLPutData trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void trace_SQLPutData (int trace_leave, int retcode, SQLHSTMT hstmt, SQLPOINTER rgbValue, SQLLEN cbValue) { /* Trace function */ _trace_print_function (en_PutData, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, hstmt); _trace_pointer (rgbValue); _trace_len (cbValue); } libiodbc-3.52.16/iodbc/trace/Tables.c0000664000175000017500000001217414424170750014127 00000000000000/* * Tables.c * * $Id$ * * SQLTables trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void trace_SQLTables (int trace_leave, int retcode, SQLHSTMT hstmt, SQLCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLCHAR * szTableName, SQLSMALLINT cbTableName, SQLCHAR * szTableType, SQLSMALLINT cbTableType) { /* Trace function */ _trace_print_function (en_Tables, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, hstmt); _trace_string (szTableQualifier, cbTableQualifier, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableQualifier); _trace_string (szTableOwner, cbTableOwner, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableOwner); _trace_string (szTableName, cbTableName, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableName); _trace_string (szTableType, cbTableType, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableType); } #if ODBCVER >= 0x0300 void trace_SQLTablesW (int trace_leave, int retcode, SQLHSTMT hstmt, SQLWCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLWCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLWCHAR * szTableName, SQLSMALLINT cbTableName, SQLWCHAR * szTableType, SQLSMALLINT cbTableType) { /* Trace function */ _trace_print_function (en_TablesW, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, hstmt); _trace_string_w (szTableQualifier, cbTableQualifier, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableQualifier); _trace_string_w (szTableOwner, cbTableOwner, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableOwner); _trace_string_w (szTableName, cbTableName, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableName); _trace_string_w (szTableType, cbTableType, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableType); } #endif libiodbc-3.52.16/iodbc/trace/SetStmtAttr.c0000664000175000017500000001017614424170750015153 00000000000000/* * SetStmtAttr.c * * $Id$ * * SQLSetStmtAttr trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" #if ODBCVER >= 0x0300 void trace_SQLSetStmtAttr (int trace_leave, int retcode, SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLPOINTER ValuePtr, SQLINTEGER StringLength) { /* Trace function */ _trace_print_function (en_SetStmtAttr, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, StatementHandle); _trace_stmtattr_type (Attribute); _trace_pointer (ValuePtr); _trace_bufferlen (StringLength); } void trace_SQLSetStmtAttrW (int trace_leave, int retcode, SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLPOINTER ValuePtr, SQLINTEGER StringLength) { /* Trace function */ _trace_print_function (en_SetStmtAttrW, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, StatementHandle); _trace_stmtattr_type (Attribute); _trace_pointer (ValuePtr); _trace_bufferlen (StringLength); } #endif libiodbc-3.52.16/iodbc/trace/GetConnectAttr.c0000664000175000017500000001224714424170750015602 00000000000000/* * GetConnectAttr.c * * $Id$ * * SQLGetConnectAttr trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" #if ODBCVER >= 0x0300 void _trace_connattr_type (SQLINTEGER type) { char *ptr = "unknown connection attribute"; switch (type) { _S (SQL_ATTR_ACCESS_MODE); _S (SQL_ATTR_AUTOCOMMIT); _S (SQL_ATTR_AUTO_IPD); _S (SQL_ATTR_CONNECTION_DEAD); _S (SQL_ATTR_CONNECTION_TIMEOUT); _S (SQL_ATTR_CURRENT_CATALOG); _S (SQL_ATTR_DISCONNECT_BEHAVIOR); _S (SQL_ATTR_ENLIST_IN_DTC); _S (SQL_ATTR_ENLIST_IN_XA); _S (SQL_ATTR_LOGIN_TIMEOUT); _S (SQL_ATTR_METADATA_ID); _S (SQL_ATTR_ODBC_CURSORS); _S (SQL_ATTR_PACKET_SIZE); _S (SQL_ATTR_QUIET_MODE); _S (SQL_ATTR_TRACE); _S (SQL_ATTR_TRACEFILE); _S (SQL_ATTR_TRANSLATE_LIB); _S (SQL_ATTR_TRANSLATE_OPTION); _S (SQL_ATTR_TXN_ISOLATION); } trace_emit ("\t\t%-15.15s %d (%s)\n", "SQLINTEGER ", (int) type, ptr); } void trace_SQLGetConnectAttr (int trace_leave, int retcode, SQLHDBC ConnectionHandle, SQLINTEGER Attribute, SQLPOINTER ValuePtr, SQLINTEGER BufferLength, SQLINTEGER * StringLengthPtr) { /* Trace function */ _trace_print_function (en_GetConnectAttr, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_DBC, ConnectionHandle); _trace_connattr_type (Attribute); _trace_pointer (ValuePtr); _trace_bufferlen (BufferLength); _trace_integer_p (StringLengthPtr, TRACE_OUTPUT_SUCCESS); } void trace_SQLGetConnectAttrW (int trace_leave, int retcode, SQLHDBC ConnectionHandle, SQLINTEGER Attribute, SQLPOINTER ValuePtr, SQLINTEGER BufferLength, SQLINTEGER * StringLengthPtr) { /* Trace function */ _trace_print_function (en_GetConnectAttrW, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_DBC, ConnectionHandle); _trace_connattr_type (Attribute); _trace_pointer (ValuePtr); _trace_bufferlen (BufferLength); _trace_integer_p (StringLengthPtr, TRACE_OUTPUT_SUCCESS); } #endif libiodbc-3.52.16/iodbc/trace/FreeConnect.c0000664000175000017500000000673214424170750015113 00000000000000/* * FreeConnect.c * * $Id$ * * SQLFreeConnect trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void trace_SQLFreeConnect (int trace_leave, int retcode, SQLHDBC hdbc) { /* Trace function */ _trace_print_function (en_FreeConnect, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_DBC, hdbc); } libiodbc-3.52.16/iodbc/trace/DescribeCol.c0000664000175000017500000001314514424170750015072 00000000000000/* * DescribeCol.c * * $Id$ * * SQLDescribeCol trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void _trace_desc_null (SQLSMALLINT *p, int output) { char *ptr = "unknown nullable type"; if (!p) { trace_emit ("\t\t%-15.15s * 0x0\n", "SQLSMALLINT"); return; } if (!output) { trace_emit ("\t\t%-15.15s * %p\n", "SQLSMALLINT", p); return; } switch (*p) { _S (SQL_NULLABLE); _S (SQL_NULLABLE_UNKNOWN); _S (SQL_NO_NULLS); } trace_emit ("\t\t%-15.15s * %p (%s)\n", "SQLSMALLINT", p, ptr); } void trace_SQLDescribeCol (int trace_leave, int retcode, SQLHSTMT StatementHandle, SQLSMALLINT ColumnNumber, SQLCHAR * ColumnName, SQLSMALLINT BufferLength, SQLSMALLINT * NameLengthPtr, SQLSMALLINT * DataTypePtr, SQLULEN * ColumnSizePtr, SQLSMALLINT * DecimalDigitsPtr, SQLSMALLINT * NullablePtr) { /* Trace function */ _trace_print_function (en_DescribeCol, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, StatementHandle); _trace_usmallint (ColumnNumber); _trace_string (ColumnName, BufferLength, NameLengthPtr, TRACE_OUTPUT_SUCCESS); _trace_stringlen ("SQLSMALLINT", BufferLength); _trace_smallint_p (NameLengthPtr, TRACE_OUTPUT_SUCCESS); _trace_sql_type_p (DataTypePtr, TRACE_OUTPUT_SUCCESS); _trace_ulen_p (ColumnSizePtr, TRACE_OUTPUT_SUCCESS); _trace_smallint_p (DecimalDigitsPtr, TRACE_OUTPUT_SUCCESS); _trace_desc_null (NullablePtr, TRACE_OUTPUT_SUCCESS); } #if ODBCVER >= 0x0300 void trace_SQLDescribeColW (int trace_leave, int retcode, SQLHSTMT StatementHandle, SQLSMALLINT ColumnNumber, SQLWCHAR * ColumnName, SQLSMALLINT BufferLength, SQLSMALLINT * NameLengthPtr, SQLSMALLINT * DataTypePtr, SQLULEN * ColumnSizePtr, SQLSMALLINT * DecimalDigitsPtr, SQLSMALLINT * NullablePtr) { /* Trace function */ _trace_print_function (en_DescribeColW, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, StatementHandle); _trace_usmallint (ColumnNumber); _trace_string_w (ColumnName, BufferLength, NameLengthPtr, TRACE_OUTPUT_SUCCESS); _trace_stringlen ("SQLSMALLINT", BufferLength); _trace_smallint_p (NameLengthPtr, TRACE_OUTPUT_SUCCESS); _trace_sql_type_p (DataTypePtr, TRACE_OUTPUT_SUCCESS); _trace_ulen_p (ColumnSizePtr, TRACE_OUTPUT_SUCCESS); _trace_smallint_p (DecimalDigitsPtr, TRACE_OUTPUT_SUCCESS); _trace_desc_null (NullablePtr, TRACE_OUTPUT_SUCCESS); } #endif libiodbc-3.52.16/iodbc/trace/GetDescRec.c0000664000175000017500000001263514424170750014667 00000000000000/* * GetDescRec.c * * $Id$ * * SQLGetDescRec trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" #if ODBCVER >= 0x0300 void trace_SQLGetDescRec (int trace_leave, int retcode, SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLCHAR * Name, SQLSMALLINT BufferLength, SQLSMALLINT * StringLengthPtr, SQLSMALLINT * TypePtr, SQLSMALLINT * SubTypePtr, SQLLEN * LengthPtr, SQLSMALLINT * PrecisionPtr, SQLSMALLINT * ScalePtr, SQLSMALLINT * NullablePtr) { /* Trace function */ _trace_print_function (en_GetDescRec, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_DESC, DescriptorHandle); _trace_smallint (RecNumber); _trace_string (Name, BufferLength, StringLengthPtr, TRACE_OUTPUT_SUCCESS); _trace_stringlen ("SQLSMALLINT", BufferLength); _trace_smallint_p (StringLengthPtr, TRACE_OUTPUT_SUCCESS); _trace_sql_type_p (TypePtr, TRACE_OUTPUT_SUCCESS); _trace_sql_subtype (TypePtr, SubTypePtr, TRACE_OUTPUT_SUCCESS); _trace_len_p (LengthPtr, TRACE_OUTPUT_SUCCESS); _trace_smallint_p (PrecisionPtr, TRACE_OUTPUT_SUCCESS); _trace_smallint_p (ScalePtr, TRACE_OUTPUT_SUCCESS); _trace_desc_null (NullablePtr, TRACE_OUTPUT_SUCCESS); } void trace_SQLGetDescRecW (int trace_leave, int retcode, SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLWCHAR * Name, SQLSMALLINT BufferLength, SQLSMALLINT * StringLengthPtr, SQLSMALLINT * TypePtr, SQLSMALLINT * SubTypePtr, SQLLEN * LengthPtr, SQLSMALLINT * PrecisionPtr, SQLSMALLINT * ScalePtr, SQLSMALLINT * NullablePtr) { /* Trace function */ _trace_print_function (en_GetDescRecW, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_DESC, DescriptorHandle); _trace_smallint (RecNumber); _trace_string_w (Name, BufferLength, StringLengthPtr, TRACE_OUTPUT_SUCCESS); _trace_stringlen ("SQLSMALLINT", BufferLength); _trace_smallint_p (StringLengthPtr, TRACE_OUTPUT_SUCCESS); _trace_sql_type_p (TypePtr, TRACE_OUTPUT_SUCCESS); _trace_sql_subtype (TypePtr, SubTypePtr, TRACE_OUTPUT_SUCCESS); _trace_len_p (LengthPtr, TRACE_OUTPUT_SUCCESS); _trace_smallint_p (PrecisionPtr, TRACE_OUTPUT_SUCCESS); _trace_smallint_p (ScalePtr, TRACE_OUTPUT_SUCCESS); _trace_desc_null (NullablePtr, TRACE_OUTPUT_SUCCESS); } #endif libiodbc-3.52.16/iodbc/trace/ExtendedFetch.c0000664000175000017500000001015314424170750015422 00000000000000/* * ExtendedFetch.c * * $Id$ * * SQLExtendedFetch trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void _trace_fetchtype (SQLUSMALLINT type) { char *ptr = "unknown fetch type"; switch (type) { _S (SQL_FETCH_NEXT); _S (SQL_FETCH_FIRST); _S (SQL_FETCH_LAST); _S (SQL_FETCH_PRIOR); _S (SQL_FETCH_ABSOLUTE); _S (SQL_FETCH_RELATIVE); _S (SQL_FETCH_BOOKMARK); } trace_emit ("\t\t%-15.15s %d (%s)\n", "SQLUSMALLINT ", (int) type, ptr); } void trace_SQLExtendedFetch (int trace_leave, int retcode, SQLHSTMT hstmt, SQLUSMALLINT fFetchType, SQLLEN irow, SQLULEN * pcrow, SQLUSMALLINT * rgfRowStatus) { /* Trace function */ _trace_print_function (en_ExtendedFetch, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, hstmt); _trace_fetchtype (fFetchType); _trace_len (irow); _trace_ulen_p (pcrow, TRACE_OUTPUT_SUCCESS); _trace_usmallint_p (rgfRowStatus, 0); } libiodbc-3.52.16/iodbc/trace/RowCount.c0000664000175000017500000000703614424170750014476 00000000000000/* * RowCount.c * * $Id$ * * SQLRowCount trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void trace_SQLRowCount (int trace_leave, int retcode, SQLHSTMT hstmt, SQLLEN * pcrow) { /* Trace function */ _trace_print_function (en_RowCount, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, hstmt); _trace_len_p (pcrow, TRACE_OUTPUT_SUCCESS); } libiodbc-3.52.16/iodbc/trace/GetDiagRec.c0000664000175000017500000001157114424170750014653 00000000000000/* * GetDiagRec.c * * $Id$ * * SQLGetDiagRec trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" #if ODBCVER >= 0x0300 void trace_SQLGetDiagRec (int trace_leave, int retcode, SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT RecNumber, SQLCHAR * SqlState, SQLINTEGER * NativeErrorPtr, SQLCHAR * MessageText, SQLSMALLINT BufferLength, SQLSMALLINT * TextLengthPtr) { /* Trace function */ _trace_print_function (en_GetDiagRec, trace_leave, retcode); /* Trace Arguments */ _trace_handletype (HandleType); _trace_handle (HandleType, Handle); _trace_smallint (RecNumber); _trace_string (SqlState, SQL_NTS, NULL, TRACE_OUTPUT_SUCCESS); _trace_integer_p (NativeErrorPtr, TRACE_OUTPUT_SUCCESS); _trace_string (MessageText, BufferLength, TextLengthPtr, TRACE_OUTPUT_SUCCESS); _trace_stringlen ("SQLSMALLINT", BufferLength); _trace_smallint_p (TextLengthPtr, trace_leave); } void trace_SQLGetDiagRecW (int trace_leave, int retcode, SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT RecNumber, SQLWCHAR * SqlState, SQLINTEGER * NativeErrorPtr, SQLWCHAR * MessageText, SQLSMALLINT BufferLength, SQLSMALLINT * TextLengthPtr) { /* Trace function */ _trace_print_function (en_GetDiagRecW, trace_leave, retcode); /* Trace Arguments */ _trace_handletype (HandleType); _trace_handle (HandleType, Handle); _trace_smallint (RecNumber); _trace_string_w (SqlState, SQL_NTS, NULL, TRACE_OUTPUT_SUCCESS); _trace_integer_p (NativeErrorPtr, TRACE_OUTPUT_SUCCESS); _trace_string_w (MessageText, BufferLength, TextLengthPtr, TRACE_OUTPUT_SUCCESS); _trace_stringlen ("SQLSMALLINT", BufferLength); _trace_smallint_p (TextLengthPtr, TRACE_OUTPUT_SUCCESS); } #endif libiodbc-3.52.16/iodbc/trace/GetConnectOption.c0000664000175000017500000001171314424170750016135 00000000000000/* * GetConnectOption.c * * $Id$ * * SQLGetConnectOption trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void _trace_connopt_type (SQLUSMALLINT type) { char *ptr = "unknown connection attribute"; switch (type) { _S (SQL_ACCESS_MODE); _S (SQL_AUTOCOMMIT); _S (SQL_CURRENT_QUALIFIER); _S (SQL_LOGIN_TIMEOUT); _S (SQL_ODBC_CURSORS); _S (SQL_OPT_TRACE); _S (SQL_OPT_TRACEFILE); _S (SQL_PACKET_SIZE); _S (SQL_QUIET_MODE); _S (SQL_TRANSLATE_DLL); _S (SQL_TRANSLATE_OPTION); _S (SQL_TXN_ISOLATION); /* 2.0 Driver Manager also allows statement options at this time */ _S (SQL_ASYNC_ENABLE); _S (SQL_BIND_TYPE); _S (SQL_CONCURRENCY); _S (SQL_CURSOR_TYPE); _S (SQL_KEYSET_SIZE); _S (SQL_MAX_LENGTH); _S (SQL_MAX_ROWS); _S (SQL_NOSCAN); _S (SQL_QUERY_TIMEOUT); _S (SQL_RETRIEVE_DATA); _S (SQL_ROWSET_SIZE); _S (SQL_SIMULATE_CURSOR); _S (SQL_USE_BOOKMARKS); } trace_emit ("\t\t%-15.15s %d (%s)\n", "SQLUSMALLINT ", (int) type, ptr); } void trace_SQLGetConnectOption (int trace_leave, int retcode, SQLHDBC hdbc, SQLUSMALLINT fOption, SQLPOINTER pvParam) { /* Trace function */ _trace_print_function (en_GetConnectOption, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_DBC, hdbc); _trace_connopt_type (fOption); _trace_pointer (pvParam); } #if ODBCVER >= 0x0300 void trace_SQLGetConnectOptionW (int trace_leave, int retcode, SQLHDBC hdbc, SQLUSMALLINT fOption, SQLPOINTER pvParam) { /* Trace function */ _trace_print_function (en_GetConnectOptionW, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_DBC, hdbc); _trace_connopt_type (fOption); _trace_pointer (pvParam); } #endif libiodbc-3.52.16/iodbc/trace/PrimaryKeys.c0000664000175000017500000001147714424170750015201 00000000000000/* * PrimaryKeys.c * * $Id$ * * SQLPrimaryKeys trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void trace_SQLPrimaryKeys (int trace_leave, int retcode, SQLHSTMT hstmt, SQLCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLCHAR * szTableName, SQLSMALLINT cbTableName) { /* Trace function */ _trace_print_function (en_PrimaryKeys, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, hstmt); _trace_string (szTableQualifier, cbTableQualifier, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableQualifier); _trace_string (szTableOwner, cbTableOwner, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableOwner); _trace_string (szTableName, cbTableName, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableName); } #if ODBCVER >= 0x0300 void trace_SQLPrimaryKeysW (int trace_leave, int retcode, SQLHSTMT hstmt, SQLWCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLWCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLWCHAR * szTableName, SQLSMALLINT cbTableName) { /* Trace function */ _trace_print_function (en_PrimaryKeysW, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, hstmt); _trace_string_w (szTableQualifier, cbTableQualifier, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableQualifier); _trace_string_w (szTableOwner, cbTableOwner, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableOwner); _trace_string_w (szTableName, cbTableName, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableName); } #endif libiodbc-3.52.16/iodbc/trace/BulkOperations.c0000664000175000017500000000714014424170750015653 00000000000000/* * BulkOperations.c * * $Id$ * * SQLBulkOperations trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" #if ODBCVER >= 0x0300 void trace_SQLBulkOperations (int trace_leave, int retcode, SQLHSTMT StatementHandle, SQLUSMALLINT Operation) { /* Trace function */ _trace_print_function (en_BulkOperations, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, StatementHandle); _trace_setpos_oper (Operation); } #endif libiodbc-3.52.16/iodbc/trace/SpecialColumns.c0000664000175000017500000001367014424170750015640 00000000000000/* * SpecialColumns.c * * $Id$ * * SQLSpecialColumns trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void _trace_spcols_type (SQLUSMALLINT type) { char *ptr = "unknown column type"; switch (type) { _S (SQL_BEST_ROWID); _S (SQL_ROWVER); } trace_emit ("\t\t%-15.15s %d (%s)\n", "SQLUSMALLINT ", (int) type, ptr); } void _trace_spcols_scope (SQLUSMALLINT type) { char *ptr = "unknown scope"; switch (type) { _S (SQL_SCOPE_CURROW); _S (SQL_SCOPE_TRANSACTION); _S (SQL_SCOPE_SESSION); } trace_emit ("\t\t%-15.15s %d (%s)\n", "SQLUSMALLINT ", (int) type, ptr); } void _trace_spcols_null (SQLUSMALLINT type) { char *ptr = "unknown option"; switch (type) { _S (SQL_NO_NULLS); _S (SQL_NULLABLE); } trace_emit ("\t\t%-15.15s %d (%s)\n", "SQLUSMALLINT ", (int) type, ptr); } void trace_SQLSpecialColumns (int trace_leave, int retcode, SQLHSTMT hstmt, SQLUSMALLINT fColType, SQLCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLCHAR * szTableName, SQLSMALLINT cbTableName, SQLUSMALLINT fScope, SQLUSMALLINT fNullable) { /* Trace function */ _trace_print_function (en_SpecialColumns, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, hstmt); _trace_spcols_type (fColType); _trace_string (szTableQualifier, cbTableQualifier, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableQualifier); _trace_string (szTableOwner, cbTableOwner, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableOwner); _trace_string (szTableName, cbTableName, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableName); _trace_spcols_scope (fScope); _trace_spcols_null (fNullable); } #if ODBCVER >= 0x0300 void trace_SQLSpecialColumnsW (int trace_leave, int retcode, SQLHSTMT hstmt, SQLUSMALLINT fColType, SQLWCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLWCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLWCHAR * szTableName, SQLSMALLINT cbTableName, SQLUSMALLINT fScope, SQLUSMALLINT fNullable) { /* Trace function */ _trace_print_function (en_SpecialColumnsW, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, hstmt); _trace_spcols_type (fColType); _trace_string_w (szTableQualifier, cbTableQualifier, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableQualifier); _trace_string_w (szTableOwner, cbTableOwner, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableOwner); _trace_string_w (szTableName, cbTableName, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableName); _trace_spcols_scope (fScope); _trace_spcols_null (fNullable); } #endif libiodbc-3.52.16/iodbc/trace/FreeEnv.c0000664000175000017500000000672014424170750014247 00000000000000/* * FreeEnv.c * * $Id$ * * SQLFreeEnv trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void trace_SQLFreeEnv(int trace_leave, int retcode, SQLHENV henv) { /* Trace function */ _trace_print_function (en_FreeEnv, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_ENV, henv); } libiodbc-3.52.16/iodbc/trace/SetStmtOption.c0000664000175000017500000000713414424170750015511 00000000000000/* * SetStmtOption.c * * $Id$ * * SQLSetStmtOption trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void trace_SQLSetStmtOption (int trace_leave, int retcode, SQLHSTMT hstmt, SQLUSMALLINT fOption, SQLUINTEGER vParam) { /* Trace function */ _trace_print_function (en_SetStmtOption, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, hstmt); _trace_stmtopt_type (fOption); _trace_uinteger (vParam); } libiodbc-3.52.16/iodbc/trace/EndTran.c0000664000175000017500000000717114424170750014251 00000000000000/* * EndTran.c * * $Id$ * * SQLEndTran trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" #if ODBCVER >= 0x0300 void trace_SQLEndTran (int trace_leave, int retcode, SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT CompletionType) { /* Trace function */ _trace_print_function (en_EndTran, trace_leave, retcode); /* Trace Arguments */ _trace_handletype (HandleType); _trace_handle (HandleType, Handle); _trace_tran_completion (CompletionType); } #endif libiodbc-3.52.16/iodbc/trace/GetDescField.c0000664000175000017500000001415714424170750015202 00000000000000/* * GetDescField.c * * $Id$ * * SQLGetDescField trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" #if ODBCVER >= 0x0300 void _trace_descfield_type (SQLSMALLINT type) { char *ptr = "unknown field identifier"; switch (type) { _S (SQL_DESC_ALLOC_TYPE); _S (SQL_DESC_ARRAY_SIZE); _S (SQL_DESC_ARRAY_STATUS_PTR); _S (SQL_DESC_AUTO_UNIQUE_VALUE); _S (SQL_DESC_BASE_COLUMN_NAME); _S (SQL_DESC_BASE_TABLE_NAME); _S (SQL_DESC_BIND_OFFSET_PTR); _S (SQL_DESC_BIND_TYPE); _S (SQL_DESC_CASE_SENSITIVE); _S (SQL_DESC_CATALOG_NAME); _S (SQL_DESC_CONCISE_TYPE); _S (SQL_DESC_COUNT); _S (SQL_DESC_DATA_PTR); _S (SQL_DESC_DATETIME_INTERVAL_CODE); _S (SQL_DESC_DATETIME_INTERVAL_PRECISION); _S (SQL_DESC_DISPLAY_SIZE); _S (SQL_DESC_FIXED_PREC_SCALE); _S (SQL_DESC_INDICATOR_PTR); _S (SQL_DESC_LABEL); _S (SQL_DESC_LENGTH); _S (SQL_DESC_LITERAL_PREFIX); _S (SQL_DESC_LITERAL_SUFFIX); _S (SQL_DESC_LOCAL_TYPE_NAME); _S (SQL_DESC_MAXIMUM_SCALE); _S (SQL_DESC_MINIMUM_SCALE); _S (SQL_DESC_NAME); _S (SQL_DESC_NULLABLE); _S (SQL_DESC_NUM_PREC_RADIX); _S (SQL_DESC_OCTET_LENGTH); _S (SQL_DESC_OCTET_LENGTH_PTR); _S (SQL_DESC_PARAMETER_TYPE); _S (SQL_DESC_PRECISION); _S (SQL_DESC_ROWS_PROCESSED_PTR); _S (SQL_DESC_SCALE); _S (SQL_DESC_SCHEMA_NAME); _S (SQL_DESC_SEARCHABLE); _S (SQL_DESC_TABLE_NAME); _S (SQL_DESC_TYPE); _S (SQL_DESC_TYPE_NAME); _S (SQL_DESC_UNNAMED); _S (SQL_DESC_UNSIGNED); _S (SQL_DESC_UPDATABLE); #if (ODBCVER >= 0x0350) _S (SQL_DESC_ROWVER); #endif } trace_emit ("\t\t%-15.15s %d (%s)\n", "SQLUSMALLINT ", (int) type, ptr); } void trace_SQLGetDescField (int trace_leave, int retcode, SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER ValuePtr, SQLINTEGER BufferLength, SQLINTEGER * StringLengthPtr) { /* Trace function */ _trace_print_function (en_GetDescField, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_DESC, DescriptorHandle); _trace_smallint (RecNumber); _trace_descfield_type (FieldIdentifier); _trace_pointer (ValuePtr); _trace_bufferlen (BufferLength); _trace_integer_p (StringLengthPtr, TRACE_OUTPUT_SUCCESS); } void trace_SQLGetDescFieldW (int trace_leave, int retcode, SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER ValuePtr, SQLINTEGER BufferLength, SQLINTEGER * StringLengthPtr) { /* Trace function */ _trace_print_function (en_GetDescFieldW, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_DESC, DescriptorHandle); _trace_smallint (RecNumber); _trace_descfield_type (FieldIdentifier); _trace_pointer (ValuePtr); _trace_bufferlen (BufferLength); _trace_integer_p (StringLengthPtr, TRACE_OUTPUT_SUCCESS); } #endif libiodbc-3.52.16/iodbc/trace/ExecDirect.c0000664000175000017500000001004114424170750014723 00000000000000/* * ExecDirect.c * * $Id$ * * SQLExecDirect trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void trace_SQLExecDirect (int trace_leave, int retcode, SQLHSTMT hstmt, SQLCHAR * szSqlStr, SQLINTEGER cbSqlStr) { /* Trace function */ _trace_print_function (en_ExecDirect, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, hstmt); _trace_string (szSqlStr, cbSqlStr, NULL, TRACE_INPUT); _trace_stringlen ("SQLINTEGER", cbSqlStr); } #if ODBCVER >= 0x0300 void trace_SQLExecDirectW (int trace_leave, int retcode, SQLHSTMT hstmt, SQLWCHAR * szSqlStr, SQLINTEGER cbSqlStr) { /* Trace function */ _trace_print_function (en_ExecDirectW, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, hstmt); _trace_string_w (szSqlStr, cbSqlStr, NULL, TRACE_INPUT); _trace_stringlen ("SQLINTEGER", cbSqlStr); } #endif libiodbc-3.52.16/iodbc/trace/FreeHandle.c0000664000175000017500000000707214424170750014713 00000000000000/* * FreeHandle.c * * $Id$ * * SQLFreeHandle trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" #if ODBCVER >= 0x0300 void trace_SQLFreeHandle (int trace_leave, int retcode, SQLSMALLINT HandleType, SQLHANDLE Handle) { /* Trace function */ _trace_print_function (en_FreeHandle, trace_leave, retcode); /* Trace Arguments */ _trace_handletype (HandleType); _trace_handle (HandleType, Handle); } #endif libiodbc-3.52.16/iodbc/trace/ForeignKeys.c0000664000175000017500000001400614424170750015136 00000000000000/* * ForeignKeys.c * * $Id$ * * SQLForeignKeys trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void trace_SQLForeignKeys (int trace_leave, int retcode, SQLHSTMT hstmt, SQLCHAR * szPkTableQualifier, SQLSMALLINT cbPkTableQualifier, SQLCHAR * szPkTableOwner, SQLSMALLINT cbPkTableOwner, SQLCHAR * szPkTableName, SQLSMALLINT cbPkTableName, SQLCHAR * szFkTableQualifier, SQLSMALLINT cbFkTableQualifier, SQLCHAR * szFkTableOwner, SQLSMALLINT cbFkTableOwner, SQLCHAR * szFkTableName, SQLSMALLINT cbFkTableName) { /* Trace function */ _trace_print_function (en_ForeignKeys, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, hstmt); _trace_string (szPkTableQualifier, cbPkTableQualifier, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbPkTableQualifier); _trace_string (szPkTableOwner, cbPkTableOwner, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbPkTableOwner); _trace_string (szPkTableName, cbPkTableName, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbPkTableName); _trace_string (szFkTableQualifier, cbFkTableQualifier, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbFkTableQualifier); _trace_string (szFkTableOwner, cbFkTableOwner, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbFkTableOwner); _trace_string (szFkTableName, cbFkTableName, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbFkTableName); } #if ODBCVER >= 0x0300 void trace_SQLForeignKeysW (int trace_leave, int retcode, SQLHSTMT hstmt, SQLWCHAR * szPkTableQualifier, SQLSMALLINT cbPkTableQualifier, SQLWCHAR * szPkTableOwner, SQLSMALLINT cbPkTableOwner, SQLWCHAR * szPkTableName, SQLSMALLINT cbPkTableName, SQLWCHAR * szFkTableQualifier, SQLSMALLINT cbFkTableQualifier, SQLWCHAR * szFkTableOwner, SQLSMALLINT cbFkTableOwner, SQLWCHAR * szFkTableName, SQLSMALLINT cbFkTableName) { /* Trace function */ _trace_print_function (en_ForeignKeysW, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, hstmt); _trace_string_w (szPkTableQualifier, cbPkTableQualifier, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbPkTableQualifier); _trace_string_w (szPkTableOwner, cbPkTableOwner, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbPkTableOwner); _trace_string_w (szPkTableName, cbPkTableName, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbPkTableName); _trace_string_w (szFkTableQualifier, cbFkTableQualifier, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbFkTableQualifier); _trace_string_w (szFkTableOwner, cbFkTableOwner, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbFkTableOwner); _trace_string_w (szFkTableName, cbFkTableName, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbFkTableName); } #endif libiodbc-3.52.16/iodbc/trace/BindParameter.c0000664000175000017500000001015614424170750015430 00000000000000/* * BindParameter.c * * $Id$ * * SQLBindParameter trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void trace_SQLBindParameter (int trace_leave, int retcode, SQLHSTMT StatementHandle, SQLUSMALLINT ParameterNumber, SQLSMALLINT InputOutputType, SQLSMALLINT ValueType, SQLSMALLINT ParameterType, SQLUINTEGER ColumnSize, SQLSMALLINT DecimalDigits, SQLPOINTER ParameterValuePtr, SQLLEN BufferLength, SQLLEN * Strlen_or_IndPtr) { /* Trace function */ _trace_print_function (en_BindParameter, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, StatementHandle); _trace_smallint (ParameterNumber); _trace_inouttype (InputOutputType); _trace_c_type (ValueType); _trace_sql_type (ParameterType); _trace_uinteger (ColumnSize); _trace_smallint (DecimalDigits); _trace_pointer (ParameterValuePtr); _trace_len (BufferLength); _trace_len_p (Strlen_or_IndPtr, 0); /* just display pointer */ } libiodbc-3.52.16/iodbc/trace/Info.c0000664000175000017500000010657714424170750013623 00000000000000/* * Info.c * * $Id$ * * Decode the SQLGetInfo responses and dump them to the trace log * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" /* * Internal macros to decode the various GetInfo return values */ #define I_STR(T) case T: \ infoname = #T; \ if (output) \ goto print_string; \ break #define I_INT16(T) case T: \ infoname = #T; \ if (output) \ goto print_int16; \ break #define I_INT32(T) case T: \ infoname = #T; \ if (output) \ goto print_int32; \ break #define I_MASK(T) case T: \ infoname = #T; \ mask = _mask_##T; \ elem = NUM_ELEM(_mask_##T); \ if (output) \ goto print_mask; \ break #define I_MASK1(T, O) case T: \ infoname = #T; \ mask = _mask_##O; \ elem = NUM_ELEM(_mask_##O); \ if (output) \ goto print_mask; \ break #define I_SVAL(T) case T: \ infoname = #T; \ mask = _mask_##T; \ elem = NUM_ELEM(_mask_##T); \ if (output) \ goto print_svalue; \ break #define I_SVAL1(T,O) case T: \ infoname = #T; \ mask = _mask_##O; \ elem = NUM_ELEM(_mask_##O); \ if (output) \ goto print_svalue; \ break #define MASK(X) char * _mask_##X[] #define NUM_ELEM(X) (sizeof(X) / sizeof(X[0])) /* * Various bitmask strings */ static MASK (SQL_AGGREGATE_FUNCTIONS) = { "SQL_AF_UNKNOWN", "SQL_AF_AVG", "SQL_AF_COUNT", "SQL_AF_MAX", "SQL_AF_MIN", "SQL_AF_SUM" "SQL_AF_DISTINCT", "SQL_AF_ALL" }; static MASK (SQL_ALTER_DOMAIN) = { "SQL_AD_CONSTRAINT_UNKNOWN", "SQL_AD_CONSTRAINT_NAME_DEFINITION", "SQL_AD_ADD_DOMAIN_CONSTRAINT", "SQL_AD_DROP_DOMAIN_CONSTRAINT", "SQL_AD_ADD_DOMAIN_DEFAULT", "SQL_AD_DROP_DOMAIN_DEFAULT", "SQL_AD_ADD_CONSTRAINT_INITIALLY_DEFERRED", "SQL_AD_ADD_CONSTRAINT_INITIALLY_IMMEDIATE", "SQL_AD_ADD_CONSTRAINT_DEFERRABLE", "SQL_AD_ADD_CONSTRAINT_NON_DEFERRABLE" }; static MASK (SQL_ALTER_TABLE) = { "SQL_AT_UNKNOWN", "SQL_AT_ADD_COLUMN", "SQL_AT_DROP_COLUMN", "SQL_AT_UNKNOWN_BIT_3", "SQL_AT_ADD_CONSTRAINT", "SQL_AT_UNKNOWN_BIT_5", "SQL_AT_ADD_COLUMN_SINGLE", "SQL_AT_ADD_COLUMN_DEFAULT", "SQL_AT_ADD_COLUMN_COLLATION", "SQL_AT_SET_COLUMN_DEFAULT", "SQL_AT_DROP_COLUMN_DEFAULT", "SQL_AT_DROP_COLUMN_CASCADE", "SQL_AT_DROP_COLUMN_RESTRICT", "SQL_AT_ADD_TABLE_CONSTRAINT", "SQL_AT_DROP_TABLE_CONSTRAINT_CASCADE", "SQL_AT_DROP_TABLE_CONSTRAINT_RESTRICT", "SQL_AT_CONSTRAINT_NAME_DEFINITION", "SQL_AT_CONSTRAINT_INITIALLY_DEFERRED", "SQL_AT_CONSTRAINT_INITIALLY_IMMEDIATE", "SQL_AT_CONSTRAINT_DEFERRABLE", "SQL_AT_CONSTRAINT_NON_DEFERRABLE" }; static MASK (SQL_ASYNC_MODE) = { "SQL_AM_NONE", "SQL_AM_CONNECTION", "SQL_AM_STATEMENT" }; static MASK (SQL_BATCH_ROW_COUNT) = { "SQL_BRC_UNKNOWN", "SQL_BRC_PROCEDURES", "SQL_BRC_EXPLICIT", "SQL_BRC_ROLLED_UP" }; static MASK (SQL_BATCH_SUPPORT) = { "SQL_BS_UNKNOWN", "SQL_BS_SELECT_EXPLICIT", "SQL_BS_ROW_COUNT_EXPLICIT", "SQL_BS_SELECT_PROC", "SQL_BS_ROW_COUNT_PROC" }; static MASK (SQL_BOOKMARK_PERSISTENCE) = { "SQL_BP_UNKNOWN", "SQL_BP_CLOSE", "SQL_BP_DELETE", "SQL_BP_DROP", "SQL_BP_TRANSACTION", "SQL_BP_UPDATE", "SQL_BP_OTHER_HSTMT", "SQL_BP_SCROLL" }; static MASK (SQL_CATALOG_LOCATION) = { "SQL_CL_UNKNOWN", "SQL_CL_START", "SQL_CL_END" }; static MASK (SQL_CATALOG_USAGE) = { "SQL_CU_UNKNOWN", "SQL_CU_DML_STATEMENTS", "SQL_CU_PROCEDURE_INVOCATION", "SQL_CU_TABLE_DEFINITION", "SQL_CU_INDEX_DEFINITION", "SQL_CU_PRIVILEGE_DEFINITION" }; static MASK (SQL_CONCAT_NULL_BEHAVIOR) = { "SQL_CB_NULL", "SQL_CB_NON_NULL" }; static MASK (CONVERT) = { "SQL_CVT_UNKNOWN", "SQL_CVT_CHAR", "SQL_CVT_NUMERIC", "SQL_CVT_DECIMAL", "SQL_CVT_INTEGER", "SQL_CVT_SMALLINT", "SQL_CVT_FLOAT", "SQL_CVT_REAL", "SQL_CVT_DOUBLE", "SQL_CVT_VARCHAR", "SQL_CVT_LONGVARCHAR", "SQL_CVT_BINARY", "SQL_CVT_VARBINARY", "SQL_CVT_BIT", "SQL_CVT_TINYINT", "SQL_CVT_BIGINT", "SQL_CVT_DATE", "SQL_CVT_TIME", "SQL_CVT_TIMESTAMP", "SQL_CVT_LONGVARBINARY", "SQL_CVT_INTERVAL_YEAR_MONTH", "SQL_CVT_INTERVAL_DAY_TIME", "SQL_CVT_WCHAR", "SQL_CVT_WLONGVARCHAR", "SQL_CVT_WVARCHAR" }; static MASK (SQL_CONVERT_FUNCTIONS) = { "SQL_FN_CVT_UNKNOWN", "SQL_FN_CVT_CONVERT", "SQL_FN_CVT_CAST" }; static MASK (SQL_CORRELATION_NAME) = { "SQL_CN_NONE", "SQL_CN_DIFFERENT", "SQL_CN_ANY" }; static MASK (SQL_CREATE_ASSERTION) = { "SQL_CA_UNKNOWN", "SQL_CA_CREATE_ASSERTION", "SQL_CA_UNKNOWN_BIT 2", "SQL_CA_UNKNOWN_BIT 3", "SQL_CA_UNKNOWN_BIT 4", "SQL_CA_CONSTRAINT_INITIALLY_DEFERRED", "SQL_CA_CONSTRAINT_INITIALLY_IMMEDIATE", "SQL_CA_CONSTRAINT_DEFERRABLE", "SQL_CA_CONSTRAINT_NON_DEFERRABLE" }; static MASK (SQL_CREATE_CHARACTER_SET) = { "SQL_CSS_UNKNOWN", "SQL_CSS_CREATE_CHARACTER_SET", "SQL_CSS_COLLATE_CLAUSE", "SQL_CSS_LIMITED_COLLATION" }; static MASK (SQL_CREATE_COLLATION) = { "SQL_CCOL_UNKNOWN", "SQL_CCOL_CREATE_COLLATION" }; static MASK (SQL_CREATE_DOMAIN) = { "SQL_CDO_UNKNOWN", "SQL_CDO_CREATE_DOMAIN", "SQL_CDO_DEFAULT", "SQL_CDO_CONSTRAINT", "SQL_CDO_COLLATION", "SQL_CDO_CONSTRAINT_NAME_DEFINITION", "SQL_CDO_CONSTRAINT_INITIALLY_DEFERRED", "SQL_CDO_CONSTRAINT_INITIALLY_IMMEDIATE", "SQL_CDO_CONSTRAINT_DEFERRABLE", "SQL_CDO_CONSTRAINT_NON_DEFERRABLE" }; static MASK (SQL_CREATE_SCHEMA) = { "SQL_CS_UNKNOWN", "SQL_CS_CREATE_SCHEMA", "SQL_CS_AUTHORIZATION", "SQL_CS_DEFAULT_CHARACTER_SET" }; static MASK (SQL_CREATE_TABLE) = { "SQL_CT_UNKNOWN", "SQL_CT_CREATE_TABLE", "SQL_CT_COMMIT_PRESERVE", "SQL_CT_COMMIT_DELETE", "SQL_CT_GLOBAL_TEMPORARY", "SQL_CT_LOCAL_TEMPORARY", "SQL_CT_CONSTRAINT_INITIALLY_DEFERRED", "SQL_CT_CONSTRAINT_INITIALLY_IMMEDIATE", "SQL_CT_CONSTRAINT_DEFERRABLE", "SQL_CT_CONSTRAINT_NON_DEFERRABLE", "SQL_CT_COLUMN_CONSTRAINT", "SQL_CT_COLUMN_DEFAULT", "SQL_CT_COLUMN_COLLATION", "SQL_CT_TABLE_CONSTRAINT", "SQL_CT_CONSTRAINT_NAME_DEFINITION" }; static MASK (SQL_CREATE_TRANSLATION) = { "SQL_CTR_UNKNOWN", "SQL_CTR_CREATE_TRANSLATION" }; static MASK (SQL_CREATE_VIEW) = { "SQL_CV_UNKNOWN", "SQL_CV_CREATE_VIEW", "SQL_CV_CHECK_OPTION", "SQL_CV_CASCADED", "SQL_CV_LOCAL" }; static MASK (CURSOR_BEHAVIOR) = { "SQL_CB_DELETE", "SQL_CB_CLOSE", "SQL_CB_PRESERVE" }; static MASK (SQL_CURSOR_SENSITIVITY) = { "SQL_UNSPECIFIED", "SQL_INSENSITIVE", "SQL_SENSITIVE" }; static MASK (SQL_DATETIME_LITERALS) = { "SQL_DL_SQL92_DATE", "SQL_DL_SQL92_TIME", "SQL_DL_SQL92_TIMESTAMP", "SQL_DL_SQL92_INTERVAL_YEAR", "SQL_DL_SQL92_INTERVAL_MONTH", "SQL_DL_SQL92_INTERVAL_DAY", "SQL_DL_SQL92_INTERVAL_HOUR", "SQL_DL_SQL92_INTERVAL_MINUTE", "SQL_DL_SQL92_INTERVAL_SECOND", "SQL_DL_SQL92_INTERVAL_YEAR_TO_MONTH", "SQL_DL_SQL92_INTERVAL_DAY_TO_HOUR", "SQL_DL_SQL92_INTERVAL_DAY_TO_MINUTE", "SQL_DL_SQL92_INTERVAL_DAY_TO_SECOND", "SQL_DL_SQL92_INTERVAL_HOUR_TO_MINUTE", "SQL_DL_SQL92_INTERVAL_HOUR_TO_SECOND", "SQL_DL_SQL92_INTERVAL_MINUTE_TO_SECOND" }; static MASK (SQL_DDL_INDEX) = { "SQL_DI_UNKNOWN", "SQL_DI_CREATE_INDEX", "SQL_DI_DROP_INDEX" }; static MASK (SQL_DROP_ASSERTION) = { "SQL_DA_UNKNOWN", "SQL_DA_DROP_ASSERTION" }; static MASK (SQL_DROP_CHARACTER_SET) = { "SQL_DCS_UNKNOWN", "SQL_DCS_DROP_CHARACTER_SET" }; static MASK (SQL_DROP_COLLATION) = { "SQL_DC_UNKNOWN", "SQL_DC_DROP_COLLATION" }; static MASK (SQL_DROP_DOMAIN) = { "SQL_DD_UNKNOWN", "SQL_DD_DROP_DOMAIN", "SQL_DD_RESTRICT", "SQL_DD_CASCASE" }; static MASK (SQL_DROP_SCHEMA) = { "SQL_DS_UNKNOWN", "SQL_DS_DROP_SCHEMA", "SQL_DS_RESTRICT", "SQL_DS_CASCADE" }; static MASK (SQL_DROP_TABLE) = { "SQL_DT_UNKNOWN", "SQL_DT_DROP_TABLE", "SQL_DT_RESTRICT", "SQL_DT_CASCADE" }; static MASK (SQL_DROP_TRANSLATION) = { "SQL_DTR_UNKNOWN", "SQL_DTR_DROP_TRANSLATION" }; static MASK (SQL_DROP_VIEW) = { "SQL_DV_UNKNOWN", "SQL_DV_DROP_TABLE", "SQL_DV_RESTRICT", "SQL_DV_CASCADE" }; static MASK (CURSOR_ATTRIBUTES1) = { "SQL_CA1_UNKNOWN", "SQL_CA1_NEXT", "SQL_CA1_ABSOLUTE", "SQL_CA1_RELATIVE", "SQL_CA1_BOOKMARK", "SQL_CA1_UNKNOWN_BIT 5", "SQL_CA1_UNKNOWN_BIT 6", "SQL_CA1_LOCK_NO_CHANGE", "SQL_CA1_LOCK_EXCLUSIVE", "SQL_CA1_LOCK_UNLOCK", "SQL_CA1_POS_POSITION", "SQL_CA1_POS_UPDATE", "SQL_CA1_POS_DELETE", "SQL_CA1_POS_REFRESH", "SQL_CA1_POSITIONED_UPDATE", "SQL_CA1_POSITIONED_DELETE", "SQL_CA1_SELECT_FOR_UPDATE", "SQL_CA1_BULK_ADD", "SQL_CA1_BULK_UPDATE_BY_BOOKMARK", "SQL_CA1_BULK_DELETE_BY_BOOKMARK", "SQL_CA1_BULK_FETCH_BY_BOOKMARK" }; static MASK (CURSOR_ATTRIBUTES2) = { "SQL_CA2_UNKNOWN", "SQL_CA2_READ_ONLY_CONCURRENCY", "SQL_CA2_LOCK_CONCURRENCY", "SQL_CA2_OPT_ROWVER_CONCURRENCY", "SQL_CA2_OPT_VALUES_CONCURRENCY", "SQL_CA2_SENSITIVITY_ADDITIONS", "SQL_CA2_SENSITIVITY_DELETIONS", "SQL_CA2_SENSITIVITY_UPDATES", "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", "SQL_CA2_CRC_EXACT", "SQL_CA2_CRC_APPROXIMATE", "SQL_CA2_SIMULATE_NON_UNIQUE", "SQL_CA2_SIMULATE_TRY_UNIQUE", "SQL_CA2_SIMULATE_UNIQUE" }; static MASK (SQL_INDEX_KEYWORDS) = { "SQL_IK_NONE", "SQL_IK_ASC", "SQL_IK_DESC" }; static MASK (SQL_INFO_SCHEMA_VIEWS) = { "SQL_ISV_UNKNOWN", "SQL_ISV_ASSERTIONS", "SQL_ISV_CHARACTER_SETS", "SQL_ISV_CHECK_CONSTRAINTS", "SQL_ISV_COLLATIONS", "SQL_ISV_COLUMN_DOMAIN_USAGE", "SQL_ISV_COLUMN_PRIVILEGES", "SQL_ISV_COLUMNS", "SQL_ISV_CONSTRAINT_COLUMN_USAGE", "SQL_ISV_CONSTRAINT_TABLE_USAGE", "SQL_ISV_DOMAIN_CONSTRAINTS", "SQL_ISV_DOMAINS", "SQL_ISV_KEY_COLUMN_USAGE", "SQL_ISV_REFERENTIAL_CONSTRAINTS", "SQL_ISV_SCHEMATA", "SQL_ISV_SQL_LANGUAGES", "SQL_ISV_TABLE_CONSTRAINTS", "SQL_ISV_TABLE_PRIVILEGES", "SQL_ISV_TABLES", "SQL_ISV_TRANSLATIONS", "SQL_ISV_USAGE_PRIVILEGES", "SQL_ISV_VIEW_COLUMN_USAGE", "SQL_ISV_VIEW_TABLE_USAGE", "SQL_ISV_VIEWS" }; static MASK (SQL_INSERT_STATEMENT) = { "SQL_IS_UNKNOWN", "SQL_IS_INSERT_LITERALS", "SQL_IS_INSERT_SEARCHED", "SQL_IS_SELECT_INTO" }; static MASK (SQL_DTC_TRANSITION_COST) = { "SQL_DTC_UNKNOWN", "SQL_DTC_ENLIST_EXPENSIVE", "SQL_DTC_UNENLIST_EXPENSIVE" }; static MASK (TXN_ISOLATION) = { "SQL_TXN_UNKNOWN", "SQL_TXN_READ_UNCOMMITTED", "SQL_TXN_READ_COMMITTED", "SQL_TXN_REPEATABLE_READ", "SQL_TXN_SERIALIZABLE", "SQL_TXN_VERSIONING" }; static MASK (SQL_FETCH_DIRECTION) = { "SQL_FD_FETCH_UNKNOWN", "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_RESUME", "SQL_FD_FETCH_BOOKMARK" }; static MASK (SQL_FILE_USAGE) = { "SQL_FILE_NOT_SUPPORTED", "SQL_FILE_TABLE", "SQL_FILE_QUALIFIER" }; static MASK (SQL_GETDATA_EXTENSIONS) = { "SQL_GD_UNKNOWN", "SQL_GD_ANY_COLUMN", "SQL_GD_ANY_ORDER", "SQL_GD_BLOCK", "SQL_GD_BOUND" }; static MASK (SQL_GROUP_BY) = { "SQL_GB_NOT_SUPPORTED", "SQL_GB_GROUP_BY_EQUALS_SELECT", "SQL_GB_GROUP_BY_CONTAINS_SELECT", "SQL_GB_NO_RELATION" }; static MASK (IDENTIFIER_CASE) = { "SQL_IC_UNKNOWN", "SQL_IC_UPPER", "SQL_IC_LOWER", "SQL_IC_SENSITIVE", "SQL_IC_MIXED" }; static MASK (SQL_LOCK_TYPES) = { "SQL_LCK_UNKNOWN", "SQL_LCK_NO_CHANGE", "SQL_LCK_EXCLUSIVE", "SQL_LCK_UNLOCK" }; static MASK (SQL_NON_NULLABLE_COLUMNS) = { "SQL_NNC_NULL", "SQL_NNC_NON_NULL" }; static MASK (SQL_NULL_COLLATION) = { "SQL_NC_HIGH", "SQL_NC_LOW", "SQL_NC_START" "SQL_NC_END", }; static MASK (SQL_NUMERIC_FUNCTIONS) = { "SQL_FN_UNKNOWN", "SQL_FN_NUM_ABS", "SQL_FN_NUM_ACOS", "SQL_FN_NUM_ASIN", "SQL_FN_NUM_ATAN", "SQL_FN_NUM_ATAN2", "SQL_FN_NUM_CEILING", "SQL_FN_NUM_COS", "SQL_FN_NUM_COT", "SQL_FN_NUM_EXP", "SQL_FN_NUM_FLOOR", "SQL_FN_NUM_LOG", "SQL_FN_NUM_MOD", "SQL_FN_NUM_SIGN", "SQL_FN_NUM_SIN", "SQL_FN_NUM_SQRT", "SQL_FN_NUM_TAN", "SQL_FN_NUM_PI", "SQL_FN_NUM_RAND", "SQL_FN_NUM_DEGREES", "SQL_FN_NUM_LOG10", "SQL_FN_NUM_POWER", "SQL_FN_NUM_RADIANS", "SQL_FN_NUM_ROUND", "SQL_FN_NUM_TRUNCATE" }; static MASK (SQL_ODBC_API_CONFORMANCE) = { "SQL_OAC_NONE", "SQL_OAC_LEVEL1", "SQL_OAC_LEVEL2" }; static MASK (SQL_ODBC_INTERFACE_CONFORMANCE) = { "SQL_OIC_UNKNOWN", "SQL_OAC_CORE", "SQL_OAC_LEVEL1", "SQL_OAC_LEVEL2" }; static MASK (SQL_ODBC_SAG_CLI_CONFORMANCE) = { "SQL_OSCC_NOT_COMPLIANT", "SQL_OSCC_COMPLIANT" }; static MASK (SQL_ODBC_SQL_CONFORMANCE) = { "SQL_OSC_MINIMUM", "SQL_OSC_CORE", "SQL_OSC_EXTENDED" }; static MASK (SQL_OJ_CAPABILITIES) = { "SQL_OJ_UNKNOWN", "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 (ODBCVER < 0x0300) static MASK (SQL_OWNER_USAGE) = { "SQL_OU_UNKNOWN", "SQL_OU_DML_STATEMENTS", "SQL_OU_PROCEDURE_INVOCATION", "SQL_OU_TABLE_DEFINITION", "SQL_OU_INDEX_DEFINITION", "SQL_OU_PRIVILEGE_DEFINITION" }; #endif static MASK (SQL_PARAM_ARRAY_ROW_COUNTS) = { "SQL_PARC_UNKNOWN", "SQL_PARC_BATCH", "SQL_PARC_NOBATCH" }; static MASK (SQL_PARAM_ARRAY_SELECTS) = { "SQL_PAS_UNKNOWN", "SQL_PAS_BATCH", "SQL_PAS_NO_BATCH", "SQL_PAS_NO_SELECT" }; static MASK (SQL_POSITIONED_STATEMENTS) = { "SQL_PS_UNKNOWN", "SQL_PS_POSITIONED_DELETE", "SQL_PS_POSITIONED_UPDATE", "SQL_PS_SELECT_FOR_UPDATE" }; static MASK (SQL_POS_OPERATIONS) = { "SQL_POS_UNKNOWN", "SQL_POS_POSITION", "SQL_POS_REFRESH", "SQL_POS_UPDATE", "SQL_POS_DELETE", "SQL_POS_ADD" }; #if (ODBCVER < 0x0300) static MASK (SQL_QUALIFIER_LOCATION) = { "SQL_QL_UNKNOWN", "SQL_QL_START", "SQL_QL_END" }; #endif #if (ODBCVER < 0x0300) static MASK (SQL_QUALIFIER_USAGE) = { "SQL_QU_UNKNOWN", "SQL_QU_DML_STATEMENTS", "SQL_QU_PROCEDURE_INVOCATION", "SQL_QU_TABLE_DEFINITION", "SQL_QU_INDEX_DEFINITION", "SQL_QU_PRIVILEGE_DEFINITION" }; #endif static MASK (SQL_SCHEMA_USAGE) = { "SQL_SU_UNKNOWN", "SQL_SU_DML_STATEMENTS", "SQL_SU_PROCEDURE_INVOCATION", "SQL_SU_TABLE_DEFINITION", "SQL_SU_INDEX_DEFINITION", "SQL_SU_PRIVILEGE_DEFINITION" }; static MASK (SQL_SCROLL_CONCURRENCY) = { "SQL_SCCO_UNKNOWN", "SQL_SCCO_READ_ONLY", "SQL_SCCO_LOCK", "SQL_SCCO_OPT_ROWVER", "SQL_SCCO_OPT_VALUES" }; static MASK (SQL_SCROLL_OPTIONS) = { "SQL_SO_UNKNOWN", "SQL_SO_FORWARD_ONLY", "SQL_SO_KEYSET_DRIVEN", "SQL_SO_DYNAMIC", "SQL_SO_MIXED", "SQL_SO_STATIC" }; static MASK (SQL_SQL_CONFORMANCE) = { "SQL_SC_UINKNOWN", "SQL_SC_SQL92_ENTRY", "SQL_SC_FIPS127_2_TRANSITIONAL", "SQL_SC_SQL92_INTERMEDIATE", "SQL_SC_SQL92_FULL" }; static MASK (SQL_SQL92_DATETIME_FUNCTIONS) = { "SQL_SDF_UNKNOWN", "SQL_SDF_CURRENT_DATE", "SQL_SDF_CURRENT_TIME", "SQL_SDF_CURRENT_TIMESTAMP" }; static MASK (SQL_SQL92_FOREIGN_KEY_DELETE_RULE) = { "SQL_SFKD_UNKNOWN", "SQL_SFKD_CASCADE", "SQL_SFKD_NO_ACTION", "SQL_SFKD_SET_DEFAULT", "SQL_SFKD_SET_NULL" }; static MASK (SQL_SQL92_FOREIGN_KEY_UPDATE_RULE) = { "SQL_SFKU_UNKNOWN", "SQL_SFKU_CASCADE", "SQL_SFKU_NO_ACTION", "SQL_SFKU_SET_DEFAULT", "SQL_SFKU_SET_NULL" }; static MASK (SQL_SQL92_GRANT) = { "SQL_SG_UNKNOWN", "SQL_SG_USAGE_ON_DOMAIN", "SQL_SG_USAGE_ON_CHARACTER_SET", "SQL_SG_USAGE_ON_COLLATION", "SQL_SG_USAGE_ON_TRANSLATION", "SQL_SG_WITH_GRANT_OPTION", "SQL_SG_DELETE_TABLE", "SQL_SG_INSERT_TABLE", "SQL_SG_INSERT_COLUMN", "SQL_SG_REFERENCES_TABLE", "SQL_SG_REFERENCES_COLUMN", "SQL_SG_SELECT_TABLE", "SQL_SG_UPDATE_TABLE", "SQL_SG_UPDATE_COLUMN" }; static MASK (SQL_SQL92_NUMERIC_VALUE_FUNCTIONS) = { "SQL_SNVF_UNKNOWN", "SQL_SNVF_BIT_LENGTH", "SQL_SNVF_CHAR_LENGTH", "SQL_SNVF_CHARACTER_LENGTH", "SQL_SNVF_EXTRACT", "SQL_SNVF_OCTET_LENGTH", "SQL_SNVF_POSITION" }; static MASK (SQL_SQL92_PREDICATES) = { "SQL_SP_UNKNOWN", "SQL_SP_EXISTS", "SQL_SP_ISNOTNULL", "SQL_SP_ISNULL", "SQL_SP_MATCH_FULL", "SQL_SP_MATCH_PARTIAL", "SQL_SP_MATCH_UNIQUE_FULL", "SQL_SP_MATCH_UNIQUE_PARTIAL", "SQL_SP_OVERLAPS", "SQL_SP_UNIQUE", "SQL_SP_LIKE", "SQL_SP_IN", "SQL_SP_BETWEEN", "SQL_SP_COMPARISON", "SQL_SP_QUANTIFIED_COMPARISON" }; static MASK (SQL_SQL92_RELATIONAL_JOIN_OPERATORS) = { "SQL_SRJO_UNKOWN", "SQL_SRJO_CORRESPONDING_CLAUSE", "SQL_SRJO_CROSS_JOIN", "SQL_SRJO_EXCEPT_JOIN", "SQL_SRJO_FULL_OUTER_JOIN", "SQL_SRJO_INNER_JOIN", "SQL_SRJO_INTERSECT_JOIN", "SQL_SRJO_LEFT_OUTER_JOIN", "SQL_SRJO_NATURAL_JOIN", "SQL_SRJO_RIGHT_OUTER_JOIN", "SQL_SRJO_UNION_JOIN" }; static MASK (SQL_SQL92_REVOKE) = { "SQL_SR_UNKNOWN", "SQL_SR_USAGE_ON_DOMAIN", "SQL_SR_USAGE_ON_CHARACTER_SET", "SQL_SR_USAGE_ON_COLLATION", "SQL_SR_USAGE_ON_TRANSLATION", "SQL_SR_GRANT_OPTION_FOR", "SQL_SR_CASCADE", "SQL_SR_RESTRICT", "SQL_SR_DELETE_TABLE", "SQL_SR_INSERT_TABLE", "SQL_SR_INSERT_COLUMN", "SQL_SR_REFERENCES_TABLE", "SQL_SR_REFERENCES_COLUMN", "SQL_SR_SELECT_TABLE", "SQL_SR_UPDATE_TABLE", "SQL_SR_UPDATE_COLUMN" }; static MASK (SQL_SQL92_ROW_VALUE_CONSTRUCTOR) = { "SQL_SRVC_UNKOWN", "SQL_SRVC_VALUE_EXPRESSION", "SQL_SRVC_NULL", "SQL_SRVC_DEFAULT", "SQL_SRVC_ROW_SUBQUERY" }; static MASK (SQL_SQL92_STRING_FUNCTIONS) = { "SQL_SSF_UNKNOWN", "SQL_SSF_CONVERT", "SQL_SSF_LOWER", "SQL_SSF_UPPER", "SQL_SSF_SUBSTRING", "SQL_SSF_TRANSLATE", "SQL_SSF_TRIM_BOTH", "SQL_SSF_TRIM_LEADING", "SQL_SSF_TRIM_TRAILING" }; static MASK (SQL_SQL92_VALUE_EXPRESSIONS) = { "SQL_SVE_UNKNOWN", "SQL_SVE_CASE", "SQL_SVE_CAST", "SQL_SVE_COALESCE", "SQL_SVE_NULLIF" }; static MASK (SQL_STANDARD_CLI_CONFORMANCE) = { "SQL_SCC_UNKNOWN", "SQL_SCC_XOPEN_CLI_VERSION1", "SQL_SCC_ISO92_CLI", }; static MASK (SQL_STATIC_SENSITIVITY) = { "SQL_SS_UNKNOWN", "SQL_SS_ADDITIONS", "SQL_SS_DELETIONS", "SQL_SS_UPDATES" }; static MASK (SQL_STRING_FUNCTIONS) = { "SQL_FN_STR_UNKNOWN", "SQL_FN_STR_CONCAT", "SQL_FN_STR_INSERT", "SQL_FN_STR_LEFT", "SQL_FN_STR_LTRIM", "SQL_FN_STR_LENGTH", "SQL_FN_STR_LOCATE", "SQL_FN_STR_LCASE", "SQL_FN_STR_REPEAT", "SQL_FN_STR_REPLACE", "SQL_FN_STR_RIGHT", "SQL_FN_STR_RTRIM", "SQL_FN_STR_SUBSTRING", "SQL_FN_STR_UCASE ", "SQL_FN_STR_ASCII", "SQL_FN_STR_CHAR", "SQL_FN_STR_DIFFERENCE", "SQL_FN_STR_LOCATE_2", "SQL_FN_STR_SOUNDEX", "SQL_FN_STR_SPACE", "SQL_FN_BIT_LENGTH", "SQL_FN_STR_CHAR_LENGTH", "SQL_FN_STR_CARACTER_LENGTH", "SQL_FN_STR_OCTET_LENGTH", "SQL_FN_STR_POSITION" }; static MASK (SQL_SUBQUERIES) = { "SQL_SQ_UNKNOWN", "SQL_SQ_COMPARISON", "SQL_SQ_EXISTS", "SQL_SQ_IN", "SQL_SQ_QUANTIFIED", "SQL_SQ_CORRELATED_SUBQUERIES" }; static MASK (SQL_SYSTEM_FUNCTIONS) = { "SQL_FN_SYS_UNKNOWN", "SQL_FN_SYS_USERNAME", "SQL_FN_SYS_DBNAME", "SQL_FN_SYS_IFNULL" }; static MASK (TIMEDATE_INTERVALS) = { "SQL_FN_TSI_UNKNOWN", "SQL_FN_TSI_FRAC_SECOND", "SQL_FN_TSI_SECOND", "SQL_FN_TSI_MINUTE", "SQL_FN_TSI_HOUR", "SQL_FN_TSI_DAY", "SQL_FN_TSI_WEEK", "SQL_FN_TSI_MONTH", "SQL_FN_TSI_QUARTER", "SQL_FN_TSI_YEAR " }; static MASK (SQL_TIMEDATE_FUNCTIONS) = { "SQL_FN_TD_UNKNOWN", "SQL_FN_TD_NOW", "SQL_FN_TD_CURDATE", "SQL_FN_TD_DAYOFMONTH", "SQL_FN_TD_DAYOFWEEK", "SQL_FN_TD_DAYOFYEAR", "SQL_FN_TD_MONTH", "SQL_FN_TD_QUARTER", "SQL_FN_TD_WEEK", "SQL_FN_TD_YEAR", "SQL_FN_TD_CURTIME", "SQL_FN_TD_HOUR", "SQL_FN_TD_MINUTE", "SQL_FN_TD_SECOND", "SQL_FN_TD_TIMESTAMPADD", "SQL_FN_TD_TIMESTAMPDIFF", "SQL_FN_TD_DAYNAME", "SQL_FN_TD_MONTHNAME", "SQL_FN_TD_CURRENT_DATE", "SQL_FN_TD_CURRENT_TIME", "SQL_FN_TD_CURRENT_TIMESTAMP", "SQL_FN_TD_EXTRACT" }; static MASK (SQL_TXN_CAPABLE) = { "SQL_TC_NONE", "SQL_TC_DML", "SQL_TC_ALL", "SQL_TC_DDL_COMMIT", "SQL_TC_DDL_IGNORE", }; static MASK (SQL_UNION) = { "SQL_U_UNION_UNKNOWN", "SQL_U_UNION", "SQL_U_UNION_ALL" }; /* * Decode the various GetInfo return values and print them into the trace log */ static void _trace_getinfo ( SQLUSMALLINT fInfoType, SQLPOINTER rgbInfoValue, SQLSMALLINT cbInfoValueMax, SQLSMALLINT * pcbInfoValue, int output, char waMode) { char *infoname; char **mask; int elem; int i; cbInfoValueMax = cbInfoValueMax; /*UNUSED*/ pcbInfoValue = pcbInfoValue; /*UNUSED*/ /* * If the pointer is NULL, we have no information to decode, so * we just print the generic details. */ if (!rgbInfoValue) output = 0; switch (fInfoType) { /* * ODBC 1.0 */ I_STR (SQL_ACCESSIBLE_TABLES); I_STR (SQL_ACCESSIBLE_PROCEDURES); #if (ODBCVER < 0x0300) I_INT16 (SQL_ACTIVE_CONNECTIONS); /* 3.0: SQL_MAX_DRIVER_CONNECTIONS */ #endif #if (ODBCVER < 0x0300) I_INT16 (SQL_ACTIVE_STATEMENTS); /* 3.0: SQL_MAX_CONCURRENT_ACTIVITIES */ #endif I_SVAL (SQL_CONCAT_NULL_BEHAVIOR); I_MASK (SQL_CONVERT_FUNCTIONS); I_MASK1 (SQL_CONVERT_BIGINT, CONVERT); I_MASK1 (SQL_CONVERT_BINARY, CONVERT); I_MASK1 (SQL_CONVERT_BIT, CONVERT); I_MASK1 (SQL_CONVERT_CHAR, CONVERT); I_MASK1 (SQL_CONVERT_DATE, CONVERT); I_MASK1 (SQL_CONVERT_DECIMAL, CONVERT); I_MASK1 (SQL_CONVERT_DOUBLE, CONVERT); I_MASK1 (SQL_CONVERT_FLOAT, CONVERT); I_MASK1 (SQL_CONVERT_INTEGER, CONVERT); I_MASK1 (SQL_CONVERT_LONGVARBINARY, CONVERT); I_MASK1 (SQL_CONVERT_LONGVARCHAR, CONVERT); I_MASK1 (SQL_CONVERT_NUMERIC, CONVERT); I_MASK1 (SQL_CONVERT_REAL, CONVERT); I_MASK1 (SQL_CONVERT_SMALLINT, CONVERT); I_MASK1 (SQL_CONVERT_TIME, CONVERT); I_MASK1 (SQL_CONVERT_TIMESTAMP, CONVERT); I_MASK1 (SQL_CONVERT_TINYINT, CONVERT); I_MASK1 (SQL_CONVERT_VARBINARY, CONVERT); I_MASK1 (SQL_CONVERT_VARCHAR, CONVERT); I_SVAL1 (SQL_CURSOR_COMMIT_BEHAVIOR, CURSOR_BEHAVIOR); I_SVAL1 (SQL_CURSOR_ROLLBACK_BEHAVIOR, CURSOR_BEHAVIOR); I_STR (SQL_DATA_SOURCE_NAME); I_STR (SQL_DATA_SOURCE_READ_ONLY); I_STR (SQL_DATABASE_NAME); I_STR (SQL_DBMS_NAME); I_STR (SQL_DBMS_VER); I_MASK1 (SQL_DEFAULT_TXN_ISOLATION, TXN_ISOLATION); I_INT32 (SQL_DRIVER_HDBC); I_INT32 (SQL_DRIVER_HENV); I_INT32 (SQL_DRIVER_HSTMT); I_STR (SQL_DRIVER_NAME); I_STR (SQL_DRIVER_VER); I_STR (SQL_EXPRESSIONS_IN_ORDERBY); I_MASK (SQL_FETCH_DIRECTION); I_SVAL1 (SQL_IDENTIFIER_CASE, IDENTIFIER_CASE); I_STR (SQL_IDENTIFIER_QUOTE_CHAR); I_INT16 (SQL_MAX_COLUMN_NAME_LEN); I_INT16 (SQL_MAX_CURSOR_NAME_LEN); #if (ODBCVER < 0x0300) I_INT16 (SQL_MAX_OWNER_NAME_LEN); /* 3.0: SQL_MAX_SCHEMA_NAME_LEN */ #endif I_INT16 (SQL_MAX_PROCEDURE_NAME_LEN); #if (ODBCVER < 0x0300) I_INT16 (SQL_MAX_QUALIFIER_NAME_LEN); /* 3.0: SQL_MAX_CATALOG_NAME_LEN */ #endif I_INT16 (SQL_MAX_TABLE_NAME_LEN); I_STR (SQL_MULT_RESULT_SETS); I_STR (SQL_MULTIPLE_ACTIVE_TXN); I_MASK (SQL_NUMERIC_FUNCTIONS); I_SVAL (SQL_ODBC_API_CONFORMANCE); I_SVAL (SQL_ODBC_SAG_CLI_CONFORMANCE); I_SVAL (SQL_ODBC_SQL_CONFORMANCE); I_STR (SQL_ODBC_VER); #if (ODBCVER < 0x0300) I_STR (SQL_ODBC_SQL_OPT_IEF); /* 3.0: SQL_INTEGRITY */ #endif #if (ODBCVER < 0x0300) I_STR (SQL_OWNER_TERM); /* 3.0: SQL_SCHEMA_TERM */ #endif I_STR (SQL_OUTER_JOINS); I_STR (SQL_PROCEDURE_TERM); I_STR (SQL_PROCEDURES); #if (ODBCVER < 0x0300) I_STR (SQL_QUALIFIER_NAME_SEPARATOR); /* 3.0: SQL_CATALOG_NAME_SEPARATOR */ #endif #if (ODBCVER < 0x0300) I_STR (SQL_QUALIFIER_TERM); /* 3.0: SQL_CATALOG_TERM */ #endif I_STR (SQL_ROW_UPDATES); I_MASK (SQL_SCROLL_CONCURRENCY); I_MASK (SQL_SCROLL_OPTIONS); I_STR (SQL_SEARCH_PATTERN_ESCAPE); I_STR (SQL_SERVER_NAME); I_MASK (SQL_STRING_FUNCTIONS); I_MASK (SQL_SYSTEM_FUNCTIONS); I_STR (SQL_TABLE_TERM); I_MASK (SQL_TIMEDATE_FUNCTIONS); I_SVAL (SQL_TXN_CAPABLE); I_MASK1 (SQL_TXN_ISOLATION_OPTION, TXN_ISOLATION); I_STR (SQL_USER_NAME); /* * ODBC 1.0 Additions */ I_SVAL (SQL_CORRELATION_NAME); I_SVAL (SQL_NON_NULLABLE_COLUMNS); /* * ODBC 2.0 Additions */ I_MASK (SQL_ALTER_TABLE); I_MASK (SQL_BOOKMARK_PERSISTENCE); I_STR (SQL_COLUMN_ALIAS); I_INT32 (SQL_DRIVER_HLIB); I_STR (SQL_DRIVER_ODBC_VER); I_MASK (SQL_GETDATA_EXTENSIONS); I_SVAL (SQL_GROUP_BY); I_SVAL (SQL_FILE_USAGE); I_STR (SQL_KEYWORDS); I_STR (SQL_LIKE_ESCAPE_CLAUSE); I_MASK (SQL_LOCK_TYPES); I_INT32 (SQL_MAX_BINARY_LITERAL_LEN); I_INT32 (SQL_MAX_CHAR_LITERAL_LEN); I_INT16 (SQL_MAX_COLUMNS_IN_GROUP_BY); I_INT16 (SQL_MAX_COLUMNS_IN_INDEX); I_INT16 (SQL_MAX_COLUMNS_IN_ORDER_BY); I_INT16 (SQL_MAX_COLUMNS_IN_SELECT); I_INT16 (SQL_MAX_COLUMNS_IN_TABLE); I_INT32 (SQL_MAX_INDEX_SIZE); I_STR (SQL_MAX_ROW_SIZE_INCLUDES_LONG); I_INT32 (SQL_MAX_ROW_SIZE); I_INT32 (SQL_MAX_STATEMENT_LEN); I_INT16 (SQL_MAX_TABLES_IN_SELECT); I_INT16 (SQL_MAX_USER_NAME_LEN); I_STR (SQL_NEED_LONG_DATA_LEN); I_SVAL (SQL_NULL_COLLATION); I_STR (SQL_ORDER_BY_COLUMNS_IN_SELECT); #if (ODBCVER < 0x0300) I_MASK (SQL_OWNER_USAGE); /* 3.0: SQL_SCHEMA_USAGE */ #endif I_MASK (SQL_OJ_CAPABILITIES); I_MASK (SQL_POS_OPERATIONS); I_MASK (SQL_POSITIONED_STATEMENTS); #if (ODBCVER < 0x0300) I_SVAL (SQL_QUALIFIER_LOCATION); /* 3.0: SQL_CATALOG_LOCATION */ #endif #if (ODBCVER < 0x0300) I_MASK (SQL_QUALIFIER_USAGE); /* 3.0: SQL_CATALOG_USAGE */ #endif I_SVAL1 (SQL_QUOTED_IDENTIFIER_CASE, IDENTIFIER_CASE); I_STR (SQL_SPECIAL_CHARACTERS); I_MASK (SQL_STATIC_SENSITIVITY); I_MASK (SQL_SUBQUERIES); I_MASK1 (SQL_TIMEDATE_ADD_INTERVALS, TIMEDATE_INTERVALS); I_MASK1 (SQL_TIMEDATE_DIFF_INTERVALS, TIMEDATE_INTERVALS); I_MASK (SQL_UNION); /* * ODBC 3.0 */ #if (ODBCVER >= 0x0300) I_INT16 (SQL_ACTIVE_ENVIRONMENTS); I_MASK (SQL_AGGREGATE_FUNCTIONS); I_MASK (SQL_ALTER_DOMAIN); I_SVAL (SQL_ASYNC_MODE); I_MASK (SQL_BATCH_ROW_COUNT); I_MASK (SQL_BATCH_SUPPORT); I_SVAL (SQL_CATALOG_LOCATION); I_STR (SQL_CATALOG_NAME); I_STR (SQL_CATALOG_NAME_SEPARATOR); I_STR (SQL_CATALOG_TERM); I_MASK (SQL_CATALOG_USAGE); I_STR (SQL_COLLATION_SEQ); I_MASK1 (SQL_CONVERT_INTERVAL_YEAR_MONTH, CONVERT); I_MASK1 (SQL_CONVERT_INTERVAL_DAY_TIME, CONVERT); I_MASK1 (SQL_CONVERT_WCHAR, CONVERT); I_MASK1 (SQL_CONVERT_WLONGVARCHAR, CONVERT); I_MASK1 (SQL_CONVERT_WVARCHAR, CONVERT); I_MASK (SQL_CREATE_ASSERTION); I_MASK (SQL_CREATE_CHARACTER_SET); I_MASK (SQL_CREATE_COLLATION); I_MASK (SQL_CREATE_DOMAIN); I_MASK (SQL_CREATE_SCHEMA); I_MASK (SQL_CREATE_TABLE); I_MASK (SQL_CREATE_TRANSLATION); I_MASK (SQL_CREATE_VIEW); I_SVAL (SQL_CURSOR_SENSITIVITY); I_MASK (SQL_DATETIME_LITERALS); I_MASK (SQL_DDL_INDEX); I_STR (SQL_DESCRIBE_PARAMETER); I_STR (SQL_DM_VER); I_MASK (SQL_DTC_TRANSITION_COST); I_MASK (SQL_DROP_ASSERTION); I_MASK (SQL_DROP_CHARACTER_SET); I_MASK (SQL_DROP_COLLATION); I_MASK (SQL_DROP_DOMAIN); I_MASK (SQL_DROP_SCHEMA); I_MASK (SQL_DROP_TABLE); I_MASK (SQL_DROP_TRANSLATION); I_MASK (SQL_DROP_VIEW); I_MASK1 (SQL_DYNAMIC_CURSOR_ATTRIBUTES1, CURSOR_ATTRIBUTES1); I_MASK1 (SQL_DYNAMIC_CURSOR_ATTRIBUTES2, CURSOR_ATTRIBUTES2); I_MASK1 (SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1, CURSOR_ATTRIBUTES1); I_MASK1 (SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2, CURSOR_ATTRIBUTES2); I_MASK (SQL_INDEX_KEYWORDS); I_MASK (SQL_INFO_SCHEMA_VIEWS); I_MASK (SQL_INSERT_STATEMENT); I_STR (SQL_INTEGRITY); I_MASK1 (SQL_KEYSET_CURSOR_ATTRIBUTES1, CURSOR_ATTRIBUTES1); I_MASK1 (SQL_KEYSET_CURSOR_ATTRIBUTES2, CURSOR_ATTRIBUTES2); I_INT32 (SQL_MAX_ASYNC_CONCURRENT_STATEMENTS); I_INT16 (SQL_MAX_CATALOG_NAME_LEN); I_INT16 (SQL_MAX_CONCURRENT_ACTIVITIES); I_INT16 (SQL_MAX_DRIVER_CONNECTIONS); I_INT16 (SQL_MAX_IDENTIFIER_LEN); I_INT16 (SQL_MAX_SCHEMA_NAME_LEN); I_SVAL (SQL_ODBC_INTERFACE_CONFORMANCE); I_SVAL (SQL_PARAM_ARRAY_ROW_COUNTS); I_SVAL (SQL_PARAM_ARRAY_SELECTS); I_STR (SQL_SCHEMA_TERM); I_MASK (SQL_SCHEMA_USAGE); I_SVAL (SQL_SQL_CONFORMANCE); I_MASK (SQL_SQL92_DATETIME_FUNCTIONS); I_MASK (SQL_SQL92_FOREIGN_KEY_DELETE_RULE); I_MASK (SQL_SQL92_FOREIGN_KEY_UPDATE_RULE); I_MASK (SQL_SQL92_GRANT); I_MASK (SQL_SQL92_NUMERIC_VALUE_FUNCTIONS); I_MASK (SQL_SQL92_PREDICATES); I_MASK (SQL_SQL92_RELATIONAL_JOIN_OPERATORS); I_MASK (SQL_SQL92_REVOKE); I_MASK (SQL_SQL92_ROW_VALUE_CONSTRUCTOR); I_MASK (SQL_SQL92_STRING_FUNCTIONS); I_MASK (SQL_SQL92_VALUE_EXPRESSIONS); I_MASK (SQL_STANDARD_CLI_CONFORMANCE); I_MASK1 (SQL_STATIC_CURSOR_ATTRIBUTES1, CURSOR_ATTRIBUTES1); I_MASK1 (SQL_STATIC_CURSOR_ATTRIBUTES2, CURSOR_ATTRIBUTES2); I_STR (SQL_XOPEN_CLI_YEAR); #endif default: infoname = "unknown or driver specific"; break; } /* * If we arrive here, just print the generic pointer information */ trace_emit ("\t\t%-15.15s %d (%s)\n", "SQLUSMALLINT", fInfoType, infoname); if (rgbInfoValue) trace_emit ("\t\t%-15.15s %p\n", "SQLPOINTER", rgbInfoValue); else trace_emit ("\t\t%-15.15s 0x0\n", "SQLPOINTER"); goto print_end; print_int16: trace_emit ("\t\t%-15.15s %d (%s)\n", "SQLUSMALLINT", fInfoType, infoname); trace_emit ("\t\t%-15.15s %p (%ld)\n", "SQLPOINTER", rgbInfoValue, (long) *((short *) rgbInfoValue)); goto print_end; print_int32: trace_emit ("\t\t%-15.15s %d (%s)\n", "SQLUSMALLINT", fInfoType, infoname); trace_emit ("\t\t%-15.15s %p (%ld)\n", "SQLPOINTER", rgbInfoValue, (long) *((int *) rgbInfoValue)); goto print_end; print_string: trace_emit ("\t\t%-15.15s %d (%s)\n", "SQLUSMALLINT", fInfoType, infoname); trace_emit ("\t\t%-15.15s %p\n", "SQLPOINTER", rgbInfoValue); if (waMode == 'A') trace_emit_string ((SQLCHAR *) rgbInfoValue, pcbInfoValue ? *pcbInfoValue : SQL_NTS, 0); else { SQLCHAR *str_u8 = dm_SQL_W2A ((SQLWCHAR *) rgbInfoValue, pcbInfoValue ? *pcbInfoValue : SQL_NTS); trace_emit_string (str_u8, SQL_NTS, 1); free (str_u8); } goto print_end; print_mask: trace_emit ("\t\t%-15.15s %d (%s)\n", "SQLUSMALLINT", fInfoType, infoname); trace_emit ("\t\t%-15.15s %p (0x%lX)\n", "SQLPOINTER", rgbInfoValue, (unsigned long) *((unsigned int *) rgbInfoValue)); if (*(int *) rgbInfoValue == 0) trace_emit ("\t\t\t\t | %-40.40s |\n", mask[0]); else { register unsigned int val = *(unsigned int *) rgbInfoValue; for (i = 1; i < 32; i++) { if (val & (1 << (i - 1))) { if (i < elem) trace_emit ("\t\t\t\t | %-40.40s |\n", mask[i]); else trace_emit ("\t\t\t\t | %-40.40s |\n", "UNKNOWN"); } } } goto print_end; print_svalue: i = *((short *) rgbInfoValue); trace_emit ("\t\t%-15.15s %d (%s)\n", "SQLUSMALLINT", fInfoType, infoname); trace_emit ("\t\t%-15.15s %p (%ld)\n", "SQLPOINTER", rgbInfoValue, (long) *((SQLSMALLINT *) rgbInfoValue)); trace_emit ("\t\t\t\t | %-40.40s |\n", (i < elem) ? mask[i] : "UNKNOWN"); goto print_end; /* * All done */ print_end: return; } void trace_SQLGetInfo (int trace_leave, int retcode, SQLHDBC hdbc, SQLUSMALLINT fInfoType, SQLPOINTER rgbInfoValue, SQLSMALLINT cbInfoValueMax, SQLSMALLINT * pcbInfoValue) { /* Trace function */ _trace_print_function (en_GetInfo, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_DBC, hdbc); _trace_getinfo (fInfoType, rgbInfoValue, cbInfoValueMax, pcbInfoValue, TRACE_OUTPUT_SUCCESS, 'A'); _trace_smallint (cbInfoValueMax); _trace_smallint_p (pcbInfoValue, TRACE_OUTPUT_SUCCESS); } #if ODBCVER >= 0x0300 void trace_SQLGetInfoW (int trace_leave, int retcode, SQLHDBC hdbc, SQLUSMALLINT fInfoType, SQLPOINTER rgbInfoValue, SQLSMALLINT cbInfoValueMax, SQLSMALLINT * pcbInfoValue) { /* Trace function */ _trace_print_function (en_GetInfoW, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_DBC, hdbc); _trace_getinfo (fInfoType, rgbInfoValue, cbInfoValueMax, pcbInfoValue, TRACE_OUTPUT_SUCCESS, 'W'); _trace_smallint (cbInfoValueMax); _trace_smallint_p (pcbInfoValue, TRACE_OUTPUT_SUCCESS); } #endif libiodbc-3.52.16/iodbc/trace/BrowseConnect.c0000664000175000017500000001136214424170750015466 00000000000000/* * BrowseConnect.c * * $Id$ * * SQLBrowseConnect trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void trace_SQLBrowseConnect (int trace_leave, int retcode, SQLHDBC ConnectionHandle, SQLCHAR * InConnectionString, SQLSMALLINT StringLength1, SQLCHAR * OutConnectionString, SQLSMALLINT BufferLength, SQLSMALLINT * StringLength2Ptr) { /* Trace function */ _trace_print_function (en_BrowseConnect, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_DBC, ConnectionHandle); _trace_string (InConnectionString, StringLength1, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", StringLength1); _trace_string (OutConnectionString, BufferLength, StringLength2Ptr, TRACE_OUTPUT_SUCCESS); _trace_smallint (BufferLength); _trace_smallint_p (StringLength2Ptr, TRACE_OUTPUT_SUCCESS); } #if ODBCVER >= 0x0300 void trace_SQLBrowseConnectW (int trace_leave, int retcode, SQLHDBC ConnectionHandle, SQLWCHAR * InConnectionString, SQLSMALLINT StringLength1, SQLWCHAR * OutConnectionString, SQLSMALLINT BufferLength, SQLSMALLINT * StringLength2Ptr) { /* Trace function */ _trace_print_function (en_BrowseConnectW, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_DBC, ConnectionHandle); _trace_string_w (InConnectionString, StringLength1, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", StringLength1); _trace_string_w (OutConnectionString, BufferLength, StringLength2Ptr, TRACE_OUTPUT_SUCCESS); _trace_smallint (BufferLength); _trace_smallint_p (StringLength2Ptr, TRACE_OUTPUT_SUCCESS); } #endif libiodbc-3.52.16/iodbc/trace/Columns.c0000664000175000017500000001217214424170750014333 00000000000000/* * Columns.c * * $Id$ * * SQLColumns trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void trace_SQLColumns (int trace_leave, int retcode, SQLHSTMT hstmt, SQLCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLCHAR * szTableName, SQLSMALLINT cbTableName, SQLCHAR * szColumnName, SQLSMALLINT cbColumnName) { /* Trace function */ _trace_print_function (en_Columns, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, hstmt); _trace_string (szTableQualifier, cbTableQualifier, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableQualifier); _trace_string (szTableOwner, cbTableOwner, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableOwner); _trace_string (szTableName, cbTableName, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableName); _trace_string (szColumnName, cbColumnName, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbColumnName); } #if ODBCVER >= 0x0300 void trace_SQLColumnsW (int trace_leave, int retcode, SQLHSTMT hstmt, SQLWCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLWCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLWCHAR * szTableName, SQLSMALLINT cbTableName, SQLWCHAR * szColumnName, SQLSMALLINT cbColumnName) { /* Trace function */ _trace_print_function (en_ColumnsW, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, hstmt); _trace_string_w (szTableQualifier, cbTableQualifier, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableQualifier); _trace_string_w (szTableOwner, cbTableOwner, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableOwner); _trace_string_w (szTableName, cbTableName, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableName); _trace_string_w (szColumnName, cbColumnName, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbColumnName); } #endif libiodbc-3.52.16/iodbc/trace/proto.h0000664000175000017500000007233714424170750014074 00000000000000/* * proto.h * * $Id$ * * Trace functions prototypes * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* AllocConnect.c */ void trace_SQLAllocConnect (int trace_leave, int retcode, SQLHENV henv, SQLHDBC * phdbc); /* AllocEnv.c */ void trace_SQLAllocEnv (int trace_leave, int retcode, SQLHENV * phenv); /* AllocHandle.c */ void trace_SQLAllocHandle (int trace_leave, int retcode, SQLSMALLINT HandleType, SQLHANDLE InputHandle, SQLHANDLE * OutputHandlePtr); /* AllocStmt.c */ void trace_SQLAllocStmt (int trace_leave, int retcode, SQLHDBC hdbc, SQLHSTMT * phstmt); /* BindCol.c */ void trace_SQLBindCol (int trace_leave, int retcode, SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLSMALLINT TargetType, SQLPOINTER TargetValuePtr, SQLLEN BufferLength, SQLLEN * Strlen_or_IndPtr); /* BindParameter.c */ void trace_SQLBindParameter (int trace_leave, int retcode, SQLHSTMT StatementHandle, SQLUSMALLINT ParameterNumber, SQLSMALLINT InputOutputType, SQLSMALLINT ValueType, SQLSMALLINT ParameterType, SQLUINTEGER ColumnSize, SQLSMALLINT DecimalDigits, SQLPOINTER ParameterValuePtr, SQLLEN BufferLength, SQLLEN * Strlen_or_IndPtr); /* BrowseConnect.c */ void trace_SQLBrowseConnect (int trace_leave, int retcode, SQLHDBC ConnectionHandle, SQLCHAR * InConnectionString, SQLSMALLINT StringLength1, SQLCHAR * OutConnectionString, SQLSMALLINT BufferLength, SQLSMALLINT * StringLength2Ptr); void trace_SQLBrowseConnectW (int trace_leave, int retcode, SQLHDBC ConnectionHandle, SQLWCHAR * InConnectionString, SQLSMALLINT StringLength1, SQLWCHAR * OutConnectionString, SQLSMALLINT BufferLength, SQLSMALLINT * StringLength2Ptr); /* BulkOperations.c */ void trace_SQLBulkOperations (int trace_leave, int retcode, SQLHSTMT StatementHandle, SQLUSMALLINT Operation); /* Cancel.c */ void trace_SQLCancel (int trace_leave, int retcode, SQLHSTMT StatementHandle); /* CloseCursor.c */ void trace_SQLCloseCursor (int trace_leave, int retcode, SQLHSTMT StatementHandle); /* ColAttribute.c */ void _trace_colattr2_type (SQLUSMALLINT type); void _trace_colattr3_type (SQLUSMALLINT type); void trace_SQLColAttribute (int trace_leave, int retcode, SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLUSMALLINT FieldIdentifier, SQLPOINTER CharacterAttributePtr, SQLSMALLINT BufferLength, SQLSMALLINT * StringLengthPtr, SQLLEN * NumericAttributePtr); void trace_SQLColAttributeW (int trace_leave, int retcode, SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLUSMALLINT FieldIdentifier, SQLPOINTER CharacterAttributePtr, SQLSMALLINT BufferLength, SQLSMALLINT * StringLengthPtr, SQLLEN * NumericAttributePtr); void trace_SQLColAttributes (int trace_leave, int retcode, SQLHSTMT StatementHandle, SQLUSMALLINT icol, SQLUSMALLINT fDescType, SQLPOINTER rgbDesc, SQLSMALLINT cbDescMax, SQLSMALLINT * pcbDesc, SQLLEN * pfDesc); void trace_SQLColAttributesW (int trace_leave, int retcode, SQLHSTMT StatementHandle, SQLUSMALLINT icol, SQLUSMALLINT fDescType, SQLPOINTER rgbDesc, SQLSMALLINT cbDescMax, SQLSMALLINT * pcbDesc, SQLLEN * pfDesc); /* ColumnPrivileges.c */ void trace_SQLColumnPrivileges (int trace_leave, int retcode, SQLHSTMT hstmt, SQLCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLCHAR * szTableName, SQLSMALLINT cbTableName, SQLCHAR * szColumnName, SQLSMALLINT cbColumnName); void trace_SQLColumnPrivilegesW (int trace_leave, int retcode, SQLHSTMT hstmt, SQLWCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLWCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLWCHAR * szTableName, SQLSMALLINT cbTableName, SQLWCHAR * szColumnName, SQLSMALLINT cbColumnName); /* Columns.c */ void trace_SQLColumns (int trace_leave, int retcode, SQLHSTMT hstmt, SQLCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLCHAR * szTableName, SQLSMALLINT cbTableName, SQLCHAR * szColumnName, SQLSMALLINT cbColumnName); void trace_SQLColumnsW (int trace_leave, int retcode, SQLHSTMT hstmt, SQLWCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLWCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLWCHAR * szTableName, SQLSMALLINT cbTableName, SQLWCHAR * szColumnName, SQLSMALLINT cbColumnName); /* Connect.c */ void trace_SQLConnect (int trace_leave, int retcode, SQLHDBC hdbc, SQLCHAR * szDSN, SQLSMALLINT cbDSN, SQLCHAR * szUID, SQLSMALLINT cbUID, SQLCHAR * szAuthStr, SQLSMALLINT cbAuthStr); void trace_SQLConnectW (int trace_leave, int retcode, SQLHDBC hdbc, SQLWCHAR * szDSN, SQLSMALLINT cbDSN, SQLWCHAR * szUID, SQLSMALLINT cbUID, SQLWCHAR * szAuthStr, SQLSMALLINT cbAuthStr); /* CopyDesc.c */ #if (ODBCVER >= 0x0300) void trace_SQLCopyDesc (int trace_leave, int retcode, SQLHDESC SourceDescHandle, SQLHDESC TargetDescHandle); #endif /* DataSources.c */ void _trace_direction (SQLUSMALLINT dir); void trace_SQLDataSources (int trace_leave, int retcode, SQLHENV EnvironmentHandle, SQLUSMALLINT Direction, SQLCHAR * ServerName, SQLSMALLINT BufferLength1, SQLSMALLINT * NameLength1Ptr, SQLCHAR * Description, SQLSMALLINT BufferLength2, SQLSMALLINT * NameLength2Ptr); void trace_SQLDataSourcesW (int trace_leave, int retcode, SQLHENV EnvironmentHandle, SQLUSMALLINT Direction, SQLWCHAR * ServerName, SQLSMALLINT BufferLength1, SQLSMALLINT * NameLength1Ptr, SQLWCHAR * Description, SQLSMALLINT BufferLength2, SQLSMALLINT * NameLength2Ptr); /* DescribeCol.c */ void _trace_desc_null (SQLSMALLINT * p, int output); void trace_SQLDescribeCol (int trace_leave, int retcode, SQLHSTMT StatementHandle, SQLSMALLINT ColumnNumber, SQLCHAR * ColumnName, SQLSMALLINT BufferLength, SQLSMALLINT * NameLengthPtr, SQLSMALLINT * DataTypePtr, SQLULEN * ColumnSizePtr, SQLSMALLINT * DecimalDigitsPtr, SQLSMALLINT * NullablePtr); void trace_SQLDescribeColW (int trace_leave, int retcode, SQLHSTMT StatementHandle, SQLSMALLINT ColumnNumber, SQLWCHAR * ColumnName, SQLSMALLINT BufferLength, SQLSMALLINT * NameLengthPtr, SQLSMALLINT * DataTypePtr, SQLULEN * ColumnSizePtr, SQLSMALLINT * DecimalDigitsPtr, SQLSMALLINT * NullablePtr); /* DescribeParam.c */ void trace_SQLDescribeParam (int trace_leave, int retcode, SQLHSTMT hstmt, SQLUSMALLINT ipar, SQLSMALLINT * pfSqlType, SQLULEN * pcbColDef, SQLSMALLINT * pibScale, SQLSMALLINT * pfNullable); /* Disconnect.c */ void trace_SQLDisconnect (int trace_leave, int retcode, SQLHDBC ConnectionHandle); /* DriverConnect.c */ void trace_SQLDriverConnect (int trace_leave, int retcode, SQLHDBC hdbc, SQLHWND hwnd, SQLCHAR * szConnStrIn, SQLSMALLINT cbConnStrIn, SQLCHAR * szConnStrOut, SQLSMALLINT cbConnStrOutMax, SQLSMALLINT * pcbConnStrOut, SQLUSMALLINT fDriverCompletion); void trace_SQLDriverConnectW (int trace_leave, int retcode, SQLHDBC hdbc, SQLHWND hwnd, SQLWCHAR * szConnStrIn, SQLSMALLINT cbConnStrIn, SQLWCHAR * szConnStrOut, SQLSMALLINT cbConnStrOutMax, SQLSMALLINT * pcbConnStrOut, SQLUSMALLINT fDriverCompletion); /* Drivers.c */ void trace_SQLDrivers (int trace_leave, int retcode, SQLHENV EnvironmentHandle, SQLUSMALLINT Direction, SQLCHAR * DriverDescription, SQLSMALLINT BufferLength1, SQLSMALLINT * DescriptionLengthPtr, SQLCHAR * DriverAttributes, SQLSMALLINT BufferLength2, SQLSMALLINT * AttributesLengthPtr); void trace_SQLDriversW (int trace_leave, int retcode, SQLHENV EnvironmentHandle, SQLUSMALLINT Direction, SQLWCHAR * DriverDescription, SQLSMALLINT BufferLength1, SQLSMALLINT * DescriptionLengthPtr, SQLWCHAR * DriverAttributes, SQLSMALLINT BufferLength2, SQLSMALLINT * AttributesLengthPtr); /* EndTran.c */ void trace_SQLEndTran (int trace_leave, int retcode, SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT CompletionType); /* Error.c */ void trace_SQLError (int trace_leave, int retcode, SQLHENV henv, SQLHDBC hdbc, SQLHSTMT hstmt, SQLCHAR * szSqlstate, SQLINTEGER * pfNativeError, SQLCHAR * szErrorMsg, SQLSMALLINT cbErrorMsgMax, SQLSMALLINT * pcbErrorMsg); void trace_SQLErrorW (int trace_leave, int retcode, SQLHENV henv, SQLHDBC hdbc, SQLHSTMT hstmt, SQLWCHAR * szSqlstate, SQLINTEGER * pfNativeError, SQLWCHAR * szErrorMsg, SQLSMALLINT cbErrorMsgMax, SQLSMALLINT * pcbErrorMsg); /* ExecDirect.c */ void trace_SQLExecDirect (int trace_leave, int retcode, SQLHSTMT hstmt, SQLCHAR * szSqlStr, SQLINTEGER cbSqlStr); void trace_SQLExecDirectW (int trace_leave, int retcode, SQLHSTMT hstmt, SQLWCHAR * szSqlStr, SQLINTEGER cbSqlStr); /* Execute.c */ void trace_SQLExecute (int trace_leave, int retcode, SQLHSTMT hstmt); /* ExtendedFetch.c */ void _trace_fetchtype (SQLUSMALLINT type); void trace_SQLExtendedFetch (int trace_leave, int retcode, SQLHSTMT hstmt, SQLUSMALLINT fFetchType, SQLLEN irow, SQLULEN * pcrow, SQLUSMALLINT * rgfRowStatus); /* Fetch.c */ void trace_SQLFetch (int trace_leave, int retcode, SQLHSTMT hstmt); /* FetchScroll.c */ void trace_SQLFetchScroll (int trace_leave, int retcode, SQLHSTMT StatementHandle, SQLSMALLINT FetchOrientation, SQLLEN FetchOffset); /* ForeignKeys.c */ void trace_SQLForeignKeys (int trace_leave, int retcode, SQLHSTMT hstmt, SQLCHAR * szPkTableQualifier, SQLSMALLINT cbPkTableQualifier, SQLCHAR * szPkTableOwner, SQLSMALLINT cbPkTableOwner, SQLCHAR * szPkTableName, SQLSMALLINT cbPkTableName, SQLCHAR * szFkTableQualifier, SQLSMALLINT cbFkTableQualifier, SQLCHAR * szFkTableOwner, SQLSMALLINT cbFkTableOwner, SQLCHAR * szFkTableName, SQLSMALLINT cbFkTableName); void trace_SQLForeignKeysW (int trace_leave, int retcode, SQLHSTMT hstmt, SQLWCHAR * szPkTableQualifier, SQLSMALLINT cbPkTableQualifier, SQLWCHAR * szPkTableOwner, SQLSMALLINT cbPkTableOwner, SQLWCHAR * szPkTableName, SQLSMALLINT cbPkTableName, SQLWCHAR * szFkTableQualifier, SQLSMALLINT cbFkTableQualifier, SQLWCHAR * szFkTableOwner, SQLSMALLINT cbFkTableOwner, SQLWCHAR * szFkTableName, SQLSMALLINT cbFkTableName); /* FreeConnect.c */ void trace_SQLFreeConnect (int trace_leave, int retcode, SQLHDBC hdbc); /* FreeEnv.c */ void trace_SQLFreeEnv (int trace_leave, int retcode, SQLHENV henv); /* FreeHandle.c */ void trace_SQLFreeHandle (int trace_leave, int retcode, SQLSMALLINT HandleType, SQLHANDLE Handle); /* FreeStmt.c */ void _trace_freestmt_option (int option); void trace_SQLFreeStmt (int trace_leave, int retcode, SQLHSTMT hstmt, SQLUSMALLINT Option); /* GetConnectAttr.c */ void _trace_connattr_type (SQLINTEGER type); void trace_SQLGetConnectAttr (int trace_leave, int retcode, SQLHDBC ConnectionHandle, SQLINTEGER Attribute, SQLPOINTER ValuePtr, SQLINTEGER BufferLength, SQLINTEGER * StringLengthPtr); void trace_SQLGetConnectAttrW (int trace_leave, int retcode, SQLHDBC ConnectionHandle, SQLINTEGER Attribute, SQLPOINTER ValuePtr, SQLINTEGER BufferLength, SQLINTEGER * StringLengthPtr); /* GetConnectOption.c */ void _trace_connopt_type (SQLUSMALLINT type); void trace_SQLGetConnectOption (int trace_leave, int retcode, SQLHDBC hdbc, SQLUSMALLINT fOption, SQLPOINTER pvParam); void trace_SQLGetConnectOptionW (int trace_leave, int retcode, SQLHDBC hdbc, SQLUSMALLINT fOption, SQLPOINTER pvParam); /* GetCursorName.c */ void trace_SQLGetCursorName (int trace_leave, int retcode, SQLHSTMT StatementHandle, SQLCHAR * CursorName, SQLSMALLINT BufferLength, SQLSMALLINT * NameLengthPtr); void trace_SQLGetCursorNameW (int trace_leave, int retcode, SQLHSTMT StatementHandle, SQLWCHAR * CursorName, SQLSMALLINT BufferLength, SQLSMALLINT * NameLengthPtr); /* GetData.c */ void _trace_data (SQLSMALLINT fCType, SQLPOINTER rgbValue, SQLLEN cbValueMax, SQLLEN * pcbValue, int output); void trace_SQLGetData (int trace_leave, int retcode, SQLHSTMT hstmt, SQLUSMALLINT icol, SQLSMALLINT fCType, SQLPOINTER rgbValue, SQLLEN cbValueMax, SQLLEN * pcbValue); /* GetDescField.c */ #if (ODBCVER >= 0x0300) void _trace_descfield_type (SQLSMALLINT type); void trace_SQLGetDescField (int trace_leave, int retcode, SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER ValuePtr, SQLINTEGER BufferLength, SQLINTEGER * StringLengthPtr); void trace_SQLGetDescFieldW (int trace_leave, int retcode, SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER ValuePtr, SQLINTEGER BufferLength, SQLINTEGER * StringLengthPtr); /* GetDescRec.c */ void trace_SQLGetDescRec (int trace_leave, int retcode, SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLCHAR * Name, SQLSMALLINT BufferLength, SQLSMALLINT * StringLengthPtr, SQLSMALLINT * TypePtr, SQLSMALLINT * SubTypePtr, SQLLEN * LengthPtr, SQLSMALLINT * PrecisionPtr, SQLSMALLINT * ScalePtr, SQLSMALLINT * NullablePtr); void trace_SQLGetDescRecW (int trace_leave, int retcode, SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLWCHAR * Name, SQLSMALLINT BufferLength, SQLSMALLINT * StringLengthPtr, SQLSMALLINT * TypePtr, SQLSMALLINT * SubTypePtr, SQLLEN * LengthPtr, SQLSMALLINT * PrecisionPtr, SQLSMALLINT * ScalePtr, SQLSMALLINT * NullablePtr); /* GetDiagField.c */ void _trace_diag_type (SQLSMALLINT type); void trace_SQLGetDiagField (int trace_leave, int retcode, SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT RecNumber, SQLSMALLINT DiagIdentifier, SQLPOINTER DiagInfoPtr, SQLSMALLINT BufferLength, SQLSMALLINT * StringLengthPtr); void trace_SQLGetDiagFieldW (int trace_leave, int retcode, SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT RecNumber, SQLSMALLINT DiagIdentifier, SQLPOINTER DiagInfoPtr, SQLSMALLINT BufferLength, SQLSMALLINT * StringLengthPtr); /* GetDiagRec.c */ void trace_SQLGetDiagRec (int trace_leave, int retcode, SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT RecNumber, SQLCHAR * SqlState, SQLINTEGER * NativeErrorPtr, SQLCHAR * MessageText, SQLSMALLINT BufferLength, SQLSMALLINT * TextLengthPtr); void trace_SQLGetDiagRecW (int trace_leave, int retcode, SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT RecNumber, SQLWCHAR * SqlState, SQLINTEGER * NativeErrorPtr, SQLWCHAR * MessageText, SQLSMALLINT BufferLength, SQLSMALLINT * TextLengthPtr); #endif /* GetEnvAttr.c */ void _trace_envattr_type (SQLINTEGER type); void trace_SQLGetEnvAttr (int trace_leave, int retcode, SQLHENV EnvironmentHandle, SQLINTEGER Attribute, SQLPOINTER ValuePtr, SQLINTEGER BufferLength, SQLINTEGER * StringLengthPtr); /* GetFunctions.c */ void trace_SQLGetFunctions (int trace_leave, int retcode, SQLHDBC hdbc, SQLUSMALLINT fFunc, SQLUSMALLINT * pfExists); /* GetStmtAttr.c */ void _trace_stmtattr_type (SQLINTEGER type); void trace_SQLGetStmtAttr (int trace_leave, int retcode, SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLPOINTER ValuePtr, SQLINTEGER BufferLength, SQLINTEGER * StringLengthPtr); void trace_SQLGetStmtAttrW (int trace_leave, int retcode, SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLPOINTER ValuePtr, SQLINTEGER BufferLength, SQLINTEGER * StringLengthPtr); /* GetStmtOption.c */ void _trace_stmtopt_type (SQLUSMALLINT type); void trace_SQLGetStmtOption (int trace_leave, int retcode, SQLHSTMT StatementHandle, SQLUSMALLINT Attribute, SQLPOINTER ValuePtr); /* GetTypeInfo.c */ void _trace_typeinfo (SQLSMALLINT type); void trace_SQLGetTypeInfo (int trace_leave, int retcode, SQLHSTMT hstmt, SQLSMALLINT fSqlType); void trace_SQLGetTypeInfoW (int trace_leave, int retcode, SQLHSTMT hstmt, SQLSMALLINT fSqlType); /* Info.c */ void trace_SQLGetInfo (int trace_leave, int retcode, SQLHDBC hdbc, SQLUSMALLINT fInfoType, SQLPOINTER rgbInfoValue, SQLSMALLINT cbInfoValueMax, SQLSMALLINT * pcbInfoValue); void trace_SQLGetInfoW (int trace_leave, int retcode, SQLHDBC hdbc, SQLUSMALLINT fInfoType, SQLPOINTER rgbInfoValue, SQLSMALLINT cbInfoValueMax, SQLSMALLINT * pcbInfoValue); /* MoreResults.c */ void trace_SQLMoreResults (int trace_leave, int retcode, SQLHSTMT hstmt); /* NativeSql.c */ void trace_SQLNativeSql (int trace_leave, int retcode, SQLHDBC hdbc, SQLCHAR * InStatementText, SQLINTEGER TextLength1, SQLCHAR * OutStatementText, SQLINTEGER BufferLength, SQLINTEGER * TextLength2Ptr); void trace_SQLNativeSqlW (int trace_leave, int retcode, SQLHDBC hdbc, SQLWCHAR * InStatementText, SQLINTEGER TextLength1, SQLWCHAR * OutStatementText, SQLINTEGER BufferLength, SQLINTEGER * TextLength2Ptr); /* NumParams.c */ void trace_SQLNumParams (int trace_leave, int retcode, SQLHSTMT hstmt, SQLSMALLINT * pcpar); /* NumResultCols.c */ void trace_SQLNumResultCols (int trace_leave, int retcode, SQLHSTMT hstmt, SQLSMALLINT * pccol); /* ParamData.c */ void trace_SQLParamData (int trace_leave, int retcode, SQLHSTMT hstmt, SQLPOINTER * prgbValue); /* ParamOptions.c */ void trace_SQLParamOptions (int trace_leave, int retcode, SQLHSTMT hstmt, SQLULEN crow, SQLULEN * pirow); /* Prepare.c */ void trace_SQLPrepare (int trace_leave, int retcode, SQLHSTMT StatementHandle, SQLCHAR * StatementText, SQLINTEGER TextLength); void trace_SQLPrepareW (int trace_leave, int retcode, SQLHSTMT StatementHandle, SQLWCHAR * StatementText, SQLINTEGER TextLength); /* PrimaryKeys.c */ void trace_SQLPrimaryKeys (int trace_leave, int retcode, SQLHSTMT hstmt, SQLCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLCHAR * szTableName, SQLSMALLINT cbTableName); void trace_SQLPrimaryKeysW (int trace_leave, int retcode, SQLHSTMT hstmt, SQLWCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLWCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLWCHAR * szTableName, SQLSMALLINT cbTableName); /* ProcedureColumns.c */ void trace_SQLProcedureColumns (int trace_leave, int retcode, SQLHSTMT hstmt, SQLCHAR * szProcQualifier, SQLSMALLINT cbProcQualifier, SQLCHAR * szProcOwner, SQLSMALLINT cbProcOwner, SQLCHAR * szProcName, SQLSMALLINT cbProcName, SQLCHAR * szColumnName, SQLSMALLINT cbColumnName); void trace_SQLProcedureColumnsW (int trace_leave, int retcode, SQLHSTMT hstmt, SQLWCHAR * szProcQualifier, SQLSMALLINT cbProcQualifier, SQLWCHAR * szProcOwner, SQLSMALLINT cbProcOwner, SQLWCHAR * szProcName, SQLSMALLINT cbProcName, SQLWCHAR * szColumnName, SQLSMALLINT cbColumnName); /* Procedures.c */ void trace_SQLProcedures (int trace_leave, int retcode, SQLHSTMT hstmt, SQLCHAR * szProcQualifier, SQLSMALLINT cbProcQualifier, SQLCHAR * szProcOwner, SQLSMALLINT cbProcOwner, SQLCHAR * szProcName, SQLSMALLINT cbProcName); void trace_SQLProceduresW (int trace_leave, int retcode, SQLHSTMT hstmt, SQLWCHAR * szProcQualifier, SQLSMALLINT cbProcQualifier, SQLWCHAR * szProcOwner, SQLSMALLINT cbProcOwner, SQLWCHAR * szProcName, SQLSMALLINT cbProcName); /* PutData.c */ void trace_SQLPutData (int trace_leave, int retcode, SQLHSTMT hstmt, SQLPOINTER rgbValue, SQLLEN cbValue); /* RowCount.c */ void trace_SQLRowCount (int trace_leave, int retcode, SQLHSTMT hstmt, SQLLEN * pcrow); /* SetConnectAttr.c */ void trace_SQLSetConnectAttr (int trace_leave, int retcode, SQLHDBC ConnectionHandle, SQLINTEGER Attribute, SQLPOINTER ValuePtr, SQLINTEGER StringLength); void trace_SQLSetConnectAttrW (int trace_leave, int retcode, SQLHDBC ConnectionHandle, SQLINTEGER Attribute, SQLPOINTER ValuePtr, SQLINTEGER StringLength); /* SetConnectOption.c */ void trace_SQLSetConnectOption (int trace_leave, int retcode, SQLHDBC hdbc, SQLUSMALLINT fOption, SQLULEN vParam); void trace_SQLSetConnectOptionW (int trace_leave, int retcode, SQLHDBC hdbc, SQLUSMALLINT fOption, SQLULEN vParam); /* SetCursorName.c */ void trace_SQLSetCursorName (int trace_leave, int retcode, SQLHSTMT hstmt, SQLCHAR * szCursor, SQLSMALLINT cbCursor); void trace_SQLSetCursorNameW (int trace_leave, int retcode, SQLHSTMT hstmt, SQLWCHAR * szCursor, SQLSMALLINT cbCursor); /* SetDescField.c */ #if (ODBCVER >= 0x0300) void trace_SQLSetDescField (int trace_leave, int retcode, SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER ValuePtr, SQLINTEGER BufferLength); void trace_SQLSetDescFieldW (int trace_leave, int retcode, SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER ValuePtr, SQLINTEGER BufferLength); #endif /* SetDescRec.c */ #if (ODBCVER >= 0x0300) void trace_SQLSetDescRec (int trace_leave, int retcode, SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT Type, SQLSMALLINT SubType, SQLLEN Length, SQLSMALLINT Precision, SQLSMALLINT Scale, SQLPOINTER Data, SQLLEN * StringLength, SQLLEN * Indicator); #endif /* SetEnvAttr.c */ void trace_SQLSetEnvAttr (int trace_leave, int retcode, SQLHENV EnvironmentHandle, SQLINTEGER Attribute, SQLPOINTER ValuePtr, SQLINTEGER StringLength); /* SetPos.c */ void _trace_setpos_irow (SQLSETPOSIROW i); void _trace_setpos_oper (SQLUSMALLINT type); void _trace_setpos_lock (SQLUSMALLINT type); void trace_SQLSetPos (int trace_leave, int retcode, SQLHSTMT hstmt, SQLSETPOSIROW irow, SQLUSMALLINT fOption, SQLUSMALLINT fLock); /* SetScrollOptions.c */ void _trace_scrollopt_type (SQLUSMALLINT type); void trace_SQLSetScrollOptions (int trace_leave, int retcode, SQLHSTMT hstmt, SQLUSMALLINT fConcurrency, SQLINTEGER crowKeyset, SQLUSMALLINT crowRowset); /* SetStmtAttr.c */ void trace_SQLSetStmtAttr (int trace_leave, int retcode, SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLPOINTER ValuePtr, SQLINTEGER StringLength); void trace_SQLSetStmtAttrW (int trace_leave, int retcode, SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLPOINTER ValuePtr, SQLINTEGER StringLength); /* SetStmtOption.c */ void trace_SQLSetStmtOption (int trace_leave, int retcode, SQLHSTMT hstmt, SQLUSMALLINT fOption, SQLUINTEGER vParam); /* SpecialColumns.c */ void _trace_spcols_type (SQLUSMALLINT type); void _trace_spcols_scope (SQLUSMALLINT type); void _trace_spcols_null (SQLUSMALLINT type); void trace_SQLSpecialColumns (int trace_leave, int retcode, SQLHSTMT hstmt, SQLUSMALLINT fColType, SQLCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLCHAR * szTableName, SQLSMALLINT cbTableName, SQLUSMALLINT fScope, SQLUSMALLINT fNullable); void trace_SQLSpecialColumnsW (int trace_leave, int retcode, SQLHSTMT hstmt, SQLUSMALLINT fColType, SQLWCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLWCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLWCHAR * szTableName, SQLSMALLINT cbTableName, SQLUSMALLINT fScope, SQLUSMALLINT fNullable); /* Statistics.c */ void _trace_stats_unique (SQLUSMALLINT type); void _trace_stats_accuracy (SQLUSMALLINT type); void trace_SQLStatistics (int trace_leave, int retcode, SQLHSTMT hstmt, SQLCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLCHAR * szTableName, SQLSMALLINT cbTableName, SQLUSMALLINT fUnique, SQLUSMALLINT fAccuracy); void trace_SQLStatisticsW (int trace_leave, int retcode, SQLHSTMT hstmt, SQLWCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLWCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLWCHAR * szTableName, SQLSMALLINT cbTableName, SQLUSMALLINT fUnique, SQLUSMALLINT fAccuracy); /* TablePrivileges.c */ void trace_SQLTablePrivileges (int trace_leave, int retcode, SQLHSTMT hstmt, SQLCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLCHAR * szTableName, SQLSMALLINT cbTableName); void trace_SQLTablePrivilegesW (int trace_leave, int retcode, SQLHSTMT hstmt, SQLWCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLWCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLWCHAR * szTableName, SQLSMALLINT cbTableName); /* Tables.c */ void trace_SQLTables (int trace_leave, int retcode, SQLHSTMT hstmt, SQLCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLCHAR * szTableName, SQLSMALLINT cbTableName, SQLCHAR * szTableType, SQLSMALLINT cbTableType); void trace_SQLTablesW (int trace_leave, int retcode, SQLHSTMT hstmt, SQLWCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLWCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLWCHAR * szTableName, SQLSMALLINT cbTableName, SQLWCHAR * szTableType, SQLSMALLINT cbTableType); /* trace.c */ void trace_set_appname (char *appname); char *trace_get_filename (void); void trace_set_filename (char *fname); void trace_start (void); void trace_stop (void); void trace_emitc (char c); void trace_emit (char *fmt, ...) #ifdef __GNUC__ __attribute__ ((format (printf, 1, 2))) #endif ; void trace_emit_string (SQLCHAR * str, ssize_t len, int is_utf8); void trace_emit_binary (unsigned char *str, ssize_t len); void _trace_print_function (int func, int trace_leave, int retcode); void _trace_handletype (SQLSMALLINT type); void _trace_handle_p (SQLSMALLINT type, SQLHANDLE * handle, int output); void _trace_handle (SQLSMALLINT type, SQLHANDLE handle); void _trace_smallint (SQLSMALLINT i); void _trace_usmallint (SQLUSMALLINT i); void _trace_integer (SQLINTEGER i); void _trace_uinteger (SQLUINTEGER i); void _trace_pointer (SQLPOINTER p); void _trace_smallint_p (SQLSMALLINT * p, int output); void _trace_usmallint_p (SQLUSMALLINT * p, int output); void _trace_integer_p (SQLINTEGER * p, int output); void _trace_uinteger_p (SQLUINTEGER * p, int output); void _trace_stringlen (char *type, SQLINTEGER len); void _trace_len (SQLLEN i); void _trace_ulen (SQLULEN i); void _trace_len_p (SQLLEN * p, int output); void _trace_ulen_p (SQLULEN * p, int output); void _trace_string (SQLCHAR * str, SQLSMALLINT len, SQLSMALLINT * lenptr, int output); void _trace_string_w (SQLWCHAR * str, SQLSMALLINT len, SQLSMALLINT * lenptr, int output); void _trace_c_type (SQLSMALLINT type); void _trace_inouttype (SQLSMALLINT type); void _trace_sql_type (SQLSMALLINT type); void _trace_sql_type_p (SQLSMALLINT * p, int output); void _trace_sql_subtype (SQLSMALLINT * type, SQLSMALLINT * sub, int output); void _trace_bufferlen (SQLINTEGER length); /* Transact.c */ void _trace_tran_completion (SQLSMALLINT option); void trace_SQLTransact (int trace_leave, int retcode, SQLHENV EnvironmentHandle, SQLHDBC ConnectionHandle, SQLSMALLINT CompletionType); libiodbc-3.52.16/iodbc/trace/CloseCursor.c0000664000175000017500000000702414424170750015156 00000000000000/* * CloseCursor.c * * $Id$ * * SQLCloseCursor trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" #if ODBCVER >= 0x0300 void trace_SQLCloseCursor (int trace_leave, int retcode, SQLHSTMT StatementHandle) { /* Trace function */ _trace_print_function (en_CloseCursor, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, StatementHandle); } #endif libiodbc-3.52.16/iodbc/trace/SetPos.c0000664000175000017500000001103114424170750014121 00000000000000/* * SetPos.c * * $Id$ * * SQLSetPos trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void _trace_setpos_irow (SQLSETPOSIROW i) { #ifdef _WIN64 trace_emit ("\t\t%-15.15s %I64d\n", "SQLSETPOSIROW", (INT64) i); #else trace_emit ("\t\t%-15.15s %ld\n", "SQLSETPOSIROW", (long) i); #endif } void _trace_setpos_oper (SQLUSMALLINT type) { char *ptr = "unknown operation"; switch (type) { _S (SQL_POSITION); _S (SQL_REFRESH); _S (SQL_UPDATE); _S (SQL_DELETE); _S (SQL_ADD); #if ODBCVER >= 0x0300 _S (SQL_UPDATE_BY_BOOKMARK); _S (SQL_DELETE_BY_BOOKMARK); _S (SQL_FETCH_BY_BOOKMARK); #endif } trace_emit ("\t\t%-15.15s %d (%s)\n", "SQLUSMALLINT", (int) type, ptr); } void _trace_setpos_lock (SQLUSMALLINT type) { char *ptr = "unknown lock type"; switch (type) { _S (SQL_LOCK_NO_CHANGE); _S (SQL_LOCK_EXCLUSIVE); _S (SQL_LOCK_UNLOCK); } trace_emit ("\t\t%-15.15s %d (%s)\n", "SQLUSMALLINT", (int) type, ptr); } void trace_SQLSetPos (int trace_leave, int retcode, SQLHSTMT hstmt, SQLSETPOSIROW irow, SQLUSMALLINT fOption, SQLUSMALLINT fLock) { /* Trace function */ _trace_print_function (en_SetPos, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, hstmt); _trace_setpos_irow (irow); _trace_setpos_oper (fOption); _trace_setpos_lock (fLock); } libiodbc-3.52.16/iodbc/trace/ColumnPrivileges.c0000664000175000017500000001226014424170750016200 00000000000000/* * ColumnPrivileges.c * * $Id$ * * SQLColumnPrivileges trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void trace_SQLColumnPrivileges (int trace_leave, int retcode, SQLHSTMT hstmt, SQLCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLCHAR * szTableName, SQLSMALLINT cbTableName, SQLCHAR * szColumnName, SQLSMALLINT cbColumnName) { /* Trace function */ _trace_print_function (en_ColumnPrivileges, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, hstmt); _trace_string (szTableQualifier, cbTableQualifier, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableQualifier); _trace_string (szTableOwner, cbTableOwner, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableOwner); _trace_string (szTableName, cbTableName, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableName); _trace_string (szColumnName, cbColumnName, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbColumnName); } #if ODBCVER >= 0x0300 void trace_SQLColumnPrivilegesW (int trace_leave, int retcode, SQLHSTMT hstmt, SQLWCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLWCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLWCHAR * szTableName, SQLSMALLINT cbTableName, SQLWCHAR * szColumnName, SQLSMALLINT cbColumnName) { /* Trace function */ _trace_print_function (en_ColumnPrivilegesW, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, hstmt); _trace_string_w (szTableQualifier, cbTableQualifier, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableQualifier); _trace_string_w (szTableOwner, cbTableOwner, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableOwner); _trace_string_w (szTableName, cbTableName, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableName); _trace_string_w (szColumnName, cbColumnName, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbColumnName); } #endif libiodbc-3.52.16/iodbc/trace/ColAttribute.c0000664000175000017500000002755314424170750015325 00000000000000/* * ColAttribute.c * * $Id$ * * SQLColAttribute trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void _trace_colattr2_type (SQLUSMALLINT type) { char *ptr = "unknown option"; switch (type) { _S (SQL_COLUMN_COUNT); _S (SQL_COLUMN_NAME); _S (SQL_COLUMN_TYPE); _S (SQL_COLUMN_LENGTH); _S (SQL_COLUMN_PRECISION); _S (SQL_COLUMN_SCALE); _S (SQL_COLUMN_DISPLAY_SIZE); _S (SQL_COLUMN_NULLABLE); _S (SQL_COLUMN_UNSIGNED); _S (SQL_COLUMN_MONEY); _S (SQL_COLUMN_UPDATABLE); _S (SQL_COLUMN_AUTO_INCREMENT); _S (SQL_COLUMN_CASE_SENSITIVE); _S (SQL_COLUMN_SEARCHABLE); _S (SQL_COLUMN_TYPE_NAME); _S (SQL_COLUMN_TABLE_NAME); _S (SQL_COLUMN_OWNER_NAME); _S (SQL_COLUMN_QUALIFIER_NAME); _S (SQL_COLUMN_LABEL); } trace_emit ("\t\t%-15.15s %d (%s)\n", "SQLUSMALLINT ", (int) type, ptr); } #if ODBCVER >= 0x0300 void _trace_colattr3_type (SQLUSMALLINT type) { char *ptr = "unknown option"; switch (type) { _S (SQL_DESC_AUTO_UNIQUE_VALUE); _S (SQL_DESC_BASE_COLUMN_NAME); _S (SQL_DESC_BASE_TABLE_NAME); _S (SQL_DESC_CASE_SENSITIVE); _S (SQL_DESC_CATALOG_NAME); _S (SQL_DESC_CONCISE_TYPE); _S (SQL_DESC_COUNT); _S (SQL_DESC_DISPLAY_SIZE); _S (SQL_DESC_FIXED_PREC_SCALE); _S (SQL_DESC_LABEL); _S (SQL_DESC_LENGTH); _S (SQL_DESC_LITERAL_PREFIX); _S (SQL_DESC_LITERAL_SUFFIX); _S (SQL_DESC_LOCAL_TYPE_NAME); _S (SQL_DESC_NAME); _S (SQL_DESC_NULLABLE); _S (SQL_DESC_NUM_PREC_RADIX); _S (SQL_DESC_OCTET_LENGTH); _S (SQL_DESC_PRECISION); _S (SQL_DESC_SCALE); _S (SQL_DESC_SCHEMA_NAME); _S (SQL_DESC_SEARCHABLE); _S (SQL_DESC_TABLE_NAME); _S (SQL_DESC_TYPE); _S (SQL_DESC_TYPE_NAME); _S (SQL_DESC_UNNAMED); _S (SQL_DESC_UNSIGNED); _S (SQL_DESC_UPDATABLE); } trace_emit ("\t\t%-15.15s %d (%s)\n", "SQLUSMALLINT ", (int) type, ptr); } #endif #if ODBCVER >= 0x0300 static void _trace_colattr3_data ( SQLUSMALLINT FieldIdentifier, SQLPOINTER CharacterAttributePtr, SQLSMALLINT BufferLength, SQLSMALLINT * StringLengthPtr, SQLLEN * NumericAttributePtr, int w_mode, int output) { int type = 0; switch (FieldIdentifier) { 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_TYPE_NAME: case SQL_DESC_TABLE_NAME: type = 1; /* string */ break; case SQL_DESC_CONCISE_TYPE: case SQL_DESC_COUNT: case SQL_DESC_DISPLAY_SIZE: case SQL_DESC_LENGTH: case SQL_DESC_NUM_PREC_RADIX: case SQL_DESC_OCTET_LENGTH: case SQL_DESC_PRECISION: case SQL_DESC_SCALE: case SQL_DESC_TYPE: type = 2; /* integer */ break; case SQL_DESC_AUTO_UNIQUE_VALUE: case SQL_DESC_CASE_SENSITIVE: case SQL_DESC_FIXED_PREC_SCALE: case SQL_DESC_UNSIGNED: type = 3; /* boolean */ break; case SQL_DESC_NULLABLE: type = 4; break; case SQL_DESC_SEARCHABLE: type = 5; break; case SQL_DESC_UNNAMED: type = 6; break; case SQL_DESC_UPDATABLE: type = 7; break; default: type = 0; /* unknown */ break; } /* * If we cannot determine the type or we are entering, just * emit the pointers */ if (type == 0 || !output) { _trace_pointer (CharacterAttributePtr); _trace_bufferlen ((SQLINTEGER) BufferLength); _trace_smallint_p (StringLengthPtr, output); _trace_len_p (NumericAttributePtr, output); return; } if (type == 1) /* string */ { if (w_mode) _trace_string_w (CharacterAttributePtr, BufferLength, StringLengthPtr, output); else _trace_string (CharacterAttributePtr, BufferLength, StringLengthPtr, output); _trace_bufferlen ((SQLINTEGER) BufferLength); _trace_smallint_p (StringLengthPtr, output); _trace_len_p (NumericAttributePtr, 0); /* just display pointer */ } else /* integer */ { _trace_pointer (CharacterAttributePtr); _trace_bufferlen ((SQLINTEGER) BufferLength); _trace_smallint_p (StringLengthPtr, 0); /* just display pointer */ if (!NumericAttributePtr) /* null pointer */ trace_emit ("\t\t%-15.15s * 0x0\n", "SQLLEN"); else if (type == 3) /* boolean */ { trace_emit ("\t\t%-15.15s * %p (%s)\n", "SQLLEN", NumericAttributePtr, *(SQLLEN *) NumericAttributePtr ? "SQL_TRUE" : "SQL_FALSE"); } else if (type == 4) /* nullable */ { char *ptr = "unknown nullable type"; switch (*NumericAttributePtr) { _S (SQL_NULLABLE); _S (SQL_NULLABLE_UNKNOWN); _S (SQL_NO_NULLS); } trace_emit ("\t\t%-15.15s * %p (%s)\n", "SQLLEN", NumericAttributePtr, ptr); } else if (type == 5) /* searchable */ { char *ptr = "unknown searchable type"; switch (*NumericAttributePtr) { _S (SQL_PRED_NONE); _S (SQL_PRED_CHAR); _S (SQL_PRED_BASIC); _S (SQL_PRED_SEARCHABLE); } trace_emit ("\t\t%-15.15s * %p (%s)\n", "SQLLEN", NumericAttributePtr, ptr); } else if (type == 6) /* named */ { char *ptr = "unknown named type"; switch (*NumericAttributePtr) { _S (SQL_NAMED); _S (SQL_UNNAMED); } trace_emit ("\t\t%-15.15s * %p (%s)\n", "SQLLEN", NumericAttributePtr, ptr); } else if (type == 7) /* updatable */ { char *ptr = "unknown updatable type"; switch (*NumericAttributePtr) { _S (SQL_ATTR_READONLY); _S (SQL_ATTR_WRITE); _S (SQL_ATTR_READWRITE_UNKNOWN); } trace_emit ("\t\t%-15.15s * %p (%s)\n", "SQLLEN", NumericAttributePtr, ptr); } else /* just a value */ { _trace_len_p (NumericAttributePtr, output); } } return; } #endif #if ODBCVER >= 0x0300 void trace_SQLColAttribute (int trace_leave, int retcode, SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLUSMALLINT FieldIdentifier, SQLPOINTER CharacterAttributePtr, SQLSMALLINT BufferLength, SQLSMALLINT * StringLengthPtr, SQLLEN * NumericAttributePtr ) { /* Trace function */ _trace_print_function (en_ColAttribute, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, StatementHandle); _trace_usmallint (ColumnNumber); _trace_colattr3_type (FieldIdentifier); _trace_colattr3_data (FieldIdentifier, CharacterAttributePtr, BufferLength, StringLengthPtr, NumericAttributePtr, 0, TRACE_OUTPUT_SUCCESS); } #endif #if ODBCVER >= 0x0300 void trace_SQLColAttributeW (int trace_leave, int retcode, SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLUSMALLINT FieldIdentifier, SQLPOINTER CharacterAttributePtr, SQLSMALLINT BufferLength, SQLSMALLINT * StringLengthPtr, SQLLEN * NumericAttributePtr ) { /* Trace function */ _trace_print_function (en_ColAttributeW, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, StatementHandle); _trace_usmallint (ColumnNumber); _trace_colattr3_type (FieldIdentifier); _trace_colattr3_data (FieldIdentifier, CharacterAttributePtr, BufferLength, StringLengthPtr, NumericAttributePtr, 1, TRACE_OUTPUT_SUCCESS); } #endif void trace_SQLColAttributes (int trace_leave, int retcode, SQLHSTMT StatementHandle, SQLUSMALLINT icol, SQLUSMALLINT fDescType, SQLPOINTER rgbDesc, SQLSMALLINT cbDescMax, SQLSMALLINT * pcbDesc, SQLLEN * pfDesc) { /* Trace function */ _trace_print_function (en_ColAttributes, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, StatementHandle); _trace_usmallint (icol); _trace_colattr2_type (fDescType); _trace_pointer (rgbDesc); /* TODO */ _trace_smallint (cbDescMax); _trace_smallint_p (pcbDesc, TRACE_OUTPUT_SUCCESS); _trace_len_p (pfDesc, TRACE_OUTPUT_SUCCESS); } #if ODBCVER >= 0x0300 void trace_SQLColAttributesW (int trace_leave, int retcode, SQLHSTMT StatementHandle, SQLUSMALLINT icol, SQLUSMALLINT fDescType, SQLPOINTER rgbDesc, SQLSMALLINT cbDescMax, SQLSMALLINT * pcbDesc, SQLLEN * pfDesc) { /* Trace function */ _trace_print_function (en_ColAttributeW, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, StatementHandle); _trace_usmallint (icol); _trace_colattr2_type (fDescType); _trace_pointer (rgbDesc); /* TODO */ _trace_smallint (cbDescMax); _trace_smallint_p (pcbDesc, TRACE_OUTPUT_SUCCESS); _trace_len_p (pfDesc, TRACE_OUTPUT_SUCCESS); } #endif libiodbc-3.52.16/iodbc/trace/Disconnect.c0000664000175000017500000000676414424170750015016 00000000000000/* * Disconnect.c * * $Id$ * * SQLDisconnect trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void trace_SQLDisconnect (int trace_leave, int retcode, SQLHDBC ConnectionHandle) { /* Trace function */ _trace_print_function (en_Disconnect, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_DBC, ConnectionHandle); } libiodbc-3.52.16/iodbc/trace/NumResultCols.c0000664000175000017500000000707514424170750015500 00000000000000/* * NumResultCols.c * * $Id$ * * SQLNumResultCols trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void trace_SQLNumResultCols (int trace_leave, int retcode, SQLHSTMT hstmt, SQLSMALLINT * pccol) { /* Trace function */ _trace_print_function (en_NumResultCols, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, hstmt); _trace_smallint_p (pccol, TRACE_OUTPUT_SUCCESS); } libiodbc-3.52.16/iodbc/trace/GetDiagField.c0000664000175000017500000001240014424170750015155 00000000000000/* * GetDiagField.c * * $Id$ * * SQLGetDiagField trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" #if ODBCVER >= 0x0300 void _trace_diag_type (SQLSMALLINT type) { char *ptr = "unknown diag identifier"; switch (type) { _S (SQL_DIAG_CLASS_ORIGIN); _S (SQL_DIAG_COLUMN_NUMBER); _S (SQL_DIAG_CONNECTION_NAME); _S (SQL_DIAG_CURSOR_ROW_COUNT); _S (SQL_DIAG_DYNAMIC_FUNCTION); _S (SQL_DIAG_DYNAMIC_FUNCTION_CODE); _S (SQL_DIAG_MESSAGE_TEXT); _S (SQL_DIAG_NATIVE); _S (SQL_DIAG_NUMBER); _S (SQL_DIAG_RETURNCODE); _S (SQL_DIAG_ROW_COUNT); _S (SQL_DIAG_ROW_NUMBER); _S (SQL_DIAG_SERVER_NAME); _S (SQL_DIAG_SQLSTATE); _S (SQL_DIAG_SUBCLASS_ORIGIN); } trace_emit ("\t\t%-15.15s %d (%s)\n", "SQLUSMALLINT ", (int) type, ptr); } void trace_SQLGetDiagField (int trace_leave, int retcode, SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT RecNumber, SQLSMALLINT DiagIdentifier, SQLPOINTER DiagInfoPtr, SQLSMALLINT BufferLength, SQLSMALLINT * StringLengthPtr) { /* Trace function */ _trace_print_function (en_GetDiagField, trace_leave, retcode); /* Trace Arguments */ _trace_handletype (HandleType); _trace_handle (HandleType, Handle); _trace_smallint (RecNumber); _trace_diag_type (DiagIdentifier); _trace_pointer (DiagInfoPtr); _trace_bufferlen ((SQLINTEGER) BufferLength); _trace_smallint_p (StringLengthPtr, TRACE_OUTPUT_SUCCESS); } void trace_SQLGetDiagFieldW (int trace_leave, int retcode, SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT RecNumber, SQLSMALLINT DiagIdentifier, SQLPOINTER DiagInfoPtr, SQLSMALLINT BufferLength, SQLSMALLINT * StringLengthPtr) { /* Trace function */ _trace_print_function (en_GetDiagFieldW, trace_leave, retcode); /* Trace Arguments */ _trace_handletype (HandleType); _trace_handle (HandleType, Handle); _trace_smallint (RecNumber); _trace_diag_type (DiagIdentifier); _trace_pointer (DiagInfoPtr); _trace_bufferlen ((SQLINTEGER) BufferLength); _trace_smallint_p (StringLengthPtr, trace_leave); } #endif libiodbc-3.52.16/iodbc/trace/Statistics.c0000664000175000017500000001302414424170750015042 00000000000000/* * Statistics.c * * $Id$ * * SQLStatistics trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void _trace_stats_unique (SQLUSMALLINT type) { char *ptr = "unknown option"; switch (type) { _S (SQL_INDEX_ALL); _S (SQL_INDEX_UNIQUE); } trace_emit ("\t\t%-15.15s %d (%s)\n", "SQLUSMALLINT ", (int) type, ptr); } void _trace_stats_accuracy (SQLUSMALLINT type) { char *ptr = "unknown option"; switch (type) { _S (SQL_ENSURE); _S (SQL_QUICK); } trace_emit ("\t\t%-15.15s %d (%s)\n", "SQLUSMALLINT ", (int) type, ptr); } void trace_SQLStatistics (int trace_leave, int retcode, SQLHSTMT hstmt, SQLCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLCHAR * szTableName, SQLSMALLINT cbTableName, SQLUSMALLINT fUnique, SQLUSMALLINT fAccuracy) { /* Trace function */ _trace_print_function (en_Statistics, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, hstmt); _trace_string (szTableQualifier, cbTableQualifier, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableQualifier); _trace_string (szTableOwner, cbTableOwner, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableOwner); _trace_string (szTableName, cbTableName, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableName); _trace_stats_unique (fUnique); _trace_stats_accuracy (fAccuracy); } #if ODBCVER >= 0x0300 void trace_SQLStatisticsW (int trace_leave, int retcode, SQLHSTMT hstmt, SQLWCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLWCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLWCHAR * szTableName, SQLSMALLINT cbTableName, SQLUSMALLINT fUnique, SQLUSMALLINT fAccuracy) { /* Trace function */ _trace_print_function (en_Statistics, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, hstmt); _trace_string_w (szTableQualifier, cbTableQualifier, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableQualifier); _trace_string_w (szTableOwner, cbTableOwner, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableOwner); _trace_string_w (szTableName, cbTableName, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbTableName); _trace_stats_unique (fUnique); _trace_stats_accuracy (fAccuracy); } #endif libiodbc-3.52.16/iodbc/trace/AllocEnv.c0000664000175000017500000000675614424170750014431 00000000000000/* * AllocEnv.c * * $Id$ * * SQLAllocEnv trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void trace_SQLAllocEnv(int trace_leave, int retcode, SQLHENV * phenv) { /* Trace function */ _trace_print_function (en_AllocEnv, trace_leave, retcode); /* Trace Arguments */ _trace_handle_p (SQL_HANDLE_ENV, phenv, TRACE_OUTPUT_SUCCESS); } libiodbc-3.52.16/iodbc/trace/Fetch.c0000664000175000017500000000671514424170750013752 00000000000000/* * Fetch.c * * $Id$ * * SQLFetch trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void trace_SQLFetch (int trace_leave, int retcode, SQLHSTMT hstmt) { /* Trace function */ _trace_print_function (en_Fetch, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, hstmt); } libiodbc-3.52.16/iodbc/trace/SetDescRec.c0000664000175000017500000001002514424170750014672 00000000000000/* * SetDescRec.c * * $Id$ * * SQLSetDescRec trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" #if ODBCVER >= 0x0300 void trace_SQLSetDescRec (int trace_leave, int retcode, SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT Type, SQLSMALLINT SubType, SQLLEN Length, SQLSMALLINT Precision, SQLSMALLINT Scale, SQLPOINTER Data, SQLLEN * StringLength, SQLLEN * Indicator) { /* Trace function */ _trace_print_function (en_SetDescRec, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_DESC, DescriptorHandle); _trace_smallint (RecNumber); _trace_smallint (Type); _trace_smallint (SubType); _trace_len (Length); _trace_smallint (Precision); _trace_smallint (Scale); _trace_pointer (Data); _trace_len_p (StringLength, TRACE_OUTPUT_SUCCESS); _trace_len_p (Indicator, TRACE_OUTPUT_SUCCESS); } #endif libiodbc-3.52.16/iodbc/trace/ProcedureColumns.c0000664000175000017500000001224414424170750016204 00000000000000/* * ProcedureColumns.c * * $Id$ * * SQLProcedureColumns trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void trace_SQLProcedureColumns (int trace_leave, int retcode, SQLHSTMT hstmt, SQLCHAR * szProcQualifier, SQLSMALLINT cbProcQualifier, SQLCHAR * szProcOwner, SQLSMALLINT cbProcOwner, SQLCHAR * szProcName, SQLSMALLINT cbProcName, SQLCHAR * szColumnName, SQLSMALLINT cbColumnName) { /* Trace function */ _trace_print_function (en_ProcedureColumns, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, hstmt); _trace_string (szProcQualifier, cbProcQualifier, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbProcQualifier); _trace_string (szProcOwner, cbProcOwner, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbProcOwner); _trace_string (szProcName, cbProcName, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbProcName); _trace_string (szColumnName, cbColumnName, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbColumnName); } #if ODBCVER >= 0x0300 void trace_SQLProcedureColumnsW (int trace_leave, int retcode, SQLHSTMT hstmt, SQLWCHAR * szProcQualifier, SQLSMALLINT cbProcQualifier, SQLWCHAR * szProcOwner, SQLSMALLINT cbProcOwner, SQLWCHAR * szProcName, SQLSMALLINT cbProcName, SQLWCHAR * szColumnName, SQLSMALLINT cbColumnName) { /* Trace function */ _trace_print_function (en_ProcedureColumnsW, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, hstmt); _trace_string_w (szProcQualifier, cbProcQualifier, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbProcQualifier); _trace_string_w (szProcOwner, cbProcOwner, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbProcOwner); _trace_string_w (szProcName, cbProcName, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbProcName); _trace_string_w (szColumnName, cbColumnName, NULL, TRACE_INPUT); _trace_stringlen ("SQLSMALLINT", cbColumnName); } #endif libiodbc-3.52.16/iodbc/trace/CopyDesc.c0000664000175000017500000000713714424170750014431 00000000000000/* * CopyDesc.c * * $Id$ * * SQLCopyDesc trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" #if ODBCVER >= 0x0300 void trace_SQLCopyDesc (int trace_leave, int retcode, SQLHDESC SourceDescHandle, SQLHDESC TargetDescHandle) { /* Trace function */ _trace_print_function (en_CopyDesc, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_DESC, SourceDescHandle); _trace_handle (SQL_HANDLE_DESC, TargetDescHandle); } #endif libiodbc-3.52.16/iodbc/trace/GetStmtOption.c0000664000175000017500000001026014424170750015467 00000000000000/* * GetStmtOption.c * * $Id$ * * SQLGetStmtOption trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void _trace_stmtopt_type (SQLUSMALLINT type) { char *ptr = "unknown statement option"; switch (type) { _S (SQL_ASYNC_ENABLE); _S (SQL_BIND_TYPE); _S (SQL_CONCURRENCY); _S (SQL_CURSOR_TYPE); _S (SQL_KEYSET_SIZE); _S (SQL_MAX_LENGTH); _S (SQL_MAX_ROWS); _S (SQL_NOSCAN); _S (SQL_QUERY_TIMEOUT); _S (SQL_RETRIEVE_DATA); _S (SQL_ROWSET_SIZE); _S (SQL_SIMULATE_CURSOR); _S (SQL_USE_BOOKMARKS); } trace_emit ("\t\t%-15.15s %d (%s)\n", "SQLUSMALLINT ", (int) type, ptr); } void trace_SQLGetStmtOption (int trace_leave, int retcode, SQLHSTMT StatementHandle, SQLUSMALLINT Attribute, SQLPOINTER ValuePtr) { /* Trace function */ _trace_print_function (en_GetStmtOption, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, StatementHandle); _trace_stmtopt_type (Attribute); _trace_pointer (ValuePtr); } libiodbc-3.52.16/iodbc/trace/ParamOptions.c0000664000175000017500000000712714424170750015333 00000000000000/* * ParamOptions.c * * $Id$ * * SQLParamOptions trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "trace.h" void trace_SQLParamOptions (int trace_leave, int retcode, SQLHSTMT hstmt, SQLULEN crow, SQLULEN * pirow) { /* Trace function */ _trace_print_function (en_ParamOptions, trace_leave, retcode); /* Trace Arguments */ _trace_handle (SQL_HANDLE_STMT, hstmt); _trace_ulen (crow); _trace_ulen_p (pirow, TRACE_OUTPUT_SUCCESS); } libiodbc-3.52.16/iodbc/trace/trace.c0000664000175000017500000006422014424170750014012 00000000000000/* * trace.c * * $Id$ * * Trace functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include #ifdef TIME_WITH_SYS_TIME #include #endif #include #include #include #include "unicode.h" #include "herr.h" #include "henv.h" #include "ithread.h" #include "trace.h" #define NO_CARBON 1 #if defined(macintosh) # include # include # include #elif defined(__APPLE__) && !defined(NO_CARBON) # include #endif /* * Limit the size of the tracefile, to avoid a core dump when the * the RLIMIT_FSIZE is reached. */ #define MAX_TRACEFILE_LEN 1000000000L /* about 1GB */ /* * Global trace flag */ int ODBCSharedTraceFlag = SQL_OPT_TRACE_OFF; static char *trace_appname = NULL; static char *trace_fname = NULL; static char *trace_fname_template = NULL; static FILE *trace_fp = NULL; static int trace_fp_close = 0; void trace_emit (char *fmt, ...); #ifdef HAVE_GETTIMEOFDAY static struct timeval starttime = {0}; #endif /* * Internal functions */ void trace_set_appname (char *appname) { MEM_FREE (trace_appname); trace_appname = STRDUP (appname); } char * trace_get_filename (void) { return STRDUP (trace_fname); } static void trace_strftime_now (char *buf, size_t buflen, char *format) { time_t now; struct tm *timeNow; #ifdef HAVE_LOCALTIME_R struct tm keeptime; #endif tzset (); time (&now); #ifdef HAVE_LOCALTIME_R timeNow = localtime_r (&now, &keeptime); #else timeNow = localtime (&now); #endif strftime (buf, buflen, format, timeNow); } void trace_set_filename (char *template) { char *s, *p; struct passwd *pwd; char *buf; size_t buf_len, buf_pos; char tmp[4096]; /* Make copy of template */ if (template) { MEM_FREE (trace_fname_template) trace_fname_template = STRDUP (template); } /* Initialize */ MEM_FREE (trace_fname); trace_fname = NULL; buf = (char *) malloc (buf_len = strlen (trace_fname_template) + sizeof (tmp) + 1); if (!buf) return; /* No more memory */ buf_pos = 0; buf[0] = '\0'; for (s = trace_fname_template; *s;) { /* * Make sure we can fit at least 1 more tmp buffer inside */ if (buf_len - buf_pos < sizeof (tmp)) buf = realloc (buf, buf_len += sizeof (tmp) + 1); if (!buf) return; /* No more memory */ if (*s != '$') { buf[buf_pos++] = *s++; } else { /* Handle Escape sequences */ switch (*(s + 1)) { case '$': { buf[buf_pos++] = '$'; break; } case 'p': case 'P': { #if defined (HAVE_SNPRINTF) snprintf (tmp, sizeof (tmp), "%ld", (long) getpid ()); #else sprintf (tmp, "%ld", (long) getpid ()); #endif strcpy (&buf[buf_pos], tmp); buf_pos += strlen (tmp); break; } case 'u': case 'U': { if ((pwd = getpwuid (getuid ())) != NULL) { #if defined (HAVE_SNPRINTF) snprintf (tmp, sizeof (tmp), "%s", pwd->pw_name); #else sprintf (tmp, "%s", pwd->pw_name); #endif strcpy (&buf[buf_pos], tmp); buf_pos += strlen (tmp); } break; } case 'h': case 'H': { p = NULL; if ((p = getenv ("HOME")) == NULL) { if ((pwd = getpwuid (getuid ())) != NULL) p = pwd->pw_dir; } if (p) { #if defined (HAVE_SNPRINTF) snprintf (tmp, sizeof (tmp), "%s", p); #else sprintf (tmp, "%s", p); #endif strcpy (&buf[buf_pos], tmp); buf_pos += strlen (tmp); } break; } case 't': case 'T': { trace_strftime_now (tmp, sizeof (tmp), "%Y%m%d-%H%M%S"); strcpy (&buf[buf_pos], tmp); buf_pos += strlen (tmp); break; } case 's': case 'S': { static unsigned int counter = 0; #if defined (HAVE_SNPRINTF) snprintf (tmp, sizeof (tmp), "%d", ++counter); #else sprintf (tmp, "%d", ++counter); #endif strcpy (&buf[buf_pos], tmp); buf_pos += strlen (tmp); } default: /* Skip unknown escapes */ break; } s += 2; } } buf[buf_pos] = '\0'; trace_fname = buf; return; } void trace_start(void) { /* * First stop any previous trace */ trace_stop (); #ifdef HAVE_GETTIMEOFDAY gettimeofday (&starttime, NULL); #endif /* * If no trace filename is specified, use the default */ if (!trace_fname) trace_fname = STRDUP (SQL_OPT_TRACE_FILE_DEFAULT); #if defined (stderr) else if (STRCASEEQ (trace_fname, "stderr")) { trace_fp = stderr; } #endif else { int fd; int fd_flags = O_WRONLY | O_CREAT | O_TRUNC; int fd_mode = 0644; #if defined (unix) /* * As this is a security risk, we do not allow root to overwrite a file */ if (geteuid () == 0) { fd_flags |= O_EXCL; } #endif fd = open (trace_fname, fd_flags, fd_mode); if (fd < 0 || (trace_fp = fdopen (fd, "w")) == NULL) { return; /* no tracing */ } trace_fp_close = 1; /* * Set trace stream to line buffered */ setvbuf (trace_fp, NULL, _IOLBF, 0); } /* * Initialize the debug stream */ if (trace_fp == NULL) { return; } else { char mesgBuf[200]; trace_emit ("** iODBC Trace file\n"); /* * Show start time */ trace_strftime_now (mesgBuf, sizeof (mesgBuf), "** Trace started on %a %b %d %H:%M:%S %Y"); trace_emit ("%s\n", mesgBuf); /* * Show Driver Manager version similar to SQLGetInfo (SQL_DM_VER) */ sprintf ((char *) mesgBuf, "%02d.%02d.%04d.%04d", SQL_SPEC_MAJOR, SQL_SPEC_MINOR, IODBC_BUILD / 10000, IODBC_BUILD % 10000); trace_emit ("** Driver Manager: %s\n\n", mesgBuf); } #if defined (linux) { extern char *__progname; trace_set_appname (__progname); } #elif defined(macintosh) || (defined(__APPLE__) && !defined(NO_CARBON)) { ProcessSerialNumber PSN; ProcessInfoRec prec; unsigned char processName[40]; GetCurrentProcess (&PSN); prec.processInfoLength = sizeof (ProcessInfoRec); prec.processName = processName; prec.processAppSpec = NULL; if (GetProcessInformation (&PSN, &prec) == noErr) { processName[processName[0] + 1] = '\0'; trace_set_appname (processName + 1); } else trace_set_appname ("{No Application Name}"); } #elif defined(__APPLE__) { trace_set_appname ((char *) getprogname ()); } #endif /* * Turn on tracing flag */ ODBCSharedTraceFlag = SQL_OPT_TRACE_ON; return; } void trace_stop(void) { char mesgBuf[200]; if (trace_fp) { /* * Show end time */ trace_strftime_now (mesgBuf, sizeof (mesgBuf), "** Trace finished on %a %b %d %H:%M:%S %Y"); trace_emit ("\n%s\n", mesgBuf); if (trace_fp_close) fclose (trace_fp); } ODBCSharedTraceFlag = SQL_OPT_TRACE_OFF; trace_fp = NULL; trace_fp_close = 0; } void trace_emitc (char c) { /* * Make sure tracing is enabled */ if (!trace_fp) { ODBCSharedTraceFlag = SQL_OPT_TRACE_OFF; return; } fputc (c, trace_fp); } void trace_emit (char *fmt, ...) { va_list ap; /* * Make sure tracing is enabled */ if (!trace_fp) { ODBCSharedTraceFlag = SQL_OPT_TRACE_OFF; return; } va_start (ap, fmt); vfprintf (trace_fp, fmt, ap); va_end (ap); } void trace_emit_string (SQLCHAR *str, ssize_t len, int is_utf8) { ssize_t length = len; int i, j; int col; SQLCHAR *ptr; int bytes; int truncated = 0; if (!str) return; if (len == SQL_NTS) length = STRLEN ((char *) str); if (len <= 0) return; /* * Guard against very long strings */ if (length > MAX_EMIT_STRING) { length = MAX_EMIT_STRING; truncated = 1; } /* * Dump the (optional UTF-8) string in chunks of 40 characters */ ptr = str; col = 0; for (i = 0; i < length; i += bytes) { register int c = *ptr; /* * Assume this is a nul-terminated string */ if (!c) break; /* * Print prefix */ if (col == 0) trace_emit ("\t\t\t\t | "); /* * Take care of UTF-8 encoding */ if (!is_utf8) bytes = 1; else if (c < 128) bytes = 1; else if ((c & 0xE0) == 0xC0) bytes = 2; else if ((c & 0xF0) == 0xE0) bytes = 3; else if ((c & 0xF8) == 0xF0) bytes = 4; else if ((c & 0xFC) == 0xF8) bytes = 5; else if ((c & 0xFE) == 0xFC) bytes = 6; else bytes = -1; /* Wrong UTF8 character */ if (bytes > 0) { /* * Emit the number of bytes calculated */ for (j = 0; j < bytes; j++) trace_emitc (*ptr++); } else { /* * Skip this bogus UTF8 character sequence and emit a single # */ for (bytes = 1, ptr++; (*ptr & 0xC0) == 0x80; bytes++) ptr++; trace_emitc ('#'); } /* * After 40 characters, start a new line */ if (++col >= 40) { trace_emit (" |\n"); col = 0; } } /* * Pad the last part of the string with spaces */ if (col > 0) { for (i = col; i < 40; i++) trace_emitc (' '); trace_emit (" |\n"); } if (truncated) trace_emit ("\t\t\t\t | %-40.40s |\n", "(truncated)"); } void trace_emit_binary (unsigned char *str, ssize_t len) { ssize_t length = len; int i; int col; unsigned char *ptr; int truncated = 0; char buf[80]; char *HEX = "0123456789ABCDEF"; if (!str || len <= 0) return; /* * Guard against very long binary buffers */ if (length > MAX_EMIT_BINARY) { length = MAX_EMIT_BINARY; truncated = 1; } ptr = str; col = 0; memset (buf, ' ', sizeof (buf)); buf[40] = '\0'; for (i = 0; i < length; i++) { unsigned char c = *ptr++; /* * Put data into buffer */ buf[3 * col] = HEX[(c >> 4) & 0xF]; buf[3 * col + 1] = HEX[c & 0xF]; if (isprint (c)) buf[30 + col] = c; else buf[30 + col] = '.'; /* * After 10 bytes, start a new line */ if (++col > 9) { trace_emit_string ((SQLCHAR *) buf, 40, 0); col = 0; memset (buf, ' ', sizeof (buf)); } } /* * Pad the last part of the string with spaces */ if (col > 0) trace_emit_string ((SQLCHAR *) buf, 40, 0); if (truncated) trace_emit ("\t\t\t\t | %-40.40s |\n", "(truncated)"); } void _trace_print_function (int func, int trace_leave, int retcode) { extern char *odbcapi_symtab[]; char *ptr = "invalid retcode"; #ifdef HAVE_GETTIMEOFDAY struct timeval tv; #endif /* * Guard against tracefile getting too big */ if (trace_fp && ftell (trace_fp) > MAX_TRACEFILE_LEN) { trace_emit ("\n*** TRACEFILE LIMIT REACHED ***\n"); trace_stop (); trace_set_filename (NULL); trace_start (); trace_emit ("\n*** TRACEFILE CONTINUED ***\n\n"); return; } /* * Calculate timestamp */ #ifdef HAVE_GETTIMEOFDAY gettimeofday (&tv, NULL); tv.tv_sec -= starttime.tv_sec; tv.tv_usec -= starttime.tv_usec; if (tv.tv_usec < 0) { tv.tv_sec--; tv.tv_usec += 1000000L; } trace_emit ("\n[%06ld.%06ld]\n", (long) tv.tv_sec, (long) tv.tv_usec); #else trace_emit ("\n"); #endif switch (retcode) { _S (SQL_SUCCESS); _S (SQL_SUCCESS_WITH_INFO); _S (SQL_NO_DATA_FOUND); _S (SQL_NEED_DATA); _S (SQL_INVALID_HANDLE); _S (SQL_ERROR); _S (SQL_STILL_EXECUTING); } #ifndef THREAD_IDENT #define THREAD_IDENT 0UL #endif if (trace_leave == TRACE_LEAVE) trace_emit ("%-15.15s %08lX EXIT %s with return code %d (%s)\n", trace_appname ? trace_appname : "Application", THREAD_IDENT, odbcapi_symtab[func], retcode, ptr); else trace_emit ("%-15.15s %08lX ENTER %s\n", trace_appname ? trace_appname : "Application", THREAD_IDENT, odbcapi_symtab[func]); } static char *_trace_sym_handletype[] = { "SQLHANDLE", "SQLHENV", "SQLHDBC", "SQLHSTMT", "SQLDESC", "SQLSENV" }; void _trace_handletype (SQLSMALLINT type) { char *ptr = "invalid handle type"; switch (type) { _S (SQL_HANDLE_ENV); _S (SQL_HANDLE_DBC); _S (SQL_HANDLE_STMT); #if ODBCVER >= 0x0300 _S (SQL_HANDLE_DESC); _S (SQL_HANDLE_SENV); #endif } trace_emit ("\t\t%-15.15s %d (%s)\n", "SQLSMALLINT", (int) type, ptr); } void _trace_handle_p (SQLSMALLINT type, SQLHANDLE * handle, int output) { if (!handle) trace_emit ("\t\t%-15.15s * 0x0 (%s)\n", _trace_sym_handletype[type], "SQL_NULL_HANDLE"); else if (output) trace_emit ("\t\t%-15.15s * %p (%p)\n", _trace_sym_handletype[type], handle, *handle); else trace_emit ("\t\t%-15.15s * %p\n", _trace_sym_handletype[type], handle); } void _trace_handle (SQLSMALLINT type, SQLHANDLE handle) { if (!handle) trace_emit ("\t\t%-15.15s 0x0 (%s)\n", _trace_sym_handletype[type], "SQL_NULL_HANDLE"); else trace_emit ("\t\t%-15.15s %p\n", _trace_sym_handletype[type], handle); } /* * Trace basic data types */ void _trace_smallint (SQLSMALLINT i) { trace_emit ("\t\t%-15.15s %ld\n", "SQLSMALLINT", (long) i); } void _trace_usmallint (SQLUSMALLINT i) { trace_emit ("\t\t%-15.15s %lu\n", "SQLUSMALLINT", (unsigned long) i); } void _trace_integer (SQLINTEGER i) { trace_emit ("\t\t%-15.15s %ld\n", "SQLINTEGER", (long) i); } void _trace_uinteger (SQLUINTEGER i) { trace_emit ("\t\t%-15.15s %lu\n", "SQLUINTEGER", (unsigned long) i); } void _trace_pointer (SQLPOINTER p) { if (!p) trace_emit ("\t\t%-15.15s 0x0\n", "SQLPOINTER"); else trace_emit ("\t\t%-15.15s %p\n", "SQLPOINTER", p); } void _trace_smallint_p (SQLSMALLINT *p, int output) { if (!p) trace_emit ("\t\t%-15.15s * 0x0\n", "SQLSMALLINT"); else if (output) trace_emit ("\t\t%-15.15s * %p (%ld)\n", "SQLSMALLINT", p, (long) *p); else trace_emit ("\t\t%-15.15s * %p\n", "SQLSMALLINT", p); } void _trace_usmallint_p (SQLUSMALLINT *p, int output) { if (!p) trace_emit ("\t\t%-15.15s * 0x0\n", "SQLUSMALLINT"); else if (output) trace_emit ("\t\t%-15.15s * %p (%lu)\n", "SQLUSMALLINT", p, (unsigned long) *p); else trace_emit ("\t\t%-15.15s * %p\n", "SQLUSMALLINT", p); } void _trace_integer_p (SQLINTEGER *p, int output) { if (!p) trace_emit ("\t\t%-15.15s * 0x0\n", "SQLINTEGER"); else if (output) trace_emit ("\t\t%-15.15s * %p (%ld)\n", "SQLINTEGER", p, (long) *p); else trace_emit ("\t\t%-15.15s * %p\n", "SQLINTEGER", p); } void _trace_uinteger_p (SQLUINTEGER *p, int output) { if (!p) trace_emit ("\t\t%-15.15s * 0x0\n", "SQLUINTEGER"); else if (output) trace_emit ("\t\t%-15.15s * %p (%lu)\n", "SQLUINTEGER", p, (unsigned long) *p); else trace_emit ("\t\t%-15.15s * %p\n", "SQLUINTEGER", p); } void _trace_stringlen (char *type, SQLINTEGER len) { if (len == SQL_NTS) trace_emit ("\t\t%-15.15s %ld (SQL_NTS)\n", type, (long) len); else trace_emit ("\t\t%-15.15s %ld\n", type, (long) len); } void _trace_len (SQLLEN i) { #ifdef _WIN64 trace_emit ("\t\t%-15.15s %I64d\n", "SQLLEN", (INT64) i); #else trace_emit ("\t\t%-15.15s %ld\n", "SQLLEN", (long) i); #endif } void _trace_ulen (SQLULEN i) { #ifdef _WIN64 trace_emit ("\t\t%-15.15s %I64u\n", "SQLLEN", (UINT64) i); #else trace_emit ("\t\t%-15.15s %ld\n", "SQLLEN", (unsigned long) i); #endif } void _trace_len_p (SQLLEN *p, int output) { if (!p) trace_emit ("\t\t%-15.15s * 0x0\n", "SQLLEN"); else if (output) #ifdef _WIN64 trace_emit ("\t\t%-15.15s * %p (%I64d)\n", "SQLLEN", p, (INT64) *p); #else trace_emit ("\t\t%-15.15s * %p (%ld)\n", "SQLLEN", p, (long) *p); #endif else trace_emit ("\t\t%-15.15s * %p\n", "SQLLEN", p); } void _trace_ulen_p (SQLULEN *p, int output) { if (!p) trace_emit ("\t\t%-15.15s * 0x0\n", "SQLULEN"); else if (output) #ifdef _WIN64 trace_emit ("\t\t%-15.15s * %p (%I64u)\n", "SQLULEN", p, (UINT64) *p); #else trace_emit ("\t\t%-15.15s * %p (%lu)\n", "SQLULEN", p, (unsigned long) *p); #endif else trace_emit ("\t\t%-15.15s * %p\n", "SQLULEN", p); } void _trace_string (SQLCHAR * str, SQLSMALLINT len, SQLSMALLINT * lenptr, int output) { ssize_t length; if (!str) { trace_emit ("\t\t%-15.15s * 0x0\n", "SQLCHAR"); return; } trace_emit ("\t\t%-15.15s * %p\n", "SQLCHAR", str); if (!output) return; /* * Calculate length of string */ if (lenptr) length = *lenptr; else length = len; if (length == SQL_NTS) length = STRLEN (str); if (*str && length) trace_emit_string (str, length, 0); else trace_emit_string ( (SQLCHAR *) "(empty string)", SQL_NTS, 0); return; } void _trace_string_w (SQLWCHAR * str, SQLSMALLINT len, SQLSMALLINT * lenptr, int output) { ssize_t length; if (!str) { trace_emit ("\t\t%-15.15s * 0x0\n", "SQLWCHAR"); return; } trace_emit ("\t\t%-15.15s * %p\n", "SQLWCHAR", str); if (!output) return; /* * Calculate length of string */ if (lenptr) length = *lenptr; else length = len; if (length == SQL_NTS) length = wcslen (str); /* * Translate wide string into UTF-8 format and print it */ if (*str && length) { SQLCHAR *str_u8 = dm_SQL_W2A (str, length); trace_emit_string (str_u8, SQL_NTS, 1); free (str_u8); } else trace_emit_string ((SQLCHAR *)"(empty string)", SQL_NTS, 0); return; } void _trace_c_type (SQLSMALLINT type) { char *ptr = "unknown C type"; switch (type) { _S (SQL_C_BINARY); _S (SQL_C_BIT); /* _S (SQL_C_BOOKMARK); */ _S (SQL_C_CHAR); _S (SQL_C_DATE); _S (SQL_C_DEFAULT); _S (SQL_C_DOUBLE); _S (SQL_C_FLOAT); #if (ODBCVER >= 0x0350) _S (SQL_C_GUID); #endif #if ODBCVER >= 0x0300 _S (SQL_C_INTERVAL_DAY); _S (SQL_C_INTERVAL_DAY_TO_HOUR); _S (SQL_C_INTERVAL_DAY_TO_MINUTE); _S (SQL_C_INTERVAL_DAY_TO_SECOND); _S (SQL_C_INTERVAL_HOUR); _S (SQL_C_INTERVAL_HOUR_TO_MINUTE); _S (SQL_C_INTERVAL_HOUR_TO_SECOND); _S (SQL_C_INTERVAL_MINUTE); _S (SQL_C_INTERVAL_MINUTE_TO_SECOND); _S (SQL_C_INTERVAL_MONTH); _S (SQL_C_INTERVAL_SECOND); _S (SQL_C_INTERVAL_YEAR); _S (SQL_C_INTERVAL_YEAR_TO_MONTH); #endif _S (SQL_C_LONG); #if ODBCVER >= 0x0300 _S (SQL_C_NUMERIC); _S (SQL_C_SBIGINT); #endif _S (SQL_C_SHORT); _S (SQL_C_SLONG); _S (SQL_C_SSHORT); _S (SQL_C_STINYINT); _S (SQL_C_TIME); _S (SQL_C_TIMESTAMP); _S (SQL_C_TINYINT); #if ODBCVER >= 0x0300 _S (SQL_C_TYPE_DATE); _S (SQL_C_TYPE_TIME); _S (SQL_C_TYPE_TIMESTAMP); _S (SQL_C_UBIGINT); #endif _S (SQL_C_ULONG); _S (SQL_C_USHORT); _S (SQL_C_UTINYINT); /* _S (SQL_C_VARBOOKMARK); */ _S (SQL_C_WCHAR); #if ODBCVER >= 0x0300 _S (SQL_ARD_TYPE); #endif } trace_emit ("\t\t%-15.15s %d (%s)\n", "SQLSMALLINT ", type, ptr); } void _trace_inouttype (SQLSMALLINT type) { char *ptr = "unknown Input/Output type"; switch (type) { _S (SQL_PARAM_INPUT); _S (SQL_PARAM_OUTPUT); _S (SQL_PARAM_INPUT_OUTPUT); } trace_emit ("\t\t%-15.15s %d (%s)\n", "SQLSMALLINT ", type, ptr); } void _trace_sql_type (SQLSMALLINT type) { char *ptr = "unknown SQL type"; switch (type) { _S (SQL_UNKNOWN_TYPE); _S (SQL_BIGINT); _S (SQL_BINARY); _S (SQL_BIT); _S (SQL_CHAR); #if (ODBCVER < 0x0300) _S (SQL_DATE); #else _S (SQL_DATETIME); #endif _S (SQL_DECIMAL); _S (SQL_DOUBLE); _S (SQL_FLOAT); #if (ODBCVER >= 0x0350) _S (SQL_GUID); #endif _S (SQL_INTEGER); _S (SQL_LONGVARBINARY); _S (SQL_LONGVARCHAR); _S (SQL_NUMERIC); _S (SQL_REAL); _S (SQL_SMALLINT); #if (ODBCVER < 0x0300) _S (SQL_TIME); #else _S (SQL_INTERVAL); #endif _S (SQL_TIMESTAMP); _S (SQL_TINYINT); #if ODBCVER >= 0x0300 _S (SQL_TYPE_DATE); _S (SQL_TYPE_TIME); _S (SQL_TYPE_TIMESTAMP); #endif _S (SQL_VARBINARY); _S (SQL_VARCHAR); _S (SQL_WCHAR); _S (SQL_WLONGVARCHAR); _S (SQL_WVARCHAR); } trace_emit ("\t\t%-15.15s %d (%s)\n", "SQLSMALLINT", (int) type, ptr); } void _trace_sql_type_p (SQLSMALLINT *p, int output) { char *ptr = "unknown SQL type"; if (!p) { trace_emit ("\t\t%-15.15s * 0x0\n", "SQLSMALLINT"); return; } if (!output) { trace_emit ("\t\t%-15.15s * %p\n", "SQLSMALLINT", p); return; } switch (*p) { _S (SQL_UNKNOWN_TYPE); _S (SQL_BIGINT); _S (SQL_BINARY); _S (SQL_BIT); _S (SQL_CHAR); #if (ODBCVER < 0x0300) _S (SQL_DATE); #else _S (SQL_DATETIME); #endif _S (SQL_DECIMAL); _S (SQL_DOUBLE); _S (SQL_FLOAT); #if (ODBCVER >= 0x0350) _S (SQL_GUID); #endif _S (SQL_INTEGER); _S (SQL_LONGVARBINARY); _S (SQL_LONGVARCHAR); _S (SQL_NUMERIC); _S (SQL_REAL); _S (SQL_SMALLINT); #if (ODBCVER < 0x0300) _S (SQL_TIME); #else _S (SQL_INTERVAL); #endif _S (SQL_TIMESTAMP); _S (SQL_TINYINT); #if ODBCVER >= 0x0300 _S (SQL_TYPE_DATE); _S (SQL_TYPE_TIME); _S (SQL_TYPE_TIMESTAMP); #endif _S (SQL_VARBINARY); _S (SQL_VARCHAR); _S (SQL_WCHAR); _S (SQL_WLONGVARCHAR); _S (SQL_WVARCHAR); } trace_emit ("\t\t%-15.15s * %p (%s)\n", "SQLSMALLINT", p, ptr); } #if ODBCVER >= 0x0300 void _trace_sql_subtype (SQLSMALLINT *type, SQLSMALLINT *sub, int output) { char *ptr = NULL; if (!type || !sub) { trace_emit ("\t\t%-15.15s * 0x0\n", "SQLSMALLINT"); return; } if (!output) { trace_emit ("\t\t%-15.15s * %p\n", "SQLSMALLINT", sub); return; } if (*type == SQL_DATETIME) { switch (*sub) { _S (SQL_CODE_DATE); _S (SQL_CODE_TIME); _S (SQL_CODE_TIMESTAMP); } } else if (*type == SQL_INTERVAL) { switch (*sub) { _S (SQL_CODE_YEAR); _S (SQL_CODE_MONTH); _S (SQL_CODE_DAY); _S (SQL_CODE_HOUR); _S (SQL_CODE_MINUTE); _S (SQL_CODE_SECOND); _S (SQL_CODE_YEAR_TO_MONTH); _S (SQL_CODE_DAY_TO_HOUR); _S (SQL_CODE_DAY_TO_MINUTE); _S (SQL_CODE_DAY_TO_SECOND); _S (SQL_CODE_HOUR_TO_MINUTE); _S (SQL_CODE_HOUR_TO_SECOND); _S (SQL_CODE_MINUTE_TO_SECOND); } } if (ptr) trace_emit ("\t\t%-15.15s * %p (%s)\n", "SQLSMALLINT", sub, ptr); else trace_emit ("\t\t%-15.15s * %p (%d)\n", "SQLSMALLINT", sub, *sub); } #endif void _trace_bufferlen (SQLINTEGER length) { char buf[255]; char *ptr = NULL; switch (length) { _S (SQL_NTS); #if ODBCVER >= 0x0300 _S (SQL_IS_POINTER); _S (SQL_IS_UINTEGER); _S (SQL_IS_INTEGER); _S (SQL_IS_USMALLINT); _S (SQL_IS_SMALLINT); #endif } /* * Translate binary buffer length */ if (length <= SQL_LEN_BINARY_ATTR_OFFSET) { sprintf (buf, "SQL_LEN_BINARY_ATTR(%ld)", (long) SQL_LEN_BINARY_ATTR(length)); ptr = buf; } if (ptr) trace_emit ("\t\t%-15.15s * %ld (%s)\n", "SQLINTEGER", (long) length, ptr); else trace_emit ("\t\t%-15.15s * %ld\n", "SQLINTEGER", (long) length); } libiodbc-3.52.16/iodbc/catalog.c0000664000175000017500000017343714424170750013243 00000000000000/* * catalog.c * * $Id$ * * Catalog functions * * The iODBC driver manager. * * Copyright (C) 1995 Ke Jin * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include "unicode.h" #include "herr.h" #include "henv.h" #include "hdbc.h" #include "hstmt.h" #include "dlproc.h" #include "itrace.h" /* * Check state for executing catalog functions */ static SQLRETURN _iodbcdm_cata_state_ok ( STMT_t * pstmt, int fidx) { sqlstcode_t sqlstat = en_00000; if (pstmt->asyn_on == en_NullProc) { switch (pstmt->state) { case en_stmt_needdata: case en_stmt_mustput: case en_stmt_canput: sqlstat = en_S1010; break; case en_stmt_fetched: case en_stmt_xfetched: sqlstat = en_24000; break; default: break; } } else if (pstmt->asyn_on != fidx) { sqlstat = en_S1010; } if (sqlstat != en_00000) { PUSHSQLERR (pstmt->herr, sqlstat); return SQL_ERROR; } return SQL_SUCCESS; } /* * State transition for catalog function */ static SQLRETURN _iodbcdm_cata_state_tr ( STMT_t * pstmt, int fidx, SQLRETURN result) { if (pstmt->asyn_on == fidx) { switch (result) { case SQL_SUCCESS: case SQL_SUCCESS_WITH_INFO: case SQL_ERROR: pstmt->asyn_on = en_NullProc; break; case SQL_STILL_EXECUTING: default: return result; } } if (pstmt->state <= en_stmt_executed) { switch (result) { case SQL_SUCCESS: case SQL_SUCCESS_WITH_INFO: pstmt->state = en_stmt_cursoropen; break; case SQL_ERROR: pstmt->state = en_stmt_allocated; pstmt->prep_state = 0; break; case SQL_STILL_EXECUTING: pstmt->asyn_on = fidx; break; default: break; } } return result; } SQLRETURN SQL_API SQLGetTypeInfo_Internal ( SQLHSTMT hstmt, SQLSMALLINT fSqlType, SQLCHAR waMode) { STMT (pstmt, hstmt); CONN (pdbc, pstmt->hdbc); ENVR (penv, pdbc->henv); HPROC hproc = SQL_NULL_HPROC; SQLRETURN retcode = SQL_SUCCESS; sqlstcode_t sqlstat = en_00000; waMode = waMode; /*NOTUSED*/ for (;;) { #if (ODBCVER < 0x0300) if (fSqlType > SQL_TYPE_MAX) { sqlstat = en_S1004; break; } /* Note: SQL_TYPE_DRIVER_START is a negative number So, we use ">" */ if (fSqlType < SQL_TYPE_MIN && fSqlType > SQL_TYPE_DRIVER_START) { sqlstat = en_S1004; break; } #endif /* ODBCVER < 0x0300 */ retcode = _iodbcdm_cata_state_ok (pstmt, en_GetTypeInfo); if (retcode != SQL_SUCCESS) { return SQL_ERROR; } CALL_UDRIVER(pstmt->hdbc, pstmt, retcode, hproc, penv->unicode_driver, en_GetTypeInfo, ( pstmt->dhstmt, fSqlType)); if (hproc == SQL_NULL_HPROC) { sqlstat = en_IM001; break; } sqlstat = en_00000; if (1) /* turn off solaris warning message */ break; } if (sqlstat != en_00000) { PUSHSQLERR (pstmt->herr, sqlstat); return SQL_ERROR; } retcode = _iodbcdm_cata_state_tr (pstmt, en_GetTypeInfo, retcode); return retcode; } SQLRETURN SQL_API SQLGetTypeInfo (SQLHSTMT hstmt, SQLSMALLINT fSqlType) { ENTER_STMT (hstmt, trace_SQLGetTypeInfo (TRACE_ENTER, hstmt, fSqlType)); retcode = SQLGetTypeInfo_Internal (hstmt, fSqlType, 'A'); LEAVE_STMT (hstmt, trace_SQLGetTypeInfo (TRACE_LEAVE, hstmt, fSqlType)); } #if ODBCVER >= 0x0300 SQLRETURN SQL_API SQLGetTypeInfoA (SQLHSTMT hstmt, SQLSMALLINT fSqlType) { ENTER_STMT (hstmt, trace_SQLGetTypeInfo (TRACE_ENTER, hstmt, fSqlType)); retcode = SQLGetTypeInfo_Internal (hstmt, fSqlType, 'A'); LEAVE_STMT (hstmt, trace_SQLGetTypeInfo (TRACE_LEAVE, hstmt, fSqlType)); } SQLRETURN SQL_API SQLGetTypeInfoW (SQLHSTMT hstmt, SQLSMALLINT fSqlType) { ENTER_STMT (hstmt, trace_SQLGetTypeInfoW (TRACE_ENTER, hstmt, fSqlType)); retcode = SQLGetTypeInfo_Internal (hstmt, fSqlType, 'W'); LEAVE_STMT (hstmt, trace_SQLGetTypeInfoW (TRACE_LEAVE, hstmt, fSqlType)); } #endif SQLRETURN SQL_API SQLSpecialColumns_Internal ( SQLHSTMT hstmt, SQLUSMALLINT fColType, SQLPOINTER szTableQualifier, SQLSMALLINT cbTableQualifier, SQLPOINTER szTableOwner, SQLSMALLINT cbTableOwner, SQLPOINTER szTableName, SQLSMALLINT cbTableName, SQLUSMALLINT fScope, SQLUSMALLINT fNullable, SQLCHAR waMode) { STMT (pstmt, hstmt); CONN (pdbc, pstmt->hdbc); ENVR (penv, pdbc->henv); HPROC hproc = SQL_NULL_HPROC; SQLRETURN retcode = SQL_SUCCESS; sqlstcode_t sqlstat = en_00000; void * _TableQualifier = NULL; void * _TableOwner = NULL; void * _TableName = NULL; CONV_DIRECT conv_direct = CD_NONE; DM_CONV *conv = &pdbc->conv; for (;;) { if ((cbTableQualifier < 0 && cbTableQualifier != SQL_NTS) || (cbTableOwner < 0 && cbTableOwner != SQL_NTS) || (cbTableName < 0 && cbTableName != SQL_NTS)) { sqlstat = en_S1090; break; } if (fColType != SQL_BEST_ROWID && fColType != SQL_ROWVER) { sqlstat = en_S1097; break; } if (fScope != SQL_SCOPE_CURROW && fScope != SQL_SCOPE_TRANSACTION && fScope != SQL_SCOPE_SESSION) { sqlstat = en_S1098; break; } if (fNullable != SQL_NO_NULLS && fNullable != SQL_NULLABLE) { sqlstat = en_S1099; break; } retcode = _iodbcdm_cata_state_ok (pstmt, en_SpecialColumns); if (retcode != SQL_SUCCESS) { return SQL_ERROR; } if (penv->unicode_driver && waMode != 'W') conv_direct = CD_A2W; else if (!penv->unicode_driver && waMode == 'W') conv_direct = CD_W2A; else if (waMode == 'W' && conv->dm_cp!=conv->drv_cp) conv_direct = CD_W2W; if (conv_direct != CD_NONE) { _TableQualifier = _iodbcdm_conv_var (pstmt, 0, szTableQualifier, cbTableQualifier, conv_direct); _TableOwner = _iodbcdm_conv_var (pstmt, 1, szTableOwner, cbTableOwner, conv_direct); _TableName = _iodbcdm_conv_var (pstmt, 2, szTableName, cbTableName, conv_direct); szTableQualifier = _TableQualifier; szTableOwner = _TableOwner; szTableName = _TableName; cbTableQualifier = (cbTableQualifier > 0) ? SQL_NTS : cbTableQualifier; cbTableOwner = (cbTableOwner > 0) ? SQL_NTS : cbTableOwner; cbTableName = (cbTableName > 0) ? SQL_NTS : cbTableName; } CALL_UDRIVER(pstmt->hdbc, pstmt, retcode, hproc, penv->unicode_driver, en_SpecialColumns, ( pstmt->dhstmt, fColType, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, fScope, fNullable)); if (hproc == SQL_NULL_HPROC) { sqlstat = en_IM001; break; } sqlstat = en_00000; if (1) /* turn off solaris warning message */ break; } if (retcode != SQL_STILL_EXECUTING) _iodbcdm_FreeStmtVars(pstmt); if (sqlstat != en_00000) { PUSHSQLERR (pstmt->herr, sqlstat); return SQL_ERROR; } retcode = _iodbcdm_cata_state_tr (pstmt, en_SpecialColumns, retcode); return retcode; } SQLRETURN SQL_API SQLSpecialColumns (SQLHSTMT hstmt, SQLUSMALLINT fColType, SQLCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLCHAR * szTableName, SQLSMALLINT cbTableName, SQLUSMALLINT fScope, SQLUSMALLINT fNullable) { ENTER_STMT (hstmt, trace_SQLSpecialColumns (TRACE_ENTER, hstmt, fColType, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, fScope, fNullable)); retcode = SQLSpecialColumns_Internal( hstmt, fColType, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, fScope, fNullable, 'A'); LEAVE_STMT (hstmt, trace_SQLSpecialColumns (TRACE_LEAVE, hstmt, fColType, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, fScope, fNullable)); } #if ODBCVER >= 0x0300 SQLRETURN SQL_API SQLSpecialColumnsA (SQLHSTMT hstmt, SQLUSMALLINT fColType, SQLCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLCHAR * szTableName, SQLSMALLINT cbTableName, SQLUSMALLINT fScope, SQLUSMALLINT fNullable) { ENTER_STMT (hstmt, trace_SQLSpecialColumns (TRACE_ENTER, hstmt, fColType, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, fScope, fNullable)); retcode = SQLSpecialColumns_Internal( hstmt, fColType, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, fScope, fNullable, 'A'); LEAVE_STMT (hstmt, trace_SQLSpecialColumns (TRACE_LEAVE, hstmt, fColType, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, fScope, fNullable)); } SQLRETURN SQL_API SQLSpecialColumnsW (SQLHSTMT hstmt, SQLUSMALLINT fColType, SQLWCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLWCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLWCHAR * szTableName, SQLSMALLINT cbTableName, SQLUSMALLINT fScope, SQLUSMALLINT fNullable) { ENTER_STMT (hstmt, trace_SQLSpecialColumnsW (TRACE_ENTER, hstmt, fColType, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, fScope, fNullable)); retcode = SQLSpecialColumns_Internal( hstmt, fColType, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, fScope, fNullable, 'W'); LEAVE_STMT (hstmt, trace_SQLSpecialColumnsW (TRACE_LEAVE, hstmt, fColType, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, fScope, fNullable)); } #endif SQLRETURN SQL_API SQLStatistics_Internal ( SQLHSTMT hstmt, SQLPOINTER szTableQualifier, SQLSMALLINT cbTableQualifier, SQLPOINTER szTableOwner, SQLSMALLINT cbTableOwner, SQLPOINTER szTableName, SQLSMALLINT cbTableName, SQLUSMALLINT fUnique, SQLUSMALLINT fAccuracy, SQLCHAR waMode) { STMT (pstmt, hstmt); CONN (pdbc, pstmt->hdbc); ENVR (penv, pdbc->henv); HPROC hproc = SQL_NULL_HPROC; SQLRETURN retcode = SQL_SUCCESS; sqlstcode_t sqlstat = en_00000; void * _TableQualifier = NULL; void * _TableOwner = NULL; void * _TableName = NULL; CONV_DIRECT conv_direct = CD_NONE; DM_CONV *conv = &pdbc->conv; for (;;) { if ((cbTableQualifier < 0 && cbTableQualifier != SQL_NTS) || (cbTableOwner < 0 && cbTableOwner != SQL_NTS) || (cbTableName < 0 && cbTableName != SQL_NTS)) { sqlstat = en_S1090; break; } if (fUnique != SQL_INDEX_UNIQUE && fUnique != SQL_INDEX_ALL) { sqlstat = en_S1100; break; } if (fAccuracy != SQL_ENSURE && fAccuracy != SQL_QUICK) { sqlstat = en_S1101; break; } retcode = _iodbcdm_cata_state_ok (pstmt, en_Statistics); if (retcode != SQL_SUCCESS) { return SQL_ERROR; } if (penv->unicode_driver && waMode != 'W') conv_direct = CD_A2W; else if (!penv->unicode_driver && waMode == 'W') conv_direct = CD_W2A; else if (waMode == 'W' && conv->dm_cp!=conv->drv_cp) conv_direct = CD_W2W; if (conv_direct != CD_NONE) { _TableQualifier = _iodbcdm_conv_var (pstmt, 0, szTableQualifier, cbTableQualifier, conv_direct); _TableOwner = _iodbcdm_conv_var (pstmt, 1, szTableOwner, cbTableOwner, conv_direct); _TableName = _iodbcdm_conv_var (pstmt, 2, szTableName, cbTableName, conv_direct); szTableQualifier = _TableQualifier; szTableOwner = _TableOwner; szTableName = _TableName; cbTableQualifier = (cbTableQualifier > 0) ? SQL_NTS : cbTableQualifier; cbTableOwner = (cbTableOwner > 0) ? SQL_NTS : cbTableOwner; cbTableName = (cbTableName > 0) ? SQL_NTS : cbTableName; } CALL_UDRIVER(pstmt->hdbc, pstmt, retcode, hproc, penv->unicode_driver, en_Statistics, ( pstmt->dhstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, fUnique, fAccuracy)); if (hproc == SQL_NULL_HPROC) { sqlstat = en_IM001; break; } sqlstat = en_00000; if (1) /* turn off solaris warning message */ break; } if (retcode != SQL_STILL_EXECUTING) _iodbcdm_FreeStmtVars(pstmt); if (sqlstat != en_00000) { PUSHSQLERR (pstmt->herr, sqlstat); return SQL_ERROR; } retcode = _iodbcdm_cata_state_tr (pstmt, en_Statistics, retcode); return retcode; } SQLRETURN SQL_API SQLStatistics (SQLHSTMT hstmt, SQLCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLCHAR * szTableName, SQLSMALLINT cbTableName, SQLUSMALLINT fUnique, SQLUSMALLINT fAccuracy) { ENTER_STMT (hstmt, trace_SQLStatistics (TRACE_ENTER, hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, fUnique, fAccuracy)); retcode = SQLStatistics_Internal ( hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, fUnique, fAccuracy, 'A'); LEAVE_STMT (hstmt, trace_SQLStatistics (TRACE_LEAVE, hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, fUnique, fAccuracy)); } #if ODBCVER >= 0x0300 SQLRETURN SQL_API SQLStatisticsA (SQLHSTMT hstmt, SQLCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLCHAR * szTableName, SQLSMALLINT cbTableName, SQLUSMALLINT fUnique, SQLUSMALLINT fAccuracy) { ENTER_STMT (hstmt, trace_SQLStatistics (TRACE_ENTER, hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, fUnique, fAccuracy)); retcode = SQLStatistics_Internal ( hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, fUnique, fAccuracy, 'A'); LEAVE_STMT (hstmt, trace_SQLStatistics (TRACE_LEAVE, hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, fUnique, fAccuracy)); } SQLRETURN SQL_API SQLStatisticsW (SQLHSTMT hstmt, SQLWCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLWCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLWCHAR * szTableName, SQLSMALLINT cbTableName, SQLUSMALLINT fUnique, SQLUSMALLINT fAccuracy) { ENTER_STMT (hstmt, trace_SQLStatisticsW (TRACE_ENTER, hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, fUnique, fAccuracy)); retcode = SQLStatistics_Internal ( hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, fUnique, fAccuracy, 'W'); LEAVE_STMT (hstmt, trace_SQLStatisticsW (TRACE_LEAVE, hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, fUnique, fAccuracy)); } #endif SQLRETURN SQL_API SQLTables_Internal ( SQLHSTMT hstmt, SQLPOINTER szTableQualifier, SQLSMALLINT cbTableQualifier, SQLPOINTER szTableOwner, SQLSMALLINT cbTableOwner, SQLPOINTER szTableName, SQLSMALLINT cbTableName, SQLPOINTER szTableType, SQLSMALLINT cbTableType, SQLCHAR waMode) { STMT (pstmt, hstmt); CONN (pdbc, pstmt->hdbc); ENVR (penv, pdbc->henv); HPROC hproc = SQL_NULL_HPROC; SQLRETURN retcode = SQL_SUCCESS; sqlstcode_t sqlstat = en_00000; void * _TableQualifier = NULL; void * _TableOwner = NULL; void * _TableName = NULL; void * _TableType = NULL; CONV_DIRECT conv_direct = CD_NONE; DM_CONV *conv = &pdbc->conv; for (;;) { if ((cbTableQualifier < 0 && cbTableQualifier != SQL_NTS) || (cbTableOwner < 0 && cbTableOwner != SQL_NTS) || (cbTableName < 0 && cbTableName != SQL_NTS) || (cbTableType < 0 && cbTableType != SQL_NTS)) { sqlstat = en_S1090; break; } retcode = _iodbcdm_cata_state_ok (pstmt, en_Tables); if (retcode != SQL_SUCCESS) { return SQL_ERROR; } if (penv->unicode_driver && waMode != 'W') conv_direct = CD_A2W; else if (!penv->unicode_driver && waMode == 'W') conv_direct = CD_W2A; else if (waMode == 'W' && conv->dm_cp!=conv->drv_cp) conv_direct = CD_W2W; if (conv_direct != CD_NONE) { _TableQualifier = _iodbcdm_conv_var (pstmt, 0, szTableQualifier, cbTableQualifier, conv_direct); _TableOwner = _iodbcdm_conv_var (pstmt, 1, szTableOwner, cbTableOwner, conv_direct); _TableName = _iodbcdm_conv_var (pstmt, 2, szTableName, cbTableName, conv_direct); _TableType = _iodbcdm_conv_var (pstmt, 3, szTableType, cbTableType, conv_direct); szTableQualifier = _TableQualifier; szTableOwner = _TableOwner; szTableName = _TableName; szTableType = _TableType; cbTableQualifier = (cbTableQualifier > 0) ? SQL_NTS : cbTableQualifier; cbTableOwner = (cbTableOwner > 0) ? SQL_NTS : cbTableOwner; cbTableName = (cbTableName > 0) ? SQL_NTS : cbTableName; cbTableType = (cbTableType > 0) ? SQL_NTS : cbTableType; } CALL_UDRIVER(pstmt->hdbc, pstmt, retcode, hproc, penv->unicode_driver, en_Tables, ( pstmt->dhstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, szTableType, cbTableType)); if (hproc == SQL_NULL_HPROC) { sqlstat = en_IM001; break; } sqlstat = en_00000; if (1) /* turn off solaris warning message */ break; } if (retcode != SQL_STILL_EXECUTING) _iodbcdm_FreeStmtVars(pstmt); if (sqlstat != en_00000) { PUSHSQLERR (pstmt->herr, sqlstat); return SQL_ERROR; } retcode = _iodbcdm_cata_state_tr (pstmt, en_Tables, retcode); return retcode; } SQLRETURN SQL_API SQLTables (SQLHSTMT hstmt, SQLCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLCHAR * szTableName, SQLSMALLINT cbTableName, SQLCHAR * szTableType, SQLSMALLINT cbTableType) { ENTER_STMT (hstmt, trace_SQLTables (TRACE_ENTER, hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, szTableType, cbTableType)); retcode = SQLTables_Internal( hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, szTableType, cbTableType, 'A'); LEAVE_STMT (hstmt, trace_SQLTables (TRACE_LEAVE, hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, szTableType, cbTableType)); } #if ODBCVER >= 0x0300 SQLRETURN SQL_API SQLTablesA (SQLHSTMT hstmt, SQLCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLCHAR * szTableName, SQLSMALLINT cbTableName, SQLCHAR * szTableType, SQLSMALLINT cbTableType) { ENTER_STMT (hstmt, trace_SQLTables (TRACE_ENTER, hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, szTableType, cbTableType)); retcode = SQLTables_Internal ( hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, szTableType, cbTableType, 'A'); LEAVE_STMT (hstmt, trace_SQLTables (TRACE_LEAVE, hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, szTableType, cbTableType)); } SQLRETURN SQL_API SQLTablesW (SQLHSTMT hstmt, SQLWCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLWCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLWCHAR * szTableName, SQLSMALLINT cbTableName, SQLWCHAR * szTableType, SQLSMALLINT cbTableType) { ENTER_STMT (hstmt, trace_SQLTablesW (TRACE_ENTER, hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, szTableType, cbTableType)); retcode = SQLTables_Internal ( hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, szTableType, cbTableType, 'W'); LEAVE_STMT (hstmt, trace_SQLTablesW (TRACE_LEAVE, hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, szTableType, cbTableType)); } #endif SQLRETURN SQL_API SQLColumnPrivileges_Internal ( SQLHSTMT hstmt, SQLPOINTER szTableQualifier, SQLSMALLINT cbTableQualifier, SQLPOINTER szTableOwner, SQLSMALLINT cbTableOwner, SQLPOINTER szTableName, SQLSMALLINT cbTableName, SQLPOINTER szColumnName, SQLSMALLINT cbColumnName, SQLCHAR waMode) { STMT (pstmt, hstmt); CONN (pdbc, pstmt->hdbc); ENVR (penv, pdbc->henv); HPROC hproc = SQL_NULL_HPROC; SQLRETURN retcode = SQL_SUCCESS; sqlstcode_t sqlstat = en_00000; void * _TableQualifier = NULL; void * _TableOwner = NULL; void * _TableName = NULL; void * _ColumnName = NULL; CONV_DIRECT conv_direct = CD_NONE; DM_CONV *conv = &pdbc->conv; for (;;) { if ((cbTableQualifier < 0 && cbTableQualifier != SQL_NTS) || (cbTableOwner < 0 && cbTableOwner != SQL_NTS) || (cbTableName < 0 && cbTableName != SQL_NTS) || (cbColumnName < 0 && cbColumnName != SQL_NTS)) { sqlstat = en_S1090; break; } retcode = _iodbcdm_cata_state_ok (pstmt, en_ColumnPrivileges); if (retcode != SQL_SUCCESS) { return SQL_ERROR; } if (penv->unicode_driver && waMode != 'W') conv_direct = CD_A2W; else if (!penv->unicode_driver && waMode == 'W') conv_direct = CD_W2A; else if (waMode == 'W' && conv->dm_cp!=conv->drv_cp) conv_direct = CD_W2W; if (conv_direct != CD_NONE) { _TableQualifier = _iodbcdm_conv_var (pstmt, 0, szTableQualifier, cbTableQualifier, conv_direct); _TableOwner = _iodbcdm_conv_var (pstmt, 1, szTableOwner, cbTableOwner, conv_direct); _TableName = _iodbcdm_conv_var (pstmt, 2, szTableName, cbTableName, conv_direct); _ColumnName = _iodbcdm_conv_var (pstmt, 3, szColumnName, cbColumnName, conv_direct); szTableQualifier = _TableQualifier; szTableOwner = _TableOwner; szTableName = _TableName; szColumnName = _ColumnName; cbTableQualifier = (cbTableQualifier > 0) ? SQL_NTS : cbTableQualifier; cbTableOwner = (cbTableOwner > 0) ? SQL_NTS : cbTableOwner; cbTableName = (cbTableName > 0) ? SQL_NTS : cbTableName; cbColumnName = (cbColumnName > 0) ? SQL_NTS : cbColumnName; } CALL_UDRIVER(pstmt->hdbc, pstmt, retcode, hproc, penv->unicode_driver, en_ColumnPrivileges, ( pstmt->dhstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, szColumnName, cbColumnName)); if (hproc == SQL_NULL_HPROC) { sqlstat = en_IM001; break; } sqlstat = en_00000; if (1) /* turn off solaris warning message */ break; } if (retcode != SQL_STILL_EXECUTING) _iodbcdm_FreeStmtVars(pstmt); if (sqlstat != en_00000) { PUSHSQLERR (pstmt->herr, sqlstat); return SQL_ERROR; } retcode = _iodbcdm_cata_state_tr (pstmt, en_ColumnPrivileges, retcode); return retcode; } SQLRETURN SQL_API SQLColumnPrivileges (SQLHSTMT hstmt, SQLCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLCHAR * szTableName, SQLSMALLINT cbTableName, SQLCHAR * szColumnName, SQLSMALLINT cbColumnName) { ENTER_STMT (hstmt, trace_SQLColumnPrivileges (TRACE_ENTER, hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, szColumnName, cbColumnName)); retcode = SQLColumnPrivileges_Internal(hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, szColumnName, cbColumnName, 'A'); LEAVE_STMT (hstmt, trace_SQLColumnPrivileges (TRACE_LEAVE, hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, szColumnName, cbColumnName)); } #if ODBCVER >= 0x0300 SQLRETURN SQL_API SQLColumnPrivilegesA (SQLHSTMT hstmt, SQLCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLCHAR * szTableName, SQLSMALLINT cbTableName, SQLCHAR * szColumnName, SQLSMALLINT cbColumnName) { ENTER_STMT (hstmt, trace_SQLColumnPrivileges (TRACE_ENTER, hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, szColumnName, cbColumnName)); retcode = SQLColumnPrivileges_Internal(hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, szColumnName, cbColumnName, 'A'); LEAVE_STMT (hstmt, trace_SQLColumnPrivileges (TRACE_LEAVE, hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, szColumnName, cbColumnName)); } SQLRETURN SQL_API SQLColumnPrivilegesW (SQLHSTMT hstmt, SQLWCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLWCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLWCHAR * szTableName, SQLSMALLINT cbTableName, SQLWCHAR * szColumnName, SQLSMALLINT cbColumnName) { ENTER_STMT (hstmt, trace_SQLColumnPrivilegesW (TRACE_ENTER, hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, szColumnName, cbColumnName)); retcode = SQLColumnPrivileges_Internal (hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, szColumnName, cbColumnName, 'W'); LEAVE_STMT (hstmt, trace_SQLColumnPrivilegesW (TRACE_LEAVE, hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, szColumnName, cbColumnName)); } #endif SQLRETURN SQL_API SQLColumns_Internal ( SQLHSTMT hstmt, SQLPOINTER szTableQualifier, SQLSMALLINT cbTableQualifier, SQLPOINTER szTableOwner, SQLSMALLINT cbTableOwner, SQLPOINTER szTableName, SQLSMALLINT cbTableName, SQLPOINTER szColumnName, SQLSMALLINT cbColumnName, SQLCHAR waMode) { STMT (pstmt, hstmt); CONN (pdbc, pstmt->hdbc); ENVR (penv, pdbc->henv); HPROC hproc = SQL_NULL_HPROC; SQLRETURN retcode = SQL_SUCCESS; sqlstcode_t sqlstat = en_00000; void * _TableQualifier = NULL; void * _TableOwner = NULL; void * _TableName = NULL; void * _ColumnName = NULL; CONV_DIRECT conv_direct = CD_NONE; DM_CONV *conv = &pdbc->conv; for (;;) { if ((cbTableQualifier < 0 && cbTableQualifier != SQL_NTS) || (cbTableOwner < 0 && cbTableOwner != SQL_NTS) || (cbTableName < 0 && cbTableName != SQL_NTS) || (cbColumnName < 0 && cbColumnName != SQL_NTS)) { sqlstat = en_S1090; break; } retcode = _iodbcdm_cata_state_ok (pstmt, en_Columns); if (retcode != SQL_SUCCESS) { return SQL_ERROR; } if (penv->unicode_driver && waMode != 'W') conv_direct = CD_A2W; else if (!penv->unicode_driver && waMode == 'W') conv_direct = CD_W2A; else if (waMode == 'W' && conv->dm_cp!=conv->drv_cp) conv_direct = CD_W2W; if (conv_direct != CD_NONE) { _TableQualifier = _iodbcdm_conv_var (pstmt, 0, szTableQualifier, cbTableQualifier, conv_direct); _TableOwner = _iodbcdm_conv_var (pstmt, 1, szTableOwner, cbTableOwner, conv_direct); _TableName = _iodbcdm_conv_var (pstmt, 2, szTableName, cbTableName, conv_direct); _ColumnName = _iodbcdm_conv_var (pstmt, 3, szColumnName, cbColumnName, conv_direct); szTableQualifier = _TableQualifier; szTableOwner = _TableOwner; szTableName = _TableName; szColumnName = _ColumnName; cbTableQualifier = (cbTableQualifier > 0) ? SQL_NTS : cbTableQualifier; cbTableOwner = (cbTableOwner > 0) ? SQL_NTS : cbTableOwner; cbTableName = (cbTableName > 0) ? SQL_NTS : cbTableName; cbColumnName = (cbColumnName > 0) ? SQL_NTS : cbColumnName; } CALL_UDRIVER(pstmt->hdbc, pstmt, retcode, hproc, penv->unicode_driver, en_Columns, ( pstmt->dhstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, szColumnName, cbColumnName)); if (hproc == SQL_NULL_HPROC) { sqlstat = en_IM001; break; } sqlstat = en_00000; if (1) /* turn off solaris warning message */ break; } if (retcode != SQL_STILL_EXECUTING) _iodbcdm_FreeStmtVars(pstmt); if (sqlstat != en_00000) { PUSHSQLERR (pstmt->herr, sqlstat); return SQL_ERROR; } retcode = _iodbcdm_cata_state_tr (pstmt, en_Columns, retcode); return retcode; } SQLRETURN SQL_API SQLColumns (SQLHSTMT hstmt, SQLCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLCHAR * szTableName, SQLSMALLINT cbTableName, SQLCHAR * szColumnName, SQLSMALLINT cbColumnName) { ENTER_STMT (hstmt, trace_SQLColumns (TRACE_ENTER, hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, szColumnName, cbColumnName)); retcode = SQLColumns_Internal ( hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, szColumnName, cbColumnName, 'A'); LEAVE_STMT (hstmt, trace_SQLColumns (TRACE_LEAVE, hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, szColumnName, cbColumnName)); } #if ODBCVER >= 0x0300 SQLRETURN SQL_API SQLColumnsA (SQLHSTMT hstmt, SQLCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLCHAR * szTableName, SQLSMALLINT cbTableName, SQLCHAR * szColumnName, SQLSMALLINT cbColumnName) { ENTER_STMT (hstmt, trace_SQLColumns (TRACE_ENTER, hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, szColumnName, cbColumnName)); retcode = SQLColumns_Internal ( hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, szColumnName, cbColumnName, 'A'); LEAVE_STMT (hstmt, trace_SQLColumns (TRACE_LEAVE, hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, szColumnName, cbColumnName)); } SQLRETURN SQL_API SQLColumnsW (SQLHSTMT hstmt, SQLWCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLWCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLWCHAR * szTableName, SQLSMALLINT cbTableName, SQLWCHAR * szColumnName, SQLSMALLINT cbColumnName) { ENTER_STMT (hstmt, trace_SQLColumnsW (TRACE_ENTER, hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, szColumnName, cbColumnName)); retcode = SQLColumns_Internal ( hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, szColumnName, cbColumnName, 'W'); LEAVE_STMT (hstmt, trace_SQLColumnsW (TRACE_LEAVE, hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, szColumnName, cbColumnName)); } #endif SQLRETURN SQL_API SQLForeignKeys_Internal ( SQLHSTMT hstmt, SQLPOINTER szPkTableQualifier, SQLSMALLINT cbPkTableQualifier, SQLPOINTER szPkTableOwner, SQLSMALLINT cbPkTableOwner, SQLPOINTER szPkTableName, SQLSMALLINT cbPkTableName, SQLPOINTER szFkTableQualifier, SQLSMALLINT cbFkTableQualifier, SQLPOINTER szFkTableOwner, SQLSMALLINT cbFkTableOwner, SQLPOINTER szFkTableName, SQLSMALLINT cbFkTableName, SQLCHAR waMode) { STMT (pstmt, hstmt); CONN (pdbc, pstmt->hdbc); ENVR (penv, pdbc->henv); HPROC hproc = SQL_NULL_HPROC; SQLRETURN retcode = SQL_SUCCESS; sqlstcode_t sqlstat = en_00000; void * _PkTableQualifier = NULL; void * _PkTableOwner = NULL; void * _PkTableName = NULL; void * _FkTableQualifier = NULL; void * _FkTableOwner = NULL; void * _FkTableName = NULL; CONV_DIRECT conv_direct = CD_NONE; DM_CONV *conv = &pdbc->conv; for (;;) { if ((cbPkTableQualifier < 0 && cbPkTableQualifier != SQL_NTS) || (cbPkTableOwner < 0 && cbPkTableOwner != SQL_NTS) || (cbPkTableName < 0 && cbPkTableName != SQL_NTS) || (cbFkTableQualifier < 0 && cbFkTableQualifier != SQL_NTS) || (cbFkTableOwner < 0 && cbFkTableOwner != SQL_NTS) || (cbFkTableName < 0 && cbFkTableName != SQL_NTS)) { sqlstat = en_S1090; break; } retcode = _iodbcdm_cata_state_ok (pstmt, en_ForeignKeys); if (retcode != SQL_SUCCESS) { return SQL_ERROR; } if (penv->unicode_driver && waMode != 'W') conv_direct = CD_A2W; else if (!penv->unicode_driver && waMode == 'W') conv_direct = CD_W2A; else if (waMode == 'W' && conv->dm_cp!=conv->drv_cp) conv_direct = CD_W2W; if (conv_direct != CD_NONE) { _PkTableQualifier = _iodbcdm_conv_var (pstmt, 0, szPkTableQualifier, cbPkTableQualifier, conv_direct); _PkTableOwner = _iodbcdm_conv_var (pstmt, 1, szPkTableOwner, cbPkTableOwner, conv_direct); _PkTableName = _iodbcdm_conv_var (pstmt, 2, szPkTableName, cbPkTableName, conv_direct); _FkTableQualifier = _iodbcdm_conv_var (pstmt, 3, szFkTableQualifier, cbFkTableQualifier, conv_direct); _FkTableOwner = _iodbcdm_conv_var (pstmt, 4, szFkTableOwner, cbFkTableOwner, conv_direct); _FkTableName = _iodbcdm_conv_var (pstmt, 5, szFkTableName, cbFkTableName, conv_direct); szPkTableQualifier = _PkTableQualifier; szPkTableOwner = _PkTableOwner; szPkTableName = _PkTableName; szFkTableQualifier = _FkTableQualifier; szFkTableOwner = _FkTableOwner; szFkTableName = _FkTableName; cbPkTableQualifier = (cbPkTableQualifier > 0) ? SQL_NTS : cbPkTableQualifier; cbPkTableOwner = (cbPkTableOwner > 0) ? SQL_NTS : cbPkTableOwner; cbPkTableName = (cbPkTableName > 0) ? SQL_NTS : cbPkTableName; cbFkTableQualifier = (cbFkTableQualifier > 0) ? SQL_NTS : cbFkTableQualifier; cbFkTableOwner = (cbFkTableOwner > 0) ? SQL_NTS : cbFkTableOwner; cbFkTableName = (cbFkTableName > 0) ? SQL_NTS : cbFkTableName; } CALL_UDRIVER(pstmt->hdbc, pstmt, retcode, hproc, penv->unicode_driver, en_ForeignKeys, ( pstmt->dhstmt, szPkTableQualifier, cbPkTableQualifier, szPkTableOwner, cbPkTableOwner, szPkTableName, cbPkTableName, szFkTableQualifier, cbFkTableQualifier, szFkTableOwner, cbFkTableOwner, szFkTableName, cbFkTableName)); if (hproc == SQL_NULL_HPROC) { sqlstat = en_IM001; break; } sqlstat = en_00000; if (1) /* turn off solaris warning message */ break; } if (retcode != SQL_STILL_EXECUTING) _iodbcdm_FreeStmtVars(pstmt); if (sqlstat != en_00000) { PUSHSQLERR (pstmt->herr, sqlstat); return SQL_ERROR; } retcode = _iodbcdm_cata_state_tr (pstmt, en_ForeignKeys, retcode); return retcode; } SQLRETURN SQL_API SQLForeignKeys (SQLHSTMT hstmt, SQLCHAR * szPkTableQualifier, SQLSMALLINT cbPkTableQualifier, SQLCHAR * szPkTableOwner, SQLSMALLINT cbPkTableOwner, SQLCHAR * szPkTableName, SQLSMALLINT cbPkTableName, SQLCHAR * szFkTableQualifier, SQLSMALLINT cbFkTableQualifier, SQLCHAR * szFkTableOwner, SQLSMALLINT cbFkTableOwner, SQLCHAR * szFkTableName, SQLSMALLINT cbFkTableName) { ENTER_STMT (hstmt, trace_SQLForeignKeys (TRACE_ENTER, hstmt, szPkTableQualifier, cbPkTableQualifier, szPkTableOwner, cbPkTableOwner, szPkTableName, cbPkTableName, szFkTableQualifier, cbFkTableQualifier, szFkTableOwner, cbFkTableOwner, szFkTableName, cbFkTableName)); retcode = SQLForeignKeys_Internal( hstmt, szPkTableQualifier, cbPkTableQualifier, szPkTableOwner, cbPkTableOwner, szPkTableName, cbPkTableName, szFkTableQualifier, cbFkTableQualifier, szFkTableOwner, cbFkTableOwner, szFkTableName, cbFkTableName, 'A'); LEAVE_STMT (hstmt, trace_SQLForeignKeys (TRACE_LEAVE, hstmt, szPkTableQualifier, cbPkTableQualifier, szPkTableOwner, cbPkTableOwner, szPkTableName, cbPkTableName, szFkTableQualifier, cbFkTableQualifier, szFkTableOwner, cbFkTableOwner, szFkTableName, cbFkTableName)); } #if ODBCVER >= 0x0300 SQLRETURN SQL_API SQLForeignKeysA (SQLHSTMT hstmt, SQLCHAR * szPkTableQualifier, SQLSMALLINT cbPkTableQualifier, SQLCHAR * szPkTableOwner, SQLSMALLINT cbPkTableOwner, SQLCHAR * szPkTableName, SQLSMALLINT cbPkTableName, SQLCHAR * szFkTableQualifier, SQLSMALLINT cbFkTableQualifier, SQLCHAR * szFkTableOwner, SQLSMALLINT cbFkTableOwner, SQLCHAR * szFkTableName, SQLSMALLINT cbFkTableName) { ENTER_STMT (hstmt, trace_SQLForeignKeys (TRACE_ENTER, hstmt, szPkTableQualifier, cbPkTableQualifier, szPkTableOwner, cbPkTableOwner, szPkTableName, cbPkTableName, szFkTableQualifier, cbFkTableQualifier, szFkTableOwner, cbFkTableOwner, szFkTableName, cbFkTableName)); retcode = SQLForeignKeys_Internal( hstmt, szPkTableQualifier, cbPkTableQualifier, szPkTableOwner, cbPkTableOwner, szPkTableName, cbPkTableName, szFkTableQualifier, cbFkTableQualifier, szFkTableOwner, cbFkTableOwner, szFkTableName, cbFkTableName, 'A'); LEAVE_STMT (hstmt, trace_SQLForeignKeys (TRACE_LEAVE, hstmt, szPkTableQualifier, cbPkTableQualifier, szPkTableOwner, cbPkTableOwner, szPkTableName, cbPkTableName, szFkTableQualifier, cbFkTableQualifier, szFkTableOwner, cbFkTableOwner, szFkTableName, cbFkTableName)); } SQLRETURN SQL_API SQLForeignKeysW (SQLHSTMT hstmt, SQLWCHAR * szPkTableQualifier, SQLSMALLINT cbPkTableQualifier, SQLWCHAR * szPkTableOwner, SQLSMALLINT cbPkTableOwner, SQLWCHAR * szPkTableName, SQLSMALLINT cbPkTableName, SQLWCHAR * szFkTableQualifier, SQLSMALLINT cbFkTableQualifier, SQLWCHAR * szFkTableOwner, SQLSMALLINT cbFkTableOwner, SQLWCHAR * szFkTableName, SQLSMALLINT cbFkTableName) { ENTER_STMT (hstmt, trace_SQLForeignKeysW (TRACE_ENTER, hstmt, szPkTableQualifier, cbPkTableQualifier, szPkTableOwner, cbPkTableOwner, szPkTableName, cbPkTableName, szFkTableQualifier, cbFkTableQualifier, szFkTableOwner, cbFkTableOwner, szFkTableName, cbFkTableName)); retcode = SQLForeignKeys_Internal( hstmt, szPkTableQualifier, cbPkTableQualifier, szPkTableOwner, cbPkTableOwner, szPkTableName, cbPkTableName, szFkTableQualifier, cbFkTableQualifier, szFkTableOwner, cbFkTableOwner, szFkTableName, cbFkTableName, 'W'); LEAVE_STMT (hstmt, trace_SQLForeignKeysW (TRACE_LEAVE, hstmt, szPkTableQualifier, cbPkTableQualifier, szPkTableOwner, cbPkTableOwner, szPkTableName, cbPkTableName, szFkTableQualifier, cbFkTableQualifier, szFkTableOwner, cbFkTableOwner, szFkTableName, cbFkTableName)); } #endif SQLRETURN SQL_API SQLPrimaryKeys_Internal ( SQLHSTMT hstmt, SQLPOINTER szTableQualifier, SQLSMALLINT cbTableQualifier, SQLPOINTER szTableOwner, SQLSMALLINT cbTableOwner, SQLPOINTER szTableName, SQLSMALLINT cbTableName, SQLCHAR waMode) { STMT (pstmt, hstmt); CONN (pdbc, pstmt->hdbc); ENVR (penv, pdbc->henv); HPROC hproc = SQL_NULL_HPROC; SQLRETURN retcode = SQL_SUCCESS; sqlstcode_t sqlstat = en_00000; void * _TableQualifier = NULL; void * _TableOwner = NULL; void * _TableName = NULL; CONV_DIRECT conv_direct = CD_NONE; DM_CONV *conv = &pdbc->conv; for (;;) { if ((cbTableQualifier < 0 && cbTableQualifier != SQL_NTS) || (cbTableOwner < 0 && cbTableOwner != SQL_NTS) || (cbTableName < 0 && cbTableName != SQL_NTS)) { sqlstat = en_S1090; break; } retcode = _iodbcdm_cata_state_ok (pstmt, en_PrimaryKeys); if (retcode != SQL_SUCCESS) { return SQL_ERROR; } if (penv->unicode_driver && waMode != 'W') conv_direct = CD_A2W; else if (!penv->unicode_driver && waMode == 'W') conv_direct = CD_W2A; else if (waMode == 'W' && conv->dm_cp!=conv->drv_cp) conv_direct = CD_W2W; if (conv_direct != CD_NONE) { _TableQualifier = _iodbcdm_conv_var(pstmt, 0, szTableQualifier, cbTableQualifier, conv_direct); _TableOwner = _iodbcdm_conv_var (pstmt, 1, szTableOwner, cbTableOwner, conv_direct); _TableName = _iodbcdm_conv_var (pstmt, 2, szTableName, cbTableName, conv_direct); szTableQualifier = _TableQualifier; szTableOwner = _TableOwner; szTableName = _TableName; cbTableQualifier = (cbTableQualifier > 0) ? SQL_NTS : cbTableQualifier; cbTableOwner = (cbTableOwner > 0) ? SQL_NTS : cbTableOwner; cbTableName = (cbTableName > 0) ? SQL_NTS : cbTableName; } CALL_UDRIVER(pstmt->hdbc, pstmt, retcode, hproc, penv->unicode_driver, en_PrimaryKeys, ( pstmt->dhstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName)); if (hproc == SQL_NULL_HPROC) { sqlstat = en_IM001; break; } sqlstat = en_00000; if (1) /* turn off solaris warning message */ break; } if (retcode != SQL_STILL_EXECUTING) _iodbcdm_FreeStmtVars(pstmt); if (sqlstat != en_00000) { PUSHSQLERR (pstmt->herr, sqlstat); return SQL_ERROR; } retcode = _iodbcdm_cata_state_tr (pstmt, en_PrimaryKeys, retcode); return retcode; } SQLRETURN SQL_API SQLPrimaryKeys (SQLHSTMT hstmt, SQLCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLCHAR * szTableName, SQLSMALLINT cbTableName) { ENTER_STMT (hstmt, trace_SQLPrimaryKeys (TRACE_ENTER, hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName)); retcode = SQLPrimaryKeys_Internal ( hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, 'A'); LEAVE_STMT (hstmt, trace_SQLPrimaryKeys (TRACE_LEAVE, hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName)); } #if ODBCVER >= 0x0300 SQLRETURN SQL_API SQLPrimaryKeysA (SQLHSTMT hstmt, SQLCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLCHAR * szTableName, SQLSMALLINT cbTableName) { ENTER_STMT (hstmt, trace_SQLPrimaryKeys (TRACE_ENTER, hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName)); retcode = SQLPrimaryKeys_Internal ( hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, 'A'); LEAVE_STMT (hstmt, trace_SQLPrimaryKeys (TRACE_LEAVE, hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName)); } SQLRETURN SQL_API SQLPrimaryKeysW (SQLHSTMT hstmt, SQLWCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLWCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLWCHAR * szTableName, SQLSMALLINT cbTableName) { ENTER_STMT (hstmt, trace_SQLPrimaryKeysW (TRACE_ENTER, hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName)); retcode = SQLPrimaryKeys_Internal ( hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName, 'W'); LEAVE_STMT (hstmt, trace_SQLPrimaryKeysW (TRACE_LEAVE, hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName)); } #endif SQLRETURN SQL_API SQLProcedureColumns_Internal ( SQLHSTMT hstmt, SQLPOINTER szProcQualifier, SQLSMALLINT cbProcQualifier, SQLPOINTER szProcOwner, SQLSMALLINT cbProcOwner, SQLPOINTER szProcName, SQLSMALLINT cbProcName, SQLPOINTER szColumnName, SQLSMALLINT cbColumnName, SQLCHAR waMode) { STMT (pstmt, hstmt); CONN (pdbc, pstmt->hdbc); ENVR (penv, pdbc->henv); HPROC hproc = SQL_NULL_HPROC; SQLRETURN retcode = SQL_SUCCESS; sqlstcode_t sqlstat = en_00000; void * _ProcQualifier = NULL; void * _ProcOwner = NULL; void * _ProcName = NULL; void * _ColumnName = NULL; CONV_DIRECT conv_direct = CD_NONE; DM_CONV *conv = &pdbc->conv; for (;;) { if ((cbProcQualifier < 0 && cbProcQualifier != SQL_NTS) || (cbProcOwner < 0 && cbProcOwner != SQL_NTS) || (cbProcName < 0 && cbProcName != SQL_NTS) || (cbColumnName < 0 && cbColumnName != SQL_NTS)) { sqlstat = en_S1090; break; } retcode = _iodbcdm_cata_state_ok (pstmt, en_ProcedureColumns); if (retcode != SQL_SUCCESS) { return SQL_ERROR; } if (penv->unicode_driver && waMode != 'W') conv_direct = CD_A2W; else if (!penv->unicode_driver && waMode == 'W') conv_direct = CD_W2A; else if (waMode == 'W' && conv->dm_cp!=conv->drv_cp) conv_direct = CD_W2W; if (conv_direct != CD_NONE) { _ProcQualifier = _iodbcdm_conv_var (pstmt, 0, szProcQualifier, cbProcQualifier, conv_direct); _ProcOwner = _iodbcdm_conv_var (pstmt, 1, szProcOwner, cbProcOwner, conv_direct); _ProcName = _iodbcdm_conv_var (pstmt, 2, szProcName, cbProcName, conv_direct); _ColumnName = _iodbcdm_conv_var (pstmt, 3, szColumnName, cbColumnName, conv_direct); szProcQualifier = _ProcQualifier; szProcOwner = _ProcOwner; szProcName = _ProcName; szColumnName = _ColumnName; cbProcQualifier = (cbProcQualifier > 0) ? SQL_NTS : cbProcQualifier; cbProcOwner = (cbProcOwner > 0) ? SQL_NTS : cbProcOwner; cbProcName = (cbProcName > 0) ? SQL_NTS : cbProcName; cbColumnName = (cbColumnName > 0) ? SQL_NTS : cbColumnName; } CALL_UDRIVER(pstmt->hdbc, pstmt, retcode, hproc, penv->unicode_driver, en_ProcedureColumns, ( pstmt->dhstmt, szProcQualifier, cbProcQualifier, szProcOwner, cbProcOwner, szProcName, cbProcName, szColumnName, cbColumnName)); if (hproc == SQL_NULL_HPROC) { sqlstat = en_IM001; break; } sqlstat = en_00000; if (1) /* turn off solaris warning message */ break; } if (retcode != SQL_STILL_EXECUTING) _iodbcdm_FreeStmtVars(pstmt); if (sqlstat != en_00000) { PUSHSQLERR (pstmt->herr, sqlstat); return SQL_ERROR; } retcode = _iodbcdm_cata_state_tr (pstmt, en_ProcedureColumns, retcode); return retcode; } SQLRETURN SQL_API SQLProcedureColumns (SQLHSTMT hstmt, SQLCHAR * szProcQualifier, SQLSMALLINT cbProcQualifier, SQLCHAR * szProcOwner, SQLSMALLINT cbProcOwner, SQLCHAR * szProcName, SQLSMALLINT cbProcName, SQLCHAR * szColumnName, SQLSMALLINT cbColumnName) { ENTER_STMT (hstmt, trace_SQLProcedureColumns (TRACE_ENTER, hstmt, szProcQualifier, cbProcQualifier, szProcOwner, cbProcOwner, szProcName, cbProcName, szColumnName, cbColumnName)); retcode = SQLProcedureColumns_Internal ( hstmt, szProcQualifier, cbProcQualifier, szProcOwner, cbProcOwner, szProcName, cbProcName, szColumnName, cbColumnName, 'A'); LEAVE_STMT (hstmt, trace_SQLProcedureColumns (TRACE_LEAVE, hstmt, szProcQualifier, cbProcQualifier, szProcOwner, cbProcOwner, szProcName, cbProcName, szColumnName, cbColumnName)); } #if ODBCVER >= 0x0300 SQLRETURN SQL_API SQLProcedureColumnsA (SQLHSTMT hstmt, SQLCHAR * szProcQualifier, SQLSMALLINT cbProcQualifier, SQLCHAR * szProcOwner, SQLSMALLINT cbProcOwner, SQLCHAR * szProcName, SQLSMALLINT cbProcName, SQLCHAR * szColumnName, SQLSMALLINT cbColumnName) { ENTER_STMT (hstmt, trace_SQLProcedureColumns (TRACE_ENTER, hstmt, szProcQualifier, cbProcQualifier, szProcOwner, cbProcOwner, szProcName, cbProcName, szColumnName, cbColumnName)); retcode = SQLProcedureColumns_Internal ( hstmt, szProcQualifier, cbProcQualifier, szProcOwner, cbProcOwner, szProcName, cbProcName, szColumnName, cbColumnName, 'A'); LEAVE_STMT (hstmt, trace_SQLProcedureColumns (TRACE_LEAVE, hstmt, szProcQualifier, cbProcQualifier, szProcOwner, cbProcOwner, szProcName, cbProcName, szColumnName, cbColumnName)); } SQLRETURN SQL_API SQLProcedureColumnsW (SQLHSTMT hstmt, SQLWCHAR * szProcQualifier, SQLSMALLINT cbProcQualifier, SQLWCHAR * szProcOwner, SQLSMALLINT cbProcOwner, SQLWCHAR * szProcName, SQLSMALLINT cbProcName, SQLWCHAR * szColumnName, SQLSMALLINT cbColumnName) { ENTER_STMT (hstmt, trace_SQLProcedureColumnsW (TRACE_ENTER, hstmt, szProcQualifier, cbProcQualifier, szProcOwner, cbProcOwner, szProcName, cbProcName, szColumnName, cbColumnName)); retcode = SQLProcedureColumns_Internal ( hstmt, szProcQualifier, cbProcQualifier, szProcOwner, cbProcOwner, szProcName, cbProcName, szColumnName, cbColumnName, 'W'); LEAVE_STMT (hstmt, trace_SQLProcedureColumnsW (TRACE_LEAVE, hstmt, szProcQualifier, cbProcQualifier, szProcOwner, cbProcOwner, szProcName, cbProcName, szColumnName, cbColumnName)); } #endif SQLRETURN SQL_API SQLProcedures_Internal ( SQLHSTMT hstmt, SQLPOINTER szProcQualifier, SQLSMALLINT cbProcQualifier, SQLPOINTER szProcOwner, SQLSMALLINT cbProcOwner, SQLPOINTER szProcName, SQLSMALLINT cbProcName, SQLCHAR waMode) { STMT (pstmt, hstmt); CONN (pdbc, pstmt->hdbc); ENVR (penv, pdbc->henv); HPROC hproc = SQL_NULL_HPROC; SQLRETURN retcode = SQL_SUCCESS; sqlstcode_t sqlstat = en_00000; void * _ProcQualifier = NULL; void * _ProcOwner = NULL; void * _ProcName = NULL; CONV_DIRECT conv_direct = CD_NONE; DM_CONV *conv = &pdbc->conv; for (;;) { if ((cbProcQualifier < 0 && cbProcQualifier != SQL_NTS) || (cbProcOwner < 0 && cbProcOwner != SQL_NTS) || (cbProcName < 0 && cbProcName != SQL_NTS)) { sqlstat = en_S1090; break; } retcode = _iodbcdm_cata_state_ok (pstmt, en_Procedures); if (retcode != SQL_SUCCESS) { return SQL_ERROR; } if (penv->unicode_driver && waMode != 'W') conv_direct = CD_A2W; else if (!penv->unicode_driver && waMode == 'W') conv_direct = CD_W2A; else if (waMode == 'W' && conv->dm_cp!=conv->drv_cp) conv_direct = CD_W2W; if (conv_direct != CD_NONE) { _ProcQualifier = _iodbcdm_conv_var (pstmt, 0, szProcQualifier, cbProcQualifier, conv_direct); _ProcOwner = _iodbcdm_conv_var (pstmt, 1, szProcOwner, cbProcOwner, conv_direct); _ProcName = _iodbcdm_conv_var (pstmt, 2, szProcName, cbProcName, conv_direct); szProcQualifier = _ProcQualifier; szProcOwner = _ProcOwner; szProcName = _ProcName; cbProcQualifier = (cbProcQualifier > 0) ? SQL_NTS : cbProcQualifier; cbProcOwner = (cbProcOwner > 0) ? SQL_NTS : cbProcOwner; cbProcName = (cbProcName > 0) ? SQL_NTS : cbProcName; } CALL_UDRIVER(pstmt->hdbc, pstmt, retcode, hproc, penv->unicode_driver, en_Procedures, ( pstmt->dhstmt, szProcQualifier, cbProcQualifier, szProcOwner, cbProcOwner, szProcName, cbProcName)); if (hproc == SQL_NULL_HPROC) { sqlstat = en_IM001; break; } sqlstat = en_00000; if (1) /* turn off solaris warning message */ break; } if (retcode != SQL_STILL_EXECUTING) _iodbcdm_FreeStmtVars(pstmt); if (sqlstat != en_00000) { PUSHSQLERR (pstmt->herr, sqlstat); return SQL_ERROR; } retcode = _iodbcdm_cata_state_tr (pstmt, en_Procedures, retcode); return retcode; } SQLRETURN SQL_API SQLProcedures (SQLHSTMT hstmt, SQLCHAR * szProcQualifier, SQLSMALLINT cbProcQualifier, SQLCHAR * szProcOwner, SQLSMALLINT cbProcOwner, SQLCHAR * szProcName, SQLSMALLINT cbProcName) { ENTER_STMT (hstmt, trace_SQLProcedures (TRACE_ENTER, hstmt, szProcQualifier, cbProcQualifier, szProcOwner, cbProcOwner, szProcName, cbProcName)); retcode = SQLProcedures_Internal ( hstmt, szProcQualifier, cbProcQualifier, szProcOwner, cbProcOwner, szProcName, cbProcName, 'A'); LEAVE_STMT (hstmt, trace_SQLProcedures (TRACE_LEAVE, hstmt, szProcQualifier, cbProcQualifier, szProcOwner, cbProcOwner, szProcName, cbProcName)); } #if ODBCVER >= 0x0300 SQLRETURN SQL_API SQLProceduresA (SQLHSTMT hstmt, SQLCHAR * szProcQualifier, SQLSMALLINT cbProcQualifier, SQLCHAR * szProcOwner, SQLSMALLINT cbProcOwner, SQLCHAR * szProcName, SQLSMALLINT cbProcName) { ENTER_STMT (hstmt, trace_SQLProcedures (TRACE_ENTER, hstmt, szProcQualifier, cbProcQualifier, szProcOwner, cbProcOwner, szProcName, cbProcName)); retcode = SQLProcedures_Internal ( hstmt, szProcQualifier, cbProcQualifier, szProcOwner, cbProcOwner, szProcName, cbProcName, 'A'); LEAVE_STMT (hstmt, trace_SQLProcedures (TRACE_LEAVE, hstmt, szProcQualifier, cbProcQualifier, szProcOwner, cbProcOwner, szProcName, cbProcName)); } SQLRETURN SQL_API SQLProceduresW (SQLHSTMT hstmt, SQLWCHAR * szProcQualifier, SQLSMALLINT cbProcQualifier, SQLWCHAR * szProcOwner, SQLSMALLINT cbProcOwner, SQLWCHAR * szProcName, SQLSMALLINT cbProcName) { ENTER_STMT (hstmt, trace_SQLProceduresW (TRACE_ENTER, hstmt, szProcQualifier, cbProcQualifier, szProcOwner, cbProcOwner, szProcName, cbProcName)); retcode = SQLProcedures_Internal ( hstmt, szProcQualifier, cbProcQualifier, szProcOwner, cbProcOwner, szProcName, cbProcName, 'W'); LEAVE_STMT (hstmt, trace_SQLProceduresW (TRACE_LEAVE, hstmt, szProcQualifier, cbProcQualifier, szProcOwner, cbProcOwner, szProcName, cbProcName)); } #endif SQLRETURN SQL_API SQLTablePrivileges_Internal ( SQLHSTMT hstmt, SQLPOINTER szTableQualifier, SQLSMALLINT cbTableQualifier, SQLPOINTER szTableOwner, SQLSMALLINT cbTableOwner, SQLPOINTER szTableName, SQLSMALLINT cbTableName, SQLCHAR waMode) { STMT (pstmt, hstmt); CONN (pdbc, pstmt->hdbc); ENVR (penv, pdbc->henv); HPROC hproc = SQL_NULL_HPROC; SQLRETURN retcode = SQL_SUCCESS; sqlstcode_t sqlstat = en_00000; void * _TableQualifier = NULL; void * _TableOwner = NULL; void * _TableName = NULL; CONV_DIRECT conv_direct = CD_NONE; DM_CONV *conv = &pdbc->conv; for (;;) { if ((cbTableQualifier < 0 && cbTableQualifier != SQL_NTS) || (cbTableOwner < 0 && cbTableOwner != SQL_NTS) || (cbTableName < 0 && cbTableName != SQL_NTS)) { sqlstat = en_S1090; break; } retcode = _iodbcdm_cata_state_ok (pstmt, en_TablePrivileges); if (retcode != SQL_SUCCESS) { return SQL_ERROR; } if (penv->unicode_driver && waMode != 'W') conv_direct = CD_A2W; else if (!penv->unicode_driver && waMode == 'W') conv_direct = CD_W2A; else if (waMode == 'W' && conv->dm_cp!=conv->drv_cp) conv_direct = CD_W2W; if (conv_direct != CD_NONE) { _TableQualifier = _iodbcdm_conv_var (pstmt, 0, szTableQualifier, cbTableQualifier, conv_direct); _TableOwner = _iodbcdm_conv_var (pstmt, 1, szTableOwner, cbTableOwner, conv_direct); _TableName = _iodbcdm_conv_var (pstmt, 2, szTableName, cbTableName, conv_direct); szTableQualifier = _TableQualifier; szTableOwner = _TableOwner; szTableName = _TableName; cbTableQualifier = (cbTableQualifier > 0) ? SQL_NTS : cbTableQualifier; cbTableOwner = (cbTableOwner > 0) ? SQL_NTS : cbTableOwner; cbTableName = (cbTableName > 0) ? SQL_NTS : cbTableName; } CALL_UDRIVER(pstmt->hdbc, pstmt, retcode, hproc, penv->unicode_driver, en_TablePrivileges, ( pstmt->dhstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName, cbTableName)); if (hproc == SQL_NULL_HPROC) { sqlstat = en_IM001; break; } sqlstat = en_00000; if (1) /* turn off solaris warning message */ break; } if (retcode != SQL_STILL_EXECUTING) _iodbcdm_FreeStmtVars(pstmt); if (sqlstat != en_00000) { PUSHSQLERR (pstmt->herr, sqlstat); return SQL_ERROR; } retcode = _iodbcdm_cata_state_tr (pstmt, en_TablePrivileges, retcode); return retcode; } SQLRETURN SQL_API SQLTablePrivileges (SQLHSTMT hstmt, SQLCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLCHAR * szTableName, SQLSMALLINT cbTableName) { ENTER_STMT (hstmt, trace_SQLTablePrivileges (TRACE_ENTER, hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName,cbTableName)); retcode = SQLTablePrivileges_Internal( hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName,cbTableName, 'A'); LEAVE_STMT (hstmt, trace_SQLTablePrivileges (TRACE_LEAVE, hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName,cbTableName)); } #if ODBCVER >= 0x0300 SQLRETURN SQL_API SQLTablePrivilegesA (SQLHSTMT hstmt, SQLCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLCHAR * szTableName, SQLSMALLINT cbTableName) { ENTER_STMT (hstmt, trace_SQLTablePrivileges (TRACE_ENTER, hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName,cbTableName)); retcode = SQLTablePrivileges_Internal( hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName,cbTableName, 'A'); LEAVE_STMT (hstmt, trace_SQLTablePrivileges (TRACE_LEAVE, hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName,cbTableName)); } SQLRETURN SQL_API SQLTablePrivilegesW (SQLHSTMT hstmt, SQLWCHAR * szTableQualifier, SQLSMALLINT cbTableQualifier, SQLWCHAR * szTableOwner, SQLSMALLINT cbTableOwner, SQLWCHAR * szTableName, SQLSMALLINT cbTableName) { ENTER_STMT (hstmt, trace_SQLTablePrivilegesW (TRACE_ENTER, hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName,cbTableName)); retcode = SQLTablePrivileges_Internal( hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName,cbTableName, 'W'); LEAVE_STMT (hstmt, trace_SQLTablePrivilegesW (TRACE_LEAVE, hstmt, szTableQualifier, cbTableQualifier, szTableOwner, cbTableOwner, szTableName,cbTableName)); } #endif libiodbc-3.52.16/iodbc/dlproc.c0000664000175000017500000001406214424170750013100 00000000000000/* * dlproc.c * * $Id$ * * Load driver and resolve driver's function entry point * * The iODBC driver manager. * * Copyright (C) 1995 Ke Jin * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include "dlproc.h" #include "unicode.h" #include "herr.h" #include "henv.h" #include "hdbc.h" #include "itrace.h" char *odbcapi_symtab[] = { "UNKNOWN FUNCTION" #define FUNCDEF(A, B, C) ,C #include "henv.ci" #undef FUNCDEF }; HPROC _iodbcdm_getproc (HDBC hdbc, int idx) { CONN (pdbc, hdbc); ENV_t *penv; HPROC *phproc; if (idx <= 0 || idx >= __LAST_API_FUNCTION__) return SQL_NULL_HPROC; penv = (ENV_t *) (pdbc->henv); if (penv == NULL) return SQL_NULL_HPROC; phproc = penv->dllproc_tab + idx; if (*phproc == SQL_NULL_HPROC) *phproc = _iodbcdm_dllproc (penv->hdll, odbcapi_symtab[idx]); return *phproc; } static dlproc_t *pRoot = NULL; HDLL _iodbcdm_dllopen (char *path) { dlproc_t *pDrv = NULL, *p; /* * Check if we have already loaded the driver */ for (p = pRoot; p; p = p->next) { if (STREQ (p->path, path)) { pDrv = p; break; } } /* * If already loaded, increase ref counter */ if (pDrv) { pDrv->refcount++; /* * If the driver was unloaded, load it again */ if (pDrv->dll == NULL) pDrv->dll = (HDLL) DLL_OPEN (path); return pDrv->dll; } /* * Initialize new structure */ if ((pDrv = calloc (1, sizeof (dlproc_t))) == NULL) return NULL; pDrv->refcount = 1; pDrv->path = STRDUP (path); pDrv->dll = (HDLL) DLL_OPEN (path); /* * Add to linked list */ pDrv->next = pRoot; pRoot = pDrv; return pDrv->dll; } HPROC _iodbcdm_dllproc (HDLL hdll, char *sym) { return (HPROC) DLL_PROC (hdll, sym); } int _iodbcdm_dllclose (HDLL hdll) { dlproc_t *pDrv = NULL, *p; /* * Find loaded driver */ for (p = pRoot; p; p = p->next) { if (p->dll == hdll) { pDrv = p; break; } } /* * Not found */ if (!pDrv) return -1; /* * Decrease reference counter */ pDrv->refcount--; /* * Check if it is possible to unload the driver safely * * NOTE: Some drivers set explicit on_exit hooks, which makes it * impossible for the driver manager to unload the driver * as this would crash the executable at exit. */ if (pDrv->refcount == 0 && pDrv->safe_unload) { DLL_CLOSE (pDrv->dll); pDrv->dll = NULL; } return 0; } char * _iodbcdm_dllerror () { return DLL_ERROR (); } /* * If driver manager determines this driver is safe, flag the driver can * be unloaded if not used. */ void _iodbcdm_safe_unload (HDLL hdll) { dlproc_t *pDrv = NULL, *p; /* * Find loaded driver */ for (p = pRoot; p; p = p->next) { if (p->dll == hdll) { pDrv = p; break; } } /* * Driver not found */ if (!pDrv) return; pDrv->safe_unload = 1; } libiodbc-3.52.16/iodbc/execute.c0000664000175000017500000013435614424170750013270 00000000000000/* * execute.c * * $Id$ * * Invoke a query * * The iODBC driver manager. * * Copyright (C) 1995 Ke Jin * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include "unicode.h" #include "dlproc.h" #include "herr.h" #include "henv.h" #include "hdbc.h" #include "hstmt.h" #include "itrace.h" void _iodbcdm_do_cursoropen (STMT_t * pstmt) { SQLRETURN retcode; SWORD ncol; pstmt->state = en_stmt_executed; retcode = _iodbcdm_NumResultCols ((SQLHSTMT) pstmt, &ncol); if (SQL_SUCCEEDED (retcode)) { if (ncol) { pstmt->state = en_stmt_cursoropen; pstmt->cursor_state = en_stmt_cursor_opened; } else { pstmt->state = en_stmt_executed; pstmt->cursor_state = en_stmt_cursor_no; } } } #if (ODBCVER >= 0x0300) SQLLEN _iodbcdm_OdbcCTypeSize (SWORD fCType) { SQLLEN cbSize = 0; switch (fCType) { /* * ODBC fixed length types */ case SQL_C_SHORT: case SQL_C_SSHORT: cbSize = sizeof (SQLSMALLINT); break; case SQL_C_USHORT: cbSize = sizeof (SQLUSMALLINT); break; case SQL_C_LONG: case SQL_C_SLONG: cbSize = sizeof (SQLINTEGER); break; case SQL_C_ULONG: cbSize = sizeof (SQLUINTEGER); break; case SQL_C_FLOAT: cbSize = sizeof (SQLREAL); break; case SQL_C_DOUBLE: cbSize = sizeof (SQLDOUBLE); break; case SQL_C_BIT: cbSize = sizeof (SQLCHAR); break; case SQL_TINYINT: cbSize = sizeof (SQLSCHAR); break; case SQL_C_STINYINT: cbSize = sizeof (SQLSCHAR); break; case SQL_C_UTINYINT: cbSize = sizeof (SQLCHAR); break; case SQL_C_DATE: #if (ODBCVER >= 0x0300) cbSize = sizeof (SQL_DATE_STRUCT); #else cbSize = sizeof (DATE_STRUCT); #endif break; case SQL_C_TIME: #if (ODBCVER >= 0x0300) cbSize = sizeof (SQL_TIME_STRUCT); #else cbSize = sizeof (TIME_STRUCT); #endif break; case SQL_C_TIMESTAMP: #if (ODBCVER >= 0x0300) cbSize = sizeof (SQL_TIMESTAMP_STRUCT); #else cbSize = sizeof (TIMESTAMP_STRUCT); #endif break; #if (ODBCVER >= 0x0300) #ifdef ODBCINT64 case SQL_C_SBIGINT: cbSize = sizeof (SQLBIGINT); break; case SQL_C_UBIGINT: cbSize = sizeof (SQLUBIGINT); break; #endif /* ODBCINT64 */ case SQL_C_TYPE_DATE: cbSize = sizeof (SQL_DATE_STRUCT); break; case SQL_C_TYPE_TIME: cbSize = sizeof (SQL_TIME_STRUCT); break; case SQL_C_TYPE_TIMESTAMP: cbSize = sizeof (SQL_TIMESTAMP_STRUCT); break; case SQL_C_NUMERIC: cbSize = sizeof (SQL_NUMERIC_STRUCT); break; case SQL_C_GUID: cbSize = sizeof (SQLGUID); break; #endif /* ODBCVER >= 0x0300 */ /* * Variable length types and unsupported types */ case SQL_C_CHAR: case SQL_C_BINARY: case SQL_C_WCHAR: default: break; } return cbSize; } static SQLLEN GetElementSize (PPARM pparm, DM_CONV *conv) { SQLLEN elementSize; if (pparm->pm_c_type == SQL_C_BINARY) { elementSize = pparm->pm_cbValueMax == 0 ? pparm->pm_precision : pparm->pm_cbValueMax; elementSize = (elementSize == 0) ? sizeof(SQLLEN) : elementSize; } else if (pparm->pm_c_type == SQL_C_CHAR) { elementSize = pparm->pm_cbValueMax == 0 ? pparm->pm_precision + 1 : pparm->pm_cbValueMax; elementSize = (elementSize == 0) ? sizeof(SQLLEN) : elementSize; } else if (pparm->pm_c_type == SQL_C_WCHAR) { if (pparm->pm_cbValueMax == 0) { if (conv && conv->dm_cp != conv->drv_cp) elementSize = (pparm->pm_precision + 1) * DM_WCHARSIZE(conv); else elementSize = (pparm->pm_precision + 1) * sizeof(wchar_t); } else elementSize = pparm->pm_cbValueMax; elementSize = (elementSize == 0) ? sizeof(SQLLEN) : elementSize; } else /* fixed length types */ { /*elementSize = pparm->pm_size;*/ elementSize = _iodbcdm_OdbcCTypeSize(pparm->pm_c_type); } return elementSize; } /* DM=>DRV */ static void _ExecConv_W2A(wchar_t *wdata, SQLLEN *pInd, UDWORD size, DM_CONV *conv) { char *buf; if (*pInd != SQL_NULL_DATA && *pInd != SQL_DATA_AT_EXEC && *pInd > SQL_LEN_DATA_AT_EXEC_OFFSET) { buf = (char*) conv_text_m2d(conv, wdata, (ssize_t)*pInd, CD_W2A); if (buf != NULL) strcpy((char*)wdata, buf); MEM_FREE (buf); if (pInd && *pInd != SQL_NTS) { if (conv->drv_cp == CP_UTF8) *pInd = strlen((char*)wdata); else *pInd /= DRV_WCHARSIZE(conv); } } } /* DRV => DM */ static void _ExecConv_A2W(char *data, SQLLEN *pInd, UDWORD size, DM_CONV *conv) { wchar_t *buf; if (*pInd != SQL_NULL_DATA && *pInd != SQL_DATA_AT_EXEC && *pInd > SQL_LEN_DATA_AT_EXEC_OFFSET) { buf = (wchar_t*) conv_text_d2m(conv, data, (ssize_t)*pInd, CD_A2W); if (buf != NULL) DM_WCSCPY (conv, data, buf); MEM_FREE (buf); if (pInd && *pInd != SQL_NTS) { if (conv->dm_cp == CP_UTF8) *pInd = strlen(data); else *pInd *= DM_WCHARSIZE(conv); } } } static void _ExecConv_W2W(char *data, SQLLEN *pInd, UDWORD size, DM_CONV *conv, BOOL bOutput) { void *buf = NULL; if (*pInd != SQL_NULL_DATA && *pInd != SQL_DATA_AT_EXEC && *pInd > SQL_LEN_DATA_AT_EXEC_OFFSET) { if (bOutput) { /* DRV => DM */ void *buf = conv_text_d2m(conv, data, (ssize_t)*pInd, CD_W2W); if (buf != NULL) { DM_WCSNCPY (conv, data, buf, size/DM_WCHARSIZE(conv)); if (conv->dm_cp == CP_UTF8) data[size-1] = 0; else DM_SetWCharAt(conv, data, size/DM_WCHARSIZE(conv)-1, 0); } if (pInd && *pInd != SQL_NTS) { if (conv->dm_cp == CP_UTF8) *pInd = strlen(data); else *pInd = DM_WCSLEN(conv, data) * DM_WCHARSIZE(conv); } } else { /* DM => DRV */ void *buf = conv_text_m2d(conv, data, (ssize_t)*pInd, CD_W2W); if (buf != NULL) { DRV_WCSNCPY(conv, data, buf, size/DRV_WCHARSIZE(conv)); if (conv->drv_cp == CP_UTF8) data[size-1] = 0; else DRV_SetWCharAt(conv, data, size/DRV_WCHARSIZE(conv)-1, 0); } if (pInd && *pInd != SQL_NTS) { if (conv->drv_cp == CP_UTF8) *pInd = strlen(data); else *pInd = DRV_WCSLEN(conv, data) * DRV_WCHARSIZE(conv); } } MEM_FREE (buf); } } static SQLRETURN _ConvParam (STMT_t *pstmt, PPARM pparm, SQLULEN row, BOOL bOutput, DM_CONV *conv, SWORD unicode_driver) { SQLLEN octetLen; void *value; SQLLEN *pInd = NULL; SQLLEN elementSize = 0; SQLUINTEGER bindOffset = pstmt->param_bind_offset; if (pparm->pm_c_type != SQL_C_WCHAR) return SQL_SUCCESS; elementSize = GetElementSize (pparm, conv); if (pstmt->param_bind_type) { /* row-wise binding of parameters in force */ if (pparm->pm_pOctetLength) octetLen = *(SQLLEN *) ((char *) pparm->pm_pOctetLength + row * pstmt->param_bind_type + bindOffset); else octetLen = pparm->pm_size; if (pparm->pm_pInd) pInd = (SQLLEN *) ((char *) pparm->pm_pInd + row * pstmt->param_bind_type + bindOffset); } else { octetLen = pparm->pm_pOctetLength ? ((SQLLEN*)((char*)pparm->pm_pOctetLength + bindOffset))[row] : pparm->pm_size; if (pparm->pm_pInd) pInd = &((SQLLEN*)((char*)pparm->pm_pInd + bindOffset))[row]; } if (!pInd || (pInd && (*pInd == SQL_NULL_DATA || (*pInd == SQL_DEFAULT_PARAM && !bOutput) ))) { return SQL_SUCCESS; } if (octetLen == SQL_DATA_AT_EXEC || octetLen <= SQL_LEN_DATA_AT_EXEC_OFFSET) { value = NULL; PUSHSQLERR (pstmt->herr, en_HYC00); /* Unsupported Modes */ return SQL_ERROR; } else value = pparm->pm_data; if (value == NULL) return 0; if (pstmt->param_bind_type) /* row-wise binding of parameters in force */ value = (char *) pparm->pm_data + row * pstmt->param_bind_type + bindOffset; else value = (char *) pparm->pm_data + row * elementSize + bindOffset; if (unicode_driver) _ExecConv_W2W(value, pInd, elementSize, conv, bOutput); else { if (bOutput) _ExecConv_A2W(value, pInd, elementSize, conv); else _ExecConv_W2A(value, pInd, elementSize, conv); } return SQL_SUCCESS; } static SQLRETURN _ConvRebindedParam (STMT_t *pstmt, PPARM pparm, SQLULEN row, BOOL bOutput, DM_CONV *conv) { SQLLEN octetLen; void *val_dm; void *val_drv; SQLLEN *pInd_dm = NULL; SQLLEN *pInd_drv = NULL; SQLLEN elementSize = 0; IODBC_CHARSET m_charset = (conv) ? conv->dm_cp : CP_DEF; IODBC_CHARSET d_charset = (conv) ? conv->drv_cp : CP_DEF; SQLUINTEGER bindOffset = pstmt->param_bind_offset; elementSize = GetElementSize (pparm, conv); if (pstmt->param_bind_type) { /* row-wise binding of parameters in force */ if (pparm->pm_pOctetLength) octetLen = *(SQLLEN *) ((char *) pparm->pm_pOctetLength + row * pstmt->param_bind_type + bindOffset); else octetLen = pparm->pm_size; if (pparm->pm_pInd) { pInd_dm = (SQLLEN *) ((char *) pparm->pm_pInd + row * pstmt->param_bind_type + bindOffset); pInd_drv = (SQLLEN *) ((char *) pparm->pm_conv_pInd + row * pstmt->conv_param_bind_type); } } else { octetLen = pparm->pm_pOctetLength ? ((SQLLEN*)((char*)pparm->pm_pOctetLength + bindOffset))[row] : pparm->pm_size; if (pparm->pm_pInd) { pInd_dm = &((SQLLEN*)((char*)pparm->pm_pInd + bindOffset))[row]; pInd_drv = &((SQLLEN*)pparm->pm_conv_pInd)[row]; } } if (!pInd_dm) return SQL_SUCCESS; if (pstmt->param_bind_type && (octetLen == SQL_DATA_AT_EXEC || octetLen <= SQL_LEN_DATA_AT_EXEC_OFFSET)) { PUSHSQLERR (pstmt->herr, en_HYC00); /* Unsupported Modes */ return SQL_ERROR; } if (bOutput && (octetLen == SQL_DATA_AT_EXEC || octetLen <= SQL_LEN_DATA_AT_EXEC_OFFSET)) { PUSHSQLERR (pstmt->herr, en_HYC00); /* Unsupported Modes */ return SQL_ERROR; } if (bOutput && *pInd_drv == SQL_NULL_DATA && (pparm->pm_usage == SQL_PARAM_OUTPUT || pparm->pm_usage == SQL_PARAM_INPUT_OUTPUT)) { *pInd_dm = *pInd_drv; return SQL_SUCCESS; } else if (!bOutput && (*pInd_dm == SQL_NULL_DATA || *pInd_dm == SQL_DATA_AT_EXEC || *pInd_dm <= SQL_LEN_DATA_AT_EXEC_OFFSET) && (pparm->pm_usage == SQL_PARAM_INPUT || pparm->pm_usage == SQL_PARAM_INPUT_OUTPUT)) { *pInd_drv = *pInd_dm; return SQL_SUCCESS; } if (pparm->pm_data == NULL) return SQL_SUCCESS; if (pstmt->param_bind_type) { /* row-wise binding of parameters in force */ val_dm = (char *) pparm->pm_data + row * pstmt->param_bind_type + bindOffset; val_drv = (char *) pparm->pm_conv_data + row * pstmt->conv_param_bind_type; } else { val_dm = (char *) pparm->pm_data + row * elementSize + bindOffset; val_drv = (char *) pparm->pm_conv_data + row * pparm->pm_conv_el_size; } if (pparm->pm_c_type_orig == SQL_C_WCHAR) { SQLLEN len, size; if (bOutput && (pparm->pm_usage == SQL_PARAM_OUTPUT || pparm->pm_usage == SQL_PARAM_INPUT_OUTPUT)) { /* drv-dm */ len = (SQLLEN)*pInd_drv; size = dm_conv_W2W(val_drv, len, val_dm, elementSize, d_charset, m_charset); if (m_charset == CP_UTF8) *(char*)(val_dm + size) = 0; else DM_SetWCharAt(conv, val_dm, size/DM_WCHARSIZE(conv), 0); *pInd_dm = (*pInd_drv != SQL_NTS)? size: SQL_NTS; } else if (!bOutput && (pparm->pm_usage == SQL_PARAM_INPUT || pparm->pm_usage == SQL_PARAM_INPUT_OUTPUT)) { /* dm-drv */ len = (SQLLEN)*pInd_dm; size = dm_conv_W2W(val_dm, len, val_drv, pparm->pm_conv_el_size, m_charset, d_charset); if (d_charset == CP_UTF8) *(char*)(val_drv + size) = 0; else DRV_SetWCharAt(conv, val_drv, size/DRV_WCHARSIZE(conv), 0); *pInd_drv = (*pInd_dm != SQL_NTS)? size: SQL_NTS; } } else { if (bOutput && (pparm->pm_usage == SQL_PARAM_OUTPUT || pparm->pm_usage == SQL_PARAM_INPUT_OUTPUT)) { memcpy(val_dm, val_drv, elementSize); if (pInd_dm) *pInd_dm = *pInd_drv; } else if (!bOutput && (pparm->pm_usage == SQL_PARAM_INPUT || pparm->pm_usage == SQL_PARAM_INPUT_OUTPUT)) { memcpy(val_drv, val_dm, elementSize); if (pInd_dm) *pInd_drv = *pInd_dm; } } return SQL_SUCCESS; } static SQLRETURN _ReBindParam (STMT_t *pstmt, PPARM pparm) { CONN (pdbc, pstmt->hdbc); ENVR (penv, pdbc->henv); HPROC hproc2 = SQL_NULL_HPROC; HPROC hproc3 = SQL_NULL_HPROC; SQLUINTEGER odbc_ver = ((GENV_t *) pdbc->genv)->odbc_ver; SQLUINTEGER dodbc_ver = ((ENV_t *) pdbc->henv)->dodbc_ver; SQLRETURN retcode = SQL_SUCCESS; SQLSMALLINT nSqlType; hproc2 = _iodbcdm_getproc (pstmt->hdbc, en_BindParameter); #if (ODBCVER >=0x0300) hproc3 = _iodbcdm_getproc (pstmt->hdbc, en_BindParam); #endif nSqlType = _iodbcdm_map_sql_type (pparm->pm_sql_type, penv->dodbc_ver); if (odbc_ver == SQL_OV_ODBC2 && ( dodbc_ver == SQL_OV_ODBC2 || (dodbc_ver == SQL_OV_ODBC3 && hproc2 != SQL_NULL_HPROC))) hproc3 = SQL_NULL_HPROC; #if (ODBCVER >=0x0300) if (pparm->pm_usage == SQL_PARAM_INPUT && hproc2 == SQL_NULL_HPROC && hproc3 != SQL_NULL_HPROC) { CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc3, (pstmt->dhstmt, pparm->pm_par, pparm->pm_c_type, nSqlType, pparm->pm_precision, pparm->pm_scale, pparm->pm_conv_data, pparm->pm_conv_pInd)); } else #endif { if (hproc2 == SQL_NULL_HPROC) { PUSHSQLERR (pstmt->herr, en_IM001); return SQL_ERROR; } CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc2, (pstmt->dhstmt, pparm->pm_par, pparm->pm_usage, pparm->pm_c_type, nSqlType, pparm->pm_precision, pparm->pm_scale, pparm->pm_conv_data, pparm->pm_conv_el_size, pparm->pm_conv_pInd)); } return retcode; } static SQLRETURN _SQLExecute_ConvParams (SQLHSTMT hstmt, BOOL bOutput) { STMT (pstmt, hstmt); CONN (pdbc, pstmt->hdbc); ENVR (penv, pdbc->henv); SQLUINTEGER odbc_ver = ((GENV_t *) pdbc->genv)->odbc_ver; SQLUINTEGER dodbc_ver = ((ENV_t *) pdbc->henv)->dodbc_ver; PPARM pparm; int maxpar; int i; SQLULEN j; SQLULEN cRows = pstmt->paramset_size; DM_CONV *conv = &pdbc->conv; SQLRETURN retcode = SQL_SUCCESS; IODBC_CHARSET m_charset = CP_DEF; IODBC_CHARSET d_charset = CP_DEF; BOOL needRebind = FALSE; SQLLEN sz_mult = 1; HPROC hproc2 = SQL_NULL_HPROC; HPROC hproc3 = SQL_NULL_HPROC; if (cRows == 0) cRows = 1; if (conv) { m_charset = conv ? conv->dm_cp: CP_DEF; d_charset = conv ? conv->drv_cp: CP_DEF; if (m_charset==CP_UTF16 && d_charset==CP_UCS4) sz_mult = 2; else if (m_charset==CP_UTF8 && d_charset==CP_UCS4) sz_mult = 4; else if (m_charset==CP_UTF8 && d_charset==CP_UTF16) sz_mult = 2; else sz_mult = 1; } maxpar = pstmt->st_nparam; if (penv->unicode_driver && !bOutput) { if (conv==NULL || (m_charset == d_charset)) { needRebind = FALSE; } /** else if ((m_charset==CP_UCS4 && d_charset==CP_UTF16) ||(m_charset==CP_UTF16 && d_charset==CP_UCS4) ||(m_charset==CP_UTF8 && d_charset==CP_UTF16) ||(m_charset==CP_UTF8 && d_charset==CP_UCS4)) ***/ else { /* check if we need rebind params */ pparm = pstmt->st_pparam; for (i = 0; i < maxpar; i++, pparm++) { if (pparm->pm_data == NULL) continue; if (pparm->pm_c_type_orig == SQL_C_WCHAR) { needRebind = TRUE; break; } } } } if (needRebind && !bOutput) /* mode this flag to PSTMT */ { SQLULEN new_size = 0; void *buf = NULL; if (pstmt->param_bind_type) /* row-wise binding */ { pparm = pstmt->st_pparam; for (i = 0; i < maxpar; i++, pparm++) { if (pparm->pm_data == NULL) continue; new_size += sizeof(SQLLEN); pparm->pm_conv_el_size = GetElementSize(pparm, conv); if (pparm->pm_c_type == SQL_C_WCHAR) pparm->pm_conv_el_size *= sz_mult; new_size += pparm->pm_conv_el_size; } if (pstmt->params_buf) { free(pstmt->params_buf); pstmt->params_buf = NULL; } buf = calloc((new_size*cRows), sizeof(char)); if (!buf) { PUSHSQLERR (pstmt->herr, en_HY001); return SQL_ERROR; } pstmt->params_buf = buf; pstmt->conv_param_bind_type = new_size; /***** Reset Params *****/ hproc2 = _iodbcdm_getproc (pstmt->hdbc, en_FreeStmt); if (hproc2 == SQL_NULL_HPROC) { PUSHSQLERR (pstmt->herr, en_IM001); return SQL_ERROR; } CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc2, (pstmt->dhstmt, (SQLUSMALLINT)SQL_RESET_PARAMS)); if (!SQL_SUCCEEDED (retcode)) return retcode; /***** Set Bind_type in driver to new size *****/ if (dodbc_ver == SQL_OV_ODBC3) { CALL_UDRIVER(pstmt->hdbc, pstmt, retcode, hproc3, penv->unicode_driver, en_SetStmtAttr, (pstmt->dhstmt, (SQLINTEGER)SQL_ATTR_PARAM_BIND_TYPE, (SQLPOINTER)new_size, 0)); if (hproc3 == SQL_NULL_HPROC) { PUSHSQLERR (pstmt->herr, en_IM001); return SQL_ERROR; } } else { hproc2 = _iodbcdm_getproc (pstmt->hdbc, en_SetStmtOption); if (hproc2 == SQL_NULL_HPROC) hproc2 = _iodbcdm_getproc (pstmt->hdbc, en_SetStmtOptionA); if (hproc2 == SQL_NULL_HPROC) { PUSHSQLERR (pstmt->herr, en_IM001); return SQL_ERROR; } CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc2, (pstmt->dhstmt, (SQLUSMALLINT)SQL_ATTR_PARAM_BIND_TYPE, (SQLUINTEGER)new_size)); } if (!SQL_SUCCEEDED (retcode)) return retcode; if (cRows > 1) { /***** Set ParamSet size *****/ if (dodbc_ver == SQL_OV_ODBC3) { CALL_UDRIVER(pstmt->hdbc, pstmt, retcode, hproc3, penv->unicode_driver, en_SetStmtAttr, (pstmt->dhstmt, (SQLINTEGER)SQL_ATTR_PARAMSET_SIZE, (SQLPOINTER)cRows, 0)); if (hproc3 == SQL_NULL_HPROC) { PUSHSQLERR (pstmt->herr, en_IM001); return SQL_ERROR; } } if (!SQL_SUCCEEDED (retcode)) return retcode; } /* rebind parameters */ pparm = pstmt->st_pparam; buf = pstmt->params_buf; for (i = 0; i < maxpar; i++, pparm++) { if (pparm->pm_data == NULL) continue; pparm->pm_conv_data = buf; buf += pparm->pm_conv_el_size; pparm->pm_conv_pInd = buf; buf += sizeof(SQLLEN); retcode = _ReBindParam(pstmt, pparm); if (!SQL_SUCCEEDED (retcode)) return retcode; pparm->rebinded = TRUE; } } else /* col-wise binding rebind all for avoid OFFSET related issues */ { pparm = pstmt->st_pparam; for (i = 0; i < maxpar; i++, pparm++) { SQLLEN *pInd_dm = NULL; SQLUINTEGER bindOffset = pstmt->param_bind_offset; if (pparm->pm_pInd) pInd_dm = ((SQLLEN*)((char*)pparm->pm_pInd + bindOffset)); if (pparm->pm_data == NULL) continue; if (pparm->pm_tmp) { free(pparm->pm_tmp); pparm->pm_tmp = NULL; } if (pparm->pm_tmp_Ind) { free(pparm->pm_tmp_Ind); pparm->pm_tmp_Ind = NULL; } pparm->pm_conv_el_size = GetElementSize (pparm, conv); if (cRows == 1 && pInd_dm && (*pInd_dm == SQL_DATA_AT_EXEC || *pInd_dm <= SQL_LEN_DATA_AT_EXEC_OFFSET)) { pparm->pm_conv_pInd = pparm->pm_pInd; pparm->pm_conv_data = pparm->pm_data; } else { if (pparm->pm_c_type == SQL_C_WCHAR) pparm->pm_conv_el_size *= sz_mult; new_size = cRows * pparm->pm_conv_el_size; buf = calloc(new_size, sizeof(char)); if (!buf) { PUSHSQLERR (pstmt->herr, en_HY001); return SQL_ERROR; } pparm->pm_tmp = pparm->pm_conv_data = buf; buf = calloc(cRows, sizeof(SQLLEN)); if (!buf) { PUSHSQLERR (pstmt->herr, en_HY001); return SQL_ERROR; } pparm->pm_tmp_Ind = pparm->pm_conv_pInd = buf; } retcode = _ReBindParam(pstmt, pparm); if (!SQL_SUCCEEDED (retcode)) return retcode; pparm->rebinded = TRUE; } } /***** Set ParamSet offset *****/ if (dodbc_ver == SQL_OV_ODBC3) { CALL_UDRIVER(pstmt->hdbc, pstmt, retcode, hproc3, penv->unicode_driver, en_SetStmtAttr, (pstmt->dhstmt, (SQLINTEGER)SQL_ATTR_PARAM_BIND_OFFSET_PTR, (SQLPOINTER)0, 0)); if (hproc3 == SQL_NULL_HPROC) { PUSHSQLERR (pstmt->herr, en_IM001); return SQL_ERROR; } } } pparm = pstmt->st_pparam; for (i = 0; i < maxpar; i++, pparm++) { if (pparm->pm_data == NULL) continue; if (pparm->rebinded) { if (bOutput && pparm->pm_usage == SQL_PARAM_INPUT) continue; for (j = 0; j < cRows; j++) _ConvRebindedParam(pstmt, pparm, j, bOutput, conv); } else { if (bOutput && (pparm->pm_usage == SQL_PARAM_OUTPUT || pparm->pm_usage == SQL_PARAM_INPUT_OUTPUT)) { if (pparm->pm_c_type_orig != SQL_C_WCHAR || m_charset == d_charset) continue; for (j = 0; j < cRows; j++) _ConvParam(pstmt, pparm, j, bOutput, conv, penv->unicode_driver); } else if (!bOutput && (pparm->pm_usage == SQL_PARAM_INPUT || pparm->pm_usage == SQL_PARAM_INPUT_OUTPUT)) { if (pparm->pm_c_type != SQL_C_WCHAR || m_charset == d_charset) continue; for (j = 0; j < cRows; j++) _ConvParam(pstmt, pparm, j, bOutput, conv, penv->unicode_driver); pparm->pm_c_type = SQL_C_CHAR; } } } /* next column */ return SQL_SUCCESS; } #endif static SQLRETURN SQLExecute_Internal (SQLHSTMT hstmt) { STMT (pstmt, hstmt); HPROC hproc = SQL_NULL_HPROC; SQLRETURN retcode, rc; sqlstcode_t sqlstat = en_00000; /* check state */ if (pstmt->asyn_on == en_NullProc) { switch (pstmt->state) { case en_stmt_allocated: sqlstat = en_S1010; break; case en_stmt_executed_with_info: case en_stmt_executed: if (!pstmt->prep_state) { sqlstat = en_S1010; } break; case en_stmt_cursoropen: if (!pstmt->prep_state) { sqlstat = en_S1010; } break; case en_stmt_fetched: case en_stmt_xfetched: if (!pstmt->prep_state) { sqlstat = en_S1010; } else { sqlstat = en_24000; } break; case en_stmt_needdata: case en_stmt_mustput: case en_stmt_canput: sqlstat = en_S1010; break; default: break; } } else if (pstmt->asyn_on != en_Execute) { sqlstat = en_S1010; } if (sqlstat == en_00000) { hproc = _iodbcdm_getproc (pstmt->hdbc, en_Execute); if (hproc == SQL_NULL_HPROC) { sqlstat = en_IM001; } } if (sqlstat != en_00000) { PUSHSQLERR (pstmt->herr, sqlstat); return SQL_ERROR; } if ((rc = _SQLExecute_ConvParams(hstmt, FALSE)) != SQL_SUCCESS) return rc; CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc, (pstmt->dhstmt)); /* stmt state transition */ if (pstmt->asyn_on == en_Execute) { switch (retcode) { case SQL_SUCCESS: case SQL_SUCCESS_WITH_INFO: case SQL_NEED_DATA: case SQL_ERROR: pstmt->asyn_on = en_NullProc; break; case SQL_STILL_EXECUTING: default: return retcode; } } if (retcode == SQL_SUCCESS || retcode == SQL_SUCCESS_WITH_INFO) { rc = _SQLExecute_ConvParams(hstmt, TRUE); if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) retcode = rc; } switch (pstmt->state) { case en_stmt_prepared: switch (retcode) { case SQL_SUCCESS: _iodbcdm_do_cursoropen (pstmt); break; case SQL_SUCCESS_WITH_INFO: pstmt->state = en_stmt_executed_with_info; break; case SQL_NEED_DATA: pstmt->state = en_stmt_needdata; pstmt->need_on = en_Execute; pstmt->st_need_param = NULL; break; case SQL_STILL_EXECUTING: pstmt->asyn_on = en_Execute; break; default: break; } break; case en_stmt_executed: switch (retcode) { case SQL_ERROR: pstmt->state = en_stmt_prepared; pstmt->cursor_state = en_stmt_cursor_no; break; case SQL_NEED_DATA: pstmt->state = en_stmt_needdata; pstmt->need_on = en_Execute; break; case SQL_STILL_EXECUTING: pstmt->asyn_on = en_Execute; break; default: break; } break; default: break; } return retcode; } SQLRETURN SQL_API SQLExecute (SQLHSTMT hstmt) { ENTER_STMT (hstmt, trace_SQLExecute (TRACE_ENTER, hstmt)); retcode = SQLExecute_Internal (hstmt); LEAVE_STMT (hstmt, trace_SQLExecute (TRACE_LEAVE, hstmt)); } SQLRETURN SQL_API SQLExecDirect_Internal (SQLHSTMT hstmt, SQLPOINTER szSqlStr, SQLINTEGER cbSqlStr, SQLCHAR waMode) { STMT (pstmt, hstmt); CONN (pdbc, pstmt->hdbc); ENVR (penv, pdbc->henv); HPROC hproc = SQL_NULL_HPROC; SQLRETURN retcode = SQL_SUCCESS; SQLRETURN rc = SQL_SUCCESS; sqlstcode_t sqlstat = en_00000; void * _SqlStr = NULL; CONV_DIRECT conv_direct = CD_NONE; DM_CONV *conv = &pdbc->conv; /* check arguments */ if (szSqlStr == NULL) { sqlstat = en_S1009; } else if (cbSqlStr < 0 && cbSqlStr != SQL_NTS) { sqlstat = en_S1090; } if (sqlstat != en_00000) { PUSHSQLERR (pstmt->herr, sqlstat); return SQL_ERROR; } /* check state */ if (pstmt->asyn_on == en_NullProc) { switch (pstmt->state) { case en_stmt_fetched: case en_stmt_xfetched: sqlstat = en_24000; break; case en_stmt_needdata: case en_stmt_mustput: case en_stmt_canput: sqlstat = en_S1010; break; default: break; } } else if (pstmt->asyn_on != en_ExecDirect) { sqlstat = en_S1010; } if (sqlstat != en_00000) { PUSHSQLERR (pstmt->herr, sqlstat); return SQL_ERROR; } if (penv->unicode_driver && waMode != 'W') conv_direct = CD_A2W; else if (!penv->unicode_driver && waMode == 'W') conv_direct = CD_W2A; else if (waMode == 'W' && conv->dm_cp != conv->drv_cp) conv_direct = CD_W2W; if (conv_direct != CD_NONE) { _SqlStr = _iodbcdm_conv_var (pstmt, 0, szSqlStr, cbSqlStr, conv_direct); szSqlStr = _SqlStr; cbSqlStr = SQL_NTS; } if ((rc = _SQLExecute_ConvParams(hstmt, FALSE)) != SQL_SUCCESS) return rc; CALL_UDRIVER(pstmt->hdbc, pstmt, retcode, hproc, penv->unicode_driver, en_ExecDirect, ( pstmt->dhstmt, szSqlStr, cbSqlStr)); if (hproc == SQL_NULL_HPROC) { _iodbcdm_FreeStmtVars(pstmt); PUSHSQLERR (pstmt->herr, en_IM001); return SQL_ERROR; } if (retcode != SQL_STILL_EXECUTING) _iodbcdm_FreeStmtVars(pstmt); /* stmt state transition */ if (pstmt->asyn_on == en_ExecDirect) { switch (retcode) { case SQL_SUCCESS: case SQL_SUCCESS_WITH_INFO: case SQL_NEED_DATA: case SQL_ERROR: pstmt->asyn_on = en_NullProc; break; case SQL_STILL_EXECUTING: default: return retcode; } } if (retcode == SQL_SUCCESS || retcode == SQL_SUCCESS_WITH_INFO) { rc = _SQLExecute_ConvParams(hstmt, TRUE); if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) retcode = rc; } if (pstmt->state <= en_stmt_executed) { switch (retcode) { case SQL_SUCCESS: _iodbcdm_do_cursoropen (pstmt); pstmt->prep_state = 1; break; case SQL_SUCCESS_WITH_INFO: pstmt->state = en_stmt_executed_with_info; pstmt->prep_state = 1; break; case SQL_NEED_DATA: pstmt->state = en_stmt_needdata; pstmt->need_on = en_ExecDirect; pstmt->st_need_param = NULL; break; case SQL_STILL_EXECUTING: pstmt->asyn_on = en_ExecDirect; break; case SQL_ERROR: pstmt->state = en_stmt_allocated; pstmt->cursor_state = en_stmt_cursor_no; pstmt->prep_state = 0; break; default: break; } } return retcode; } SQLRETURN SQL_API SQLExecDirect (SQLHSTMT hstmt, SQLCHAR * szSqlStr, SQLINTEGER cbSqlStr) { ENTER_STMT (hstmt, trace_SQLExecDirect (TRACE_ENTER, hstmt, szSqlStr, cbSqlStr)); retcode = SQLExecDirect_Internal(hstmt, szSqlStr, cbSqlStr, 'A'); LEAVE_STMT (hstmt, trace_SQLExecDirect (TRACE_LEAVE, hstmt, szSqlStr, cbSqlStr)); } #if ODBCVER >= 0x0300 SQLRETURN SQL_API SQLExecDirectA (SQLHSTMT hstmt, SQLCHAR * szSqlStr, SQLINTEGER cbSqlStr) { ENTER_STMT (hstmt, trace_SQLExecDirect (TRACE_ENTER, hstmt, szSqlStr, cbSqlStr)); retcode = SQLExecDirect_Internal(hstmt, szSqlStr, cbSqlStr, 'A'); LEAVE_STMT (hstmt, trace_SQLExecDirect (TRACE_LEAVE, hstmt, szSqlStr, cbSqlStr)); } SQLRETURN SQL_API SQLExecDirectW (SQLHSTMT hstmt, SQLWCHAR * szSqlStr, SQLINTEGER cbSqlStr) { ENTER_STMT (hstmt, trace_SQLExecDirectW (TRACE_ENTER, hstmt, szSqlStr, cbSqlStr)); retcode = SQLExecDirect_Internal(hstmt, szSqlStr, cbSqlStr, 'W'); LEAVE_STMT (hstmt, trace_SQLExecDirectW (TRACE_LEAVE, hstmt, szSqlStr, cbSqlStr)); } #endif static SQLRETURN SQLMoreResults_Internal (SQLHSTMT hstmt) { STMT (pstmt, hstmt); HPROC hproc; SQLRETURN retcode; SQLRETURN rc; /* check state */ if (pstmt->asyn_on == en_NullProc) { switch (pstmt->state) { #if 0 case en_stmt_allocated: case en_stmt_prepared: return SQL_NO_DATA_FOUND; #endif case en_stmt_needdata: case en_stmt_mustput: case en_stmt_canput: PUSHSQLERR (pstmt->herr, en_S1010); return SQL_ERROR; default: break; } } else if (pstmt->asyn_on != en_MoreResults) { PUSHSQLERR (pstmt->herr, en_S1010); return SQL_ERROR; } /* call driver */ hproc = _iodbcdm_getproc (pstmt->hdbc, en_MoreResults); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (pstmt->herr, en_IM001); return SQL_ERROR; } CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc, (pstmt->dhstmt)); if (retcode == SQL_SUCCESS || retcode == SQL_SUCCESS_WITH_INFO || retcode == SQL_NO_DATA_FOUND) { rc = _SQLExecute_ConvParams(hstmt, TRUE); if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) retcode = rc; } /* state transition */ if (pstmt->asyn_on == en_MoreResults) { switch (retcode) { case SQL_SUCCESS: case SQL_SUCCESS_WITH_INFO: case SQL_NO_DATA_FOUND: case SQL_ERROR: pstmt->asyn_on = en_NullProc; break; case SQL_STILL_EXECUTING: default: return retcode; } } switch (pstmt->state) { case en_stmt_allocated: case en_stmt_prepared: /* driver should return SQL_NO_DATA_FOUND */ if (pstmt->prep_state) { pstmt->state = en_stmt_cursoropen; } else { pstmt->state = en_stmt_prepared; } break; case en_stmt_executed_with_info: _iodbcdm_do_cursoropen (pstmt); /* FALL THROUGH */ case en_stmt_executed: if (retcode == SQL_NO_DATA_FOUND) { if (pstmt->prep_state) { pstmt->state = en_stmt_prepared; } else { pstmt->state = en_stmt_cursoropen; } } else if (retcode == SQL_STILL_EXECUTING) { pstmt->asyn_on = en_MoreResults; } break; case en_stmt_cursoropen: case en_stmt_fetched: case en_stmt_xfetched: if (retcode == SQL_SUCCESS) { break; } else if (retcode == SQL_NO_DATA_FOUND) { if (pstmt->prep_state) { pstmt->state = en_stmt_prepared; } else { pstmt->state = en_stmt_allocated; } } else if (retcode == SQL_STILL_EXECUTING) { pstmt->asyn_on = en_MoreResults; } break; default: break; } return retcode; } SQLRETURN SQL_API SQLMoreResults (SQLHSTMT hstmt) { ENTER_STMT (hstmt, trace_SQLMoreResults (TRACE_ENTER, hstmt)); retcode = SQLMoreResults_Internal (hstmt); LEAVE_STMT (hstmt, trace_SQLMoreResults (TRACE_LEAVE, hstmt)); } static SQLRETURN SQLPutData_Internal ( SQLHSTMT hstmt, SQLPOINTER rgbValue, SQLLEN cbValue) { STMT (pstmt, hstmt); CONN (pdbc, pstmt->hdbc); ENVR (penv, pdbc->henv); HPROC hproc; SQLRETURN retcode; DM_CONV *conv = &pdbc->conv; IODBC_CHARSET m_charset = CP_DEF; IODBC_CHARSET d_charset = CP_DEF; /* check argument value */ if (rgbValue == NULL && (cbValue != SQL_DEFAULT_PARAM && cbValue != SQL_NULL_DATA)) { PUSHSQLERR (pstmt->herr, en_S1009); return SQL_ERROR; } /* check state */ if (pstmt->asyn_on == en_NullProc) { if (pstmt->state <= en_stmt_xfetched) { PUSHSQLERR (pstmt->herr, en_S1010); return SQL_ERROR; } } else if (pstmt->asyn_on != en_PutData) { PUSHSQLERR (pstmt->herr, en_S1010); return SQL_ERROR; } /* call driver */ hproc = _iodbcdm_getproc (pstmt->hdbc, en_PutData); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (pstmt->herr, en_IM001); return SQL_ERROR; } if (conv) { m_charset = conv ? conv->dm_cp: CP_DEF; d_charset = conv ? conv->drv_cp: CP_DEF; } if (pstmt->st_need_param != NULL && m_charset != d_charset && pstmt->st_need_param->pm_c_type_orig == SQL_C_WCHAR) { SQLLEN drv_cbValue; SQLPOINTER drv_rgbValue = conv_text_m2d_W2W(conv, rgbValue, cbValue, &drv_cbValue); CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc, (pstmt->dhstmt, drv_rgbValue, drv_cbValue)); if (drv_rgbValue != NULL) free(drv_rgbValue); } else { CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc, (pstmt->dhstmt, rgbValue, cbValue)); } /* state transition */ if (pstmt->asyn_on == en_PutData) { switch (retcode) { case SQL_SUCCESS: case SQL_SUCCESS_WITH_INFO: case SQL_ERROR: pstmt->asyn_on = en_NullProc; break; case SQL_STILL_EXECUTING: default: return retcode; } } /* must in mustput or canput states */ switch (retcode) { case SQL_SUCCESS: case SQL_SUCCESS_WITH_INFO: pstmt->state = en_stmt_canput; break; case SQL_ERROR: switch (pstmt->need_on) { case en_ExecDirect: pstmt->state = en_stmt_allocated; pstmt->need_on = en_NullProc; break; case en_Execute: if (pstmt->prep_state) { pstmt->state = en_stmt_prepared; pstmt->need_on = en_NullProc; } break; case en_SetPos: /* Is this possible ???? */ pstmt->state = en_stmt_xfetched; break; default: break; } break; case SQL_STILL_EXECUTING: pstmt->asyn_on = en_PutData; break; default: break; } return retcode; } SQLRETURN SQL_API SQLPutData ( SQLHSTMT hstmt, SQLPOINTER rgbValue, SQLLEN cbValue) { ENTER_STMT (hstmt, trace_SQLPutData (TRACE_ENTER, hstmt, rgbValue, cbValue)); retcode = SQLPutData_Internal (hstmt, rgbValue, cbValue); LEAVE_STMT (hstmt, trace_SQLPutData (TRACE_LEAVE, hstmt, rgbValue, cbValue)); } static SQLRETURN SQLParamData_Internal (SQLHSTMT hstmt, SQLPOINTER * prgbValue) { STMT (pstmt, hstmt); HPROC hproc; SQLRETURN retcode; int i; /* check argument */ /* check state */ if (pstmt->asyn_on == en_NullProc) { if (pstmt->state <= en_stmt_xfetched) { PUSHSQLERR (pstmt->herr, en_S1010); return SQL_ERROR; } } else if (pstmt->asyn_on != en_ParamData) { PUSHSQLERR (pstmt->herr, en_S1010); return SQL_ERROR; } /* call driver */ hproc = _iodbcdm_getproc (pstmt->hdbc, en_ParamData); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (pstmt->herr, en_IM001); return SQL_ERROR; } CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc, (pstmt->dhstmt, prgbValue)); /* state transition */ if (pstmt->asyn_on == en_ParamData) { switch (retcode) { case SQL_SUCCESS: case SQL_SUCCESS_WITH_INFO: case SQL_ERROR: pstmt->asyn_on = en_NullProc; break; case SQL_STILL_EXECUTING: default: return retcode; } } if (pstmt->state < en_stmt_needdata) { return retcode; } switch (retcode) { case SQL_ERROR: switch (pstmt->need_on) { case en_ExecDirect: pstmt->state = en_stmt_allocated; break; case en_Execute: pstmt->state = en_stmt_prepared; break; case en_SetPos: pstmt->state = en_stmt_xfetched; pstmt->cursor_state = en_stmt_cursor_xfetched; break; default: break; } pstmt->need_on = en_NullProc; break; case SQL_SUCCESS: case SQL_SUCCESS_WITH_INFO: switch (pstmt->state) { case en_stmt_needdata: pstmt->state = en_stmt_mustput; break; case en_stmt_canput: switch (pstmt->need_on) { case en_SetPos: pstmt->state = en_stmt_xfetched; pstmt->cursor_state = en_stmt_cursor_xfetched; break; case en_ExecDirect: case en_Execute: _iodbcdm_do_cursoropen (pstmt); break; default: break; } break; default: break; } pstmt->need_on = en_NullProc; break; case SQL_NEED_DATA: { PPARM pparm = pstmt->st_pparam; pstmt->state = en_stmt_mustput; pstmt->st_need_param = NULL; for (i = 0; i < pstmt->st_nparam; i++, pparm++) { if (pparm->pm_data == NULL) continue; if ((pparm->pm_c_type_orig == SQL_C_WCHAR || pparm->pm_c_type_orig == SQL_C_CHAR || pparm->pm_c_type_orig == SQL_C_BINARY) && prgbValue != NULL && pparm->pm_data == *prgbValue) { pstmt->st_need_param = pparm; break; } } } break; default: break; } return retcode; } SQLRETURN SQL_API SQLParamData (SQLHSTMT hstmt, SQLPOINTER * prgbValue) { ENTER_STMT (hstmt, trace_SQLParamData (TRACE_ENTER, hstmt, prgbValue)); retcode = SQLParamData_Internal (hstmt, prgbValue); LEAVE_STMT (hstmt, trace_SQLParamData (TRACE_LEAVE, hstmt, prgbValue)); } static SQLRETURN SQLNumParams_Internal (SQLHSTMT hstmt, SQLSMALLINT * pcpar) { STMT (pstmt, hstmt); HPROC hproc; SQLRETURN retcode; /* check argument */ if (!pcpar) { return SQL_SUCCESS; } /* check state */ if (pstmt->asyn_on == en_NullProc) { switch (pstmt->state) { case en_stmt_allocated: case en_stmt_needdata: case en_stmt_mustput: case en_stmt_canput: PUSHSQLERR (pstmt->herr, en_S1010); return SQL_ERROR; default: break; } } else if (pstmt->asyn_on != en_NumParams) { PUSHSQLERR (pstmt->herr, en_S1010); return SQL_ERROR; } /* call driver */ hproc = _iodbcdm_getproc (pstmt->hdbc, en_NumParams); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (pstmt->herr, en_IM001); return SQL_ERROR; } CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc, (pstmt->dhstmt, pcpar)); /* state transition */ if (pstmt->asyn_on == en_NumParams) { switch (retcode) { case SQL_SUCCESS: case SQL_SUCCESS_WITH_INFO: case SQL_ERROR: break; default: return retcode; } } if (retcode == SQL_STILL_EXECUTING) { pstmt->asyn_on = en_NumParams; } return retcode; } SQLRETURN SQL_API SQLNumParams (SQLHSTMT hstmt, SQLSMALLINT * pcpar) { ENTER_STMT (hstmt, trace_SQLNumParams (TRACE_ENTER, hstmt, pcpar)); retcode = SQLNumParams_Internal (hstmt, pcpar); LEAVE_STMT (hstmt, trace_SQLNumParams (TRACE_LEAVE, hstmt, pcpar)); } static SQLRETURN SQLDescribeParam_Internal ( SQLHSTMT hstmt, SQLUSMALLINT ipar, SQLSMALLINT * pfSqlType, SQLULEN * pcbColDef, SQLSMALLINT * pibScale, SQLSMALLINT * pfNullable) { STMT (pstmt, hstmt); CONN (pdbc, pstmt->hdbc); GENV (genv, pdbc->genv); HPROC hproc; SQLRETURN retcode; /* check argument */ if (ipar == 0) { PUSHSQLERR (pstmt->herr, en_S1093); return SQL_ERROR; } /* check state */ if (pstmt->asyn_on == en_NullProc) { switch (pstmt->state) { case en_stmt_allocated: case en_stmt_needdata: case en_stmt_mustput: case en_stmt_canput: PUSHSQLERR (pstmt->herr, en_S1010); return SQL_ERROR; default: break; } } else if (pstmt->asyn_on != en_DescribeParam) { PUSHSQLERR (pstmt->herr, en_S1010); return SQL_ERROR; } /* call driver */ hproc = _iodbcdm_getproc (pstmt->hdbc, en_DescribeParam); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (pstmt->herr, en_IM001); return SQL_ERROR; } CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc, (pstmt->dhstmt, ipar, pfSqlType, pcbColDef, pibScale, pfNullable)); /* * Convert sql type to ODBC version of application */ if (SQL_SUCCEEDED(retcode) && pfSqlType) *pfSqlType = _iodbcdm_map_sql_type (*pfSqlType, genv->odbc_ver); /* state transition */ if (pstmt->asyn_on == en_DescribeParam) { switch (retcode) { case SQL_SUCCESS: case SQL_SUCCESS_WITH_INFO: case SQL_ERROR: break; default: return retcode; } } if (retcode == SQL_STILL_EXECUTING) { pstmt->asyn_on = en_DescribeParam; } return retcode; } SQLRETURN SQL_API SQLDescribeParam ( SQLHSTMT hstmt, SQLUSMALLINT ipar, SQLSMALLINT * pfSqlType, SQLULEN * pcbColDef, SQLSMALLINT * pibScale, SQLSMALLINT * pfNullable) { ENTER_STMT (hstmt, trace_SQLDescribeParam (TRACE_ENTER, hstmt, ipar, pfSqlType, pcbColDef, pibScale, pfNullable)); retcode = SQLDescribeParam_Internal ( hstmt, ipar, pfSqlType, pcbColDef, pibScale, pfNullable); LEAVE_STMT (hstmt, trace_SQLDescribeParam (TRACE_LEAVE, hstmt, ipar, pfSqlType, pcbColDef, pibScale, pfNullable)); } libiodbc-3.52.16/iodbc/fetch.c0000664000175000017500000004235714424170750012716 00000000000000/* * fetch.c * * $Id$ * * Fetch query result * * The iODBC driver manager. * * Copyright (C) 1995 Ke Jin * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include "dlproc.h" #include "unicode.h" #include "herr.h" #include "henv.h" #include "hdbc.h" #include "hstmt.h" #include "itrace.h" SQLRETURN SQLFetch_Internal (SQLHSTMT hstmt) { STMT (pstmt, hstmt); HPROC hproc = SQL_NULL_HPROC; SQLRETURN retcode = SQL_SUCCESS; /* check state */ if (pstmt->asyn_on == en_NullProc) { switch (pstmt->state) { case en_stmt_allocated: case en_stmt_prepared: case en_stmt_needdata: case en_stmt_mustput: case en_stmt_canput: PUSHSQLERR (pstmt->herr, en_S1010); return SQL_ERROR; case en_stmt_executed_with_info: _iodbcdm_do_cursoropen (pstmt); break; default: break; } } else if (pstmt->asyn_on != en_Fetch) { PUSHSQLERR (pstmt->herr, en_S1010); return SQL_ERROR; } #if (ODBCVER >= 0x0300) if (((ENV_t *) ((DBC_t *) pstmt->hdbc)->henv)->dodbc_ver == SQL_OV_ODBC2 && ((GENV_t *) ((DBC_t *) pstmt->hdbc)->genv)->odbc_ver == SQL_OV_ODBC3) { /* * Try to map SQLFetch to SQLExtendedFetch for ODBC3 app calling * ODBC2 driver * * The rows_status_ptr must not be null because the SQLExtendedFetch * requires it */ hproc = _iodbcdm_getproc (pstmt->hdbc, en_ExtendedFetch); if (hproc) { CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc, (pstmt->dhstmt, SQL_FETCH_NEXT, 0, pstmt->rows_fetched_ptr, pstmt->row_status_ptr)); } } #endif if (hproc == SQL_NULL_HPROC) { hproc = _iodbcdm_getproc (pstmt->hdbc, en_Fetch); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (pstmt->herr, en_IM001); return SQL_ERROR; } CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc, (pstmt->dhstmt)); } /* state transition */ if (pstmt->asyn_on == en_Fetch) { switch (retcode) { case SQL_SUCCESS: case SQL_SUCCESS_WITH_INFO: case SQL_NO_DATA_FOUND: case SQL_ERROR: pstmt->asyn_on = en_NullProc; break; case SQL_STILL_EXECUTING: default: return retcode; } } switch (pstmt->state) { case en_stmt_cursoropen: case en_stmt_fetched: case en_stmt_xfetched: switch (retcode) { case SQL_SUCCESS: case SQL_SUCCESS_WITH_INFO: if (pstmt->state == en_stmt_xfetched) { pstmt->state = en_stmt_xfetched; pstmt->cursor_state = en_stmt_cursor_xfetched; } else { pstmt->state = en_stmt_fetched; pstmt->cursor_state = en_stmt_cursor_fetched; } break; case SQL_NO_DATA_FOUND: if (pstmt->prep_state) { if (pstmt->state == en_stmt_xfetched) pstmt->state = en_stmt_xfetched; else pstmt->state = en_stmt_fetched; } else { pstmt->state = en_stmt_allocated; } pstmt->cursor_state = en_stmt_cursor_no; break; case SQL_STILL_EXECUTING: pstmt->asyn_on = en_Fetch; break; default: break; } break; default: break; } return retcode; } SQLRETURN SQL_API SQLFetch (SQLHSTMT hstmt) { ENTER_STMT (hstmt, trace_SQLFetch (TRACE_ENTER, hstmt)); if ((retcode = _iodbcdm_FixColBindData (pstmt)) != SQL_SUCCESS) return retcode; retcode = SQLFetch_Internal (hstmt); if (SQL_SUCCEEDED (retcode)) _iodbcdm_ConvBindData (pstmt); LEAVE_STMT (hstmt, trace_SQLFetch (TRACE_LEAVE, hstmt)); } SQLRETURN SQL_API _iodbcdm_ExtendedFetch ( SQLHSTMT hstmt, SQLUSMALLINT fFetchType, SQLLEN irow, SQLULEN * pcrow, SQLUSMALLINT * rgfRowStatus) { STMT (pstmt, hstmt); HPROC hproc = SQL_NULL_HPROC; SQLRETURN retcode; /* check fetch type */ if (fFetchType < SQL_FETCH_NEXT || fFetchType > SQL_FETCH_BOOKMARK) { /* Unlike MS driver manager(i.e. DM), * we don't check driver's ODBC version * against SQL_FETCH_RESUME (only 1.0) * and SQL_FETCH_BOOKMARK (only 2.0). */ PUSHSQLERR (pstmt->herr, en_S1106); return SQL_ERROR; } /* check state */ if (pstmt->asyn_on == en_NullProc) { switch (pstmt->state) { case en_stmt_allocated: case en_stmt_prepared: case en_stmt_fetched: case en_stmt_needdata: case en_stmt_mustput: case en_stmt_canput: PUSHSQLERR (pstmt->herr, en_S1010); return SQL_ERROR; default: break; } } else if (pstmt->asyn_on != en_ExtendedFetch) { PUSHSQLERR (pstmt->herr, en_S1010); return SQL_ERROR; } if (fFetchType == SQL_FETCH_NEXT || fFetchType == SQL_FETCH_PRIOR || fFetchType == SQL_FETCH_FIRST || fFetchType == SQL_FETCH_LAST) { irow = 0; } hproc = _iodbcdm_getproc (pstmt->hdbc, en_ExtendedFetch); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (pstmt->herr, en_IM001); return SQL_ERROR; } CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc, (pstmt->dhstmt, fFetchType, irow, pcrow, rgfRowStatus)); /* state transition */ if (pstmt->asyn_on == en_ExtendedFetch) { switch (retcode) { case SQL_SUCCESS: case SQL_SUCCESS_WITH_INFO: case SQL_NO_DATA_FOUND: case SQL_ERROR: pstmt->asyn_on = en_NullProc; break; case SQL_STILL_EXECUTING: default: return retcode; } } switch (pstmt->state) { case en_stmt_cursoropen: case en_stmt_xfetched: switch (retcode) { case SQL_SUCCESS: case SQL_SUCCESS_WITH_INFO: case SQL_NO_DATA_FOUND: pstmt->state = en_stmt_xfetched; pstmt->cursor_state = en_stmt_cursor_xfetched; break; case SQL_STILL_EXECUTING: pstmt->asyn_on = en_ExtendedFetch; break; default: break; } break; default: break; } return retcode; } SQLRETURN SQL_API SQLExtendedFetch ( SQLHSTMT hstmt, SQLUSMALLINT fFetchType, SQLLEN irow, SQLULEN * pcrow, SQLUSMALLINT * rgfRowStatus) { ENTER_STMT (hstmt, trace_SQLExtendedFetch (TRACE_ENTER, hstmt, fFetchType, irow, pcrow, rgfRowStatus)); if ((retcode = _iodbcdm_FixColBindData (pstmt)) != SQL_SUCCESS) return retcode; retcode = _iodbcdm_ExtendedFetch (hstmt, fFetchType, irow, pcrow, rgfRowStatus); if (SQL_SUCCEEDED (retcode)) _iodbcdm_ConvBindData (pstmt); LEAVE_STMT (hstmt, trace_SQLExtendedFetch (TRACE_LEAVE, hstmt, fFetchType, irow, pcrow, rgfRowStatus)); } static SQLRETURN SQLGetData_Internal ( SQLHSTMT hstmt, SQLUSMALLINT icol, SQLSMALLINT fCType, SQLPOINTER rgbValue, SQLLEN cbValueMax, SQLLEN * pcbValue) { STMT (pstmt, hstmt); CONN (pdbc, pstmt->hdbc); ENVR (penv, pdbc->henv); HPROC hproc; SQLRETURN retcode = SQL_SUCCESS; sqlstcode_t sqlstat = en_00000; SQLSMALLINT nCType; void * _Value = NULL; void * valueOut = rgbValue; CONV_DIRECT conv_direct = CD_NONE; DM_CONV *conv = &pdbc->conv; IODBC_CHARSET dm_charset = (conv) ? conv->dm_cp : CP_DEF; /* check argument */ if (rgbValue == NULL) { sqlstat = en_S1009; } else if (cbValueMax < 0) { sqlstat = en_S1090; } else { switch (fCType) { case SQL_C_DEFAULT: case SQL_C_BINARY: case SQL_C_BIT: case SQL_C_CHAR: case SQL_C_DATE: case SQL_C_DOUBLE: case SQL_C_FLOAT: case SQL_C_LONG: case SQL_C_SHORT: case SQL_C_SLONG: case SQL_C_SSHORT: case SQL_C_STINYINT: case SQL_C_TIME: case SQL_C_TIMESTAMP: case SQL_C_TINYINT: case SQL_C_ULONG: case SQL_C_USHORT: case SQL_C_UTINYINT: #if (ODBCVER >= 0x0300) case SQL_C_GUID: 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: case SQL_C_INTERVAL_MINUTE_TO_SECOND: case SQL_C_INTERVAL_MONTH: case SQL_C_INTERVAL_SECOND: case SQL_C_INTERVAL_YEAR: case SQL_C_INTERVAL_YEAR_TO_MONTH: case SQL_C_NUMERIC: case SQL_C_SBIGINT: case SQL_C_TYPE_DATE: case SQL_C_TYPE_TIME: case SQL_C_TYPE_TIMESTAMP: case SQL_C_UBIGINT: case SQL_C_WCHAR: #endif break; default: sqlstat = en_S1003; break; } } if (sqlstat != en_00000) { PUSHSQLERR (pstmt->herr, sqlstat); return SQL_ERROR; } /* check state */ if (pstmt->asyn_on == en_NullProc) { switch (pstmt->state) { case en_stmt_allocated: case en_stmt_prepared: case en_stmt_needdata: case en_stmt_mustput: case en_stmt_canput: sqlstat = en_S1010; break; case en_stmt_executed_with_info: case en_stmt_executed: case en_stmt_cursoropen: sqlstat = en_24000; break; default: break; } } else if (pstmt->asyn_on != en_GetData) { sqlstat = en_S1010; } if (sqlstat != en_00000) { PUSHSQLERR (pstmt->herr, sqlstat); return SQL_ERROR; } /* * Convert C type to ODBC version of driver */ nCType = _iodbcdm_map_c_type (fCType, penv->dodbc_ver); if (!penv->unicode_driver && nCType == SQL_C_WCHAR) { nCType = SQL_C_CHAR; cbValueMax /= DM_WCHARSIZE_ALLOC(conv); } else if (penv->unicode_driver && nCType == SQL_C_WCHAR && conv && conv->dm_cp!=conv->drv_cp) { cbValueMax /= DM_WCHARSIZE_ALLOC(conv); cbValueMax *= DRV_WCHARSIZE_ALLOC(conv); if ((_Value = malloc(cbValueMax)) == NULL) { PUSHSQLERR (pdbc->herr, en_HY001); return SQL_ERROR; } valueOut = _Value; } /* call driver */ hproc = _iodbcdm_getproc (pstmt->hdbc, en_GetData); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (pstmt->herr, en_IM001); MEM_FREE(_Value); return SQL_ERROR; } CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc, (pstmt->dhstmt, icol, nCType, valueOut, cbValueMax, pcbValue)); /* state transition */ if (pstmt->asyn_on == en_GetData) { switch (retcode) { case SQL_SUCCESS: case SQL_SUCCESS_WITH_INFO: case SQL_NO_DATA_FOUND: case SQL_ERROR: pstmt->asyn_on = en_NullProc; break; case SQL_STILL_EXECUTING: default: MEM_FREE(_Value); return retcode; } } switch (pstmt->state) { case en_stmt_fetched: case en_stmt_xfetched: if (retcode == SQL_STILL_EXECUTING) { pstmt->asyn_on = en_GetData; break; } break; default: break; } if (!penv->unicode_driver && fCType == SQL_C_WCHAR) conv_direct = CD_A2W; else if (penv->unicode_driver && fCType == SQL_C_WCHAR && conv && conv->dm_cp!=conv->drv_cp) conv_direct = CD_W2W; if (conv_direct == CD_A2W) { void *buf = DM_A2W(conv, (SQLCHAR *) valueOut, SQL_NTS); if (buf != NULL) DM_WCSCPY(conv, rgbValue, buf); MEM_FREE(buf); if (pcbValue && *pcbValue > 0) { if (dm_charset == CP_UTF8) *pcbValue = strlen(rgbValue); else *pcbValue *= DM_WCHARSIZE(conv); } } else if (conv_direct == CD_W2W) { void *buf = conv_text_d2m(conv, valueOut, SQL_NTS, CD_W2W); if (buf != NULL) DM_WCSCPY(conv, rgbValue, buf); MEM_FREE(buf); if (pcbValue && *pcbValue > 0) { if (dm_charset == CP_UTF8) *pcbValue = strlen(rgbValue); else { *pcbValue /= DRV_WCHARSIZE(conv); *pcbValue *= DM_WCHARSIZE(conv); } } } MEM_FREE(_Value); return retcode; } SQLRETURN SQL_API SQLGetData ( SQLHSTMT hstmt, SQLUSMALLINT icol, SQLSMALLINT fCType, SQLPOINTER rgbValue, SQLLEN cbValueMax, SQLLEN * pcbValue) { ENTER_STMT (hstmt, trace_SQLGetData (TRACE_ENTER, hstmt, icol, fCType, rgbValue, cbValueMax, pcbValue)); retcode = SQLGetData_Internal ( hstmt, icol, fCType, rgbValue, cbValueMax, pcbValue); LEAVE_STMT (hstmt, trace_SQLGetData (TRACE_LEAVE, hstmt, icol, fCType, rgbValue, cbValueMax, pcbValue)); } SQLRETURN SQL_API _iodbcdm_SetPos ( SQLHSTMT hstmt, SQLSETPOSIROW irow, SQLUSMALLINT fOption, SQLUSMALLINT fLock) { STMT (pstmt, hstmt); HPROC hproc; SQLRETURN retcode; sqlstcode_t sqlstat = en_00000; /* check argument value */ if (fOption > SQL_ADD || fLock > SQL_LOCK_UNLOCK) { PUSHSQLERR (pstmt->herr, en_S1009); return SQL_ERROR; } /* check state */ if (pstmt->asyn_on == en_NullProc) { switch (pstmt->state) { case en_stmt_allocated: case en_stmt_prepared: case en_stmt_needdata: case en_stmt_mustput: case en_stmt_canput: sqlstat = en_S1010; break; case en_stmt_executed_with_info: case en_stmt_executed: case en_stmt_cursoropen: sqlstat = en_24000; break; default: break; } } else if (pstmt->asyn_on != en_SetPos) { sqlstat = en_S1010; } if (sqlstat != en_00000) { PUSHSQLERR (pstmt->herr, sqlstat); return SQL_ERROR; } if (fOption == SQL_ADD || fOption == SQL_UPDATE || fOption == SQL_DELETE) { _iodbcdm_ConvBindData_m2d (pstmt); } /* call driver */ hproc = _iodbcdm_getproc (pstmt->hdbc, en_SetPos); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (pstmt->herr, en_IM001); return SQL_ERROR; } CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc, (pstmt->dhstmt, irow, fOption, fLock)); /* state transition */ if (pstmt->asyn_on == en_SetPos) { switch (retcode) { case SQL_SUCCESS: case SQL_SUCCESS_WITH_INFO: case SQL_NEED_DATA: case SQL_ERROR: pstmt->asyn_on = en_NullProc; break; case SQL_STILL_EXECUTING: default: return retcode; } } /* now, the only possible init state is 'xfetched' */ switch (retcode) { case SQL_SUCCESS: case SQL_SUCCESS_WITH_INFO: break; case SQL_NEED_DATA: pstmt->state = en_stmt_needdata; pstmt->need_on = en_SetPos; break; case SQL_STILL_EXECUTING: pstmt->asyn_on = en_SetPos; break; default: break; } return retcode; } SQLRETURN SQL_API SQLSetPos ( SQLHSTMT hstmt, SQLSETPOSIROW irow, SQLUSMALLINT fOption, SQLUSMALLINT fLock) { ENTER_STMT (hstmt, trace_SQLSetPos (TRACE_ENTER, hstmt, irow, fOption, fLock)); retcode = _iodbcdm_SetPos (hstmt, irow, fOption, fLock); LEAVE_STMT (hstmt, trace_SQLSetPos (TRACE_LEAVE, hstmt, irow, fOption, fLock)); } libiodbc-3.52.16/iodbc/hdesc.h0000664000175000017500000001112014424170750012700 00000000000000/* * hdesc.h * * $Id$ * * Descriptor object * * The iODBC driver manager. * * Copyright (C) 1995 Ke Jin * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef __DESC_H #define __DESC_H #define APP_ROW_DESC 0 #define APP_PARAM_DESC 1 #define IMP_ROW_DESC 2 #define IMP_PARAM_DESC 3 typedef struct DESC_s { int type; HERR herr; /* list of descriptor errors */ SQLRETURN rc; struct DESC_s *next; SQLHDBC hdbc; /* connection associated with the descriptor */ SQLHDESC dhdesc; /* the driver's desc handle */ HSTMT hstmt; /* if not null - the descriptor is implicit to that statement */ SWORD desc_cip; /* Call in Progress flag */ SQLSMALLINT err_rec; } DESC_t; #ifndef HDESC #define HDESC SQLHDESC #endif #define IS_VALID_HDESC(x) \ ((x) != SQL_NULL_HDESC && \ ((DESC_t *)(x))->type == SQL_HANDLE_DESC && \ ((DESC_t *)(x))->hdbc != SQL_NULL_HDBC) #define ENTER_DESC(hdesc, trace) \ DESC (pdesc, hdesc); \ SQLRETURN retcode = SQL_SUCCESS; \ ODBC_LOCK();\ TRACE(trace); \ if (!IS_VALID_HDESC (pdesc)) \ { \ retcode = SQL_INVALID_HANDLE; \ goto done; \ } \ else if (pdesc->desc_cip) \ { \ PUSHSQLERR (pdesc->herr, en_S1010); \ retcode = SQL_ERROR; \ goto done; \ } \ pdesc->desc_cip = 1; \ CLEAR_ERRORS (pdesc); \ ODBC_UNLOCK() #define LEAVE_DESC(hdesc, trace) \ ODBC_LOCK (); \ pdesc->desc_cip = 0; \ done: \ TRACE(trace); \ ODBC_UNLOCK (); \ return (retcode) #endif /* __DESC_H */ libiodbc-3.52.16/iodbc/herr.c0000664000175000017500000016737214424170750012572 00000000000000/* * herr.c * * $Id$ * * Error stack management functions * * The iODBC driver manager. * * Copyright (C) 1995 Ke Jin * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include "unicode.h" #include "dlproc.h" #include "herr.h" #if (ODBCVER >= 0x0300) #include "hdesc.h" #endif #include "henv.h" #include "hdbc.h" #include "hstmt.h" #include "itrace.h" #include "herr.ci" #include "misc.h" static HERR _iodbcdm_popsqlerr (HERR herr) { sqlerr_t *list = (sqlerr_t *) herr; sqlerr_t *next; if (herr == SQL_NULL_HERR) { return herr; } MEM_FREE(list->msg); next = list->next; list->next = NULL; MEM_FREE (list); return next; } void _iodbcdm_freesqlerrlist (HERR herrlist) { HERR list = herrlist; while (list != SQL_NULL_HERR) { list = _iodbcdm_popsqlerr (list); } } HERR _iodbcdm_pushsqlerr ( HERR herr, sqlstcode_t code, void *msg) { sqlerr_t *ebuf; sqlerr_t *perr = (sqlerr_t *) herr; int idx = 0; if (herr != SQL_NULL_HERR) { idx = perr->idx + 1; } if (idx == 64) /* overwrite the top entry to prevent error stack blow out */ { perr->code = code; MEM_FREE (perr->msg); perr->msg = msg?strdup((char *) msg): NULL; return herr; } ebuf = (sqlerr_t *) MEM_ALLOC (sizeof (sqlerr_t)); if (ebuf == NULL) { return NULL; } ebuf->msg = msg?strdup((char *) msg):NULL; ebuf->code = code; ebuf->idx = idx; ebuf->next = (sqlerr_t *) herr; return (HERR) ebuf; } static char * _iodbcdm_getsqlstate ( HERR herr, void * tab) { sqlerr_t *perr = (sqlerr_t *) herr; sqlerrmsg_t *ptr; sqlstcode_t perr_code; if (herr == SQL_NULL_HERR || tab == NULL) { return (char *) NULL; } perr_code = perr->code; #if (ODBCVER >= 0x0300) switch (perr_code) { case en_S1009: perr_code = en_HY009; break; default: break; } #endif for (ptr = (sqlerrmsg_t *) tab; ptr->code != en_sqlstat_total; ptr++) { if (ptr->code == perr_code) { return (char *) (ptr->stat); } } return (char *) NULL; } static char * _iodbcdm_getsqlerrmsg ( HERR herr, void * errtab) { sqlerr_t *perr = (sqlerr_t *) herr; sqlerrmsg_t *ptr; if (herr == SQL_NULL_HERR) { return NULL; } if (perr->msg == NULL && errtab == NULL) { return NULL; } if (perr->msg != NULL) { return perr->msg; } for (ptr = (sqlerrmsg_t *) errtab; ptr->code != en_sqlstat_total; ptr++) { if (ptr->code == perr->code) { return (char *) ptr->msg; } } return (char *) NULL; } SQLRETURN SQL_API _iodbcdm_sqlerror ( SQLHENV henv, SQLHDBC hdbc, SQLHSTMT hstmt, SQLPOINTER szSqlstate, SQLINTEGER * pfNativeError, SQLPOINTER szErrorMsg, SQLSMALLINT cbErrorMsgMax, SQLSMALLINT * pcbErrorMsg, int bDelete, SQLCHAR waMode) { GENV (genv, henv); CONN (pdbc, hdbc); STMT (pstmt, hstmt); HDBC thdbc = SQL_NULL_HDBC; HENV dhenv = SQL_NULL_HENV; HDBC dhdbc = SQL_NULL_HDBC; HSTMT dhstmt = SQL_NULL_HSTMT; HERR herr = SQL_NULL_HERR; HPROC hproc2 = SQL_NULL_HPROC; HPROC hproc3 = SQL_NULL_HPROC; #if (ODBCVER >= 0x0300) SQLINTEGER handleType = 0; SQLHANDLE handle3; SQLHANDLE dhandle3 = 0; SQLSMALLINT *perr_rec = NULL; #endif SWORD unicode_driver = 0; SQLUINTEGER dodbc_ver = SQL_OV_ODBC2; SQLUINTEGER odbc_ver = SQL_OV_ODBC2; wchar_t _sqlState[6] = {L"\0"}; void *SqlstateOut = szSqlstate; void *_ErrorMsg = NULL; void *errorMsgOut = szErrorMsg; CONV_DIRECT conv_direct = CD_NONE; DM_CONV *conv = NULL; void *errmsg = NULL; void *ststr = NULL; int handle = 0; SQLRETURN retcode = SQL_SUCCESS; if (IS_VALID_HSTMT (hstmt)) /* retrieve stmt err */ { herr = pstmt->herr; thdbc = pstmt->hdbc; if (thdbc == SQL_NULL_HDBC) { return SQL_INVALID_HANDLE; } #if (ODBCVER >= 0x0300) handleType = SQL_HANDLE_STMT; handle3 = hstmt; dhandle3 = pstmt->dhstmt; perr_rec = &((STMT_t *)pstmt)->err_rec; #endif dhstmt = pstmt->dhstmt; handle = 3; } else if (IS_VALID_HDBC (hdbc)) /* retrieve dbc err */ { herr = pdbc->herr; thdbc = pdbc; if (thdbc == SQL_NULL_HDBC) { return SQL_INVALID_HANDLE; } #if (ODBCVER >= 0x0300) handleType = SQL_HANDLE_DBC; handle3 = hdbc; dhandle3 = pdbc->dhdbc; perr_rec = &((DBC_t *)pdbc)->err_rec; #endif dhdbc = pdbc->dhdbc; handle = 2; if (herr == SQL_NULL_HERR && pdbc->henv == SQL_NULL_HENV) { return SQL_NO_DATA_FOUND; } } else if (IS_VALID_HENV (henv)) /* retrieve env err */ { herr = genv->herr; /* Drivers shouldn't push error message * on environment handle */ if (herr == SQL_NULL_HERR) { return SQL_NO_DATA_FOUND; } handle = 1; } else { return SQL_INVALID_HANDLE; } if (szErrorMsg != NULL) { if (cbErrorMsgMax < 0) { return SQL_ERROR; /* SQLError() doesn't post error for itself */ } } if (herr == SQL_NULL_HERR) /* no err on drv mng */ { if (thdbc && ((DBC_t *)thdbc)->genv) odbc_ver = ((GENV_t *) ((DBC_t *)thdbc)->genv)->odbc_ver; if (thdbc && ((DBC_t *)thdbc)->henv) { unicode_driver = ((ENV_t *) ((DBC_t *)thdbc)->henv)->unicode_driver; dodbc_ver = ((ENV_t *) ((DBC_t *)thdbc)->henv)->dodbc_ver; } if (thdbc) conv = &((DBC_t *)thdbc)->conv; /* call driver */ if (unicode_driver && waMode != 'W') conv_direct = CD_A2W; else if (!unicode_driver && waMode == 'W') conv_direct = CD_W2A; else if (waMode == 'W' && conv->dm_cp != conv->drv_cp) conv_direct = CD_W2W; if (conv_direct == CD_A2W || conv_direct == CD_W2W) { /* ansi<=unicode*/ if ((_ErrorMsg = malloc((cbErrorMsgMax + 1 ) * DRV_WCHARSIZE_ALLOC(conv))) == NULL) return SQL_ERROR; errorMsgOut = _ErrorMsg; SqlstateOut = _sqlState; } else if (conv_direct == CD_W2A) { /* unicode<=ansi*/ if ((_ErrorMsg = malloc(cbErrorMsgMax * MB_CUR_MAX + 1)) == NULL) return SQL_ERROR; errorMsgOut = _ErrorMsg; SqlstateOut = _sqlState; } /* call driver */ if (unicode_driver) { /* SQL_XXX_W */ hproc2 = _iodbcdm_getproc (thdbc, en_ErrorW); #if (ODBCVER >= 0x300) hproc3 = _iodbcdm_getproc (thdbc, en_GetDiagRecW); #endif } else { /* SQL_XXX */ /* SQL_XXX_A */ hproc2 = _iodbcdm_getproc (thdbc, en_Error); if (hproc2 == SQL_NULL_HPROC) hproc2 = _iodbcdm_getproc (thdbc, en_ErrorA); #if (ODBCVER >= 0x300) hproc3 = _iodbcdm_getproc (thdbc, en_GetDiagRec); if (hproc3 == SQL_NULL_HPROC) hproc3 = _iodbcdm_getproc (thdbc, en_GetDiagRecA); #endif } if (odbc_ver == SQL_OV_ODBC2 && ( dodbc_ver == SQL_OV_ODBC2 || (dodbc_ver == SQL_OV_ODBC3 && hproc2 != SQL_NULL_HPROC))) hproc3 = SQL_NULL_HPROC; #if (ODBCVER >= 0x300) if (hproc3 != SQL_NULL_HPROC) { (*perr_rec) = (*perr_rec) + 1; CALL_DRIVER (thdbc, NULL, retcode, hproc3, ( handleType, dhandle3, (*perr_rec), SqlstateOut, pfNativeError, errorMsgOut, cbErrorMsgMax, pcbErrorMsg)); } else #endif { if (hproc2 == SQL_NULL_HPROC) { MEM_FREE(_ErrorMsg); return SQL_NO_DATA_FOUND; } CALL_DRIVER (thdbc, NULL, retcode, hproc2, ( dhenv, dhdbc, dhstmt, SqlstateOut, pfNativeError, errorMsgOut, cbErrorMsgMax, pcbErrorMsg)); } if (szErrorMsg && conv_direct != CD_NONE && SQL_SUCCEEDED (retcode)) { if (conv_direct == CD_A2W) { /*ansi<=unicode*/ dm_StrCopyOut2_W2A_d2m (conv, errorMsgOut, (SQLCHAR *)szErrorMsg, cbErrorMsgMax, NULL, NULL); dm_StrCopyOut2_W2A_d2m (conv, SqlstateOut, (SQLCHAR *)szSqlstate, 6, NULL, NULL); } else if (conv_direct == CD_W2A) { /*unicode<=ansi*/ dm_StrCopyOut2_A2W_d2m (conv, (SQLCHAR *)errorMsgOut, szErrorMsg, cbErrorMsgMax * DM_WCHARSIZE(conv), NULL, NULL); dm_StrCopyOut2_A2W_d2m (conv, (SQLCHAR *)SqlstateOut, szSqlstate, 6*DM_WCHARSIZE(conv), NULL, NULL); } else if (conv_direct == CD_W2W) { /*unicode<=unicode*/ dm_StrCopyOut2_W2W_d2m (conv, errorMsgOut, szErrorMsg, cbErrorMsgMax * DM_WCHARSIZE(conv), NULL, NULL); dm_StrCopyOut2_W2W_d2m (conv, SqlstateOut, szSqlstate, 6*DM_WCHARSIZE(conv), NULL, NULL); } } MEM_FREE(_ErrorMsg); return retcode; } if (szSqlstate != NULL) { int len; /* get sql state string */ ststr = (char *) _iodbcdm_getsqlstate (herr, (void *) sqlerrmsg_tab); if (ststr == NULL) { len = 0; } else { len = (int) STRLEN (ststr); } /* buffer size of szSqlstate is not checked. Applications * suppose provide enough ( not less than 6 bytes ) buffer * or NULL for it. */ if (waMode != 'W') { STRNCPY (szSqlstate, ststr, len); ((char*)szSqlstate)[len] = 0; } else { memset(szSqlstate, 0, DM_WCHARSIZE(conv) * (len + 1)); dm_StrCopyOut2_A2W_d2m (conv, (SQLCHAR *)ststr, szSqlstate, 6*DM_WCHARSIZE(conv), NULL, NULL); } } if (pfNativeError != NULL) { /* native error code is specific to data source */ *pfNativeError = (SDWORD) 0L; } if (szErrorMsg == NULL || cbErrorMsgMax == 0) { if (pcbErrorMsg != NULL) { *pcbErrorMsg = (SWORD) 0; } } else { int len; char msgbuf[2048] = {'\0'}; /* get sql state message */ errmsg = _iodbcdm_getsqlerrmsg (herr, (void *) sqlerrmsg_tab); if (errmsg == NULL) { errmsg = (char *) ""; } #if defined(HAVE_SNPRINTF) snprintf (msgbuf, sizeof(msgbuf), "%s%s", sqlerrhd, (char*)errmsg); #else sprintf (msgbuf, "%s%s", sqlerrhd, (char*)errmsg); #endif len = STRLEN (msgbuf); if (len < cbErrorMsgMax - 1) { retcode = SQL_SUCCESS; } else { len = cbErrorMsgMax - 1; retcode = SQL_SUCCESS_WITH_INFO; /* and not posts error for itself */ } if (waMode != 'W') { STRNCPY ((char *) szErrorMsg, msgbuf, len); ((char*)szErrorMsg)[len] = 0; if (pcbErrorMsg != NULL) *pcbErrorMsg = (SWORD) len; } else { dm_StrCopyOut2_A2W_d2m (conv, (SQLCHAR *) msgbuf, szErrorMsg, cbErrorMsgMax * DM_WCHARSIZE(conv), pcbErrorMsg, NULL); } } if (bDelete) switch (handle) /* free this err */ { case 1: genv->herr = _iodbcdm_popsqlerr (genv->herr); break; case 2: pdbc->herr = _iodbcdm_popsqlerr (pdbc->herr); break; case 3: pstmt->herr = _iodbcdm_popsqlerr (pstmt->herr); break; default: break; } return retcode; } SQLRETURN SQL_API SQLError ( SQLHENV henv, SQLHDBC hdbc, SQLHSTMT hstmt, SQLCHAR * szSqlstate, SQLINTEGER * pfNativeError, SQLCHAR * szErrorMsg, SQLSMALLINT cbErrorMsgMax, SQLSMALLINT * pcbErrorMsg) { SQLRETURN retcode = SQL_SUCCESS; GENV (genv, henv); CONN (pdbc, hdbc); STMT (pstmt, hstmt); SQLSMALLINT HandleType; int holdlock = 0; ODBC_LOCK (); TRACE (trace_SQLError (TRACE_ENTER, henv, hdbc, hstmt, szSqlstate, pfNativeError, szErrorMsg, cbErrorMsgMax, pcbErrorMsg)); if (IS_VALID_HSTMT (pstmt)) { HandleType = SQL_HANDLE_STMT; if (pstmt->stmt_cip) { PUSHSQLERR (pstmt->herr, en_S1010); retcode = SQL_ERROR; goto done; } pstmt->stmt_cip = 1; } else if (IS_VALID_HDBC (hdbc)) { HandleType = SQL_HANDLE_DBC; if (pdbc->dbc_cip) { PUSHSQLERR (pdbc->herr, en_S1010); retcode = SQL_ERROR; goto done; } pdbc->dbc_cip = 1; } else if (IS_VALID_HENV (genv)) { HandleType = SQL_HANDLE_ENV; holdlock = 1; } else { retcode = SQL_INVALID_HANDLE; goto done; } if (!holdlock) ODBC_UNLOCK (); retcode = _iodbcdm_sqlerror (henv, hdbc, hstmt, szSqlstate, pfNativeError, szErrorMsg, cbErrorMsgMax, pcbErrorMsg, 1, 'A'); if (!holdlock) ODBC_LOCK (); switch (HandleType) { case SQL_HANDLE_DBC: pdbc->dbc_cip = 0; break; case SQL_HANDLE_STMT: pstmt->stmt_cip = 0; break; } done: TRACE (trace_SQLError (TRACE_LEAVE, henv, hdbc, hstmt, szSqlstate, pfNativeError, szErrorMsg, cbErrorMsgMax, pcbErrorMsg)); ODBC_UNLOCK (); return retcode; } #if ODBCVER >= 0x0300 SQLRETURN SQL_API SQLErrorA ( SQLHENV henv, SQLHDBC hdbc, SQLHSTMT hstmt, SQLCHAR * szSqlstate, SQLINTEGER * pfNativeError, SQLCHAR * szErrorMsg, SQLSMALLINT cbErrorMsgMax, SQLSMALLINT * pcbErrorMsg) { SQLRETURN retcode = SQL_SUCCESS; GENV (genv, henv); CONN (pdbc, hdbc); STMT (pstmt, hstmt); SQLSMALLINT HandleType; int holdlock = 0; ODBC_LOCK (); TRACE (trace_SQLError (TRACE_ENTER, henv, hdbc, hstmt, szSqlstate, pfNativeError, szErrorMsg, cbErrorMsgMax, pcbErrorMsg)); if (IS_VALID_HSTMT (pstmt)) { HandleType = SQL_HANDLE_STMT; if (pstmt->stmt_cip) { PUSHSQLERR (pstmt->herr, en_S1010); retcode = SQL_ERROR; goto done; } pstmt->stmt_cip = 1; } else if (IS_VALID_HDBC (hdbc)) { HandleType = SQL_HANDLE_DBC; if (pdbc->dbc_cip) { PUSHSQLERR (pdbc->herr, en_S1010); retcode = SQL_ERROR; goto done; } pdbc->dbc_cip = 1; } else if (IS_VALID_HENV (genv)) { HandleType = SQL_HANDLE_ENV; holdlock = 1; } else { retcode = SQL_INVALID_HANDLE; goto done; } if (!holdlock) ODBC_UNLOCK (); retcode = _iodbcdm_sqlerror (henv, hdbc, hstmt, szSqlstate, pfNativeError, szErrorMsg, cbErrorMsgMax, pcbErrorMsg, 1, 'A'); if (!holdlock) ODBC_LOCK (); switch (HandleType) { case SQL_HANDLE_DBC: pdbc->dbc_cip = 0; break; case SQL_HANDLE_STMT: pstmt->stmt_cip = 0; break; } done: TRACE (trace_SQLError (TRACE_LEAVE, henv, hdbc, hstmt, szSqlstate, pfNativeError, szErrorMsg, cbErrorMsgMax, pcbErrorMsg)); ODBC_UNLOCK (); return retcode; } SQLRETURN SQL_API SQLErrorW ( SQLHENV henv, SQLHDBC hdbc, SQLHSTMT hstmt, SQLWCHAR * szSqlstate, SQLINTEGER * pfNativeError, SQLWCHAR * szErrorMsg, SQLSMALLINT cbErrorMsgMax, SQLSMALLINT * pcbErrorMsg) { SQLRETURN retcode = SQL_SUCCESS; GENV (genv, henv); CONN (pdbc, hdbc); STMT (pstmt, hstmt); SQLSMALLINT HandleType; int holdlock = 0; ODBC_LOCK (); TRACE (trace_SQLErrorW (TRACE_ENTER, henv, hdbc, hstmt, szSqlstate, pfNativeError, szErrorMsg, cbErrorMsgMax, pcbErrorMsg)); if (IS_VALID_HSTMT (pstmt)) { HandleType = SQL_HANDLE_STMT; if (pstmt->stmt_cip) { PUSHSQLERR (pstmt->herr, en_S1010); retcode = SQL_ERROR; goto done; } pstmt->stmt_cip = 1; } else if (IS_VALID_HDBC (hdbc)) { HandleType = SQL_HANDLE_DBC; if (pdbc->dbc_cip) { PUSHSQLERR (pdbc->herr, en_S1010); retcode = SQL_ERROR; goto done; } pdbc->dbc_cip = 1; } else if (IS_VALID_HENV (genv)) { HandleType = SQL_HANDLE_ENV; holdlock = 1; } else { retcode = SQL_INVALID_HANDLE; goto done; } if (!holdlock) ODBC_UNLOCK (); retcode = _iodbcdm_sqlerror (henv, hdbc, hstmt, szSqlstate, pfNativeError, szErrorMsg, cbErrorMsgMax, pcbErrorMsg, 1, 'W'); if (!holdlock) ODBC_LOCK (); switch (HandleType) { case SQL_HANDLE_DBC: pdbc->dbc_cip = 0; break; case SQL_HANDLE_STMT: pstmt->stmt_cip = 0; break; } done: TRACE (trace_SQLErrorW (TRACE_LEAVE, henv, hdbc, hstmt, szSqlstate, pfNativeError, szErrorMsg, cbErrorMsgMax, pcbErrorMsg)); ODBC_UNLOCK (); return retcode; } #endif #if (ODBCVER >= 0x0300) static int error_rec_count (HERR herr) { sqlerr_t *err = (sqlerr_t *)herr; if (err) return err->idx + 1; else return 0; } static sqlerr_t * get_nth_error(HERR herr, int nIndex) { sqlerr_t *err = (sqlerr_t *) herr; while (err && err->idx != nIndex) err = err->next; return err; } RETCODE SQL_API SQLGetDiagRec_Internal ( SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT RecNumber, SQLPOINTER Sqlstate, SQLINTEGER * NativeErrorPtr, SQLPOINTER MessageText, SQLSMALLINT BufferLength, SQLSMALLINT * TextLengthPtr, SQLCHAR waMode) { sqlerr_t *curr_err = NULL; HERR err = NULL; int nRecs; HPROC hproc2 = SQL_NULL_HPROC; HPROC hproc3 = SQL_NULL_HPROC; HDBC hdbc = SQL_NULL_HDBC; RETCODE retcode = SQL_SUCCESS; SQLHANDLE dhandle = SQL_NULL_HANDLE; SWORD unicode_driver = 0; SQLUINTEGER dodbc_ver = SQL_OV_ODBC3; SQLUINTEGER odbc_ver = SQL_OV_ODBC3; wchar_t _sqlState[6] = {L"\0"}; void *_MessageText = NULL; void *messageTextOut = MessageText; void *SqlstateOut = Sqlstate; CONV_DIRECT conv_direct = CD_NONE; DM_CONV *conv = NULL; if (RecNumber < 1) return SQL_ERROR; if (BufferLength < 0) return SQL_ERROR; switch (HandleType) { case SQL_HANDLE_ENV: err = ((GENV_t *) Handle)->herr; conv = &(((GENV_t *) Handle)->conv); break; case SQL_HANDLE_DBC: err = ((DBC_t *) Handle)->herr; dhandle = ((DBC_t *) Handle)->dhdbc; hdbc = Handle; if (hdbc) conv = &(((DBC_t *)hdbc)->conv); break; case SQL_HANDLE_STMT: err = ((STMT_t *) Handle)->herr; dhandle = ((STMT_t *) Handle)->dhstmt; hdbc = ((STMT_t *) Handle)->hdbc; if (hdbc) conv = &(((DBC_t *)hdbc)->conv); break; case SQL_HANDLE_DESC: err = ((DESC_t *) Handle)->herr; dhandle = ((DESC_t *) Handle)->dhdesc; hdbc = ((DESC_t *) Handle)->hdbc; if (hdbc) conv = &(((DBC_t *)hdbc)->conv); break; default: return SQL_INVALID_HANDLE; } nRecs = error_rec_count (err); if (nRecs >= RecNumber) { /* DM error range */ curr_err = get_nth_error (err, RecNumber - 1); if (!curr_err) { return (SQL_NO_DATA_FOUND); } retcode = SQL_SUCCESS; if (Sqlstate != NULL) { int len; char *ststr = (char *) _iodbcdm_getsqlstate (curr_err, (void *) sqlerrmsg_tab); if (ststr == NULL) { len = 0; } else { len = (int) STRLEN (ststr); } /* buffer size of szSqlstate is not checked. Applications * suppose provide enough ( not less than 6 bytes ) buffer * or NULL for it. */ if (waMode != 'W') { STRNCPY (Sqlstate, ststr, len); ((char*)Sqlstate)[len] = 0; } else { memset(Sqlstate, 0, DM_WCHARSIZE(conv) * (len + 1)); dm_StrCopyOut2_A2W_d2m (conv, (SQLCHAR *) ststr, Sqlstate, 6*DM_WCHARSIZE(conv), NULL, NULL); } } if (MessageText == NULL || BufferLength == 0) { if (TextLengthPtr != NULL) { *TextLengthPtr = (SWORD) 0; } } else { int len; char msgbuf[2048] = { '\0' }; char *errmsg; /* get sql state message */ errmsg = _iodbcdm_getsqlerrmsg (curr_err, (void *) sqlerrmsg_tab); if (errmsg == NULL) { errmsg = (char *) ""; } #if defined(HAVE_SNPRINTF) snprintf (msgbuf, sizeof (msgbuf), "%s%s", sqlerrhd, errmsg); #else sprintf (msgbuf, "%s%s", sqlerrhd, errmsg); #endif len = STRLEN (msgbuf); if (len < BufferLength - 1) { retcode = SQL_SUCCESS; } else { len = BufferLength - 1; retcode = SQL_SUCCESS_WITH_INFO; /* and not posts error for itself */ } if (waMode != 'W') { STRNCPY ((char *) MessageText, msgbuf, len); ((char*)MessageText)[len] = 0; if (TextLengthPtr != NULL) *TextLengthPtr = (SWORD) len; } else { dm_StrCopyOut2_A2W_d2m (conv, (SQLCHAR *) msgbuf, MessageText, BufferLength, TextLengthPtr, NULL); } } return retcode; } else { /* Driver errors */ if (hdbc == SQL_NULL_HDBC) { return SQL_NO_DATA_FOUND; } RecNumber -= nRecs; if (hdbc && ((DBC_t *)hdbc)->henv) { unicode_driver = ((ENV_t *) ((DBC_t *)hdbc)->henv)->unicode_driver; dodbc_ver = ((ENV_t *) ((DBC_t *)hdbc)->henv)->dodbc_ver; } if (hdbc && ((DBC_t *)hdbc)->genv) odbc_ver = ((GENV_t *) ((DBC_t *)hdbc)->genv)->odbc_ver; if (unicode_driver && waMode != 'W') conv_direct = CD_A2W; else if (!unicode_driver && waMode == 'W') conv_direct = CD_W2A; else if (waMode == 'W' && conv->dm_cp != conv->drv_cp) conv_direct = CD_W2W; if (conv_direct == CD_A2W || conv_direct == CD_W2W) { /* ansi<=unicode*/ if ((_MessageText = malloc((BufferLength + 1) * DRV_WCHARSIZE_ALLOC(conv))) == NULL) { return SQL_ERROR; } messageTextOut = _MessageText; SqlstateOut = _sqlState; } else if (conv_direct == CD_W2A) { /* unicode<=ansi*/ if ((_MessageText = malloc(BufferLength * MB_CUR_MAX + 1)) == NULL) { return SQL_ERROR; } messageTextOut = _MessageText; SqlstateOut = _sqlState; } /* call driver */ if (unicode_driver) { /* SQL_XXX_W */ hproc2 = _iodbcdm_getproc (hdbc, en_ErrorW); #if (ODBCVER >= 0x300) hproc3 = _iodbcdm_getproc (hdbc, en_GetDiagRecW); #endif } else { /* SQL_XXX */ /* SQL_XXX_A */ hproc2 = _iodbcdm_getproc (hdbc, en_Error); if (hproc2 == SQL_NULL_HPROC) hproc2 = _iodbcdm_getproc (hdbc, en_ErrorA); #if (ODBCVER >= 0x300) hproc3 = _iodbcdm_getproc (hdbc, en_GetDiagRec); if (hproc3 == SQL_NULL_HPROC) hproc3 = _iodbcdm_getproc (hdbc, en_GetDiagRecA); #endif } if (odbc_ver == SQL_OV_ODBC2 && ( dodbc_ver == SQL_OV_ODBC2 || (dodbc_ver == SQL_OV_ODBC3 && hproc2 != SQL_NULL_HPROC))) hproc3 = SQL_NULL_HPROC; #if (ODBCVER >= 0x300) if (hproc3 != SQL_NULL_HPROC) { CALL_DRIVER (hdbc, Handle, retcode, hproc3, ( HandleType, dhandle, RecNumber, SqlstateOut, NativeErrorPtr, messageTextOut, BufferLength, TextLengthPtr)); } else #endif { if (hproc2 == SQL_NULL_HPROC) { MEM_FREE(_MessageText); return SQL_ERROR; } if (RecNumber > 1 || HandleType == SQL_HANDLE_DESC) { MEM_FREE(_MessageText); return SQL_NO_DATA_FOUND; } CALL_DRIVER (hdbc, Handle, retcode, hproc2, ( SQL_NULL_HENV, HandleType == SQL_HANDLE_DBC ? dhandle : SQL_NULL_HDBC, HandleType == SQL_HANDLE_STMT ? dhandle : SQL_NULL_HSTMT, SqlstateOut, NativeErrorPtr, messageTextOut, BufferLength, TextLengthPtr)); } if (MessageText && conv_direct != CD_NONE && SQL_SUCCEEDED (retcode)) { if (conv_direct == CD_A2W) { /* ansi<=unicode*/ dm_StrCopyOut2_W2A_d2m (conv, messageTextOut, (SQLCHAR *)MessageText, BufferLength, NULL, NULL); dm_StrCopyOut2_W2A_d2m (conv, SqlstateOut, (SQLCHAR *)Sqlstate, 6, NULL, NULL); } else if (conv_direct == CD_W2A) { /* unicode<=ansi*/ dm_StrCopyOut2_A2W_d2m (conv, (SQLCHAR *) messageTextOut, MessageText, BufferLength, NULL, NULL); dm_StrCopyOut2_A2W_d2m (conv, (SQLCHAR *) SqlstateOut, Sqlstate, 6*DM_WCHARSIZE(conv), NULL, NULL); } else if (conv_direct == CD_W2W) { /* unicode<=unicode*/ dm_StrCopyOut2_W2W_d2m (conv, messageTextOut, MessageText, BufferLength, NULL, NULL); dm_StrCopyOut2_W2W_d2m (conv, SqlstateOut, Sqlstate, 6*DM_WCHARSIZE(conv), NULL, NULL); } } MEM_FREE(_MessageText); return retcode; } } RETCODE SQL_API SQLGetDiagRec ( SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT RecNumber, SQLCHAR * Sqlstate, SQLINTEGER * NativeErrorPtr, SQLCHAR * MessageText, SQLSMALLINT BufferLength, SQLSMALLINT * TextLengthPtr) { SQLRETURN retcode = SQL_SUCCESS; GENV (genv, Handle); CONN (pdbc, Handle); STMT (pstmt, Handle); DESC (pdesc, Handle); int holdlock = 0; ODBC_LOCK (); TRACE (trace_SQLGetDiagRec (TRACE_ENTER, HandleType, Handle, RecNumber, Sqlstate, NativeErrorPtr, MessageText, BufferLength, TextLengthPtr)); switch (HandleType) { case SQL_HANDLE_ENV: if (!IS_VALID_HENV (genv)) { retcode = SQL_INVALID_HANDLE; goto done; } holdlock = 1; break; case SQL_HANDLE_DBC: if (!IS_VALID_HDBC (pdbc)) { retcode = SQL_INVALID_HANDLE; goto done; } else if (pdbc->dbc_cip) { PUSHSQLERR (pdbc->herr, en_S1010); retcode = SQL_ERROR; goto done; } pdbc->dbc_cip = 1; break; case SQL_HANDLE_STMT: if (!IS_VALID_HSTMT (pstmt)) { retcode = SQL_INVALID_HANDLE; goto done; } else if (pstmt->stmt_cip) { PUSHSQLERR (pstmt->herr, en_S1010); retcode = SQL_ERROR; goto done; } pstmt->stmt_cip = 1; break; case SQL_HANDLE_DESC: if (!IS_VALID_HDESC (pdesc)) { retcode = SQL_INVALID_HANDLE; goto done; } else if (pdesc->desc_cip) { PUSHSQLERR (pdesc->herr, en_S1010); retcode = SQL_ERROR; goto done; } pdesc->desc_cip = 1; break; default: retcode = SQL_INVALID_HANDLE; goto done; } if (!holdlock) ODBC_UNLOCK (); retcode = SQLGetDiagRec_Internal (HandleType, Handle, RecNumber, Sqlstate, NativeErrorPtr, MessageText, BufferLength, TextLengthPtr, 'A'); if (!holdlock) ODBC_LOCK (); switch (HandleType) { case SQL_HANDLE_DBC: pdbc->dbc_cip = 0; break; case SQL_HANDLE_STMT: pstmt->stmt_cip = 0; break; case SQL_HANDLE_DESC: pdesc->desc_cip = 0; break; } done: TRACE (trace_SQLGetDiagRec (TRACE_LEAVE, HandleType, Handle, RecNumber, Sqlstate, NativeErrorPtr, MessageText, BufferLength, TextLengthPtr)); ODBC_UNLOCK (); return retcode; } RETCODE SQL_API SQLGetDiagRecA ( SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT RecNumber, SQLCHAR * Sqlstate, SQLINTEGER * NativeErrorPtr, SQLCHAR * MessageText, SQLSMALLINT BufferLength, SQLSMALLINT * TextLengthPtr) { SQLRETURN retcode = SQL_SUCCESS; GENV (genv, Handle); CONN (pdbc, Handle); STMT (pstmt, Handle); DESC (pdesc, Handle); int holdlock = 0; ODBC_LOCK (); TRACE (trace_SQLGetDiagRec (TRACE_ENTER, HandleType, Handle, RecNumber, Sqlstate, NativeErrorPtr, MessageText, BufferLength, TextLengthPtr)); switch (HandleType) { case SQL_HANDLE_ENV: if (!IS_VALID_HENV (genv)) { retcode = SQL_INVALID_HANDLE; goto done; } holdlock = 1; break; case SQL_HANDLE_DBC: if (!IS_VALID_HDBC (pdbc)) { retcode = SQL_INVALID_HANDLE; goto done; } else if (pdbc->dbc_cip) { PUSHSQLERR (pdbc->herr, en_S1010); retcode = SQL_ERROR; goto done; } pdbc->dbc_cip = 1; break; case SQL_HANDLE_STMT: if (!IS_VALID_HSTMT (pstmt)) { retcode = SQL_INVALID_HANDLE; goto done; } else if (pstmt->stmt_cip) { PUSHSQLERR (pstmt->herr, en_S1010); retcode = SQL_ERROR; goto done; } pstmt->stmt_cip = 1; break; case SQL_HANDLE_DESC: if (!IS_VALID_HDESC (pdesc)) { retcode = SQL_INVALID_HANDLE; goto done; } else if (pdesc->desc_cip) { PUSHSQLERR (pdesc->herr, en_S1010); retcode = SQL_ERROR; goto done; } pdesc->desc_cip = 1; break; default: retcode = SQL_INVALID_HANDLE; goto done; } if (!holdlock) ODBC_UNLOCK (); retcode = SQLGetDiagRec_Internal (HandleType, Handle, RecNumber, Sqlstate, NativeErrorPtr, MessageText, BufferLength, TextLengthPtr, 'A'); if (!holdlock) ODBC_LOCK (); switch (HandleType) { case SQL_HANDLE_DBC: pdbc->dbc_cip = 0; break; case SQL_HANDLE_STMT: pstmt->stmt_cip = 0; break; case SQL_HANDLE_DESC: pdesc->desc_cip = 0; break; } done: TRACE (trace_SQLGetDiagRec (TRACE_LEAVE, HandleType, Handle, RecNumber, Sqlstate, NativeErrorPtr, MessageText, BufferLength, TextLengthPtr)); ODBC_UNLOCK (); return retcode; } RETCODE SQL_API SQLGetDiagRecW ( SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT RecNumber, SQLWCHAR * Sqlstate, SQLINTEGER * NativeErrorPtr, SQLWCHAR * MessageText, SQLSMALLINT BufferLength, SQLSMALLINT * TextLengthPtr) { SQLRETURN retcode = SQL_SUCCESS; GENV (genv, Handle); CONN (pdbc, Handle); STMT (pstmt, Handle); DESC (pdesc, Handle); int holdlock = 0; ODBC_LOCK (); TRACE (trace_SQLGetDiagRecW (TRACE_ENTER, HandleType, Handle, RecNumber, Sqlstate, NativeErrorPtr, MessageText, BufferLength, TextLengthPtr)); switch (HandleType) { case SQL_HANDLE_ENV: if (!IS_VALID_HENV (genv)) { retcode = SQL_INVALID_HANDLE; goto done; } holdlock = 1; break; case SQL_HANDLE_DBC: if (!IS_VALID_HDBC (pdbc)) { retcode = SQL_INVALID_HANDLE; goto done; } else if (pdbc->dbc_cip) { PUSHSQLERR (pdbc->herr, en_S1010); retcode = SQL_ERROR; goto done; } pdbc->dbc_cip = 1; break; case SQL_HANDLE_STMT: if (!IS_VALID_HSTMT (pstmt)) { retcode = SQL_INVALID_HANDLE; goto done; } else if (pstmt->stmt_cip) { PUSHSQLERR (pstmt->herr, en_S1010); retcode = SQL_ERROR; goto done; } pstmt->stmt_cip = 1; break; case SQL_HANDLE_DESC: if (!IS_VALID_HDESC (pdesc)) { retcode = SQL_INVALID_HANDLE; goto done; } else if (pdesc->desc_cip) { PUSHSQLERR (pdesc->herr, en_S1010); retcode = SQL_ERROR; goto done; } pdesc->desc_cip = 1; break; default: retcode = SQL_INVALID_HANDLE; goto done; } if (!holdlock) ODBC_UNLOCK (); retcode = SQLGetDiagRec_Internal (HandleType, Handle, RecNumber, Sqlstate, NativeErrorPtr, MessageText, BufferLength, TextLengthPtr, 'W'); if (!holdlock) ODBC_LOCK (); switch (HandleType) { case SQL_HANDLE_DBC: pdbc->dbc_cip = 0; break; case SQL_HANDLE_STMT: pstmt->stmt_cip = 0; break; case SQL_HANDLE_DESC: pdesc->desc_cip = 0; break; } done: TRACE (trace_SQLGetDiagRecW (TRACE_LEAVE, HandleType, Handle, RecNumber, Sqlstate, NativeErrorPtr, MessageText, BufferLength, TextLengthPtr)); ODBC_UNLOCK (); return retcode; } RETCODE SQL_API SQLGetDiagField_Internal ( SQLSMALLINT nHandleType, SQLHANDLE Handle, SQLSMALLINT nRecNumber, SQLSMALLINT nDiagIdentifier, SQLPOINTER pDiagInfoPtr, SQLSMALLINT nBufferLength, SQLSMALLINT * pnStringLengthPtr, SQLCHAR waMode) { GENV (genv, Handle); CONN (con, Handle); STMT (stmt, Handle); DESC (desc, Handle); HERR err; HPROC hproc = SQL_NULL_HPROC; RETCODE retcode = SQL_SUCCESS; SQLHANDLE dhandle = SQL_NULL_HANDLE; SWORD unicode_driver = 0; void *_DiagInfoPtr = NULL; void *diagInfoPtr = pDiagInfoPtr; CONV_DIRECT conv_direct = CD_NONE; SQLSMALLINT _nBufferLength = nBufferLength; DM_CONV *conv = NULL; switch (nHandleType) { case SQL_HANDLE_ENV: err = genv->herr; con = NULL; stmt = NULL; desc = NULL; break; case SQL_HANDLE_DBC: err = con->herr; genv = (GENV_t *) con->genv; stmt = NULL; desc = NULL; dhandle = con->dhdbc; break; case SQL_HANDLE_STMT: err = stmt->herr; con = (DBC_t *) stmt->hdbc; genv = (GENV_t *) con->genv; desc = NULL; dhandle = stmt->dhstmt; break; case SQL_HANDLE_DESC: err = desc->herr; stmt = (STMT_t *) desc->hstmt; con = (DBC_t *) desc->hdbc; genv = (GENV_t *) con->genv; dhandle = desc->dhdesc; break; default: return SQL_INVALID_HANDLE; } if (con != NULL && con->henv != SQL_NULL_HENV) { unicode_driver = ((ENV_t *) con->henv)->unicode_driver; conv = &(con->conv); } switch (nRecNumber) { case 0: /* Header record */ switch (nDiagIdentifier) { case SQL_DIAG_ROW_COUNT: { if (nHandleType != SQL_HANDLE_STMT || !stmt) { return SQL_ERROR; } if (stmt->state != en_stmt_executed_with_info && stmt->state != en_stmt_executed && stmt->state != en_stmt_cursoropen) { return SQL_ERROR; } if (!con) { return SQL_INVALID_HANDLE; } CALL_UDRIVER(con, stmt, retcode, hproc, unicode_driver, en_GetDiagField, (SQL_HANDLE_DBC, stmt->dhstmt, nRecNumber, nDiagIdentifier, pDiagInfoPtr, nBufferLength, pnStringLengthPtr )); if (hproc == SQL_NULL_HPROC) { if (!con) { return SQL_INVALID_HANDLE; } hproc = _iodbcdm_getproc (con, en_RowCount); if (!hproc) { return SQL_ERROR; } CALL_DRIVER (stmt->hdbc, stmt, retcode, hproc, (stmt->dhstmt, pDiagInfoPtr)); } return retcode; } case SQL_DIAG_CURSOR_ROW_COUNT: case SQL_DIAG_DYNAMIC_FUNCTION: case SQL_DIAG_DYNAMIC_FUNCTION_CODE: { if (nHandleType != SQL_HANDLE_STMT || !stmt) { return SQL_ERROR; } if (stmt->state != en_stmt_executed_with_info && stmt->state != en_stmt_executed && stmt->state != en_stmt_cursoropen) { return SQL_ERROR; } if (!con) { return SQL_INVALID_HANDLE; } CALL_UDRIVER(con, stmt, retcode, hproc, unicode_driver, en_GetDiagField, (SQL_HANDLE_DBC, stmt->dhstmt, nRecNumber, nDiagIdentifier, pDiagInfoPtr, nBufferLength, pnStringLengthPtr )); if (hproc == SQL_NULL_HPROC) return SQL_ERROR; else return retcode; } case SQL_DIAG_RETURNCODE: if (pDiagInfoPtr) *((SQLRETURN *) pDiagInfoPtr) = ((GENV_t *) Handle)->rc; { return SQL_SUCCESS; } case SQL_DIAG_NUMBER: if (pDiagInfoPtr) { (*(SQLINTEGER *) pDiagInfoPtr) = 0; /* get the number from the driver */ if (con && con->henv != SQL_NULL_HENV) { CALL_UDRIVER(con, Handle, retcode, hproc, unicode_driver, en_GetDiagField, (nHandleType, dhandle, 0, nDiagIdentifier, pDiagInfoPtr, nBufferLength, pnStringLengthPtr )); if (hproc != SQL_NULL_HPROC) { if (retcode != SQL_SUCCESS) { return retcode; } /* and add the DM's value */ (*(SQLINTEGER *) pDiagInfoPtr) += error_rec_count (err); } else if (((ENV_t *) con->henv)->dodbc_ver == SQL_OV_ODBC2 && ((GENV_t *) Handle)->rc) { /* ODBC2 drivers can only have one error */ (*(SQLINTEGER *) pDiagInfoPtr) = 1; } } else if (genv) { (*(SQLINTEGER *) pDiagInfoPtr) = error_rec_count (err); } } break; default: return SQL_ERROR; } break; default: /* status records */ { int nRecs = 0; if (nRecNumber < 1) { return SQL_ERROR; } nRecs = error_rec_count (err); if (nRecNumber <= nRecs) { /* DM Errors */ char *szval = ""; int ival = 0; int isInt = 0; sqlerr_t *rec = NULL; rec = get_nth_error (err, nRecNumber - 1); if (!rec) { return (SQL_NO_DATA_FOUND); } switch (nDiagIdentifier) { case SQL_DIAG_SUBCLASS_ORIGIN: case SQL_DIAG_CLASS_ORIGIN: isInt = 0; szval = (rec->code >= en_HY001 && rec->code <= en_IM014) ? (char *) "ODBC 3.0" : (char *) "ISO 9075"; break; case SQL_DIAG_COLUMN_NUMBER: if (nHandleType != SQL_HANDLE_STMT || !stmt) { return SQL_ERROR; } if (!con) { return SQL_INVALID_HANDLE; } if (pDiagInfoPtr) *((SQLINTEGER *) pDiagInfoPtr) = SQL_COLUMN_NUMBER_UNKNOWN; return SQL_SUCCESS; case SQL_DIAG_CONNECTION_NAME: case SQL_DIAG_SERVER_NAME: isInt = 0; if (con) { if (waMode != 'W') retcode = SQLGetInfo (con, SQL_DATA_SOURCE_NAME, pDiagInfoPtr, nBufferLength, pnStringLengthPtr); else retcode = SQLGetInfoW (con, SQL_DATA_SOURCE_NAME, pDiagInfoPtr, nBufferLength, pnStringLengthPtr); return retcode; } else break; case SQL_DIAG_MESSAGE_TEXT: isInt = 0; szval = _iodbcdm_getsqlerrmsg (rec, (void *) sqlerrmsg_tab); break; case SQL_DIAG_NATIVE: isInt = 1; ival = 0; break; case SQL_DIAG_ROW_NUMBER: isInt = 1; if (nHandleType != SQL_HANDLE_STMT || !stmt) { return SQL_ERROR; } if (!con) { return SQL_INVALID_HANDLE; } CALL_UDRIVER(con, Handle, retcode, hproc, unicode_driver, en_GetDiagField, (nHandleType, dhandle, nRecNumber, nDiagIdentifier, pDiagInfoPtr, nBufferLength, pnStringLengthPtr )); if (hproc != SQL_NULL_HPROC) { return retcode; } else { ival = SQL_ROW_NUMBER_UNKNOWN; break; } case SQL_DIAG_SQLSTATE: isInt = 0; szval = _iodbcdm_getsqlstate (rec, (void *) sqlerrmsg_tab); break; default: return SQL_ERROR; } if (isInt) { if (pDiagInfoPtr) *((SQLINTEGER *) pDiagInfoPtr) = ival; } else { if (waMode != 'W') { int len = strlen (szval), len1; len1 = len > nBufferLength ? nBufferLength : len; if (pnStringLengthPtr) *pnStringLengthPtr = len; if (pDiagInfoPtr) { STRNCPY (pDiagInfoPtr, szval, len1); *(((SQLCHAR *) pDiagInfoPtr) + len1) = 0; } } else { int count; dm_StrCopyOut2_A2W_d2m(conv, (SQLCHAR *) szval, pDiagInfoPtr, nBufferLength, NULL, &count); if (pnStringLengthPtr) *pnStringLengthPtr = (SQLSMALLINT)count; } } break; } else { /* Driver's errors */ nRecNumber -= nRecs; if (!con) { return SQL_NO_DATA_FOUND; } if (unicode_driver && waMode != 'W') conv_direct = CD_A2W; else if (!unicode_driver && waMode == 'W') conv_direct = CD_W2A; else if (waMode == 'W' && conv && conv->dm_cp != conv->drv_cp) conv_direct = CD_W2W; switch(nDiagIdentifier) { case SQL_DIAG_DYNAMIC_FUNCTION: case SQL_DIAG_CLASS_ORIGIN: case SQL_DIAG_CONNECTION_NAME: case SQL_DIAG_MESSAGE_TEXT: case SQL_DIAG_SERVER_NAME: case SQL_DIAG_SQLSTATE: case SQL_DIAG_SUBCLASS_ORIGIN: if (conv_direct == CD_A2W) { /*ansi<=unicode*/ _nBufferLength *= DRV_WCHARSIZE_ALLOC(conv); if ((_DiagInfoPtr = malloc(_nBufferLength + DRV_WCHARSIZE_ALLOC(conv))) == NULL) { return SQL_ERROR; } diagInfoPtr = _DiagInfoPtr; } else if (conv_direct == CD_W2A) { /*unicode<=ansi*/ _nBufferLength /= DM_WCHARSIZE(conv); if ((_DiagInfoPtr = malloc(_nBufferLength * MB_CUR_MAX + 1)) == NULL) { return SQL_ERROR; } diagInfoPtr = _DiagInfoPtr; } else if (conv_direct == CD_W2W) { /*unicode<=unicode*/ _nBufferLength /= DM_WCHARSIZE(conv); _nBufferLength *= DRV_WCHARSIZE_ALLOC(conv); if ((_DiagInfoPtr = malloc(_nBufferLength + DRV_WCHARSIZE_ALLOC(conv))) == NULL) { return SQL_ERROR; } diagInfoPtr = _DiagInfoPtr; } break; } CALL_UDRIVER(con, Handle, retcode, hproc, unicode_driver, en_GetDiagField, (nHandleType, dhandle, nRecNumber, nDiagIdentifier, diagInfoPtr, _nBufferLength, pnStringLengthPtr )); if (hproc != SQL_NULL_HPROC) { if (pDiagInfoPtr && conv_direct != CD_NONE && SQL_SUCCEEDED (retcode)) { int count; switch(nDiagIdentifier) { case SQL_DIAG_DYNAMIC_FUNCTION: case SQL_DIAG_CLASS_ORIGIN: case SQL_DIAG_CONNECTION_NAME: case SQL_DIAG_MESSAGE_TEXT: case SQL_DIAG_SERVER_NAME: case SQL_DIAG_SQLSTATE: case SQL_DIAG_SUBCLASS_ORIGIN: if (conv_direct == CD_A2W) { /* ansi<=unicode*/ dm_StrCopyOut2_W2A_d2m (conv, diagInfoPtr, (SQLCHAR *) pDiagInfoPtr, nBufferLength, NULL, &count); if (pnStringLengthPtr) *pnStringLengthPtr = (SQLSMALLINT)count; } else if (conv_direct == CD_W2A) { /* unicode<=ansi*/ dm_StrCopyOut2_A2W_d2m (conv, (SQLCHAR *)diagInfoPtr, pDiagInfoPtr, nBufferLength, NULL, &count); if (pnStringLengthPtr) *pnStringLengthPtr = (SQLSMALLINT)count; } else if (conv_direct == CD_W2W) { /* unicode<=unicode*/ dm_StrCopyOut2_W2W_d2m (conv, diagInfoPtr, pDiagInfoPtr, nBufferLength, NULL, &count); if (pnStringLengthPtr) *pnStringLengthPtr = (SQLSMALLINT)count; } } } MEM_FREE(_DiagInfoPtr); return retcode; } else { /* an ODBC2->ODBC3 translation */ char *szval = ""; wchar_t szState[6]; SQLINTEGER nNative; if (nRecNumber > 1) { MEM_FREE(_DiagInfoPtr); return SQL_NO_DATA_FOUND; } if (nHandleType == SQL_HANDLE_DESC) { MEM_FREE(_DiagInfoPtr); return SQL_INVALID_HANDLE; } if (nDiagIdentifier != SQL_DIAG_MESSAGE_TEXT) MEM_FREE(_DiagInfoPtr); switch (nDiagIdentifier) { case SQL_DIAG_SUBCLASS_ORIGIN: case SQL_DIAG_CLASS_ORIGIN: CALL_UDRIVER (con, Handle, retcode, hproc, unicode_driver, en_Error, (SQL_NULL_HENV, nHandleType == SQL_HANDLE_DBC ? dhandle : SQL_NULL_HDBC, nHandleType == SQL_HANDLE_STMT ? dhandle : SQL_NULL_HSTMT, szState, &nNative, NULL, 0, NULL)); if (hproc == SQL_NULL_HPROC) { return SQL_INVALID_HANDLE; } if (retcode != SQL_SUCCESS) { return SQL_NO_DATA_FOUND; } if (waMode != 'W') { szval = !STRNEQ (szState, "IM", 2) ? (char *) "ODBC 3.0" : (char *) "ISO 9075"; } else { char *tmp = (char *)DRV_WtoU8(conv, szState, SQL_NTS); if (tmp && tmp[0] != 'I' && tmp[1] != 'M') szval = (char *) "ODBC 3.0"; else szval = (char *) "ISO 9075"; MEM_FREE(tmp); } break; case SQL_DIAG_ROW_NUMBER: case SQL_DIAG_COLUMN_NUMBER: if (nHandleType != SQL_HANDLE_STMT || !stmt) { return SQL_ERROR; } if (!con) { return SQL_INVALID_HANDLE; } if (pDiagInfoPtr) *((SQLINTEGER *) pDiagInfoPtr) = SQL_COLUMN_NUMBER_UNKNOWN; { return SQL_SUCCESS; } case SQL_DIAG_SERVER_NAME: case SQL_DIAG_CONNECTION_NAME: break; case SQL_DIAG_MESSAGE_TEXT: CALL_UDRIVER (con, Handle, retcode, hproc, unicode_driver, en_Error, (SQL_NULL_HENV, nHandleType == SQL_HANDLE_DBC ? dhandle : SQL_NULL_HDBC, nHandleType == SQL_HANDLE_STMT ? dhandle : SQL_NULL_HSTMT, szState, &nNative, diagInfoPtr, nBufferLength, pnStringLengthPtr)); if (hproc == SQL_NULL_HPROC) { MEM_FREE(_DiagInfoPtr); return SQL_INVALID_HANDLE; } if (pDiagInfoPtr && conv_direct != CD_NONE && SQL_SUCCEEDED (retcode)) { int count; if (conv_direct == CD_A2W) { /* ansi<=unicode*/ dm_StrCopyOut2_W2A_d2m (conv, diagInfoPtr, (SQLCHAR *) pDiagInfoPtr, nBufferLength, NULL, &count); if (pnStringLengthPtr) *pnStringLengthPtr = (SQLSMALLINT)count; } else if (conv_direct == CD_W2A) { /* unicode<=ansi*/ dm_StrCopyOut2_A2W_d2m (conv, (SQLCHAR *)diagInfoPtr, pDiagInfoPtr, nBufferLength, NULL, &count); if (pnStringLengthPtr) *pnStringLengthPtr = (SQLSMALLINT)count; } else if (conv_direct == CD_W2W) { /* unicode<=unicode*/ dm_StrCopyOut2_W2W_d2m (conv, diagInfoPtr, pDiagInfoPtr, nBufferLength, NULL, &count); if (pnStringLengthPtr) *pnStringLengthPtr = (SQLSMALLINT)count; } } MEM_FREE(_DiagInfoPtr); return retcode; case SQL_DIAG_NATIVE: CALL_UDRIVER (con, Handle, retcode, hproc, unicode_driver, en_Error, (SQL_NULL_HENV, nHandleType == SQL_HANDLE_DBC ? dhandle : SQL_NULL_HDBC, nHandleType == SQL_HANDLE_STMT ? dhandle : SQL_NULL_HSTMT, szState, &nNative, NULL, 0, NULL)); if (hproc == SQL_NULL_HPROC) { return SQL_INVALID_HANDLE; } if (pDiagInfoPtr) *((SQLINTEGER *) pDiagInfoPtr) = nNative; return retcode; case SQL_DIAG_SQLSTATE: CALL_UDRIVER (con, Handle, retcode, hproc, unicode_driver, en_Error, (SQL_NULL_HENV, nHandleType == SQL_HANDLE_DBC ? dhandle : SQL_NULL_HDBC, nHandleType == SQL_HANDLE_STMT ? dhandle : SQL_NULL_HSTMT, szState, &nNative, NULL, 0, NULL)); if (hproc == SQL_NULL_HPROC) { return SQL_INVALID_HANDLE; } if (pDiagInfoPtr && conv_direct != CD_NONE && SQL_SUCCEEDED (retcode)) { int count; if (conv_direct == CD_A2W) { /* ansi<=unicode*/ dm_StrCopyOut2_W2A_d2m (conv, szState, (SQLCHAR *) pDiagInfoPtr, nBufferLength, NULL, &count); if (pnStringLengthPtr) *pnStringLengthPtr = (SQLSMALLINT)count; } else if (conv_direct == CD_W2A) { /* unicode<=ansi*/ dm_StrCopyOut2_A2W_d2m (conv, (SQLCHAR *)szState, pDiagInfoPtr, nBufferLength, NULL, &count); if (pnStringLengthPtr) *pnStringLengthPtr = (SQLSMALLINT)count; } else if (conv_direct == CD_W2W) { /* unicode<=unicode*/ dm_StrCopyOut2_W2W_d2m (conv, szState, pDiagInfoPtr, nBufferLength, NULL, &count); if (pnStringLengthPtr) *pnStringLengthPtr = (SQLSMALLINT)count; } } return retcode; default: return SQL_ERROR; } if (waMode != 'W') { if (pDiagInfoPtr) { int len = strlen (szval); if (len > nBufferLength) len = nBufferLength; if (len) _iodbcdm_strlcpy ((char *) pDiagInfoPtr, szval, len); } if (pnStringLengthPtr) *pnStringLengthPtr = strlen (szval); } else { int count; dm_StrCopyOut2_A2W_d2m(conv, (SQLCHAR *) szval, pDiagInfoPtr, nBufferLength, NULL, &count); if (pnStringLengthPtr) *pnStringLengthPtr = (SQLSMALLINT)count; } } /* ODBC3->ODBC2 */ } /* driver's errors */ } /* status records */ } /* switch (nRecNumber */ return (SQL_SUCCESS); } RETCODE SQL_API SQLGetDiagField ( SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT RecNumber, SQLSMALLINT DiagIdentifier, SQLPOINTER DiagInfoPtr, SQLSMALLINT BufferLength, SQLSMALLINT * StringLengthPtr) { SQLRETURN retcode = SQL_SUCCESS; GENV (genv, Handle); CONN (pdbc, Handle); STMT (pstmt, Handle); DESC (pdesc, Handle); int holdlock = 0; ODBC_LOCK (); TRACE (trace_SQLGetDiagField (TRACE_ENTER, HandleType, Handle, RecNumber, DiagIdentifier, DiagInfoPtr, BufferLength, StringLengthPtr)); switch (HandleType) { case SQL_HANDLE_ENV: if (!IS_VALID_HENV (genv)) { retcode = SQL_INVALID_HANDLE; goto done; } holdlock = 1; break; case SQL_HANDLE_DBC: if (!IS_VALID_HDBC (pdbc)) { retcode = SQL_INVALID_HANDLE; goto done; } else if (pdbc->dbc_cip) { PUSHSQLERR (pdbc->herr, en_S1010); retcode = SQL_ERROR; goto done; } pdbc->dbc_cip = 1; break; case SQL_HANDLE_STMT: if (!IS_VALID_HSTMT (pstmt)) { retcode = SQL_INVALID_HANDLE; goto done; } else if (pstmt->stmt_cip) { PUSHSQLERR (pstmt->herr, en_S1010); retcode = SQL_ERROR; goto done; } pstmt->stmt_cip = 1; break; case SQL_HANDLE_DESC: if (!IS_VALID_HDESC (pdesc)) { retcode = SQL_INVALID_HANDLE; goto done; } else if (pdesc->desc_cip) { PUSHSQLERR (pdesc->herr, en_S1010); retcode = SQL_ERROR; goto done; } pdesc->desc_cip = 1; break; default: retcode = SQL_INVALID_HANDLE; goto done; } if (!holdlock) ODBC_UNLOCK (); retcode = SQLGetDiagField_Internal (HandleType, Handle, RecNumber, DiagIdentifier, DiagInfoPtr, BufferLength, StringLengthPtr, 'A'); if (!holdlock) ODBC_LOCK (); switch (HandleType) { case SQL_HANDLE_DBC: pdbc->dbc_cip = 0; break; case SQL_HANDLE_STMT: pstmt->stmt_cip = 0; break; case SQL_HANDLE_DESC: pdesc->desc_cip = 0; break; } done: TRACE (trace_SQLGetDiagField (TRACE_LEAVE, HandleType, Handle, RecNumber, DiagIdentifier, DiagInfoPtr, BufferLength, StringLengthPtr)); ODBC_UNLOCK (); return retcode; } RETCODE SQL_API SQLGetDiagFieldA ( SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT RecNumber, SQLSMALLINT DiagIdentifier, SQLPOINTER DiagInfoPtr, SQLSMALLINT BufferLength, SQLSMALLINT * StringLengthPtr) { SQLRETURN retcode = SQL_SUCCESS; GENV (genv, Handle); CONN (pdbc, Handle); STMT (pstmt, Handle); DESC (pdesc, Handle); int holdlock = 0; ODBC_LOCK (); TRACE (trace_SQLGetDiagField (TRACE_ENTER, HandleType, Handle, RecNumber, DiagIdentifier, DiagInfoPtr, BufferLength, StringLengthPtr)); switch (HandleType) { case SQL_HANDLE_ENV: if (!IS_VALID_HENV (genv)) { retcode = SQL_INVALID_HANDLE; goto done; } holdlock = 1; break; case SQL_HANDLE_DBC: if (!IS_VALID_HDBC (pdbc)) { retcode = SQL_INVALID_HANDLE; goto done; } else if (pdbc->dbc_cip) { PUSHSQLERR (pdbc->herr, en_S1010); retcode = SQL_ERROR; goto done; } pdbc->dbc_cip = 1; break; case SQL_HANDLE_STMT: if (!IS_VALID_HSTMT (pstmt)) { retcode = SQL_INVALID_HANDLE; goto done; } else if (pstmt->stmt_cip) { PUSHSQLERR (pstmt->herr, en_S1010); retcode = SQL_ERROR; goto done; } pstmt->stmt_cip = 1; break; case SQL_HANDLE_DESC: if (!IS_VALID_HDESC (pdesc)) { retcode = SQL_INVALID_HANDLE; goto done; } else if (pdesc->desc_cip) { PUSHSQLERR (pdesc->herr, en_S1010); retcode = SQL_ERROR; goto done; } pdesc->desc_cip = 1; break; default: retcode = SQL_INVALID_HANDLE; goto done; } if (!holdlock) ODBC_UNLOCK (); retcode = SQLGetDiagField_Internal (HandleType, Handle, RecNumber, DiagIdentifier, DiagInfoPtr, BufferLength, StringLengthPtr, 'A'); if (!holdlock) ODBC_LOCK (); switch (HandleType) { case SQL_HANDLE_DBC: pdbc->dbc_cip = 0; break; case SQL_HANDLE_STMT: pstmt->stmt_cip = 0; break; case SQL_HANDLE_DESC: pdesc->desc_cip = 0; break; } done: TRACE (trace_SQLGetDiagField (TRACE_LEAVE, HandleType, Handle, RecNumber, DiagIdentifier, DiagInfoPtr, BufferLength, StringLengthPtr)); ODBC_UNLOCK (); return retcode; } RETCODE SQL_API SQLGetDiagFieldW ( SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT RecNumber, SQLSMALLINT DiagIdentifier, SQLPOINTER DiagInfoPtr, SQLSMALLINT BufferLength, SQLSMALLINT * StringLengthPtr) { SQLRETURN retcode = SQL_SUCCESS; GENV (genv, Handle); CONN (pdbc, Handle); STMT (pstmt, Handle); DESC (pdesc, Handle); int holdlock = 0; ODBC_LOCK (); TRACE (trace_SQLGetDiagFieldW (TRACE_ENTER, HandleType, Handle, RecNumber, DiagIdentifier, DiagInfoPtr, BufferLength, StringLengthPtr)); switch (HandleType) { case SQL_HANDLE_ENV: if (!IS_VALID_HENV (genv)) { retcode = SQL_INVALID_HANDLE; goto done; } holdlock = 1; break; case SQL_HANDLE_DBC: if (!IS_VALID_HDBC (pdbc)) { retcode = SQL_INVALID_HANDLE; goto done; } else if (pdbc->dbc_cip) { PUSHSQLERR (pdbc->herr, en_S1010); retcode = SQL_ERROR; goto done; } pdbc->dbc_cip = 1; break; case SQL_HANDLE_STMT: if (!IS_VALID_HSTMT (pstmt)) { retcode = SQL_INVALID_HANDLE; goto done; } else if (pstmt->stmt_cip) { PUSHSQLERR (pstmt->herr, en_S1010); retcode = SQL_ERROR; goto done; } pstmt->stmt_cip = 1; break; case SQL_HANDLE_DESC: if (!IS_VALID_HDESC (pdesc)) { retcode = SQL_INVALID_HANDLE; goto done; } else if (pdesc->desc_cip) { PUSHSQLERR (pdesc->herr, en_S1010); retcode = SQL_ERROR; goto done; } pdesc->desc_cip = 1; break; default: retcode = SQL_INVALID_HANDLE; goto done; } if (!holdlock) ODBC_UNLOCK (); retcode = SQLGetDiagField_Internal (HandleType, Handle, RecNumber, DiagIdentifier, DiagInfoPtr, BufferLength, StringLengthPtr, 'W'); if (!holdlock) ODBC_LOCK (); switch (HandleType) { case SQL_HANDLE_DBC: pdbc->dbc_cip = 0; break; case SQL_HANDLE_STMT: pstmt->stmt_cip = 0; break; case SQL_HANDLE_DESC: pdesc->desc_cip = 0; break; } done: TRACE (trace_SQLGetDiagFieldW (TRACE_LEAVE, HandleType, Handle, RecNumber, DiagIdentifier, DiagInfoPtr, BufferLength, StringLengthPtr)); ODBC_UNLOCK (); return retcode; } #endif libiodbc-3.52.16/iodbc/misc.c0000664000175000017500000001556714424170750012563 00000000000000/* * misc.c * * $Id$ * * Miscellaneous functions * * The iODBC driver manager. * * Copyright (C) 1995 Ke Jin * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include #include #include #include "unicode.h" #include #include #include "herr.h" #include "misc.h" #include "iodbc_misc.h" #ifdef _MAC #include #endif /* _MAC */ /* * Parse a configuration from string (internal) */ int _iodbcdm_cfg_parse_str_Internal (PCONFIG pconfig, char *str) { char *s; int count; /* init image */ _iodbcdm_cfg_freeimage (pconfig); if (str == NULL) { /* NULL string is ok */ return 0; } s = pconfig->image = strdup (str); /* Add [ODBC] section */ if (_iodbcdm_cfg_storeentry (pconfig, "ODBC", NULL, NULL, NULL, 0) == -1) return -1; for (count = 0; *s; count++) { char *keywd = NULL, *value; char *cp, *n; /* * Extract KEY=VALUE upto first ';' */ for (cp = s; *cp && *cp != ';'; cp++) { if (*cp == '{') { for (cp++; *cp && *cp != '}'; cp++) ; } } /* * Store start of next token if available in n and terminate string */ if (*cp) { *cp = 0; n = cp + 1; } else n = cp; /* * Find '=' in string */ for (cp = s; *cp && *cp != '='; cp++) ; if (*cp) { *cp++ = 0; keywd = s; value = cp; } else if (count == 0) { /* * Handle missing DSN=... from the beginning of the string, e.g.: * 'dsn_ora7;UID=scott;PWD=tiger' */ keywd = "DSN"; value = s; } if (keywd != NULL) { /* store entry */ if (_iodbcdm_cfg_storeentry (pconfig, NULL, keywd, value, NULL, 0) == -1) return -1; } /* * Continue with next token */ s = n; } /* we're done */ pconfig->flags |= CFG_VALID; pconfig->dirty = 1; return 0; } /* * Initialize a configuration from string */ int _iodbcdm_cfg_init_str (PCONFIG *ppconf, void *str, int size, int wide, DM_CONV *conv) { PCONFIG pconfig; *ppconf = NULL; /* init config */ if ((pconfig = (PCONFIG) calloc (1, sizeof (TCONFIG))) == NULL) return -1; /* parse */ if (_iodbcdm_cfg_parse_str (pconfig, str, size, wide, conv) == -1) { _iodbcdm_cfg_done (pconfig); return -1; } /* we're done */ *ppconf = pconfig; return 0; } /* * Parse a configuration from string */ int _iodbcdm_cfg_parse_str (PCONFIG pconfig, void *str, int size, int wide, DM_CONV *conv) { int ret; char *_str; _str = wide ? (char *) DM_WtoU8 (conv, str, size) : str; ret = _iodbcdm_cfg_parse_str_Internal (pconfig, _str); if (wide) MEM_FREE (_str); return ret; } #define CATBUF(buf, str, buf_sz) \ do { \ if (_iodbcdm_strlcat (buf, str, buf_sz) >= buf_sz) \ return -1; \ } while (0) int _iodbcdm_cfg_to_string (PCONFIG pconfig, char *section, char *buf, size_t buf_sz) { BOOL atsection; if (_iodbcdm_cfg_rewind (pconfig) == -1) return -1; atsection = FALSE; buf[0] = '\0'; while (_iodbcdm_cfg_nextentry (pconfig) == 0) { if (atsection) { if (_iodbcdm_cfg_section (pconfig)) break; else if (_iodbcdm_cfg_define (pconfig)) { if (buf[0] != '\0') CATBUF (buf, ";", buf_sz); CATBUF (buf, pconfig->id, buf_sz); CATBUF (buf, "=", buf_sz); CATBUF (buf, pconfig->value, buf_sz); } } else if (_iodbcdm_cfg_section (pconfig) && !strcasecmp (pconfig->section, section)) atsection = TRUE; } return 0; } libiodbc-3.52.16/iodbc/prepare.c0000664000175000017500000005700014424170750013252 00000000000000/* * prepare.c * * $Id$ * * Prepare a query * * The iODBC driver manager. * * Copyright (C) 1995 Ke Jin * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include "unicode.h" #include "dlproc.h" #include "herr.h" #include "henv.h" #include "hdbc.h" #include "hstmt.h" #include "itrace.h" SQLRETURN SQL_API SQLPrepare_Internal ( SQLHSTMT hstmt, SQLPOINTER szSqlStr, SQLINTEGER cbSqlStr, SQLCHAR waMode) { STMT (pstmt, hstmt); CONN (pdbc, pstmt->hdbc); ENVR (penv, pdbc->henv); HPROC hproc = SQL_NULL_HPROC; SQLRETURN retcode = SQL_SUCCESS; sqlstcode_t sqlstat = en_00000; void * _SqlStr = NULL; CONV_DIRECT conv_direct = CD_NONE; DM_CONV *conv = &pdbc->conv; /* check state */ if (pstmt->asyn_on == en_NullProc) { /* not on asyn state */ switch (pstmt->state) { case en_stmt_fetched: case en_stmt_xfetched: sqlstat = en_24000; break; case en_stmt_needdata: case en_stmt_mustput: case en_stmt_canput: sqlstat = en_S1010; break; default: break; } } else if (pstmt->asyn_on != en_Prepare) { /* asyn on other */ sqlstat = en_S1010; } if (sqlstat != en_00000) { PUSHSQLERR (pstmt->herr, sqlstat); return SQL_ERROR; } if (szSqlStr == NULL) { PUSHSQLERR (pstmt->herr, en_S1009); return SQL_ERROR; } if (cbSqlStr < 0 && cbSqlStr != SQL_NTS) { PUSHSQLERR (pstmt->herr, en_S1090); return SQL_ERROR; } if (penv->unicode_driver && waMode != 'W') conv_direct = CD_A2W; else if (!penv->unicode_driver && waMode == 'W') conv_direct = CD_W2A; else if (waMode == 'W' && conv->dm_cp!=conv->drv_cp) conv_direct = CD_W2W; if (conv_direct != CD_NONE) { /* sql text is stored as param with id=0 */ _SqlStr = _iodbcdm_conv_var(pstmt, 0, szSqlStr, cbSqlStr, conv_direct); szSqlStr = _SqlStr; cbSqlStr = SQL_NTS; } CALL_UDRIVER(pstmt->hdbc, pstmt, retcode, hproc, penv->unicode_driver, en_Prepare, ( pstmt->dhstmt, szSqlStr, cbSqlStr)); if (hproc == SQL_NULL_HPROC) { _iodbcdm_FreeStmtVars(pstmt); PUSHSQLERR (pstmt->herr, en_IM001); return SQL_ERROR; } if (retcode != SQL_STILL_EXECUTING) _iodbcdm_FreeStmtVars(pstmt); /* stmt state transition */ if (pstmt->asyn_on == en_Prepare) { switch (retcode) { case SQL_SUCCESS: case SQL_SUCCESS_WITH_INFO: case SQL_ERROR: pstmt->asyn_on = en_NullProc; return retcode; case SQL_STILL_EXECUTING: default: return retcode; } } switch (retcode) { case SQL_STILL_EXECUTING: pstmt->asyn_on = en_Prepare; break; case SQL_SUCCESS: case SQL_SUCCESS_WITH_INFO: pstmt->state = en_stmt_prepared; pstmt->prep_state = 1; break; case SQL_ERROR: switch (pstmt->state) { case en_stmt_prepared: case en_stmt_executed_with_info: case en_stmt_executed: pstmt->state = en_stmt_allocated; pstmt->prep_state = 0; break; default: break; } default: break; } return retcode; } SQLRETURN SQL_API SQLPrepare (SQLHSTMT hstmt, SQLCHAR * szSqlStr, SQLINTEGER cbSqlStr) { ENTER_STMT (hstmt, trace_SQLPrepare (TRACE_ENTER, hstmt, szSqlStr, cbSqlStr)); retcode = SQLPrepare_Internal(hstmt, szSqlStr, cbSqlStr, 'A'); LEAVE_STMT (hstmt, trace_SQLPrepare (TRACE_LEAVE, hstmt, szSqlStr, cbSqlStr)); } #if ODBCVER >= 0x0300 SQLRETURN SQL_API SQLPrepareA (SQLHSTMT hstmt, SQLCHAR * szSqlStr, SQLINTEGER cbSqlStr) { ENTER_STMT (hstmt, trace_SQLPrepare (TRACE_ENTER, hstmt, szSqlStr, cbSqlStr)); retcode = SQLPrepare_Internal(hstmt, szSqlStr, cbSqlStr, 'A'); LEAVE_STMT (hstmt, trace_SQLPrepare (TRACE_LEAVE, hstmt, szSqlStr, cbSqlStr)); } SQLRETURN SQL_API SQLPrepareW (SQLHSTMT hstmt, SQLWCHAR * szSqlStr, SQLINTEGER cbSqlStr) { ENTER_STMT (hstmt, trace_SQLPrepareW (TRACE_ENTER, hstmt, szSqlStr, cbSqlStr)); retcode = SQLPrepare_Internal(hstmt, szSqlStr, cbSqlStr, 'W'); LEAVE_STMT (hstmt, trace_SQLPrepareW (TRACE_LEAVE, hstmt, szSqlStr, cbSqlStr)); } #endif SQLRETURN SQL_API SQLSetCursorName_Internal ( SQLHSTMT hstmt, SQLPOINTER szCursor, SQLSMALLINT cbCursor, SQLCHAR waMode) { STMT (pstmt, hstmt); CONN (pdbc, pstmt->hdbc); ENVR (penv, pdbc->henv); HPROC hproc = SQL_NULL_HPROC; SQLRETURN retcode = SQL_SUCCESS; sqlstcode_t sqlstat = en_00000; void * _Cursor = NULL; CONV_DIRECT conv_direct = CD_NONE; DM_CONV *conv = &pdbc->conv; if (szCursor == NULL) { PUSHSQLERR (pstmt->herr, en_S1009); return SQL_ERROR; } if (cbCursor < 0 && cbCursor != SQL_NTS) { PUSHSQLERR (pstmt->herr, en_S1090); return SQL_ERROR; } /* check state */ if (pstmt->asyn_on != en_NullProc) { sqlstat = en_S1010; } else { switch (pstmt->state) { case en_stmt_executed_with_info: case en_stmt_executed: case en_stmt_cursoropen: case en_stmt_fetched: case en_stmt_xfetched: sqlstat = en_24000; break; case en_stmt_needdata: case en_stmt_mustput: case en_stmt_canput: sqlstat = en_S1010; break; default: break; } } if (sqlstat != en_00000) { PUSHSQLERR (pstmt->herr, sqlstat); return SQL_ERROR; } if (penv->unicode_driver && waMode != 'W') conv_direct = CD_A2W; else if (!penv->unicode_driver && waMode == 'W') conv_direct = CD_W2A; else if (waMode == 'W' && conv->dm_cp!=conv->drv_cp) conv_direct = CD_W2W; if (conv_direct != CD_NONE) { _Cursor = conv_text_m2d (conv, szCursor, cbCursor, conv_direct); szCursor = _Cursor; cbCursor = SQL_NTS; } CALL_UDRIVER(pstmt->hdbc, pstmt, retcode, hproc, penv->unicode_driver, en_SetCursorName, ( pstmt->dhstmt, szCursor, cbCursor)); MEM_FREE(_Cursor); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (pstmt->herr, en_IM001); return SQL_ERROR; } if (SQL_SUCCEEDED (retcode)) { pstmt->cursor_state = en_stmt_cursor_named; } return retcode; } SQLRETURN SQL_API SQLSetCursorName ( SQLHSTMT hstmt, SQLCHAR * szCursor, SQLSMALLINT cbCursor) { ENTER_STMT (hstmt, trace_SQLSetCursorName (TRACE_ENTER, hstmt, szCursor, cbCursor)); retcode = SQLSetCursorName_Internal(hstmt, szCursor, cbCursor, 'A'); LEAVE_STMT (hstmt, trace_SQLSetCursorName (TRACE_LEAVE, hstmt, szCursor, cbCursor)); } #if ODBCVER >= 0x0300 SQLRETURN SQL_API SQLSetCursorNameA ( SQLHSTMT hstmt, SQLCHAR * szCursor, SQLSMALLINT cbCursor) { ENTER_STMT (hstmt, trace_SQLSetCursorName (TRACE_ENTER, hstmt, szCursor, cbCursor)); retcode = SQLSetCursorName_Internal(hstmt, szCursor, cbCursor, 'A'); LEAVE_STMT (hstmt, trace_SQLSetCursorName (TRACE_LEAVE, hstmt, szCursor, cbCursor)); } SQLRETURN SQL_API SQLSetCursorNameW ( SQLHSTMT hstmt, SQLWCHAR * szCursor, SQLSMALLINT cbCursor) { ENTER_STMT (hstmt, trace_SQLSetCursorNameW (TRACE_ENTER, hstmt, szCursor, cbCursor)); retcode = SQLSetCursorName_Internal(hstmt, szCursor, cbCursor, 'W'); LEAVE_STMT (hstmt, trace_SQLSetCursorNameW (TRACE_LEAVE, hstmt, szCursor, cbCursor)); } #endif static SQLRETURN SQLBindParameter_Internal ( SQLHSTMT hstmt, SQLUSMALLINT ipar, SQLSMALLINT fParamType, SQLSMALLINT fCType, SQLSMALLINT fSqlType, SQLULEN cbColDef, SQLSMALLINT ibScale, SQLPOINTER rgbValue, SQLLEN cbValueMax, SQLLEN * pcbValue) { STMT (pstmt, hstmt); CONN (pdbc, pstmt->hdbc); ENVR (penv, pdbc->henv); HPROC hproc2 = SQL_NULL_HPROC; HPROC hproc3 = SQL_NULL_HPROC; SQLSMALLINT nCType; SQLSMALLINT nSqlType; sqlstcode_t sqlstat = en_00000; SQLRETURN retcode = SQL_SUCCESS; SQLUINTEGER odbc_ver = ((GENV_t *) pdbc->genv)->odbc_ver; SQLUINTEGER dodbc_ver = ((ENV_t *) pdbc->henv)->dodbc_ver; PPARM newparam; TPARM parm; int size = 0; #if (ODBCVER >= 0x0300) if (0) #else /* check param */ if (fSqlType > SQL_TYPE_MAX || (fSqlType < SQL_TYPE_MIN && fSqlType > SQL_TYPE_DRIVER_START)) /* Note: SQL_TYPE_DRIVER_START is a negative number * So, we use ">" */ #endif { sqlstat = en_S1004; } else if (ipar < 1) { sqlstat = en_S1093; } else if ((rgbValue == NULL && pcbValue == NULL) && fParamType != SQL_PARAM_OUTPUT) { sqlstat = en_S1009; /* This means, I allow output to nowhere * (i.e. * junk output result). But I can't * allow input from nowhere. */ } /********** else if( cbValueMax < 0L && cbValueMax != SQL_SETPARAM_VALUE_MAX ) { sqlstat = en_S1090; } **********/ else if (fParamType != SQL_PARAM_INPUT && fParamType != SQL_PARAM_OUTPUT && fParamType != SQL_PARAM_INPUT_OUTPUT) { sqlstat = en_S1105; } else { switch (fCType) { case SQL_C_DEFAULT: case SQL_C_BINARY: case SQL_C_BIT: case SQL_C_CHAR: case SQL_C_DATE: case SQL_C_DOUBLE: case SQL_C_FLOAT: case SQL_C_LONG: case SQL_C_SHORT: case SQL_C_SLONG: case SQL_C_SSHORT: case SQL_C_STINYINT: case SQL_C_TIME: case SQL_C_TIMESTAMP: case SQL_C_TINYINT: case SQL_C_ULONG: case SQL_C_USHORT: case SQL_C_UTINYINT: #if (ODBCVER >= 0x0300) case SQL_C_GUID: 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: case SQL_C_INTERVAL_MINUTE_TO_SECOND: case SQL_C_INTERVAL_MONTH: case SQL_C_INTERVAL_SECOND: case SQL_C_INTERVAL_YEAR: case SQL_C_INTERVAL_YEAR_TO_MONTH: case SQL_C_NUMERIC: case SQL_C_SBIGINT: case SQL_C_TYPE_DATE: case SQL_C_TYPE_TIME: case SQL_C_TYPE_TIMESTAMP: case SQL_C_UBIGINT: case SQL_C_WCHAR: #endif break; default: sqlstat = en_S1003; break; } } if (sqlstat != en_00000) { PUSHSQLERR (pstmt->herr, sqlstat); return SQL_ERROR; } /* check state */ if (pstmt->state >= en_stmt_needdata || pstmt->asyn_on != en_NullProc) { PUSHSQLERR (pstmt->herr, en_S1010); retcode = SQL_ERROR; } /* * Convert C type to ODBC version of driver */ nCType = _iodbcdm_map_c_type (fCType, penv->dodbc_ver); /* * Convert SQL type to ODBC version of driver */ nSqlType = _iodbcdm_map_sql_type (fSqlType, penv->dodbc_ver); hproc2 = _iodbcdm_getproc (pstmt->hdbc, en_BindParameter); #if (ODBCVER >=0x0300) hproc3 = _iodbcdm_getproc (pstmt->hdbc, en_BindParam); #endif parm.pm_par = ipar; parm.pm_c_type = nCType; parm.pm_c_type_orig = nCType; parm.pm_sql_type = fSqlType; parm.pm_precision = cbColDef; parm.pm_scale = ibScale; parm.pm_data = rgbValue; parm.pm_pOctetLength = pcbValue; parm.pm_pInd = pcbValue; parm.pm_size = size; parm.pm_usage = fParamType; parm.pm_cbValueMax = cbValueMax; parm.pm_tmp = NULL; parm.pm_tmp_Ind = NULL; parm.pm_conv_data = NULL; parm.pm_conv_pInd = NULL; parm.pm_conv_el_size = 0; parm.rebinded = FALSE; #if (ODBCVER >=0x0300) if (fCType == SQL_C_WCHAR && !penv->unicode_driver && pcbValue && *pcbValue != SQL_DATA_AT_EXEC) nCType = SQL_C_CHAR; #endif if (ipar < 1 || ipar > STMT_MAX_PARAM) { PUSHSQLERR (pstmt->herr, en_S1093); return SQL_ERROR; } if (ipar > pstmt->st_nparam) { size_t newsize = ipar + 10; if (newsize > STMT_MAX_PARAM) newsize = STMT_MAX_PARAM; if ((newparam = calloc (newsize, sizeof (TPARM))) == NULL) { PUSHSQLERR (pstmt->herr, en_S1001); return SQL_ERROR; } if (pstmt->st_pparam) { memcpy (newparam, pstmt->st_pparam, pstmt->st_nparam * sizeof (TPARM)); free (pstmt->st_pparam); } pstmt->st_pparam = newparam; pstmt->st_nparam = (SQLUSMALLINT) newsize; } pstmt->st_pparam[ipar-1] = parm; if (odbc_ver == SQL_OV_ODBC2 && ( dodbc_ver == SQL_OV_ODBC2 || (dodbc_ver == SQL_OV_ODBC3 && hproc2 != SQL_NULL_HPROC))) hproc3 = SQL_NULL_HPROC; #if (ODBCVER >=0x0300) if (fParamType == SQL_PARAM_INPUT && hproc2 == SQL_NULL_HPROC && hproc3 != SQL_NULL_HPROC) { CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc3, (pstmt->dhstmt, ipar, nCType, nSqlType, cbColDef, ibScale, rgbValue, pcbValue)); } else #endif { if (hproc2 == SQL_NULL_HPROC) { PUSHSQLERR (pstmt->herr, en_IM001); return SQL_ERROR; } CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc2, (pstmt->dhstmt, ipar, fParamType, nCType, nSqlType, cbColDef, ibScale, rgbValue, cbValueMax, pcbValue)); } return retcode; } SQLRETURN SQL_API SQLBindParameter ( SQLHSTMT hstmt, SQLUSMALLINT ipar, SQLSMALLINT fParamType, SQLSMALLINT fCType, SQLSMALLINT fSqlType, SQLULEN cbColDef, SQLSMALLINT ibScale, SQLPOINTER rgbValue, SQLLEN cbValueMax, SQLLEN * pcbValue) { ENTER_STMT (hstmt, trace_SQLBindParameter (TRACE_ENTER, hstmt, ipar, fParamType, fCType, fSqlType, cbColDef, ibScale, rgbValue, cbValueMax, pcbValue)); retcode = SQLBindParameter_Internal ( hstmt, ipar, fParamType, fCType, fSqlType, cbColDef, ibScale, rgbValue, cbValueMax, pcbValue); LEAVE_STMT (hstmt, trace_SQLBindParameter (TRACE_LEAVE, hstmt, ipar, fParamType, fCType, fSqlType, cbColDef, ibScale, rgbValue, cbValueMax, pcbValue)); } static SQLRETURN SQLParamOptions_Internal ( SQLHSTMT hstmt, SQLULEN crow, SQLULEN * pirow) { STMT (pstmt, hstmt); HPROC hproc2 = SQL_NULL_HPROC; HPROC hproc3 = SQL_NULL_HPROC; SQLRETURN retcode; CONN (pdbc, pstmt->hdbc); SQLUINTEGER odbc_ver = ((GENV_t *) pdbc->genv)->odbc_ver; SQLUINTEGER dodbc_ver = ((ENV_t *) pdbc->henv)->dodbc_ver; if (crow == (SQLULEN) 0UL) { PUSHSQLERR (pstmt->herr, en_S1107); return SQL_ERROR; } if (pstmt->state >= en_stmt_needdata || pstmt->asyn_on != en_NullProc) { PUSHSQLERR (pstmt->herr, en_S1010); return SQL_ERROR; } hproc2 = _iodbcdm_getproc (pstmt->hdbc, en_ParamOptions); #if (ODBCVER >= 0x0300) hproc3 = _iodbcdm_getproc (pstmt->hdbc, en_SetStmtAttr); #endif if (odbc_ver == SQL_OV_ODBC2 && ( dodbc_ver == SQL_OV_ODBC2 || (dodbc_ver == SQL_OV_ODBC3 && hproc2 != SQL_NULL_HPROC))) hproc3 = SQL_NULL_HPROC; #if (ODBCVER >= 0x0300) if (hproc3 != SQL_NULL_HPROC) { CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc3, (pstmt->dhstmt, SQL_ATTR_PARAMSET_SIZE, crow, 0)); if (SQL_SUCCEEDED (retcode)) { CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc3, (pstmt->dhstmt, SQL_ATTR_PARAMS_PROCESSED_PTR, pirow, 0)); } } else #endif { if (hproc2 == SQL_NULL_HPROC) { PUSHSQLERR (pstmt->herr, en_IM001); return SQL_ERROR; } CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc2, (pstmt->dhstmt, crow, pirow)); } pstmt->paramset_size = crow; return retcode; } SQLRETURN SQL_API SQLParamOptions( SQLHSTMT hstmt, SQLULEN crow, SQLULEN * pirow) { ENTER_STMT (hstmt, trace_SQLParamOptions (TRACE_ENTER, hstmt, crow, pirow)); retcode = SQLParamOptions_Internal (hstmt, crow, pirow); LEAVE_STMT (hstmt, trace_SQLParamOptions (TRACE_LEAVE, hstmt, crow, pirow)); } static SQLRETURN SQLSetScrollOptions_Internal ( SQLHSTMT hstmt, SQLUSMALLINT fConcurrency, SQLLEN crowKeyset, SQLUSMALLINT crowRowset) { STMT (pstmt, hstmt); CONN (pdbc, pstmt->hdbc); HPROC hproc = SQL_NULL_HPROC; sqlstcode_t sqlstat = en_00000; SQLRETURN retcode = SQL_SUCCESS; SQLUINTEGER odbc_ver = ((GENV_t *) pdbc->genv)->odbc_ver; SQLUINTEGER dodbc_ver = ((ENV_t *) pdbc->henv)->dodbc_ver; for (;;) { if (crowRowset == (UWORD) 0) { sqlstat = en_S1107; break; } if (crowKeyset > (SDWORD) 0L && crowKeyset < (SDWORD) crowRowset) { sqlstat = en_S1107; break; } if (crowKeyset < 1) { if (crowKeyset != SQL_SCROLL_FORWARD_ONLY && crowKeyset != SQL_SCROLL_STATIC && crowKeyset != SQL_SCROLL_KEYSET_DRIVEN && crowKeyset != SQL_SCROLL_DYNAMIC) { sqlstat = en_S1107; break; } } if (fConcurrency != SQL_CONCUR_READ_ONLY && fConcurrency != SQL_CONCUR_LOCK && fConcurrency != SQL_CONCUR_ROWVER && fConcurrency != SQL_CONCUR_VALUES) { sqlstat = en_S1108; break; } #if (ODBCVER < 0x0300) if (pstmt->state != en_stmt_allocated) { sqlstat = en_S1010; break; } #endif hproc = _iodbcdm_getproc (pstmt->hdbc, en_SetScrollOptions); if (dodbc_ver == SQL_OV_ODBC3 && odbc_ver == SQL_OV_ODBC3) hproc = SQL_NULL_HPROC; if (hproc != SQL_NULL_HPROC) { CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc, (pstmt->dhstmt, fConcurrency, crowKeyset, crowRowset)); } else { #if (ODBCVER >= 0x0300) SQLINTEGER InfoValue, InfoType, Value; HPROC hproc1 = _iodbcdm_getproc (pstmt->hdbc, en_SetStmtAttr); HPROC hproc2 = _iodbcdm_getproc (pstmt->hdbc, en_GetInfo); if (hproc1 == SQL_NULL_HPROC || hproc2 == SQL_NULL_HPROC) { PUSHSQLERR (pstmt->herr, en_IM001); return SQL_ERROR; } switch (crowKeyset) { case SQL_SCROLL_FORWARD_ONLY: InfoType = SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2; Value = SQL_CURSOR_FORWARD_ONLY; break; case SQL_SCROLL_STATIC: InfoType = SQL_STATIC_CURSOR_ATTRIBUTES2; Value = SQL_CURSOR_STATIC; break; case SQL_SCROLL_DYNAMIC: InfoType = SQL_DYNAMIC_CURSOR_ATTRIBUTES2; Value = SQL_CURSOR_DYNAMIC; break; case SQL_SCROLL_KEYSET_DRIVEN: default: InfoType = SQL_KEYSET_CURSOR_ATTRIBUTES2; Value = SQL_CURSOR_KEYSET_DRIVEN; break; } CALL_DRIVER (pstmt->hdbc, pdbc, retcode, hproc2, (pdbc->dhdbc, InfoType, &InfoValue, 0, NULL)); if (retcode != SQL_SUCCESS) { return retcode; } switch (fConcurrency) { case SQL_CONCUR_READ_ONLY: if (!(InfoValue & SQL_CA2_READ_ONLY_CONCURRENCY)) { PUSHSQLERR (pstmt->herr, en_S1C00); return SQL_ERROR; } break; case SQL_CONCUR_LOCK: if (!(InfoValue & SQL_CA2_LOCK_CONCURRENCY)) { PUSHSQLERR (pstmt->herr, en_S1C00); return SQL_ERROR; } break; case SQL_CONCUR_ROWVER: if (!(InfoValue & SQL_CA2_OPT_ROWVER_CONCURRENCY)) { PUSHSQLERR (pstmt->herr, en_S1C00); return SQL_ERROR; } break; case SQL_CONCUR_VALUES: if (!(InfoValue & SQL_CA2_OPT_VALUES_CONCURRENCY)) { PUSHSQLERR (pstmt->herr, en_S1C00); return SQL_ERROR; } break; } CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc1, (pstmt->dhstmt, SQL_ATTR_CURSOR_TYPE, Value, 0)); if (retcode != SQL_SUCCESS) return retcode; CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc1, (pstmt->dhstmt, SQL_ATTR_CONCURRENCY, fConcurrency, 0)); if (retcode != SQL_SUCCESS) return retcode; if (crowKeyset > 0) { CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc1, (pstmt->dhstmt, SQL_ATTR_KEYSET_SIZE, crowKeyset, 0)); if (retcode != SQL_SUCCESS) return retcode; } CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc1, (pstmt->dhstmt, SQL_ROWSET_SIZE, crowRowset, 0)); if (retcode != SQL_SUCCESS) return retcode; #else sqlstat = en_IM001; break; #endif } sqlstat = en_00000; if (1) /* turn off solaris warning message */ break; } if (sqlstat != en_00000) { PUSHSQLERR (pstmt->herr, sqlstat); return SQL_ERROR; } return retcode; } SQLRETURN SQL_API SQLSetScrollOptions ( SQLHSTMT hstmt, SQLUSMALLINT fConcurrency, SQLLEN crowKeyset, SQLUSMALLINT crowRowset) { ENTER_STMT (hstmt, trace_SQLSetScrollOptions (TRACE_ENTER, hstmt, fConcurrency, crowKeyset, crowRowset)); retcode = SQLSetScrollOptions_Internal ( hstmt, fConcurrency, crowKeyset, crowRowset); LEAVE_STMT (hstmt, trace_SQLSetScrollOptions (TRACE_LEAVE, hstmt, fConcurrency, crowKeyset, crowRowset)); } SQLRETURN SQL_API SQLSetParam ( SQLHSTMT hstmt, SQLUSMALLINT ipar, SQLSMALLINT fCType, SQLSMALLINT fSqlType, SQLULEN cbColDef, SQLSMALLINT ibScale, SQLPOINTER rgbValue, SQLLEN * pcbValue) { return SQLBindParameter (hstmt, ipar, (SWORD) SQL_PARAM_INPUT_OUTPUT, fCType, fSqlType, cbColDef, ibScale, rgbValue, SQL_SETPARAM_VALUE_MAX, pcbValue); } libiodbc-3.52.16/iodbc/henv.c0000664000175000017500000002162514424170750012560 00000000000000/* * henv.c * * $Id$ * * Environment object management functions * * The iODBC driver manager. * * Copyright (C) 1995 Ke Jin * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include #include "dlproc.h" #include "unicode.h" #include "herr.h" #include "henv.h" #include "itrace.h" /* * Use static initializer where possible */ #if defined (PTHREAD_MUTEX_INITIALIZER) SPINLOCK_DECLARE (iodbcdm_global_lock) = PTHREAD_MUTEX_INITIALIZER; #else SPINLOCK_DECLARE (iodbcdm_global_lock); #endif static int _iodbcdm_initialized = 0; static void _iodbcdm_env_settracing (GENV_t *genv) { char buf[1024]; genv = genv; /*UNUSED*/ /* * Check TraceFile keyword */ SQLSetConfigMode (ODBC_BOTH_DSN); if( SQLGetPrivateProfileString ("ODBC", "TraceFile", "", buf, sizeof(buf) / sizeof(SQLTCHAR), "odbc.ini") == 0 || !buf[0]) STRCPY (buf, SQL_OPT_TRACE_FILE_DEFAULT); trace_set_filename (buf); /* * Check Trace keyword */ SQLSetConfigMode (ODBC_BOTH_DSN); if ( SQLGetPrivateProfileString ("ODBC", "Trace", "", buf, sizeof(buf) / sizeof(SQLTCHAR), "odbc.ini") && (STRCASEEQ (buf, "on") || STRCASEEQ (buf, "yes") || STRCASEEQ (buf, "1"))) trace_start (); return; } unsigned long _iodbc_env_counter = 0; SQLRETURN SQLAllocEnv_Internal (SQLHENV * phenv, int odbc_ver) { char buf[1024]; GENV (genv, NULL); int retcode = SQL_SUCCESS; char *s; genv = (GENV_t *) MEM_ALLOC (sizeof (GENV_t)); if (genv == NULL) { *phenv = SQL_NULL_HENV; return SQL_ERROR; } genv->rc = 0; /* * Initialize this handle */ genv->type = SQL_HANDLE_ENV; genv->henv = SQL_NULL_HENV; /* driver's env list */ genv->hdbc = SQL_NULL_HDBC; /* driver's dbc list */ genv->herr = SQL_NULL_HERR; /* err list */ #if (ODBCVER >= 0x300) genv->odbc_ver = odbc_ver; genv->connection_pooling = _iodbcdm_attr_connection_pooling; genv->cp_match = SQL_CP_MATCH_DEFAULT; genv->pdbc_pool = NULL; #endif genv->err_rec = 0; genv->conv.dm_cp = CP_DEF; genv->conv.drv_cp = CP_DEF; SQLSetConfigMode (ODBC_BOTH_DSN); if ( SQLGetPrivateProfileString ("ODBC", "AppUnicodeType", "0", buf, sizeof(buf) / sizeof(SQLTCHAR), "odbcinst.ini")) { if (STRCASEEQ (buf, "0") || STRCASEEQ (buf, "ucs4")) genv->conv.dm_cp = CP_UCS4; else if (STRCASEEQ (buf, "1") || STRCASEEQ (buf, "utf16")) genv->conv.dm_cp = CP_UTF16; else if (STRCASEEQ (buf, "2") || STRCASEEQ (buf, "utf8")) genv->conv.dm_cp = CP_UTF8; } if ((s = getenv("ODBC_APP_UNICODE_TYPE")) != NULL) { if (STRCASEEQ (s, "0") || STRCASEEQ (s, "ucs4")) genv->conv.dm_cp = CP_UCS4; else if (STRCASEEQ (s, "1") || STRCASEEQ (s, "utf16")) genv->conv.dm_cp = CP_UTF16; else if (STRCASEEQ (s, "2") || STRCASEEQ (s, "utf8")) genv->conv.dm_cp = CP_UTF8; } DPRINTF ((stderr, "DEBUG: SQLAllocEnv DiverManager AppUnicodeType=%s\n", genv->conv.dm_cp==CP_UCS4?"UCS4":(genv->conv.dm_cp==CP_UTF16?"UTF16":"UTF8"))); *phenv = (SQLHENV) genv; /* * Initialize tracing */ if (++_iodbc_env_counter == 1) _iodbcdm_env_settracing (genv); return retcode; } SQLRETURN SQL_API SQLAllocEnv (SQLHENV * phenv) { GENV (genv, NULL); int retcode = SQL_SUCCESS; /* * One time initialization */ Init_iODBC(); ODBC_LOCK (); retcode = SQLAllocEnv_Internal (phenv, SQL_OV_ODBC2); genv = (GENV_t *) *phenv; /* * Start tracing */ TRACE (trace_SQLAllocEnv (TRACE_ENTER, phenv)); TRACE (trace_SQLAllocEnv (TRACE_LEAVE, phenv)); ODBC_UNLOCK (); return retcode; } extern void _iodbcdm_pool_drop_conn (HDBC hdbc, HDBC hdbc_prev); SQLRETURN SQLFreeEnv_Internal (SQLHENV henv) { GENV (genv, henv); if (!IS_VALID_HENV (genv)) { return SQL_INVALID_HANDLE; } CLEAR_ERRORS (genv); if (genv->hdbc != SQL_NULL_HDBC) { PUSHSQLERR (genv->herr, en_S1010); return SQL_ERROR; } #if (ODBCVER >= 0x300) /* Drop connections from the pool */ while (genv->pdbc_pool != NULL) _iodbcdm_pool_drop_conn (genv->pdbc_pool, NULL); #endif /* * Invalidate this handle */ genv->type = 0; return SQL_SUCCESS; } SQLRETURN SQL_API SQLFreeEnv (SQLHENV henv) { GENV (genv, henv); int retcode = SQL_SUCCESS; ODBC_LOCK (); TRACE (trace_SQLFreeEnv (TRACE_ENTER, henv)); retcode = SQLFreeEnv_Internal (henv); TRACE (trace_SQLFreeEnv (TRACE_LEAVE, henv)); MEM_FREE (genv); /* * Close trace after last environment handle is freed */ if (--_iodbc_env_counter == 0) trace_stop(); ODBC_UNLOCK (); return retcode; } /* * Initialize the system and let everyone wait until we have done so * properly */ void Init_iODBC (void) { #if !defined (PTHREAD_MUTEX_INITIALIZER) || defined (WINDOWS) SPINLOCK_INIT (iodbcdm_global_lock); #endif #if 0 SPINLOCK_LOCK (iodbcdm_global_lock); if (!_iodbcdm_initialized) { /* * OK, now flag we are not callable anymore */ _iodbcdm_initialized = 1; /* * Other one time initializations can be performed here */ } SPINLOCK_UNLOCK (iodbcdm_global_lock); #endif return; } void Done_iODBC(void) { #if !defined (PTHREAD_MUTEX_INITIALIZER) || defined (WINDOWS) SPINLOCK_DONE (iodbcdm_global_lock); #endif } /* * DLL Entry points for Windows */ #if defined (WINDOWS) static int DLLInit (HINSTANCE hModule) { Init_iODBC (); return TRUE; } static void DLLExit (void) { Done_iODBC (); } #pragma argused BOOL WINAPI DllMain (HINSTANCE hModule, DWORD fdReason, LPVOID lpvReserved) { switch (fdReason) { case DLL_PROCESS_ATTACH: if (!DLLInit (hModule)) return FALSE; break; case DLL_PROCESS_DETACH: DLLExit (); } return TRUE; } #endif libiodbc-3.52.16/iodbc/itrace.h0000664000175000017500000001226314424170750013072 00000000000000/* * itrace.h * * $Id$ * * Trace functions * * The iODBC driver manager. * * Copyright (C) 1995 Ke Jin * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef _ITRACE_H #define _ITRACE_H /* * Trace function prototypes */ #include "trace/proto.h" extern int ODBCSharedTraceFlag; #if 0 #define DPRINTF(a) fprintf a #else #define DPRINTF(a) #endif /* * Useful macros */ #ifdef NO_TRACING #define TRACE(X) #else #define TRACE(X) if (ODBCSharedTraceFlag) X #endif #define TRACE_ENTER 0, retcode #define TRACE_LEAVE 1, retcode #define CALL_DRIVER(hdbc, errHandle, ret, proc, plist) \ {\ DBC_t * t_pdbc = (DBC_t *)(hdbc);\ ENV_t * t_penv = (ENV_t *)(t_pdbc->henv);\ \ if (!t_penv->thread_safe) MUTEX_LOCK (t_penv->drv_lock); \ \ ret = proc plist; \ if (errHandle) ((GENV_t *)(errHandle))->rc = ret; \ \ if (!t_penv->thread_safe) MUTEX_UNLOCK (t_penv->drv_lock); \ } #define CALL_UDRIVER(hdbc, errHandle, retcode, hproc, unicode_driver, procid, plist) \ { \ if (unicode_driver) \ { \ /* SQL_XXX_W */ \ hproc = _iodbcdm_getproc (hdbc, procid ## W); \ } \ else \ { \ /* SQL_XXX */ \ /* SQL_XXX_A */ \ hproc = _iodbcdm_getproc (hdbc, procid); \ if (hproc == SQL_NULL_HPROC) \ hproc = _iodbcdm_getproc (hdbc, procid ## A); \ } \ if (hproc != SQL_NULL_HPROC) \ { \ CALL_DRIVER (hdbc, errHandle, retcode, hproc, plist) \ } \ } #endif #define GET_HPROC(hdbc, hproc, procid) \ { \ /* SQL_XXX */ \ /* SQL_XXX_A */ \ hproc = _iodbcdm_getproc (hdbc, procid); \ if (hproc == SQL_NULL_HPROC) \ hproc = _iodbcdm_getproc (hdbc, procid ## A); \ } #define GET_UHPROC(hdbc, hproc, procid, unicode_driver) \ { \ if (unicode_driver) \ { \ /* SQL_XXX_W */ \ hproc = _iodbcdm_getproc (hdbc, procid ## W); \ } \ else \ { \ /* SQL_XXX */ \ /* SQL_XXX_A */ \ hproc = _iodbcdm_getproc (hdbc, procid); \ if (hproc == SQL_NULL_HPROC) \ hproc = _iodbcdm_getproc (hdbc, procid ## A); \ } \ } libiodbc-3.52.16/iodbc/connect.c0000664000175000017500000031351014424170750013246 00000000000000/* * connect.c * * $Id$ * * Connect (load) driver * * The iODBC driver manager. * * Copyright (C) 1995 Ke Jin * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include #include #include #include "dlproc.h" #include "unicode.h" #include "herr.h" #include "henv.h" #include "hdbc.h" #include "hstmt.h" #include "itrace.h" #include "unicode.h" #if defined (__APPLE__) && !defined (NO_FRAMEWORKS) #include #endif #include "misc.h" #include "iodbc_misc.h" /* * Identification strings */ static char sccsid[] = "@(#)iODBC driver manager " VERSION "\n"; char *iodbc_version = VERSION; /* * Prototypes */ extern SQLRETURN _iodbcdm_driverunload (HDBC hdbc, int ver); extern SQLRETURN SQL_API _iodbcdm_SetConnectOption (SQLHDBC hdbc, SQLUSMALLINT fOption, SQLULEN vParam, SQLCHAR waMode); #if 0 #define CHECK_DRVCONN_DIALBOX(path) \ { \ if ((handle = DLL_OPEN(path)) != NULL) \ { \ if (DLL_PROC(handle, "_iodbcdm_drvconn_dialboxw") != NULL) \ { \ DLL_CLOSE(handle); \ retVal = TRUE; \ goto quit; \ } \ else \ { \ if (DLL_PROC(handle, "_iodbcdm_drvconn_dialbox") != NULL) \ { \ DLL_CLOSE(handle); \ retVal = TRUE; \ goto quit; \ } \ } \ DLL_CLOSE(handle); \ } \ } static BOOL _iodbcdm_CheckDriverLoginDlg ( LPSTR drv, LPSTR dsn ) { char tokenstr[4096]; char drvbuf[4096] = { L'\0'}; HDLL handle; BOOL retVal = FALSE; /* Check if the driver is provided */ if (drv == NULL) { SQLSetConfigMode (ODBC_BOTH_DSN); SQLGetPrivateProfileString ("ODBC Data Sources", dsn && dsn[0] != '\0' ? dsn : "Default", "", tokenstr, sizeof (tokenstr), NULL); drv = tokenstr; } /* Call the iodbcdm_drvconn_dialbox */ SQLSetConfigMode (ODBC_USER_DSN); if (!access (drv, X_OK)) { CHECK_DRVCONN_DIALBOX (drv); } if (SQLGetPrivateProfileString (drv, "Driver", "", drvbuf, sizeof (drvbuf), "odbcinst.ini")) { CHECK_DRVCONN_DIALBOX (drvbuf); } if (SQLGetPrivateProfileString (drv, "Setup", "", drvbuf, sizeof (drvbuf), "odbcinst.ini")) { CHECK_DRVCONN_DIALBOX (drvbuf); } if (SQLGetPrivateProfileString ("Default", "Driver", "", drvbuf, sizeof (drvbuf), "odbcinst.ini")) { CHECK_DRVCONN_DIALBOX (drvbuf); } if (SQLGetPrivateProfileString ("Default", "Setup", "", drvbuf, sizeof (drvbuf), "odbcinst.ini")) { CHECK_DRVCONN_DIALBOX (drvbuf); } SQLSetConfigMode (ODBC_SYSTEM_DSN); if (!access (drv, X_OK)) { CHECK_DRVCONN_DIALBOX (drv); } if (SQLGetPrivateProfileString (drv, "Driver", "", drvbuf, sizeof (drvbuf), "odbcinst.ini")) { CHECK_DRVCONN_DIALBOX (drvbuf); } if (SQLGetPrivateProfileString (drv, "Setup", "", drvbuf, sizeof (drvbuf), "odbcinst.ini")) { CHECK_DRVCONN_DIALBOX (drvbuf); } if (SQLGetPrivateProfileString ("Default", "Driver", "", drvbuf, sizeof (drvbuf), "odbcinst.ini")) { CHECK_DRVCONN_DIALBOX (drvbuf); } if (SQLGetPrivateProfileString ("Default", "Setup", "", drvbuf, sizeof (drvbuf), "odbcinst.ini")) { CHECK_DRVCONN_DIALBOX (drvbuf); } quit: return retVal; } #endif #define RETURN(_ret) \ do { \ retcode = _ret; \ goto end; \ } while (0) static SQLRETURN _iodbcdm_SetConnectOption_init ( SQLHDBC hdbc, SQLUSMALLINT fOption, SQLULEN vParam, UCHAR waMode) { CONN (pdbc, hdbc); ENVR (penv, pdbc->henv); HPROC hproc = SQL_NULL_HPROC; SQLRETURN retcode = SQL_SUCCESS; int retinfo = 0; CONV_DIRECT conv_direct = CD_NONE; DM_CONV *conv = &pdbc->conv; SQLINTEGER strLength = 0; void *ptr = (void *) vParam; void *_vParam = NULL; if (fOption >= 1000) { retinfo = 1; /* Change SQL_ERROR -> SQL_SUCCESS_WITH_INFO */ } if (penv->unicode_driver && waMode != 'W') conv_direct = CD_A2W; else if (!penv->unicode_driver && waMode == 'W') conv_direct = CD_W2A; else if (waMode == 'W' && conv->dm_cp!=conv->drv_cp) conv_direct = CD_W2W; switch (fOption) { case SQL_ATTR_TRACEFILE: case SQL_CURRENT_QUALIFIER: case SQL_TRANSLATE_DLL: case SQL_APPLICATION_NAME: case SQL_COPT_SS_ENLIST_IN_DTC: case SQL_COPT_SS_PERF_QUERY_LOG: case SQL_COPT_SS_PERF_DATA_LOG: case SQL_CURRENT_SCHEMA: if (conv_direct != CD_NONE) { _vParam = conv_text_m2d(conv, (void *)vParam, SQL_NTS, conv_direct); ptr = _vParam; strLength = SQL_NTS; } break; } if (penv->unicode_driver) { /* SQL_XXX_W */ if ((hproc = _iodbcdm_getproc (pdbc, en_SetConnectOptionW)) != SQL_NULL_HPROC) { CALL_DRIVER (hdbc, pdbc, retcode, hproc, (pdbc->dhdbc, fOption, ptr)); } #if (ODBCVER >= 0x300) else if ((hproc = _iodbcdm_getproc (pdbc, en_SetConnectAttrW)) != SQL_NULL_HPROC) { CALL_DRIVER (hdbc, pdbc, retcode, hproc, (pdbc->dhdbc, fOption, ptr, strLength)); } #endif } else { /* SQL_XXX */ /* SQL_XXX_A */ if ((hproc = _iodbcdm_getproc (pdbc, en_SetConnectOption)) != SQL_NULL_HPROC) { CALL_DRIVER (hdbc, pdbc, retcode, hproc, (pdbc->dhdbc, fOption, vParam)); } else if ((hproc = _iodbcdm_getproc (pdbc, en_SetConnectOptionA)) != SQL_NULL_HPROC) { CALL_DRIVER (hdbc, pdbc, retcode, hproc, (pdbc->dhdbc, fOption, vParam)); } #if (ODBCVER >= 0x300) else if ((hproc = _iodbcdm_getproc (pdbc, en_SetConnectAttr)) != SQL_NULL_HPROC) { CALL_DRIVER (hdbc, pdbc, retcode, hproc, (pdbc->dhdbc, fOption, vParam, strLength)); } else if ((hproc = _iodbcdm_getproc (pdbc, en_SetConnectAttrA)) != SQL_NULL_HPROC) { CALL_DRIVER (hdbc, pdbc, retcode, hproc, (pdbc->dhdbc, fOption, vParam, strLength)); } #endif } MEM_FREE(_vParam); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (pdbc->herr, en_IM004); return SQL_SUCCESS_WITH_INFO; } if (retcode != SQL_SUCCESS && retinfo) return SQL_SUCCESS_WITH_INFO; return retcode; } static SQLRETURN _iodbcdm_SetConnectAttr_init ( SQLHDBC hdbc, SQLUSMALLINT fOption, SQLULEN vParam) { CONN (pdbc, hdbc); ENVR (penv, pdbc->henv); HPROC hproc = SQL_NULL_HPROC; SQLRETURN retcode = SQL_ERROR; SQLINTEGER strLength = 0; void *ptr = (void *) vParam; if (penv->unicode_driver) { #if (ODBCVER >= 0x300) if ((hproc = _iodbcdm_getproc (pdbc, en_SetConnectAttrW)) != SQL_NULL_HPROC) { CALL_DRIVER (hdbc, pdbc, retcode, hproc, (pdbc->dhdbc, fOption, ptr, strLength)); } #endif } else { #if (ODBCVER >= 0x300) if ((hproc = _iodbcdm_getproc (pdbc, en_SetConnectAttr)) != SQL_NULL_HPROC) { CALL_DRIVER (hdbc, pdbc, retcode, hproc, (pdbc->dhdbc, fOption, vParam, strLength)); } else if ((hproc = _iodbcdm_getproc (pdbc, en_SetConnectAttrA)) != SQL_NULL_HPROC) { CALL_DRIVER (hdbc, pdbc, retcode, hproc, (pdbc->dhdbc, fOption, vParam, strLength)); } #endif } return retcode; } static SQLRETURN _iodbcdm_getInfo_init (SQLHDBC hdbc, SQLUSMALLINT fInfoType, SQLPOINTER rgbInfoValue, SQLSMALLINT cbInfoValueMax, SQLSMALLINT * pcbInfoValue, SQLCHAR waMode) { CONN (pdbc, hdbc); ENVR (penv, pdbc->henv); HPROC hproc = SQL_NULL_HPROC; SQLRETURN retcode = SQL_SUCCESS; waMode = waMode; /*UNUSED*/ switch(fInfoType) { case SQL_CURSOR_COMMIT_BEHAVIOR: case SQL_CURSOR_ROLLBACK_BEHAVIOR: break; default: return SQL_ERROR; } CALL_UDRIVER(hdbc, pdbc, retcode, hproc, penv->unicode_driver, en_GetInfo, ( pdbc->dhdbc, fInfoType, rgbInfoValue, cbInfoValueMax, pcbInfoValue)); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (pdbc->herr, en_IM004); return SQL_SUCCESS_WITH_INFO; } return retcode; } static SQLRETURN _iodbcdm_finish_disconnect (HDBC hdbc, BOOL driver_disconnect) { CONN (pdbc, hdbc); HPROC hproc = SQL_NULL_HPROC; DPRINTF ((stderr, "DEBUG: _iodbcdm_finish_disconnect (conn %p, driver_disconnect %d)\n", hdbc, driver_disconnect)); if (driver_disconnect) { SQLRETURN retcode; hproc = _iodbcdm_getproc (pdbc, en_Disconnect); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (pdbc->herr, en_IM001); return SQL_ERROR; } ODBC_UNLOCK (); CALL_DRIVER (hdbc, pdbc, retcode, hproc, (pdbc->dhdbc)); ODBC_LOCK (); if (!SQL_SUCCEEDED (retcode)) { /* diff from MS specs. We disallow * driver SQLDisconnect() return * SQL_SUCCESS_WITH_INFO and post * error message. */ return retcode; } } /* free all statement handle(s) on this connection */ while (pdbc->hstmt != NULL) _iodbcdm_dropstmt (pdbc->hstmt); /* state transition */ pdbc->state = en_dbc_allocated; return SQL_SUCCESS; } #if (ODBCVER >= 0x300) /* * Set Retry Wait timeout */ static void _iodbcdm_pool_set_retry_wait (HDBC hdbc) { CONN (pdbc, hdbc); int retry_wait = 0; char buf[1024]; /* Get the "Retry Wait" keyword value from the Pooling section */ SQLSetConfigMode (ODBC_BOTH_DSN); if (SQLGetPrivateProfileString ("ODBC Connection Pooling", "Retry Wait", "", buf, sizeof (buf), "odbcinst.ini") != 0 && buf[0] != '\0') retry_wait = atoi(buf); DPRINTF ((stderr, "DEBUG: setting RetryWait %d (conn %p)\n", retry_wait, hdbc)); pdbc->cp_retry_wait = time(NULL) + retry_wait; } extern SQLRETURN SQLFreeConnect_Internal (SQLHDBC hdbc); /* * Drop connection from the pool */ void _iodbcdm_pool_drop_conn (HDBC hdbc, HDBC hdbc_prev) { CONN (pdbc, hdbc); CONN (pdbc_prev, hdbc_prev); assert (!pdbc->cp_in_use); DPRINTF ((stderr, "DEBUG: dropping connection %p (prev %p) from the pool\n", hdbc, hdbc_prev)); /* remove from pool */ if (pdbc_prev != NULL) pdbc_prev->next = pdbc->next; else { GENV (genv, pdbc->genv); genv->pdbc_pool = pdbc->next; } /* finish disconnect and free connection */ _iodbcdm_finish_disconnect (hdbc, TRUE); SQLFreeConnect_Internal (hdbc); MEM_FREE (hdbc); } /* * Copy connection parameters from src to dst and reset src parameters * so that src can be correctly freed by SQLDisconnect. */ static void _iodbcdm_pool_copy_conn (HDBC hdbc_dst, HDBC hdbc_src) { CONN (pdbc_dst, hdbc_dst); CONN (pdbc_src, hdbc_src); HDBC next; time_t cp_timeout, cp_expiry_time; /* Preserve `next', `cp_timeout' and `cp_expiry_time' */ next = pdbc_dst->next; cp_timeout = pdbc_dst->cp_timeout; cp_expiry_time = pdbc_dst->cp_expiry_time; *pdbc_dst = *pdbc_src; pdbc_dst->next = next; pdbc_dst->cp_timeout = cp_timeout; pdbc_dst->cp_expiry_time = cp_expiry_time; /* Reset parameters of source connection */ pdbc_src->herr = SQL_NULL_HERR; pdbc_src->dhdbc = SQL_NULL_HDBC; pdbc_src->henv = SQL_NULL_HENV; pdbc_src->hstmt = SQL_NULL_HSTMT; pdbc_src->hdesc = SQL_NULL_HDESC; pdbc_src->current_qualifier = NULL; pdbc_src->drvopt = NULL; pdbc_src->cp_probe = NULL; pdbc_src->cp_dsn = NULL; pdbc_src->cp_uid = NULL; pdbc_src->cp_pwd = NULL; pdbc_src->cp_connstr = NULL; } /* * Check if attributes of two connections match */ static BOOL _iodbcdm_pool_check_attr_match (HDBC hdbc, HDBC cp_hdbc) { CONN (pdbc, hdbc); GENV (genv, pdbc->genv); CONN (cp_pdbc, cp_hdbc); BOOL strict_match = (genv->cp_match == SQL_CP_STRICT_MATCH); DPRINTF ((stderr, "DEBUG: check attr match (conn %p, cp_conn %p)\n", hdbc, cp_hdbc)); /* * Check attrs that must be set before connection has been made: * - SQL_ATTR_PACKET_SIZE (packet_size) * - SQL_ATTR_ODBC_CURSORS (odbc_cursors) * * SQL_ATTR_PACKET_SIZE can be different if !strict_match. * The value of SQL_ATTR_LOGIN_TIMEOUT is not examined. */ if (strict_match && pdbc->packet_size != cp_pdbc->packet_size) { DPRINTF ((stderr, "DEBUG: packet_size does not match (conn %p, cp_conn %p, strict_match %d)", hdbc, cp_hdbc, strict_match)); return FALSE; } if (pdbc->odbc_cursors != cp_pdbc->odbc_cursors) { DPRINTF ((stderr, "DEBUG: odbc_cursors does not match (conn %p, cp_conn %p, strict_match %d)", hdbc, cp_hdbc, strict_match)); return FALSE; } if (pdbc->conv.dm_cp != cp_pdbc->conv.dm_cp || pdbc->conv.drv_cp != cp_pdbc->conv.drv_cp) { DPRINTF ((stderr, "DEBUG: unicode mode does not match (conn %p, cp_conn %p)", hdbc, cp_hdbc)); return FALSE; } /* * Check attrs that must be set either before or after the connection * has been made: * - SQL_ATTR_ACCESS_MODE (access_mode, default SQL_MODE_DEFAULT) * - SQL_ATTR_AUTOCOMMIT (autocommit, default SQL_AUTOCOMMIT_DEFAULT) * - SQL_ATTR_CURRENT_CATALOG (current_qualifier) * - SQL_ATTR_QUIET_MODE (quiet_mode) * - SQL_ATTR_TXN_ISOLATION (txn_isolation, default SQL_TXN_READ_UNCOMMITTED) * * If an attr is not set by the application but set in the pool: * - if there is a default, an attr is reset to the default value * (see _iodbcdm_pool_reset_conn_attrs()). * - if there is no default value, pooled connection is not considered * a match * * If an attr is set by the application, this value overrides the * value from the pool. */ if (pdbc->current_qualifier == NULL && cp_pdbc->current_qualifier != NULL) { /* has not been set by application, but set in the pool */ DPRINTF ((stderr, "DEBUG: current_qualifier has not been set by application, but is set in the pool (conn %p, cp_conn %p)", hdbc, cp_hdbc)); return FALSE; } if (pdbc->quiet_mode == 0 && cp_pdbc->quiet_mode != 0) { /* has not been set by application, but set in the pool */ DPRINTF ((stderr, "DEBUG: quiet_mode has not been set by application, but is set in the pool (conn %p, cp_conn %p)", hdbc, cp_hdbc)); return FALSE; } return TRUE; } /* * Reset connection attributes to the default values (if an attr is not set * by application and there is a default) or to the value set by application. */ SQLRETURN _iodbcdm_pool_reset_conn_attrs (SQLHDBC hdbc, SQLHDBC cp_hdbc) { CONN (pdbc, hdbc); CONN (cp_pdbc, cp_hdbc); SQLRETURN retcode = SQL_SUCCESS; SQLRETURN ret; if (pdbc->access_mode != cp_pdbc->access_mode) { cp_pdbc->access_mode = pdbc->access_mode; ret = _iodbcdm_SetConnectOption_init ( cp_pdbc, SQL_ACCESS_MODE, cp_pdbc->access_mode, 'A'); retcode |= ret; } if (pdbc->autocommit != cp_pdbc->autocommit) { cp_pdbc->autocommit = pdbc->autocommit; ret = _iodbcdm_SetConnectOption_init ( cp_pdbc, SQL_AUTOCOMMIT, cp_pdbc->autocommit, 'A'); retcode |= ret; } if (pdbc->current_qualifier != NULL) { if (cp_pdbc->current_qualifier != NULL) MEM_FREE (cp_pdbc->current_qualifier); cp_pdbc->current_qualifier = pdbc->current_qualifier; pdbc->current_qualifier = NULL; cp_pdbc->current_qualifier_WA = pdbc->current_qualifier_WA; ret = _iodbcdm_SetConnectOption_init ( cp_pdbc, SQL_CURRENT_QUALIFIER, (SQLULEN) cp_pdbc->current_qualifier, cp_pdbc->current_qualifier_WA); retcode |= ret; } if (cp_pdbc->quiet_mode != pdbc->quiet_mode) { cp_pdbc->quiet_mode = pdbc->quiet_mode; ret = _iodbcdm_SetConnectOption_init ( cp_pdbc, SQL_QUIET_MODE, cp_pdbc->quiet_mode, 'A'); retcode |= ret; } if (pdbc->txn_isolation != cp_pdbc->txn_isolation) { cp_pdbc->txn_isolation = pdbc->txn_isolation; ret = _iodbcdm_SetConnectOption_init ( cp_pdbc, SQL_TXN_ISOLATION, cp_pdbc->txn_isolation, 'A'); retcode |= ret; } return retcode; } extern SQLRETURN SQLAllocStmt_Internal (SQLHDBC hdbc, SQLHSTMT *phstmt); extern SQLRETURN SQLFreeStmt_Internal (SQLHSTMT hstmt, SQLUSMALLINT fOption); extern SQLRETURN SQL_API SQLExecDirect_Internal (SQLHSTMT hstmt, SQLPOINTER szSqlStr, SQLINTEGER cbSqlStr, SQLCHAR waMode); extern SQLRETURN SQLFetch_Internal (SQLHSTMT hstmt); /* * Execute CPProbe statement to check if connection is dead */ static SQLRETURN _iodbcdm_pool_exec_cpprobe (HDBC hdbc, char *cp_probe) { HSTMT hstmt = SQL_NULL_HSTMT; SQLRETURN retcode; SQLSMALLINT num_cols; DPRINTF ((stderr, "DEBUG: executing CPProbe (conn %p, stmt [%s])\n", hdbc, cp_probe)); /* allocate statement handle */ retcode = SQLAllocStmt_Internal (hdbc, &hstmt); if (!SQL_SUCCEEDED (retcode)) RETURN (retcode); /* execute statement */ retcode = SQLExecDirect_Internal (hstmt, cp_probe, SQL_NTS, 'A'); if (!SQL_SUCCEEDED (retcode)) RETURN (retcode); /* check that there is a result set */ retcode = _iodbcdm_NumResultCols (hstmt, &num_cols); if (!SQL_SUCCEEDED (retcode)) RETURN (retcode); /* if there was no result set -- success */ if (num_cols == 0) RETURN (SQL_SUCCESS); /* fetch results */ do { retcode = SQLFetch_Internal (hstmt); if (!SQL_SUCCEEDED (retcode)) RETURN (retcode); } while (retcode != SQL_NO_DATA); /* success */ RETURN (SQL_SUCCESS); end: if (hstmt != SQL_NULL_HSTMT) SQLFreeStmt_Internal (hstmt, SQL_DROP); return retcode; } /* * Check if connection is dead */ static BOOL _iodbcdm_pool_conn_dead (HDBC hdbc) { CONN (pdbc, hdbc); HPROC hproc = SQL_NULL_HPROC; SQLRETURN retcode; SQLINTEGER attr_dead; DPRINTF ((stderr, "DEBUG: checking if connection is dead (conn %p)\n", hdbc)); /* first try SQLGetConnectAttr */ CALL_UDRIVER(pdbc, pdbc, retcode, hproc, 'A', en_GetConnectAttr, (pdbc->dhdbc, SQL_ATTR_CONNECTION_DEAD, &attr_dead, 0, NULL)); if (hproc != SQL_NULL_HPROC && SQL_SUCCEEDED (retcode)) { DPRINTF ((stderr, "DEBUG: GetConnectAttr: attr_dead = %ld (conn %p)\n", attr_dead, hdbc)); return attr_dead == SQL_CD_TRUE; } /* try SQLGetConnectOption */ CALL_UDRIVER(pdbc, pdbc, retcode, hproc, 'A', en_GetConnectOption, (pdbc->dhdbc, SQL_ATTR_CONNECTION_DEAD, &attr_dead)); if (hproc != SQL_NULL_HPROC && SQL_SUCCEEDED (retcode)) { DPRINTF ((stderr, "DEBUG: GetConnectOption: attr_dead = %ld (conn %p)\n", attr_dead, hdbc)); return attr_dead == SQL_CD_TRUE; } /* try CPProbe statement */ if (pdbc->cp_probe != NULL && STRLEN(pdbc->cp_probe) > 0) { retcode = _iodbcdm_pool_exec_cpprobe (pdbc, pdbc->cp_probe); return SQL_SUCCEEDED (retcode); } /* don't know, assume it is alive */ return FALSE; } /* * Get the connection from to the pool * * Returns 0 if the connection was put successfully * Returns -1 otherwise */ static SQLRETURN _iodbcdm_pool_get_conn ( HDBC hdbc, char *dsn, char *uid, char *pwd, char *connstr) { CONN (pdbc, hdbc); GENV (genv, pdbc->genv); DBC_t *cp_pdbc, *cp_pdbc_next, *cp_pdbc_prev = NULL; time_t current_time; DPRINTF ((stderr, "DEBUG: getting connection %p from the pool (dsn [%s], uid [%s], pwd [%s], connstr [%s])\n", hdbc, dsn, uid, pwd, connstr)); current_time = time(NULL); for (cp_pdbc = genv->pdbc_pool; cp_pdbc != NULL; cp_pdbc_prev = cp_pdbc, cp_pdbc = cp_pdbc_next) { SQLRETURN retcode; cp_pdbc_next = cp_pdbc->next; /* skip connections in use */ if (cp_pdbc->cp_in_use) { DPRINTF ((stderr, "DEBUG: skipping connection %p (in use)\n", cp_pdbc)); continue; } /* * Check that pooled connection timeout has not expired */ if (current_time >= cp_pdbc->cp_expiry_time) { DPRINTF ((stderr, "DEBUG: connection %p expired (cp_expiry_time %d, current_time %d)\n", cp_pdbc, cp_pdbc->cp_expiry_time, current_time)); _iodbcdm_pool_drop_conn (cp_pdbc, cp_pdbc_prev); cp_pdbc = cp_pdbc_prev; continue; } /* * Check that requested dsn, uid, pwd and connstr match * pooled connection */ if (dsn != NULL) { if (cp_pdbc->cp_dsn == NULL || strcmp (dsn, cp_pdbc->cp_dsn) != 0) continue; } else if (cp_pdbc->cp_dsn != NULL) continue; if (uid != NULL) { if (cp_pdbc->cp_uid == NULL || strcmp (uid, cp_pdbc->cp_uid) != 0) continue; } else if (cp_pdbc->cp_uid != NULL) continue; if (pwd != NULL) { if (cp_pdbc->cp_pwd == NULL || strcmp (pwd, cp_pdbc->cp_pwd) != 0) continue; } else if (cp_pdbc->cp_pwd != NULL) continue; if (connstr != NULL) { if (cp_pdbc->cp_connstr == NULL || strcmp (connstr, cp_pdbc->cp_connstr) != 0) continue; } else if (cp_pdbc->cp_connstr != NULL) continue; DPRINTF ((stderr, "DEBUG: found matching pooled connection %p\n", cp_pdbc)); /* check that connection attributes match */ if (!_iodbcdm_pool_check_attr_match (pdbc, cp_pdbc)) continue; /* * Match found! */ /* * Check Retry Wait timeout */ if (cp_pdbc->cp_retry_wait != 0) { if (current_time < cp_pdbc->cp_retry_wait) { /* Retry Wait timeout has not expired yet */ DPRINTF ((stderr, "DEBUG: RetryWait timeout has not expired yet (cp_pdbc %p, cp_retry_wait %d, current_time %d)\n", cp_pdbc, cp_pdbc->cp_retry_wait, current_time)); /* remember matching pooled connection */ pdbc->cp_pdbc = cp_pdbc; return SQL_ERROR; } DPRINTF ((stderr, "DEBUG: RetryWait timeout reset (cp_pdbc %p)\n", cp_pdbc)); /* reset Retry Wait timeout */ cp_pdbc->cp_retry_wait = 0; } /* * Check if connection is dead */ if (_iodbcdm_pool_conn_dead (cp_pdbc)) { /* Connection is dead -- try to reconnect */ DPRINTF ((stderr, "DEBUG: pooled connection is dead (cp_pdbc %p)\n", cp_pdbc)); /* remember matching pooled connection */ pdbc->cp_pdbc = cp_pdbc; cp_pdbc->cp_in_use = TRUE; return SQL_ERROR; } /* reset connection attrs */ retcode = _iodbcdm_pool_reset_conn_attrs (pdbc, cp_pdbc); if (retcode != SQL_SUCCESS) retcode = SQL_SUCCESS_WITH_INFO; /* copy parameters */ _iodbcdm_pool_copy_conn (pdbc, cp_pdbc); /* remember matching pooled connection */ pdbc->cp_pdbc = cp_pdbc; cp_pdbc->cp_in_use = TRUE; DPRINTF ((stderr, "DEBUG: got connection from the pool (cp_pdbc %p)\n", cp_pdbc)); /* found a connection in a pool */ return retcode; } DPRINTF ((stderr, "DEBUG: no matching connection in the pool\n")); /* can't find a connection in a pool */ return SQL_ERROR; } /* * Put the connection back to the pool * * Return 0 if the connection was put successfully * Return -1 otherwise */ static int _iodbcdm_pool_put_conn (HDBC hdbc) { CONN (pdbc, hdbc); GENV (genv, NULL); DBC_t *cp_pdbc = pdbc->cp_pdbc; DPRINTF ((stderr, "DEBUG: putting connection back to the pool (conn %p, dsn [%s], uid [%s], pwd [%s], connstr [%s])\n", hdbc, pdbc->cp_dsn, pdbc->cp_uid, pdbc->cp_pwd, pdbc->cp_connstr)); if (cp_pdbc == NULL) { cp_pdbc = (DBC_t *) MEM_ALLOC (sizeof (DBC_t)); if (cp_pdbc == NULL) { return -1; } /* put to the pool */ genv = (GENV_t *) pdbc->genv; cp_pdbc->next = genv->pdbc_pool; genv->pdbc_pool = cp_pdbc; cp_pdbc->cp_timeout = pdbc->cp_timeout; DPRINTF ((stderr, "DEBUG: new pooled connection %p\n", cp_pdbc)); } /* copy out parameters */ _iodbcdm_pool_copy_conn(cp_pdbc, pdbc); pdbc->cp_pdbc = NULL; /* free all statement handle(s) on connection in pool */ while (cp_pdbc->hstmt != NULL) _iodbcdm_dropstmt (cp_pdbc->hstmt); /* set expiration time and other parameters for connection in pool */ cp_pdbc->cp_pdbc = NULL; if (cp_pdbc->cp_retry_wait == 0) { /* set new expiry time only if we are not returning the connection to the pool after unsuccessful reconnect attempt */ cp_pdbc->cp_expiry_time = time(NULL) + cp_pdbc->cp_timeout; } cp_pdbc->cp_in_use = FALSE; DPRINTF ((stderr, "DEBUG: connection %p put back to the pool (cp_pdbc %p, cp_timeout %d)\n", hdbc, cp_pdbc, cp_pdbc->cp_timeout)); return 0; } #endif /* (ODBCVER >= 0x300) */ /* - Load driver share library( or increase its reference count * if it has already been loaded by another active connection) * - Call driver's SQLAllocEnv() (for the first reference only) * - Call driver's SQLAllocConnect() * - Call driver's SQLSetConnectOption() (set login time out) * - Increase the bookkeeping reference count */ SQLRETURN _iodbcdm_driverload ( char * dsn, char * drv, HDBC hdbc, SWORD thread_safe, SWORD unload_safe, IODBC_CHARSET iodbcinst_drv_cp, UCHAR waMode) { CONN (pdbc, hdbc); ENVR (penv, NULL); GENV (genv, NULL); HDLL hdll = SQL_NULL_HDLL; HPROC hproc; SQLRETURN retcode = SQL_SUCCESS; sqlstcode_t sqlstat = en_00000; char buf[1024]; char path_tmp[1024]; char *path = drv; char cp_probe[1024] = {""}; int cp_timeout = 0; void *pfaux; int driver_unicode_cp = -1; SQLINTEGER wchar_id; if (drv == NULL || ((char*)drv)[0] == '\0') { PUSHSQLERR (pdbc->herr, en_IM002); return SQL_ERROR; } if (!IS_VALID_HDBC (pdbc) || pdbc->genv == SQL_NULL_HENV) { return SQL_INVALID_HANDLE; } /* * If drv does not start with / or ., we may have a symbolic driver name */ if (!(drv[0] == '/' || drv[0] == '.')) { char *tmp_drv = NULL; /* * Remove curly braces */ if (drv[0] == '{') { tmp_drv = strdup (drv); if (tmp_drv[strlen (drv) - 1] == '}') tmp_drv[strlen (drv) - 1] = '\0'; drv = &tmp_drv[1]; } /* * Hopefully the driver was registered under that name in the * odbcinst.ini file */ if (SQLGetPrivateProfileString ((char *) drv, "Driver", "", path_tmp, sizeof (path_tmp), "odbcinst.ini") && path_tmp[0]) path = path_tmp; /* * Get CPTimeout value */ SQLSetConfigMode (ODBC_BOTH_DSN); if (SQLGetPrivateProfileString (drv, "CPTimeout", "", buf, sizeof(buf), "odbcinst.ini") && buf[0]) cp_timeout = atoi(buf); /* * Get CPProbe value */ SQLGetPrivateProfileString (drv, "CPProbe", "", cp_probe, sizeof(cp_probe), "odbcinst.ini"); if (SQLGetPrivateProfileString ((char *) drv, "DriverUnicodeType", "3", buf, sizeof (buf), "odbcinst.ini")) { if (STRCASEEQ (buf, "1") || STRCASEEQ (buf, "utf16") || STRCASEEQ (buf, "ucs2")) iodbcinst_drv_cp = CP_UTF16; else if (STRCASEEQ (buf, "2") || STRCASEEQ (buf, "utf8")) iodbcinst_drv_cp = CP_UTF8; else iodbcinst_drv_cp = CP_UCS4; DPRINTF ((stderr, "DEBUG: _iodbcdm_driverload-0(odbcinst.ini) DriverUnicodeType=%s\n", iodbcinst_drv_cp==CP_UCS4?"UCS4":(iodbcinst_drv_cp==CP_UTF16?"UTF16":"UTF8"))); } if (tmp_drv) free (tmp_drv); } else if (dsn != NULL && *dsn != '\0') { char tmp_drv[1024] = {""}; SQLSetConfigMode (ODBC_BOTH_DSN); if (SQLGetPrivateProfileString ("ODBC Data Sources", dsn, "", tmp_drv, sizeof(tmp_drv), NULL) && tmp_drv[0]) { /* * Get CPTimeout value */ if (SQLGetPrivateProfileString (tmp_drv, "CPTimeout", "", buf, sizeof(buf), "odbcinst.ini") && buf[0]) cp_timeout = atoi(buf); /* * Get CPProbe value */ SQLGetPrivateProfileString (tmp_drv, "CPProbe", "", cp_probe, sizeof(cp_probe), "odbcinst.ini"); if (SQLGetPrivateProfileString ((char *) tmp_drv, "DriverUnicodeType", "3", buf, sizeof (buf), "odbcinst.ini")) { if (STRCASEEQ (buf, "1") || STRCASEEQ (buf, "utf16") || STRCASEEQ (buf, "ucs2")) iodbcinst_drv_cp = CP_UTF16; else if (STRCASEEQ (buf, "2") || STRCASEEQ (buf, "utf8")) iodbcinst_drv_cp = CP_UTF8; else iodbcinst_drv_cp = CP_UCS4; DPRINTF ((stderr, "DEBUG: _iodbcdm_driverload-1(odbcinst.ini) DriverUnicodeType=%s\n", iodbcinst_drv_cp==CP_UCS4?"UCS4":(iodbcinst_drv_cp==CP_UTF16?"UTF16":"UTF8"))); } } } genv = (GENV_t *) pdbc->genv; /* This will either load the driver dll or increase its reference count */ hdll = _iodbcdm_dllopen ((char *) path); if (hdll == SQL_NULL_HDLL) { PUSHSYSERR (pdbc->herr, _iodbcdm_dllerror ()); PUSHSQLERR (pdbc->herr, en_IM003); return SQL_ERROR; } /* Set flag if it is safe to unload the driver after use */ if (unload_safe) _iodbcdm_safe_unload (hdll); penv = (ENV_t *) (pdbc->henv); if (penv != NULL) { if (penv->hdll != hdll) { _iodbcdm_driverunload (hdbc, 3); penv->hdll = hdll; } else { /* * this will not unload the driver but only decrease its internal * reference count */ _iodbcdm_dllclose (hdll); } } if (penv == NULL) { /* * find out whether this dll has already been loaded on another * connection */ for (penv = (ENV_t *) genv->henv; penv != NULL; penv = (ENV_t *) penv->next) { if (penv->hdll == hdll) { /* * this will not unload the driver but only decrease its internal * reference count */ _iodbcdm_dllclose (hdll); break; } } if (penv == NULL) /* no connection attaching with this dll */ { int i; /* create a new dll env instance */ penv = (ENV_t *) MEM_ALLOC (sizeof (ENV_t)); if (penv == NULL) { _iodbcdm_dllclose (hdll); PUSHSQLERR (pdbc->herr, en_S1001); return SQL_ERROR; } penv->conv.dm_cp = genv->conv.dm_cp; penv->conv.drv_cp = iodbcinst_drv_cp; /* * Initialize array of ODBC functions */ for (i = 0; i < __LAST_API_FUNCTION__; i++) { #if 1 (penv->dllproc_tab)[i] = SQL_NULL_HPROC; #else (penv->dllproc_tab)[i] = _iodbcdm_getproc(pdbc, i); #endif } pdbc->henv = penv; pdbc->conv = penv->conv; penv->hdll = hdll; /* * If the driver appears not to be thread safe, use a * driver mutex to serialize all calls to this driver */ penv->thread_safe = thread_safe; if (!penv->thread_safe) MUTEX_INIT (penv->drv_lock); penv->unicode_driver = 0; /* * If the driver is Unicode */ pfaux = _iodbcdm_getproc (pdbc, en_ConnectW); if ((pfaux) && (pfaux != (void *)SQLConnectW)) penv->unicode_driver = 1; /* call driver's SQLAllocHandle() or SQLAllocEnv() */ #if (ODBCVER >= 0x0300) hproc = _iodbcdm_getproc (pdbc, en_AllocHandle); if (hproc) { CALL_DRIVER (hdbc, genv, retcode, hproc, (SQL_HANDLE_ENV, SQL_NULL_HANDLE, &(penv->dhenv))); if (SQL_SUCCEEDED (retcode)) { /* * This appears to be an ODBC3 driver * * Try to set the app's requested version */ SQLRETURN save_retcode = retcode; penv->dodbc_ver = SQL_OV_ODBC2; hproc = _iodbcdm_getproc (pdbc, en_SetEnvAttr); if (hproc != SQL_NULL_HPROC) { CALL_DRIVER (hdbc, genv, retcode, hproc, (penv->dhenv, SQL_ATTR_ODBC_VERSION, genv->odbc_ver, 0)); if (retcode == SQL_SUCCESS) penv->dodbc_ver = SQL_OV_ODBC3; } hproc = _iodbcdm_getproc (pdbc, en_GetEnvAttr); if (hproc != SQL_NULL_HPROC) { SQLINTEGER val, len; val = -1; CALL_DRIVER (hdbc, penv, retcode, hproc, (penv->dhenv, SQL_ATTR_DRIVER_UNICODE_TYPE, &val, 0, 0)); if (retcode == SQL_SUCCESS && val !=-1) { DPRINTF ((stderr, "DEBUG: _iodbcdm_driverload(ODBC Driver return=%d)\n", val)); if (val == SQL_DM_CP_UCS4 || val == SQL_DM_CP_UTF16 || val == SQL_DM_CP_UTF8) { switch(val) { case SQL_DM_CP_UTF16: penv->conv.drv_cp = CP_UTF16; pdbc->conv.drv_cp = CP_UTF16; driver_unicode_cp = CP_UTF16; break; case SQL_DM_CP_UTF8: penv->conv.drv_cp = CP_UTF8; pdbc->conv.drv_cp = CP_UTF8; driver_unicode_cp = CP_UTF8; break; default: case SQL_DM_CP_UCS4: penv->conv.drv_cp = CP_UCS4; pdbc->conv.drv_cp = CP_UCS4; driver_unicode_cp = CP_UCS4; break; } DPRINTF ((stderr, "DEBUG: _iodbcdm_driverload(ODBC Driver return DriverUnicodeType=%s)\n", penv->conv.drv_cp==CP_UCS4 ?"UCS4" :(penv->conv.drv_cp==CP_UTF16?"UTF16":"UTF8"))); } else { penv->conv.drv_cp = iodbcinst_drv_cp; pdbc->conv.drv_cp = iodbcinst_drv_cp; DPRINTF ((stderr, "DEBUG: _iodbcdm_driverload(ODBC Driver use DriverUnicodeType=UCS4 (default))\n")); } } } retcode = save_retcode; } } else /* try driver's SQLAllocEnv() */ #endif { hproc = _iodbcdm_getproc (pdbc, en_AllocEnv); if (hproc == SQL_NULL_HPROC) { sqlstat = en_IM004; } else { #if (ODBCVER >= 0x0300) penv->dodbc_ver = SQL_OV_ODBC2; #endif CALL_DRIVER (hdbc, genv, retcode, hproc, (&(penv->dhenv))); } } if (retcode == SQL_ERROR) { sqlstat = en_IM004; } if (sqlstat != en_00000) { _iodbcdm_dllclose (hdll); PUSHSQLERR (pdbc->herr, en_IM004); /* free internal env */ MEM_FREE (penv); pdbc->henv = NULL; return SQL_ERROR; } if (driver_unicode_cp == -1 && penv->unicode_driver && dsn != NULL && *dsn != '\0') { SQLSetConfigMode (ODBC_BOTH_DSN); if ( SQLGetPrivateProfileString ((char *) dsn, "DriverUnicodeType", "", buf, sizeof(buf), "odbc.ini")) { if (STRCASEEQ (buf, "1") || STRCASEEQ (buf, "utf16")) { penv->conv.drv_cp = CP_UTF16; pdbc->conv.drv_cp = CP_UTF16; } else if (STRCASEEQ (buf, "2") || STRCASEEQ (buf, "utf8")) { penv->conv.drv_cp = CP_UTF8; pdbc->conv.drv_cp = CP_UTF8; } else if (STRCASEEQ (buf, "3") || STRCASEEQ (buf, "ucs4")) { penv->conv.drv_cp = CP_UCS4; pdbc->conv.drv_cp = CP_UCS4; } DPRINTF ((stderr, "DEBUG: _iodbcdm_driverload(DSN attribute) DriverUnicodeType=%s\n", penv->conv.drv_cp==CP_UCS4 ?"UCS4":(penv->conv.drv_cp==CP_UTF16?"UTF16":"UTF8"))); } } /* insert into dll env list */ penv->next = (ENV_t *) genv->henv; genv->henv = penv; /* initiate this new env entry */ penv->refcount = 0; /* we will increase it after * driver's SQLAllocConnect() * success */ } else /* penv != NULL */ { pdbc->conv.drv_cp = penv->conv.drv_cp; #if (ODBCVER >= 0x0300) hproc = _iodbcdm_getproc (pdbc, en_GetEnvAttr); if (hproc != SQL_NULL_HPROC) { SQLINTEGER val; val = -1; CALL_DRIVER (hdbc, penv, retcode, hproc, (penv->dhenv, SQL_ATTR_DRIVER_UNICODE_TYPE, &val, 0, 0)); if (retcode == SQL_SUCCESS && val !=-1) { if (val == SQL_DM_CP_UCS4 || val == SQL_DM_CP_UTF16 || val == SQL_DM_CP_UTF8) { switch(val) { case SQL_DM_CP_UTF16: driver_unicode_cp = CP_UTF16; break; case SQL_DM_CP_UTF8: driver_unicode_cp = CP_UTF8; break; default: case SQL_DM_CP_UCS4: driver_unicode_cp = CP_UCS4; break; } } } } #endif } pdbc->henv = penv; if (pdbc->dhdbc == SQL_NULL_HDBC) { #if (ODBCVER >= 0x0300) hproc = _iodbcdm_getproc (pdbc, en_AllocHandle); if (hproc) { CALL_DRIVER (hdbc, genv, retcode, hproc, (SQL_HANDLE_DBC, penv->dhenv, &(pdbc->dhdbc))); } else #endif { hproc = _iodbcdm_getproc (pdbc, en_AllocConnect); if (hproc == SQL_NULL_HPROC) { sqlstat = en_IM005; } else { CALL_DRIVER (hdbc, genv, retcode, hproc, (penv->dhenv, &(pdbc->dhdbc))); } } if (retcode == SQL_ERROR) { sqlstat = en_IM005; } if (sqlstat != en_00000) { _iodbcdm_driverunload (hdbc, 3); pdbc->dhdbc = SQL_NULL_HDBC; PUSHSQLERR (pdbc->herr, en_IM005); return SQL_ERROR; } } pdbc->henv = penv; penv->refcount++; /* bookkeeping reference count on this driver */ } else /*penv != NULL */ { pdbc->conv.drv_cp = penv->conv.drv_cp; #if (ODBCVER >= 0x0300) hproc = _iodbcdm_getproc (pdbc, en_GetEnvAttr); if (hproc != SQL_NULL_HPROC) { SQLINTEGER val; val = -1; CALL_DRIVER (hdbc, penv, retcode, hproc, (penv->dhenv, SQL_ATTR_DRIVER_UNICODE_TYPE, &val, 0, 0)); if (retcode == SQL_SUCCESS && val !=-1) { if (val == SQL_DM_CP_UCS4 || val == SQL_DM_CP_UTF16 || val == SQL_DM_CP_UTF8) { switch(val) { case SQL_DM_CP_UTF16: driver_unicode_cp = CP_UTF16; break; case SQL_DM_CP_UTF8: driver_unicode_cp = CP_UTF8; break; default: case SQL_DM_CP_UCS4: driver_unicode_cp = CP_UCS4; break; } } } } #endif } /* driver's login timeout option must been set before * its SQLConnect() call */ if (pdbc->login_timeout != 0UL) { retcode = _iodbcdm_SetConnectOption_init (hdbc, SQL_LOGIN_TIMEOUT, pdbc->login_timeout, waMode); if (retcode == SQL_ERROR) { PUSHSQLERR (pdbc->herr, en_IM006); return SQL_SUCCESS_WITH_INFO; } } /* * Now set the driver specific options we saved earlier */ if (pdbc->drvopt != NULL) { DRVOPT *popt; for (popt = pdbc->drvopt; popt != NULL; popt = popt->next) { retcode = _iodbcdm_SetConnectOption_init (hdbc, popt->Option, popt->Param, popt->waMode); if (retcode == SQL_ERROR) { PUSHSQLERR (pdbc->herr, en_IM006); return SQL_SUCCESS_WITH_INFO; } } } wchar_id = penv->conv.dm_cp; retcode = _iodbcdm_SetConnectAttr_init (hdbc, SQL_ATTR_APP_WCHAR_TYPE, wchar_id); DPRINTF ((stderr, "DEBUG: _iodbcdm_driverload(set ODBC Driver WCHAR_TYPE=%d) retcode=%d\n", wchar_id, retcode)); if (retcode == SQL_SUCCESS) { penv->conv.drv_cp = wchar_id; pdbc->conv.drv_cp = wchar_id; DPRINTF ((stderr, "DEBUG: _iodbcdm_driverload(set ODBC Driver WCHAR_TYPE=%d) %s\n", penv->conv.drv_cp, penv->conv.drv_cp==CP_UCS4 ?"UCS4" :(penv->conv.drv_cp==CP_UTF16?"UTF16":"UTF8"))); } else if (driver_unicode_cp != -1) { wchar_id = driver_unicode_cp; retcode = _iodbcdm_SetConnectAttr_init (hdbc, SQL_ATTR_APP_WCHAR_TYPE, wchar_id); DPRINTF ((stderr, "DEBUG: _iodbcdm_driverload(set ODBC Driver WCHAR_TYPE=%d) retcode=%d\n", wchar_id, retcode)); if (retcode == SQL_SUCCESS) { penv->conv.drv_cp = wchar_id; pdbc->conv.drv_cp = wchar_id; DPRINTF ((stderr, "DEBUG: _iodbcdm_driverload(set ODBC Driver WCHAR_TYPE=%d) %s\n", penv->conv.drv_cp, penv->conv.drv_cp==CP_UCS4 ?"UCS4" :(penv->conv.drv_cp==CP_UTF16?"UTF16":"UTF8"))); } } pdbc->cp_timeout = cp_timeout; MEM_FREE (pdbc->cp_probe); pdbc->cp_probe = strdup (cp_probe); return SQL_SUCCESS; } /* - Call driver's SQLFreeConnect() * - Call driver's SQLFreeEnv() ( for the last reference only) * - Unload the share library( or decrease its reference * count if it is not the last reference ) * - decrease bookkeeping reference count * - state transition to allocated */ SQLRETURN _iodbcdm_driverunload (HDBC hdbc, int ver) { CONN (pdbc, hdbc); ENVR (penv, pdbc->henv); GENV (genv, pdbc->genv); ENV_t *tpenv; HPROC hproc2, hproc3; SQLRETURN retcode = SQL_SUCCESS; if (!IS_VALID_HDBC (pdbc)) { return SQL_INVALID_HANDLE; } if (penv == NULL || penv->hdll == SQL_NULL_HDLL || pdbc->dhdbc == SQL_NULL_HDBC) { return SQL_SUCCESS; } /* * When calling from an ODBC 2.x application, we favor the ODBC 2.x call * in the driver if the driver implements both */ hproc2 = _iodbcdm_getproc (pdbc, en_FreeConnect); #if (ODBCVER >= 0x0300) hproc3 = _iodbcdm_getproc (pdbc, en_FreeHandle); if (ver == 3 && hproc2 != SQL_NULL_HPROC && hproc3 != SQL_NULL_HPROC) hproc2 = SQL_NULL_HPROC; #else hproc3 = SQL_NULL_HPROC; #endif if (hproc2 != SQL_NULL_HPROC) { CALL_DRIVER (hdbc, pdbc, retcode, hproc2, (pdbc->dhdbc)); pdbc->dhdbc = SQL_NULL_HDBC; } #if (ODBCVER >= 0x0300) else if (hproc3 != SQL_NULL_HPROC) { CALL_DRIVER (hdbc, pdbc, retcode, hproc3, (SQL_HANDLE_DBC, pdbc->dhdbc)); } #endif penv->refcount--; if (!penv->refcount) /* no other connections still attaching with this driver */ { /* * When calling from an ODBC 2.x application, we favor the ODBC 2.x call * in the driver if the driver implements both */ hproc2 = _iodbcdm_getproc (pdbc, en_FreeEnv); #if (ODBCVER >= 0x0300) hproc3 = _iodbcdm_getproc (pdbc, en_FreeHandle); if (ver == 3 && hproc2 != SQL_NULL_HPROC && hproc3 != SQL_NULL_HPROC) hproc2 = SQL_NULL_HPROC; #else hproc3 = SQL_NULL_HPROC; #endif if (hproc2 != SQL_NULL_HPROC) { CALL_DRIVER (hdbc, genv, retcode, hproc2, (penv->dhenv)); penv->dhenv = SQL_NULL_HENV; } #if (ODBCVER >= 0x0300) else if (hproc3 != SQL_NULL_HPROC) { CALL_DRIVER (hdbc, genv, retcode, hproc3, (SQL_HANDLE_ENV, penv->dhenv)); } #endif _iodbcdm_dllclose (penv->hdll); penv->hdll = SQL_NULL_HDLL; for (tpenv = (ENV_t *) genv->henv; tpenv != NULL; tpenv = (ENV_t *) tpenv->next) { if (tpenv == penv) { genv->henv = penv->next; break; } if (tpenv->next == penv) { tpenv->next = penv->next; break; } } /* free internal env */ MEM_FREE (penv); pdbc->henv = NULL; } /* pdbc->henv = SQL_NULL_HENV; */ pdbc->hstmt = SQL_NULL_HSTMT; /* pdbc->herr = SQL_NULL_HERR; -- delay to DM's SQLFreeConnect() */ pdbc->dhdbc = SQL_NULL_HDBC; pdbc->state = en_dbc_allocated; /* set connect options to default values */ /********** pdbc->access_mode = SQL_MODE_DEFAULT; pdbc->autocommit = SQL_AUTOCOMMIT_DEFAULT; pdbc->login_timeout = 0UL; **********/ pdbc->odbc_cursors = SQL_CUR_DEFAULT; pdbc->packet_size = 0UL; pdbc->quiet_mode = (UDWORD) NULL; pdbc->txn_isolation = SQL_TXN_READ_UNCOMMITTED; #if (ODBCVER >= 0x0300) if (pdbc->cp_probe != NULL) { MEM_FREE (pdbc->cp_probe); pdbc->cp_probe = NULL; } if (pdbc->cp_dsn != NULL) { MEM_FREE (pdbc->cp_dsn); pdbc->cp_dsn = NULL; } if (pdbc->cp_uid != NULL) { MEM_FREE (pdbc->cp_uid); pdbc->cp_uid = NULL; } if (pdbc->cp_pwd != NULL) { MEM_FREE (pdbc->cp_pwd); pdbc->cp_pwd = NULL; } if (pdbc->cp_connstr != NULL) { MEM_FREE (pdbc->cp_connstr); pdbc->cp_connstr = NULL; } #endif if (pdbc->current_qualifier != NULL) { MEM_FREE (pdbc->current_qualifier); pdbc->current_qualifier = NULL; } return SQL_SUCCESS; } static SQLRETURN _iodbcdm_dbcdelayset (HDBC hdbc, UCHAR waMode) { CONN (pdbc, hdbc); SQLRETURN retcode = SQL_SUCCESS; SQLRETURN ret; if (pdbc->access_mode != SQL_MODE_DEFAULT) { ret = _iodbcdm_SetConnectOption_init (hdbc, SQL_ACCESS_MODE, pdbc->access_mode, waMode); retcode |= ret; } if (pdbc->autocommit != SQL_AUTOCOMMIT_DEFAULT) { ret = _iodbcdm_SetConnectOption_init (hdbc, SQL_AUTOCOMMIT, pdbc->autocommit, waMode); retcode |= ret; } if (pdbc->current_qualifier != NULL) { ret = _iodbcdm_SetConnectOption_init (hdbc, SQL_CURRENT_QUALIFIER, (SQLULEN) pdbc->current_qualifier, pdbc->current_qualifier_WA); retcode |= ret; } if (pdbc->packet_size != 0UL) { ret = _iodbcdm_SetConnectOption_init (hdbc, SQL_PACKET_SIZE, pdbc->packet_size, waMode); retcode |= ret; } if (pdbc->quiet_mode != (UDWORD) NULL) { ret = _iodbcdm_SetConnectOption_init (hdbc, SQL_QUIET_MODE, pdbc->quiet_mode, waMode); retcode |= ret; } if (pdbc->txn_isolation != SQL_TXN_READ_UNCOMMITTED) { ret = _iodbcdm_SetConnectOption_init (hdbc, SQL_TXN_ISOLATION, pdbc->txn_isolation, waMode); retcode |= ret; } /* check error code for driver's SQLSetConnectOption() call */ if (!SQL_SUCCEEDED (retcode)) { PUSHSQLERR (pdbc->herr, en_IM006); retcode = SQL_ERROR; } /* get cursor behavior on transaction commit or rollback */ ret = _iodbcdm_getInfo_init (hdbc, SQL_CURSOR_COMMIT_BEHAVIOR, (PTR) & (pdbc->cb_commit), sizeof (pdbc->cb_commit), NULL, waMode); retcode |= ret; ret = _iodbcdm_getInfo_init (hdbc, SQL_CURSOR_ROLLBACK_BEHAVIOR, (PTR) & (pdbc->cb_rollback), sizeof (pdbc->cb_rollback), NULL, waMode); retcode |= ret; if (retcode != SQL_SUCCESS && retcode != SQL_SUCCESS_WITH_INFO) { return SQL_ERROR; } return retcode; } static SQLRETURN _iodbcdm_con_settracing (HDBC hdbc, SQLCHAR *dsn, int dsnlen, UCHAR waMode) { SQLUINTEGER trace = SQL_OPT_TRACE_OFF; char buf[1024]; /* Unused */ hdbc=hdbc; dsnlen=dsnlen; waMode = waMode; /* Get the TraceFile keyword value from the ODBC section */ SQLSetConfigMode (ODBC_BOTH_DSN); if ((SQLGetPrivateProfileString ((char *) dsn, "TraceFile", "", buf, sizeof (buf), "odbc.ini") == 0 || !buf[0])) STRCPY (buf, SQL_OPT_TRACE_FILE_DEFAULT); trace_set_filename (buf); /* UTF-8 */ /* Get the Trace keyword value from the ODBC section */ SQLSetConfigMode (ODBC_BOTH_DSN); if (SQLGetPrivateProfileString ((char *) dsn, "Trace", "", buf, sizeof (buf), "odbc.ini") && (STRCASEEQ (buf, "on") || STRCASEEQ (buf, "yes") || STRCASEEQ (buf, "1"))) { trace = SQL_OPT_TRACE_ON; } /* Set the trace flag now */ if (trace == SQL_OPT_TRACE_ON) trace_start (); return SQL_SUCCESS; } #define CATBUF(buf, str, buf_sz) \ do { \ if (_iodbcdm_strlcat (buf, str, buf_sz) >= buf_sz) \ return -1; \ } while (0) /* * Merge the contents of .dsn file into config */ static int _iodbcdm_cfg_merge_filedsn (PCONFIG pconfig, const char *filedsn, char *buf, size_t buf_sz, int wide, DM_CONV *conv) { BOOL override; /* TRUE if params from conn str override params from .dsn file */ WORD len; char *p, *p_next; char entries[1024]; char value[1024]; char drv_value[1024] = {"\0"}; char *tmp = NULL; int rc = 0; /* identify params precedence */ if (SQLReadFileDSN (filedsn, "ODBC", "DRIVER", value, sizeof (value), &len) && len > 0) { /* if DRIVER is the same, then conn str params have precedence */ if (_iodbcdm_cfg_find (pconfig, "ODBC", "DRIVER") == 0 && !strcasecmp (value, pconfig->value)) override = TRUE; else override = FALSE; } else override = TRUE; /* get list of entries in .dsn file */ if (!SQLReadFileDSN (filedsn, "ODBC", NULL, entries, sizeof (entries), &len)) return -1; /* ignore DSN from connection string */ _iodbcdm_cfg_write (pconfig, "ODBC", "DSN", NULL); /* add params from the .dsn file */ for (p = entries; *p != '\0'; p = p_next) { /* get next entry */ p_next = strchr (p, ';'); if (p_next) *p_next++ = '\0'; if ((override || !strcasecmp (p, "DRIVER")) && _iodbcdm_cfg_find (pconfig, "ODBC", p) == 0) { /* skip param because it is specified in connection string */ continue; } if (!SQLReadFileDSN (filedsn, "ODBC", p, value, sizeof(value), &len)) return -1; _iodbcdm_cfg_write (pconfig, "ODBC", p, value); } /* remove FILEDSN from new config */ _iodbcdm_cfg_write (pconfig, "ODBC", "FILEDSN", NULL); if (_iodbcdm_cfg_find (pconfig, "ODBC", "DRIVER") == 0) strncpy(drv_value, pconfig->value, sizeof(drv_value)); /* remove DRIVER from new config */ _iodbcdm_cfg_write (pconfig, "ODBC", "DRIVER", NULL); /* construct new connection string */ if ((rc =_iodbcdm_cfg_to_string (pconfig, "ODBC", buf, buf_sz)) == -1) goto done; tmp = strdup(buf); strncpy(buf, "DRIVER=", buf_sz); CATBUF(buf, drv_value, buf_sz); CATBUF(buf, ";", buf_sz); CATBUF(buf, tmp, buf_sz); MEM_FREE(tmp); if (wide) { SQLWCHAR *_in = DM_U8toW (conv, (SQLCHAR *)buf, SQL_NTS); if (_in == NULL) { rc = -1; goto done; } DM_WCSNCPY (conv, buf, _in, buf_sz / DM_WCHARSIZE(conv)); MEM_FREE (_in); } rc = 0; done: if (drv_value[0]) _iodbcdm_cfg_write (pconfig, "ODBC", "DRIVER", drv_value); return rc; } /* * Save connection string into the file */ static int _iodbcdm_cfg_savefile (const char *savefile, void *conn_str, int wide, DM_CONV *conv) { int ret = 0; PCONFIG pconfig; BOOL atsection = FALSE; /* parse connection string into pconfig */ if (_iodbcdm_cfg_init_str (&pconfig, conn_str, SQL_NTS, wide, conv) == -1) return -1; /* don't save PWD, FILEDSN and SAVEFILE */ _iodbcdm_cfg_write (pconfig, "ODBC", "PWD", NULL); _iodbcdm_cfg_write (pconfig, "ODBC", "FILEDSN", NULL); _iodbcdm_cfg_write (pconfig, "ODBC", "SAVEFILE", NULL); _iodbcdm_cfg_write (pconfig, "ODBC", "DSN", NULL); /* save the file */ SQLWriteFileDSN (savefile, "ODBC", "DSN", NULL); _iodbcdm_cfg_rewind (pconfig); while (_iodbcdm_cfg_nextentry (pconfig) == 0) { if (atsection) { if (_iodbcdm_cfg_section (pconfig)) { /* found next section -- we're done */ break; } else if (_iodbcdm_cfg_define (pconfig)) { if (!SQLWriteFileDSN (savefile, "ODBC", pconfig->id, pconfig->value)) { ret = -1; break; } } } else if (_iodbcdm_cfg_section (pconfig) && !strcasecmp (pconfig->section, "ODBC")) atsection = TRUE; } _iodbcdm_cfg_done (pconfig); return ret; } static SQLRETURN SQL_API SQLConnect_Internal (SQLHDBC hdbc, SQLPOINTER szDSN, SQLSMALLINT cbDSN, SQLPOINTER szUID, SQLSMALLINT cbUID, SQLPOINTER szAuthStr, SQLSMALLINT cbAuthStr, SQLCHAR waMode) { CONN (pdbc, hdbc); ENVR (penv, NULL); #if (ODBCVER >= 0x300) GENV (genv, NULL); #endif SQLRETURN retcode = SQL_SUCCESS; SQLRETURN setopterr = SQL_SUCCESS; /* MS SDK Guide specifies driver path can't longer than 255. */ char driver[1024] = { '\0' }; char buf[256]; HPROC hproc = SQL_NULL_HPROC; SWORD thread_safe; SWORD unload_safe; void * _szDSN = NULL; void * _szUID = NULL; void * _szAuthStr = NULL; SQLCHAR *_dsn = (SQLCHAR *) szDSN; SQLSMALLINT _dsn_len = cbDSN; CONV_DIRECT conv_direct = CD_NONE; DM_CONV *conv = NULL; IODBC_CHARSET drv_cp = CP_DEF; /* check arguments */ if ((cbDSN < 0 && cbDSN != SQL_NTS) || (cbUID < 0 && cbUID != SQL_NTS) || (cbAuthStr < 0 && cbAuthStr != SQL_NTS) || (cbDSN > SQL_MAX_DSN_LENGTH)) { PUSHSQLERR (pdbc->herr, en_S1090); RETURN (SQL_ERROR); } if (szDSN == NULL || cbDSN == 0) { PUSHSQLERR (pdbc->herr, en_IM002); RETURN (SQL_ERROR); } /* check state */ if (pdbc->state != en_dbc_allocated) { PUSHSQLERR (pdbc->herr, en_08002); RETURN (SQL_ERROR); } conv = (penv != SQL_NULL_HENV) ? &penv->conv : &((GENV_t *) pdbc->genv)->conv; if (waMode == 'W') { _szDSN = (void *) DM_WtoU8(conv, szDSN, cbDSN); _dsn = (SQLCHAR *) _szDSN; _dsn_len = SQL_NTS; if (_dsn == NULL) { PUSHSQLERR (pdbc->herr, en_S1001); RETURN (SQL_ERROR); } } /* Get the config mode */ if (_iodbcdm_con_settracing (pdbc, _dsn, _dsn_len, waMode) == SQL_ERROR) RETURN (SQL_ERROR); #if (ODBCVER >= 0x300) genv = (GENV_t *) pdbc->genv; if (genv->connection_pooling != SQL_CP_OFF) { char *_uid = szUID; char *_pwd = szAuthStr; /* * _dsn is already an UTF8 string so * need to convert to UTF8 only szUID and szAuthStr */ if (waMode == 'W') { if (szUID != NULL) { _szUID = (void *) DM_WtoU8(conv, (SQLWCHAR *) szUID, cbUID); if (_szUID == NULL) { PUSHSQLERR (pdbc->herr, en_S1001); RETURN (SQL_ERROR); } } if (szAuthStr != NULL) { _szAuthStr = (void *) DM_WtoU8(conv, (SQLWCHAR *) szAuthStr, cbAuthStr); if (_szAuthStr == NULL) { PUSHSQLERR (pdbc->herr, en_S1001); RETURN (SQL_ERROR); } } _uid = _szUID; _pwd = _szAuthStr; } retcode = _iodbcdm_pool_get_conn (pdbc, (char *)_dsn, _uid, _pwd, NULL); if (SQL_SUCCEEDED (retcode)) { /* * Got connection from the pool */ /* state transition */ pdbc->state = en_dbc_connected; RETURN (retcode); } if (pdbc->cp_pdbc != NULL) { /* * Dead connection was taken from pool */ if (pdbc->cp_pdbc->cp_retry_wait != 0) { /* * Retry Wait timeout has not expired yet */ PUSHSQLERR (pdbc->herr, en_08004); RETURN (SQL_ERROR); } /* * Free connection parameters. */ if (waMode == 'W') { if (_szUID != NULL) { MEM_FREE (_szUID); _szUID = NULL; } if (_szAuthStr != NULL) { MEM_FREE (_szAuthStr); _szAuthStr = NULL; } } } else { /* * Connection was not found in the pool -- * save connection parameters */ if (pdbc->cp_dsn != NULL) MEM_FREE (pdbc->cp_dsn); if (pdbc->cp_uid != NULL) MEM_FREE (pdbc->cp_uid); if (pdbc->cp_pwd != NULL) MEM_FREE (pdbc->cp_pwd); if (waMode == 'W') { pdbc->cp_dsn = _szDSN; _szDSN = NULL; pdbc->cp_uid = _szUID; _szUID = NULL; pdbc->cp_pwd = _szAuthStr; _szAuthStr = NULL; } else { pdbc->cp_dsn = strdup ((char *)_dsn); if (pdbc->cp_dsn == NULL) { PUSHSQLERR (pdbc->herr, en_S1001); RETURN (SQL_ERROR); } if (_uid != NULL) { pdbc->cp_uid = strdup (_uid); if (pdbc->cp_uid == NULL) { PUSHSQLERR (pdbc->herr, en_S1001); RETURN (SQL_ERROR); } } if (_pwd != NULL) { pdbc->cp_pwd = strdup (_pwd); if (pdbc->cp_pwd == NULL) { PUSHSQLERR (pdbc->herr, en_S1001); RETURN (SQL_ERROR); } } } } } #endif /* (ODBCVER >= 0x300) */ /* * Check whether driver is thread safe */ thread_safe = 1; /* Assume driver is thread safe */ SQLSetConfigMode (ODBC_BOTH_DSN); if ( SQLGetPrivateProfileString ((char *) _dsn, "ThreadManager", "", buf, sizeof(buf), "odbc.ini") && (STRCASEEQ (buf, "on") || STRCASEEQ (buf, "1"))) { thread_safe = 0; /* Driver needs a thread manager */ } /* * Check if it is safe to unload the driver */ unload_safe = 0; /* Assume driver is not unload safe */ SQLSetConfigMode (ODBC_BOTH_DSN); if ( SQLGetPrivateProfileString ((char *) _dsn, "UnloadSafe", "", buf, sizeof(buf), "odbc.ini") && (STRCASEEQ (buf, "on") || STRCASEEQ (buf, "1"))) { unload_safe = 1; } /* * Get the name of the driver module and load it */ SQLSetConfigMode (ODBC_BOTH_DSN); if ( SQLGetPrivateProfileString ((char *) _dsn, "Driver", "", (char *) driver, sizeof(driver), "odbc.ini") == 0) /* No specified or default dsn section or * no driver specification in this dsn section */ { PUSHSQLERR (pdbc->herr, en_IM002); RETURN (SQL_ERROR); } retcode = _iodbcdm_driverload ((char *)_dsn, (char *)driver, pdbc, thread_safe, unload_safe, drv_cp, waMode); MEM_FREE(_szDSN); _szDSN = NULL; switch (retcode) { case SQL_SUCCESS: break; case SQL_SUCCESS_WITH_INFO: #if 0 /* * Unsuccessful in calling driver's SQLSetConnectOption() to set * login timeout. */ setopterr = SQL_ERROR; #endif break; default: return retcode; } penv = (ENV_t *) pdbc->henv; conv = &pdbc->conv; if (penv->unicode_driver && waMode != 'W') conv_direct = CD_A2W; else if (!penv->unicode_driver && waMode == 'W') conv_direct = CD_W2A; else if (waMode == 'W' && conv->dm_cp!=conv->drv_cp) conv_direct = CD_W2W; if (conv_direct != CD_NONE) { _szDSN = conv_text_m2d (conv, szDSN, cbDSN, conv_direct); _szUID = conv_text_m2d (conv, szUID, cbUID, conv_direct); _szAuthStr = conv_text_m2d (conv, szAuthStr, cbAuthStr, conv_direct); cbDSN = SQL_NTS; cbUID = SQL_NTS; cbAuthStr = SQL_NTS; szDSN = _szDSN; szUID = _szUID; szAuthStr = _szAuthStr; } ODBC_UNLOCK (); CALL_UDRIVER(hdbc, pdbc, retcode, hproc, penv->unicode_driver, en_Connect, ( pdbc->dhdbc, szDSN, cbDSN, szUID, cbUID, szAuthStr, cbAuthStr)); ODBC_LOCK (); if (hproc == SQL_NULL_HPROC) { _iodbcdm_driverunload (pdbc, 3); PUSHSQLERR (pdbc->herr, en_IM001); RETURN (SQL_ERROR); } if (!SQL_SUCCEEDED (retcode)) { /* not unload driver for retrieve error * message from driver */ /********* _iodbcdm_driverunload( hdbc , 3); **********/ RETURN (retcode); } /* state transition */ pdbc->state = en_dbc_connected; /* do delayed option setting */ setopterr |= _iodbcdm_dbcdelayset (pdbc, waMode); if (setopterr != SQL_SUCCESS) retcode = SQL_SUCCESS_WITH_INFO; end: #if (ODBCVER >= 0x300) if (!SQL_SUCCEEDED (retcode) && pdbc->cp_pdbc != NULL) { int rc; /* * Dead connection was taken from the pool * but reconnection attempt has failed: * set cp_retry_wait time and return connection to the pool. */ _iodbcdm_pool_set_retry_wait (pdbc); rc = _iodbcdm_pool_put_conn (pdbc); assert (rc == 0); } #endif if (_szDSN != NULL) MEM_FREE(_szDSN); if (_szUID != NULL) MEM_FREE (_szUID); if (_szAuthStr != NULL) MEM_FREE (_szAuthStr); return retcode; } SQLRETURN SQL_API SQLConnect ( SQLHDBC hdbc, SQLCHAR * szDSN, SQLSMALLINT cbDSN, SQLCHAR * szUID, SQLSMALLINT cbUID, SQLCHAR * szAuthStr, SQLSMALLINT cbAuthStr) { ENTER_HDBC (hdbc, 1, trace_SQLConnect (TRACE_ENTER, hdbc, szDSN, cbDSN, szUID, cbUID, szAuthStr, cbAuthStr)); retcode = SQLConnect_Internal ( hdbc, szDSN, cbDSN, szUID, cbUID, szAuthStr, cbAuthStr, 'A'); LEAVE_HDBC (hdbc, 1, trace_SQLConnect (TRACE_LEAVE, hdbc, szDSN, cbDSN, szUID, cbUID, szAuthStr, cbAuthStr)); } SQLRETURN SQL_API SQLConnectA ( SQLHDBC hdbc, SQLCHAR * szDSN, SQLSMALLINT cbDSN, SQLCHAR * szUID, SQLSMALLINT cbUID, SQLCHAR * szAuthStr, SQLSMALLINT cbAuthStr) { ENTER_HDBC (hdbc, 1, trace_SQLConnect (TRACE_ENTER, hdbc, szDSN, cbDSN, szUID, cbUID, szAuthStr, cbAuthStr)); retcode = SQLConnect_Internal ( hdbc, szDSN, cbDSN, szUID, cbUID, szAuthStr, cbAuthStr, 'A'); LEAVE_HDBC (hdbc, 1, trace_SQLConnect (TRACE_LEAVE, hdbc, szDSN, cbDSN, szUID, cbUID, szAuthStr, cbAuthStr)); } SQLRETURN SQL_API SQLConnectW (SQLHDBC hdbc, SQLWCHAR * szDSN, SQLSMALLINT cbDSN, SQLWCHAR * szUID, SQLSMALLINT cbUID, SQLWCHAR * szAuthStr, SQLSMALLINT cbAuthStr) { ENTER_HDBC (hdbc, 1, trace_SQLConnectW (TRACE_ENTER, hdbc, szDSN, cbDSN, szUID, cbUID, szAuthStr, cbAuthStr)); retcode = SQLConnect_Internal ( hdbc, szDSN, cbDSN, szUID, cbUID, szAuthStr, cbAuthStr, 'W'); LEAVE_HDBC (hdbc, 1, trace_SQLConnectW (TRACE_LEAVE, hdbc, szDSN, cbDSN, szUID, cbUID, szAuthStr, cbAuthStr)); } SQLRETURN SQL_API SQLDriverConnect_Internal ( SQLHDBC hdbc, SQLHWND hwnd, SQLPOINTER szConnStrIn, SQLSMALLINT cbConnStrIn, SQLPOINTER szConnStrOut, SQLSMALLINT cbConnStrOutMax, SQLPOINTER pcbConnStrOut, SQLUSMALLINT fDriverCompletion, SQLCHAR waMode) { CONN (pdbc, hdbc); ENVR (penv, NULL); #if (ODBCVER >= 0x300) GENV (genv, NULL); #endif HDLL hdll = NULL; SQLCHAR *drv = NULL; SQLCHAR drvbuf[1024]; SQLCHAR *dsn = NULL; SQLCHAR dsnbuf[SQL_MAX_DSN_LENGTH + 1]; SQLWCHAR prov[2048]; SQLWCHAR StrInTmp[2048]; SWORD thread_safe; SWORD unload_safe; SQLCHAR buf[1024]; HPROC hproc = SQL_NULL_HPROC; void *_ConnStrIn = NULL; void *_ConnStrOut = NULL; void *connStrOut = szConnStrOut; void *connStrIn = szConnStrIn; SQLSMALLINT connStrOutMax = cbConnStrOutMax; SQLWCHAR connStrOut_buf[2048]; SQLWCHAR connStrIn_buf[2048]; UWORD config; PCONFIG pconfig = NULL; BOOL bCallDmDlg = FALSE; #if defined (__APPLE__) && !defined (NO_FRAMEWORKS) CFBundleRef bundle = NULL; CFBundleRef bundle_dll = NULL; CFURLRef liburl = NULL; #endif SQLCHAR *filedsn = NULL; SQLCHAR *savefile = NULL; CONV_DIRECT conv_direct = CD_NONE; DM_CONV *conv = NULL; IODBC_CHARSET drv_cp = CP_DEF; HPROC dialproc = SQL_NULL_HPROC; sqlstcode_t sqlstat = en_00000; SQLRETURN retcode = SQL_SUCCESS; SQLRETURN setopterr = SQL_SUCCESS; /* check arguments */ if ((cbConnStrIn < 0 && cbConnStrIn != SQL_NTS) || (cbConnStrOutMax < 0 && cbConnStrOutMax != SQL_NTS)) { PUSHSQLERR (pdbc->herr, en_S1090); RETURN (SQL_ERROR); } /* check state */ if (pdbc->state != en_dbc_allocated) { PUSHSQLERR (pdbc->herr, en_08002); RETURN (SQL_ERROR); } /* Save config mode */ SQLGetConfigMode (&config); conv = (penv != SQL_NULL_HENV) ? &penv->conv : &((GENV_t *) pdbc->genv)->conv; if (_iodbcdm_cfg_init_str (&pconfig, connStrIn, cbConnStrIn, waMode == 'W', conv) == -1) { PUSHSQLERR (pdbc->herr, en_HY001); RETURN (SQL_ERROR); } assert (_iodbcdm_cfg_valid(pconfig)); /* lookup and save original SAVEFILE value */ if (_iodbcdm_cfg_find (pconfig, "ODBC", "SAVEFILE") == 0) { savefile = (SQLCHAR *)strdup (pconfig->value); if (savefile == NULL) { PUSHSQLERR (pdbc->herr, en_HY001); RETURN (SQL_ERROR); } } #if (ODBCVER >= 0x300) genv = (GENV_t *) pdbc->genv; /* * Try to find pooled connection. * Pooling is disabled if SAVEFILE is present. */ if (genv->connection_pooling != SQL_CP_OFF && savefile == NULL) { char *_connstr = connStrIn; if (fDriverCompletion != SQL_DRIVER_NOPROMPT) { PUSHSQLERR (pdbc->herr, en_HY110); RETURN (SQL_ERROR); } if (waMode == 'W') { _ConnStrIn = DM_WtoU8(conv, (SQLWCHAR *) connStrIn, cbConnStrIn); if (_ConnStrIn == NULL) { PUSHSQLERR (pdbc->herr, en_HY001); RETURN (SQL_ERROR); } _connstr = _ConnStrIn; } retcode = _iodbcdm_pool_get_conn (pdbc, NULL, NULL, NULL, _connstr); if (SQL_SUCCEEDED (retcode)) { /* * Got connection from the pool */ /* copy out connection string */ if (szConnStrOut != NULL) { if (waMode == 'W') { DM_WCSNCPY (conv, szConnStrOut, szConnStrIn, cbConnStrOutMax); if (pcbConnStrOut != NULL) { if (conv && conv->dm_cp == CP_UTF8) *(SQLSMALLINT *) pcbConnStrOut = strlen ((char *) szConnStrOut); else *(SQLSMALLINT *) pcbConnStrOut = DM_WCSLEN (conv, szConnStrOut); } } else { _iodbcdm_strlcpy (szConnStrOut, szConnStrIn, cbConnStrOutMax); if (pcbConnStrOut != NULL) *(SQLSMALLINT *) pcbConnStrOut = strlen (szConnStrOut); } } /* state transition */ pdbc->state = en_dbc_connected; RETURN (retcode); } if (pdbc->cp_pdbc != NULL) { /* * Dead connection was taken from pool */ if (pdbc->cp_pdbc->cp_retry_wait != 0) { /* * Retry Wait timeout has not expired yet */ PUSHSQLERR (pdbc->herr, en_08004); RETURN (SQL_ERROR); } /* * Free connection parameters. */ if (waMode == 'W') { if (_ConnStrIn != NULL) { MEM_FREE (_ConnStrIn); _ConnStrIn = NULL; } } } else { /* * Connection was not found in the pool -- * save connection parameters */ if (pdbc->cp_connstr != NULL) MEM_FREE (pdbc->cp_connstr); if (waMode == 'W') { pdbc->cp_connstr = _ConnStrIn; _ConnStrIn = NULL; } else { pdbc->cp_connstr = strdup (_connstr); if (pdbc->cp_connstr == NULL) { PUSHSQLERR (pdbc->herr, en_HY001); RETURN (SQL_ERROR); } } } } #endif /* (ODBCVER >= 0x300) */ /* always get (even if not requested) out connection string for SAVEFILE */ if (!connStrOut) { connStrOut = connStrOut_buf; connStrOutMax = sizeof(connStrOut_buf); } /* now look for DSN or FILEDSN, whichever comes first */ _iodbcdm_cfg_rewind (pconfig); while (_iodbcdm_cfg_nextentry (pconfig) == 0) { if (!_iodbcdm_cfg_define (pconfig)) continue; if (!strcasecmp(pconfig->id, "DSN")) { /* not a file dsn */ break; } else if (!strcasecmp(pconfig->id, "FILEDSN")) { /* file dsn */ filedsn = (SQLCHAR *)strdup (pconfig->value); if (filedsn == NULL) { PUSHSQLERR (pdbc->herr, en_HY001); RETURN (SQL_ERROR); } break; } } /* get connect parameters from .dsn file if requested */ if (filedsn != NULL) { /* merge params from .dsn file */ if (_iodbcdm_cfg_merge_filedsn (pconfig, (char *)filedsn, (char *) connStrIn_buf, sizeof (connStrIn_buf), waMode == 'W', conv) == -1) { PUSHSQLERR (pdbc->herr, en_IM015); RETURN (SQL_ERROR); } /* update connection string and its length */ connStrIn = connStrIn_buf; if (cbConnStrIn != SQL_NTS) { if (waMode != 'W') cbConnStrIn = STRLEN (connStrIn); else cbConnStrIn = DM_WCSLEN (conv, connStrIn); } } if (_iodbcdm_cfg_find (pconfig, "ODBC", "DRIVER") == 0) { /* copy because pconfig can be reinitialized later */ _iodbcdm_strlcpy ((char *) drvbuf, pconfig->value, sizeof (drvbuf)); drv = drvbuf; } if (_iodbcdm_cfg_find (pconfig, "ODBC", "DSN") == 0) { /* copy because pconfig can be reinitialized later */ _iodbcdm_strlcpy ((char *) dsnbuf, pconfig->value, sizeof (dsnbuf)); dsn = dsnbuf; } if (_iodbcdm_cfg_find (pconfig, "ODBC", "DriverUnicodeType") == 0) { if (STRCASEEQ(pconfig->value, "1") || STRCASEEQ(pconfig->value, "utf16")) drv_cp = CP_UTF16; else if (STRCASEEQ(pconfig->value, "2") || STRCASEEQ(pconfig->value, "utf8")) drv_cp = CP_UTF8; else if (STRCASEEQ(pconfig->value, "3") || STRCASEEQ(pconfig->value, "ucs4")) drv_cp = CP_UCS4; DPRINTF ((stderr, "DEBUG: SQLDriverConnect DriverUnicodeType=%s\n", drv_cp==CP_UCS4?"UCS4":(drv_cp==CP_UTF16?"UTF16":"UTF8"))); } switch (fDriverCompletion) { case SQL_DRIVER_NOPROMPT: /* Check if there's a DSN or DRIVER */ if (!dsn && !drv) { PUSHSQLERR (pdbc->herr, en_IM007); RETURN (SQL_ERROR); } break; case SQL_DRIVER_COMPLETE: case SQL_DRIVER_COMPLETE_REQUIRED: if (dsn != NULL || drv != NULL) { break; } /* fall to next case */ case SQL_DRIVER_PROMPT: /* Get data source dialog box function from * current executable */ /* Not really sure here, but should load that from the iodbcadm */ if (waMode == 'A') _iodbcdm_strlcpy ((char *) prov, connStrIn, sizeof (prov)); else if (conv && conv->dm_cp == CP_UTF8) _iodbcdm_strlcpy ((char *) prov, connStrIn, sizeof (prov)); else DM_WCSNCPY (conv, prov, connStrIn, sizeof (prov) / DM_WCHARSIZE(conv)); #if 0 if (!dsn && !drv) bCallDmDlg = TRUE; else if ( _iodbcdm_CheckDriverLoginDlg(drv, dsn) == FALSE) bCallDmDlg = TRUE; /* not call iODBC function "iodbcdm_drvconn_dialbox", if there is * the function "_iodbcdm_drvconn_dialbox" in the odbc driver, * odbc driver must call its function itself */ if (!bCallDmDlg) break; #endif ODBC_UNLOCK (); #if defined (__APPLE__) # if !defined(NO_FRAMEWORKS) bundle = CFBundleGetBundleWithIdentifier (CFSTR ("org.iodbc.core")); if (bundle) { /* Search for the drvproxy library */ liburl = CFBundleCopyResourceURL (bundle, CFSTR ("iODBCadm.bundle"), NULL, NULL); if (liburl) { bundle_dll = CFBundleCreate (NULL, liburl); if (bundle_dll){ if (waMode != 'W') dialproc = (HPROC)CFBundleGetFunctionPointerForName (bundle_dll, CFSTR("iodbcdm_drvconn_dialbox")); else dialproc = (HPROC)CFBundleGetFunctionPointerForName (bundle_dll, CFSTR("iodbcdm_drvconn_dialboxw")); } } if (liburl) CFRelease (liburl); } if (!bundle_dll) break; # endif #else hdll = _iodbcdm_dllopen ("libiodbcadm.so.2"); if (!hdll) break; if (waMode != 'W') dialproc = _iodbcdm_dllproc (hdll, "iodbcdm_drvconn_dialbox"); else dialproc = _iodbcdm_dllproc (hdll, "iodbcdm_drvconn_dialboxw"); #endif if (dialproc == SQL_NULL_HPROC) { sqlstat = en_IM008; break; } { IODBC_CHARSET m_charset = (conv) ? conv->dm_cp : CP_DEF; ssize_t size = cbConnStrIn; /*** convert DM_WCHAR => SYS_WCHAR ***/ if (waMode == 'A') _iodbcdm_strlcpy ((char *) prov, connStrIn, sizeof (prov)); else { if (size == SQL_NTS) { if (m_charset == CP_UTF8) size = strlen((char*) connStrIn); else size = DM_WCSLEN (conv, connStrIn); } if (m_charset != CP_UTF8) size *= DM_WCHARSIZE(conv); if (size >= sizeof(prov)) size = sizeof(prov) - DM_WCHARSIZE(conv); size = dm_conv_W2W(connStrIn, cbConnStrIn, prov, sizeof(prov)-sizeof(SQLWCHAR), m_charset, CP_DEF); prov[size/sizeof(SQLWCHAR)] = L'\0'; } retcode = dialproc (hwnd, /* window or display handle */ prov, /* input/output dsn buf */ sizeof (prov) / (waMode == 'A' ? 1 : sizeof (SQLWCHAR)), /* buf size */ &sqlstat, /* error code */ fDriverCompletion, /* type of completion */ &config); /* config mode */ ODBC_LOCK (); fDriverCompletion = SQL_DRIVER_NOPROMPT; if (retcode != SQL_SUCCESS) { if (retcode != SQL_NO_DATA_FOUND) PUSHSQLERR (pdbc->herr, sqlstat); goto end; } if (waMode == 'W') { /*** convert SYS_WCHAR => DM_WCHAR ***/ size = dm_conv_W2W(prov, SQL_NTS, StrInTmp, sizeof(StrInTmp)-sizeof(SQLWCHAR), CP_DEF, m_charset); StrInTmp[size/sizeof(SQLWCHAR)] = L'\0'; connStrIn = StrInTmp; } else connStrIn = prov; } /* * Recalculate length of connStrIn if needed, as it may have been * changed by iodbcdm_drvconn_dialbox */ if (cbConnStrIn != SQL_NTS) { if (waMode != 'W') cbConnStrIn = STRLEN (connStrIn); else cbConnStrIn = DM_WCSLEN (conv, connStrIn); } if (_iodbcdm_cfg_parse_str (pconfig, connStrIn, cbConnStrIn, waMode == 'W', conv) == -1) { PUSHSQLERR (pdbc->herr, en_HY001); RETURN (SQL_ERROR); } if (_iodbcdm_cfg_find (pconfig, "ODBC", "DSN") == 0) dsn = (SQLCHAR *)pconfig->value; if (_iodbcdm_cfg_find (pconfig, "ODBC", "DRIVER") == 0) { /* copy because pconfig can be reinitialized later */ _iodbcdm_strlcpy ((char *) drvbuf, pconfig->value, sizeof (drvbuf)); drv = drvbuf; } if (_iodbcdm_cfg_find (pconfig, "ODBC", "DriverUnicodeType") == 0) { if (STRCASEEQ(pconfig->value, "1") || STRCASEEQ(pconfig->value, "utf16")) drv_cp = CP_UTF16; else if (STRCASEEQ(pconfig->value, "2") || STRCASEEQ(pconfig->value, "utf8")) drv_cp = CP_UTF8; else if (STRCASEEQ(pconfig->value, "3") || STRCASEEQ(pconfig->value, "ucs4")) drv_cp = CP_UCS4; DPRINTF ((stderr, "DEBUG: SQLDriverConnect DriverUnicodeType=%s\n", drv_cp==CP_UCS4?"UCS4":(drv_cp==CP_UTF16?"UTF16":"UTF8"))); } break; default: sqlstat = en_S1110; break; } if (sqlstat != en_00000) { PUSHSQLERR (pdbc->herr, sqlstat); RETURN (SQL_ERROR); } if (dsn == NULL || *(char *) dsn == '\0') { dsn = (void *) "default"; } else /* if you want tracing, you must use a DSN */ { setopterr |= _iodbcdm_con_settracing (pdbc, (SQLCHAR *) dsn, SQL_NTS, waMode); } /* * Check whether driver is thread safe */ thread_safe = 1; /* Assume driver is thread safe */ SQLSetConfigMode (ODBC_BOTH_DSN); if (SQLGetPrivateProfileString ((char *) dsn, "ThreadManager", "", (LPSTR)buf, sizeof (buf), "odbc.ini") && (STRCASEEQ (buf, "on") || STRCASEEQ (buf, "1"))) { thread_safe = 0; /* Driver needs a thread manager */ } /* * Check whether driver is unload safe */ unload_safe = 0; /* Assume driver is not unload safe */ SQLSetConfigMode (ODBC_BOTH_DSN); if (SQLGetPrivateProfileString ((char *) dsn, "UnloadSafe", "", (LPSTR)buf, sizeof (buf), "odbc.ini") && (STRCASEEQ (buf, "on") || STRCASEEQ (buf, "1"))) { unload_safe = 1; } /* * Get the name of the driver module */ if (drv == NULL || *(char *) drv == '\0') { SQLSetConfigMode (ODBC_BOTH_DSN); if (SQLGetPrivateProfileString ((char *) dsn, "Driver", "", (char *) drvbuf, sizeof (drvbuf), "odbc.ini") != 0) { drv = drvbuf; } } if (drv == NULL) { PUSHSQLERR (pdbc->herr, en_IM002); RETURN (SQL_ERROR); } retcode = _iodbcdm_driverload ((char *)dsn, (char *) drv, pdbc, thread_safe, unload_safe, drv_cp, waMode); switch (retcode) { case SQL_SUCCESS: break; case SQL_SUCCESS_WITH_INFO: #if 0 /* * Unsuccessful in calling driver's SQLSetConnectOption() to set * login timeout. */ setopterr = SQL_ERROR; #endif break; default: RETURN (retcode); } #if (ODBCVER >= 0x300) /* * Pooling is disabled if SAVEFILE is present. */ if (savefile != NULL) pdbc->cp_timeout = 0; #endif penv = (ENV_t *) pdbc->henv; conv = &pdbc->conv; if (penv->unicode_driver && waMode != 'W') conv_direct = CD_A2W; else if (!penv->unicode_driver && waMode == 'W') conv_direct = CD_W2A; else if (waMode == 'W' && conv->dm_cp!=conv->drv_cp) conv_direct = CD_W2W; if (conv_direct != CD_NONE) { if ((_ConnStrOut = malloc ((connStrOutMax + 1) * WCHAR_MAXSIZE)) == NULL) { PUSHSQLERR (pdbc->herr, en_HY001); RETURN (SQL_ERROR); } _ConnStrIn = conv_text_m2d (conv, connStrIn, cbConnStrIn, conv_direct); connStrOut = _ConnStrOut; connStrIn = _ConnStrIn; cbConnStrIn = SQL_NTS; } /* Restore config mode */ SQLSetConfigMode (config); ODBC_UNLOCK (); CALL_UDRIVER (hdbc, pdbc, retcode, hproc, penv->unicode_driver, en_DriverConnect, (pdbc->dhdbc, hwnd, connStrIn, cbConnStrIn, connStrOut, connStrOutMax, pcbConnStrOut, fDriverCompletion)); ODBC_LOCK (); if (hproc == SQL_NULL_HPROC) { _iodbcdm_driverunload (pdbc, 3); PUSHSQLERR (pdbc->herr, en_IM001); RETURN (SQL_ERROR); } if (szConnStrOut && SQL_SUCCEEDED (retcode) && conv_direct != CD_NONE) { if (conv_direct == CD_A2W) { /* ansi<=unicode */ dm_StrCopyOut2_W2A_d2m (conv, connStrOut, (SQLCHAR *) szConnStrOut, cbConnStrOutMax, NULL, NULL); } else if (conv_direct == CD_W2A) { /* unicode<=ansi */ dm_StrCopyOut2_A2W_d2m (conv, (SQLCHAR *) connStrOut, szConnStrOut, cbConnStrOutMax * DM_WCHARSIZE(conv), NULL, NULL); } else if (conv_direct == CD_W2W) { /* unicode<=unicode */ dm_StrCopyOut2_W2W_d2m (conv, connStrOut, szConnStrOut, cbConnStrOutMax * DM_WCHARSIZE(conv), NULL, NULL); } } if (szConnStrOut != NULL) { if (filedsn != NULL) { /* append FILEDSN to the out connection string */ if (waMode == 'W') { char tmp[4096] = {""}; size_t outSize = DM_WCSLEN(conv, szConnStrOut); char *out = szConnStrOut; out += outSize * DM_WCHARSIZE(conv); _iodbcdm_strlcat (tmp, ";FILEDSN=", sizeof(tmp)); _iodbcdm_strlcat (tmp, (char *)filedsn, sizeof(tmp)); dm_StrCopyOut2_U8toW_d2m(conv, (SQLCHAR *)tmp, out, (cbConnStrOutMax - outSize) * DM_WCHARSIZE(conv), NULL, NULL); } else { _iodbcdm_strlcat (szConnStrOut, ";FILEDSN=", cbConnStrOutMax); _iodbcdm_strlcat (szConnStrOut, (char *)filedsn, cbConnStrOutMax); } } if (savefile != NULL) { /* append SAVEFILE to the out connection string */ if (waMode == 'W') { char tmp[4096] = {""}; size_t outSize = DM_WCSLEN(conv, szConnStrOut); char *out = szConnStrOut; out += outSize * DM_WCHARSIZE(conv); _iodbcdm_strlcat (tmp, ";SAVEFILE=", sizeof(tmp)); _iodbcdm_strlcat (tmp, (char *)savefile, sizeof(tmp)); dm_StrCopyOut2_U8toW_d2m(conv, (SQLCHAR *)tmp, out, (cbConnStrOutMax - outSize) * DM_WCHARSIZE(conv), NULL, NULL); } else { _iodbcdm_strlcat (szConnStrOut, ";SAVEFILE=", cbConnStrOutMax); _iodbcdm_strlcat (szConnStrOut, (char *)savefile, cbConnStrOutMax); } } /* fixup pcbConnStrOut */ if (pcbConnStrOut != NULL) { if (waMode == 'W') *(SQLSMALLINT *) pcbConnStrOut = DM_WCSLEN (conv, szConnStrOut); else *(SQLSMALLINT *) pcbConnStrOut = strlen (szConnStrOut); } } if (!SQL_SUCCEEDED (retcode)) { /* don't unload driver here for retrieve * error message from driver */ /******** _iodbcdm_driverunload( hdbc , 3); *********/ RETURN (retcode); } /* state transition */ pdbc->state = en_dbc_connected; /* do delayed option setting */ setopterr |= _iodbcdm_dbcdelayset (pdbc, waMode); if (setopterr != SQL_SUCCESS) retcode = SQL_SUCCESS_WITH_INFO; /* save .dsn file if requested */ if (savefile != NULL) { assert (connStrOut != NULL); if (_iodbcdm_cfg_savefile ((char *)savefile, connStrOut, penv->unicode_driver, conv) == -1) { PUSHSQLERR (pdbc->herr, en_01S08); retcode = SQL_SUCCESS_WITH_INFO; } } end: #if (ODBCVER >= 0x300) if (!SQL_SUCCEEDED (retcode) && pdbc->cp_pdbc != NULL) { int rc; /* * Dead connection was taken from the pool * but reconnection attempt has failed: * set cp_retry_wait time and return connection to the pool. */ _iodbcdm_pool_set_retry_wait (pdbc); rc = _iodbcdm_pool_put_conn (pdbc); assert (rc == 0); } #endif _iodbcdm_cfg_done (pconfig); if (_ConnStrIn != NULL) MEM_FREE (_ConnStrIn); if (_ConnStrOut != NULL) MEM_FREE (_ConnStrOut); if (savefile != NULL) MEM_FREE (savefile); if (filedsn != NULL) MEM_FREE (filedsn); return retcode; } SQLRETURN SQL_API SQLDriverConnect (SQLHDBC hdbc, SQLHWND hwnd, SQLCHAR * szConnStrIn, SQLSMALLINT cbConnStrIn, SQLCHAR * szConnStrOut, SQLSMALLINT cbConnStrOutMax, SQLSMALLINT * pcbConnStrOut, SQLUSMALLINT fDriverCompletion) { ENTER_HDBC (hdbc, 1, trace_SQLDriverConnect (TRACE_ENTER, hdbc, hwnd, szConnStrIn, cbConnStrIn, szConnStrOut, cbConnStrOutMax, pcbConnStrOut, fDriverCompletion)); retcode = SQLDriverConnect_Internal( hdbc, hwnd, szConnStrIn, cbConnStrIn, szConnStrOut, cbConnStrOutMax, pcbConnStrOut, fDriverCompletion, 'A'); LEAVE_HDBC (hdbc, 1, trace_SQLDriverConnect (TRACE_LEAVE, hdbc, hwnd, szConnStrIn, cbConnStrIn, szConnStrOut, cbConnStrOutMax, pcbConnStrOut, fDriverCompletion)); } SQLRETURN SQL_API SQLDriverConnectA (SQLHDBC hdbc, SQLHWND hwnd, SQLCHAR * szConnStrIn, SQLSMALLINT cbConnStrIn, SQLCHAR * szConnStrOut, SQLSMALLINT cbConnStrOutMax, SQLSMALLINT * pcbConnStrOut, SQLUSMALLINT fDriverCompletion) { ENTER_HDBC (hdbc, 1, trace_SQLDriverConnect (TRACE_ENTER, hdbc, hwnd, szConnStrIn, cbConnStrIn, szConnStrOut, cbConnStrOutMax, pcbConnStrOut, fDriverCompletion)); retcode = SQLDriverConnect_Internal( hdbc, hwnd, szConnStrIn, cbConnStrIn, szConnStrOut, cbConnStrOutMax, pcbConnStrOut, fDriverCompletion, 'A'); LEAVE_HDBC (hdbc, 1, trace_SQLDriverConnect (TRACE_LEAVE, hdbc, hwnd, szConnStrIn, cbConnStrIn, szConnStrOut, cbConnStrOutMax, pcbConnStrOut, fDriverCompletion)); } SQLRETURN SQL_API SQLDriverConnectW (SQLHDBC hdbc, SQLHWND hwnd, SQLWCHAR * szConnStrIn, SQLSMALLINT cbConnStrIn, SQLWCHAR * szConnStrOut, SQLSMALLINT cbConnStrOutMax, SQLSMALLINT * pcbConnStrOut, SQLUSMALLINT fDriverCompletion) { ENTER_HDBC (hdbc, 1, trace_SQLDriverConnectW (TRACE_ENTER, hdbc, hwnd, szConnStrIn, cbConnStrIn, szConnStrOut, cbConnStrOutMax, pcbConnStrOut, fDriverCompletion)); retcode = SQLDriverConnect_Internal( hdbc, hwnd, szConnStrIn, cbConnStrIn, szConnStrOut, cbConnStrOutMax, pcbConnStrOut, fDriverCompletion, 'W'); LEAVE_HDBC (hdbc, 1, trace_SQLDriverConnectW (TRACE_LEAVE, hdbc, hwnd, szConnStrIn, cbConnStrIn, szConnStrOut, cbConnStrOutMax, pcbConnStrOut, fDriverCompletion)); } SQLRETURN SQL_API SQLBrowseConnect_Internal (SQLHDBC hdbc, SQLPOINTER szConnStrIn, SQLSMALLINT cbConnStrIn, SQLPOINTER szConnStrOut, SQLSMALLINT cbConnStrOutMax, SQLSMALLINT * pcbConnStrOut, SQLCHAR waMode) { CONN (pdbc, hdbc); ENVR (penv, NULL); char buf[1024]; SWORD thread_safe; SWORD unload_safe; HPROC hproc = SQL_NULL_HPROC; void * _ConnStrIn = NULL; void * _ConnStrOut = NULL; void * connStrOut = szConnStrOut; void * connStrIn = szConnStrIn; CONV_DIRECT conv_direct = CD_NONE; DM_CONV *conv = NULL; IODBC_CHARSET drv_cp = CP_DEF; SQLRETURN retcode = SQL_SUCCESS; SQLRETURN setopterr = SQL_SUCCESS; /* check arguments */ if ((cbConnStrIn < 0 && cbConnStrIn != SQL_NTS) || cbConnStrOutMax < 0) { PUSHSQLERR (pdbc->herr, en_S1090); return SQL_ERROR; } conv = (penv != SQL_NULL_HENV) ? &penv->conv : &((GENV_t *) pdbc->genv)->conv; if (pdbc->state == en_dbc_allocated) { PCONFIG pconfig; void *drv = NULL, *dsn = NULL; if (_iodbcdm_cfg_init_str (&pconfig, szConnStrIn, cbConnStrIn, waMode == 'W', conv) == -1) { PUSHSQLERR (pdbc->herr, en_HY001); return SQL_ERROR; } if (_iodbcdm_cfg_find (pconfig, "ODBC", "DRIVER") == 0) drv = pconfig->value; if (_iodbcdm_cfg_find (pconfig, "ODBC", "DSN") == 0) dsn = pconfig->value; if (_iodbcdm_cfg_find (pconfig, "ODBC", "DriverUnicodeType") == 0) { if (STRCASEEQ(pconfig->value, "1") || STRCASEEQ(pconfig->value, "utf16")) drv_cp = CP_UTF16; else if (STRCASEEQ(pconfig->value, "2") || STRCASEEQ(pconfig->value, "utf8")) drv_cp = CP_UTF8; else if (STRCASEEQ(pconfig->value, "0") || STRCASEEQ(pconfig->value, "ucs4")) drv_cp = CP_UCS4; DPRINTF ((stderr, "DEBUG: SQLBrowseConnect DriverUnicodeType=%s\n", drv_cp==CP_UCS4?"UCS4":(drv_cp==CP_UTF16?"UTF16":"UTF8"))); } if (dsn == NULL || ((char*)dsn)[0] == '\0') dsn = (void *) "default"; else /* if you want tracing, you must use a DSN */ { if (_iodbcdm_con_settracing (pdbc, (SQLCHAR *) dsn, SQL_NTS, waMode) == SQL_ERROR) { _iodbcdm_cfg_done (pconfig); return SQL_ERROR; } } /* * Check whether driver is thread safe */ thread_safe = 1; /* Assume driver is thread safe */ SQLSetConfigMode (ODBC_BOTH_DSN); if ( SQLGetPrivateProfileString ((char *) dsn, "ThreadManager", "", buf, sizeof(buf), "odbc.ini") && (STRCASEEQ (buf, "on") || STRCASEEQ (buf, "1"))) { thread_safe = 0; /* Driver needs a thread manager */ } /* * Check whether driver is unload safe */ unload_safe = 0; /* Assume driver is not unload safe */ SQLSetConfigMode (ODBC_BOTH_DSN); if ( SQLGetPrivateProfileString ((char *) dsn, "ThreadManager", "", buf, sizeof(buf), "odbc.ini") && (STRCASEEQ (buf, "on") || STRCASEEQ (buf, "1"))) { unload_safe = 1; } /* * Get the name of the driver module and load it */ if (drv == NULL || *(char*)drv == '\0') { SQLSetConfigMode (ODBC_BOTH_DSN); if ( SQLGetPrivateProfileString ((char *) dsn, "Driver", "", buf, sizeof(buf), "odbc.ini") != 0) { drv = buf; } } if (drv == NULL) { PUSHSQLERR (pdbc->herr, en_IM002); _iodbcdm_cfg_done (pconfig); return SQL_ERROR; } retcode = _iodbcdm_driverload (dsn, (char *) drv, pdbc, thread_safe, unload_safe, drv_cp, waMode); _iodbcdm_cfg_done (pconfig); switch (retcode) { case SQL_SUCCESS: break; case SQL_SUCCESS_WITH_INFO: #if 0 /* * Unsuccessful in calling driver's SQLSetConnectOption() to set * login timeout. */ setopterr = SQL_ERROR; #endif break; default: return retcode; } } else if (pdbc->state != en_dbc_needdata) { PUSHSQLERR (pdbc->herr, en_08002); return SQL_ERROR; } penv = (ENV_t *) pdbc->henv; conv = &pdbc->conv; if (penv->unicode_driver && waMode != 'W') conv_direct = CD_A2W; else if (!penv->unicode_driver && waMode == 'W') conv_direct = CD_W2A; else if (waMode == 'W' && conv->dm_cp!=conv->drv_cp) conv_direct = CD_W2W; if (conv_direct != CD_NONE) { if ((_ConnStrOut = malloc((cbConnStrOutMax + 1)* WCHAR_MAXSIZE)) == NULL) { PUSHSQLERR (pdbc->herr, en_HY001); return SQL_ERROR; } _ConnStrIn = conv_text_m2d (conv, szConnStrIn, SQL_NTS, conv_direct); connStrIn = _ConnStrIn; cbConnStrIn = SQL_NTS; connStrOut = _ConnStrOut; } ODBC_UNLOCK (); CALL_UDRIVER(hdbc, pdbc, retcode, hproc, penv->unicode_driver, en_BrowseConnect, ( pdbc->dhdbc, connStrIn, cbConnStrIn, connStrOut, cbConnStrOutMax, pcbConnStrOut)); ODBC_LOCK (); MEM_FREE(_ConnStrIn); if (hproc == SQL_NULL_HPROC) { MEM_FREE(_ConnStrOut); _iodbcdm_driverunload (pdbc, 3); pdbc->state = en_dbc_allocated; PUSHSQLERR (pdbc->herr, en_IM001); return SQL_ERROR; } if (szConnStrOut && SQL_SUCCEEDED (retcode) && conv_direct != CD_NONE) { if (conv_direct == CD_A2W) { /* ansi<=unicode*/ dm_StrCopyOut2_W2A_d2m (conv, connStrOut, (SQLCHAR *) szConnStrOut, cbConnStrOutMax, NULL, NULL); } else if (conv_direct == CD_W2A) { /* unicode<=ansi*/ dm_StrCopyOut2_A2W_d2m (conv, (SQLCHAR *) connStrOut, szConnStrOut, cbConnStrOutMax * DM_WCHARSIZE(conv), NULL, NULL); } else if (conv_direct == CD_W2W) { /* unicode<=unicode*/ dm_StrCopyOut2_W2W_d2m (conv, connStrOut, szConnStrOut, cbConnStrOutMax * DM_WCHARSIZE(conv), NULL, NULL); } } MEM_FREE(_ConnStrOut); switch (retcode) { case SQL_SUCCESS: case SQL_SUCCESS_WITH_INFO: pdbc->state = en_dbc_connected; setopterr |= _iodbcdm_dbcdelayset (pdbc, waMode); if (setopterr != SQL_SUCCESS) { retcode = SQL_SUCCESS_WITH_INFO; } break; case SQL_NEED_DATA: pdbc->state = en_dbc_needdata; break; case SQL_ERROR: pdbc->state = en_dbc_allocated; /* but the driver will not unloaded * to allow application retrieve err * message from driver */ break; default: break; } return retcode; } SQLRETURN SQL_API SQLBrowseConnect (SQLHDBC hdbc, SQLCHAR * szConnStrIn, SQLSMALLINT cbConnStrIn, SQLCHAR * szConnStrOut, SQLSMALLINT cbConnStrOutMax, SQLSMALLINT * pcbConnStrOut) { ENTER_HDBC (hdbc, 1, trace_SQLBrowseConnect (TRACE_ENTER, hdbc, szConnStrIn, cbConnStrIn, szConnStrOut, cbConnStrOutMax, pcbConnStrOut)); retcode = SQLBrowseConnect_Internal ( hdbc, szConnStrIn, cbConnStrIn, szConnStrOut, cbConnStrOutMax, pcbConnStrOut, 'A'); LEAVE_HDBC (hdbc, 1, trace_SQLBrowseConnect (TRACE_LEAVE, hdbc, szConnStrIn, cbConnStrIn, szConnStrOut, cbConnStrOutMax, pcbConnStrOut)); } SQLRETURN SQL_API SQLBrowseConnectA (SQLHDBC hdbc, SQLCHAR * szConnStrIn, SQLSMALLINT cbConnStrIn, SQLCHAR * szConnStrOut, SQLSMALLINT cbConnStrOutMax, SQLSMALLINT * pcbConnStrOut) { ENTER_HDBC (hdbc, 1, trace_SQLBrowseConnect (TRACE_ENTER, hdbc, szConnStrIn, cbConnStrIn, szConnStrOut, cbConnStrOutMax, pcbConnStrOut)); retcode = SQLBrowseConnect_Internal ( hdbc, szConnStrIn, cbConnStrIn, szConnStrOut, cbConnStrOutMax, pcbConnStrOut, 'A'); LEAVE_HDBC (hdbc, 1, trace_SQLBrowseConnect (TRACE_LEAVE, hdbc, szConnStrIn, cbConnStrIn, szConnStrOut, cbConnStrOutMax, pcbConnStrOut)); } SQLRETURN SQL_API SQLBrowseConnectW (SQLHDBC hdbc, SQLWCHAR * szConnStrIn, SQLSMALLINT cbConnStrIn, SQLWCHAR * szConnStrOut, SQLSMALLINT cbConnStrOutMax, SQLSMALLINT * pcbConnStrOut) { ENTER_HDBC (hdbc, 1, trace_SQLBrowseConnectW (TRACE_ENTER, hdbc, szConnStrIn, cbConnStrIn, szConnStrOut, cbConnStrOutMax, pcbConnStrOut)); retcode = SQLBrowseConnect_Internal ( hdbc, szConnStrIn, cbConnStrIn, szConnStrOut, cbConnStrOutMax, pcbConnStrOut, 'W'); LEAVE_HDBC (hdbc, 1, trace_SQLBrowseConnectW (TRACE_LEAVE, hdbc, szConnStrIn, cbConnStrIn, szConnStrOut, cbConnStrOutMax, pcbConnStrOut)); } static SQLRETURN SQLDisconnect_Internal (SQLHDBC hdbc) { CONN (pdbc, hdbc); #if (ODBCVER >= 0x300) GENV (genv, pdbc->genv); #endif STMT (pstmt, NULL); /* check hdbc state */ if (pdbc->state == en_dbc_allocated) { PUSHSQLERR (pdbc->herr, en_08003); return SQL_ERROR; } /* check stmt(s) state */ for (pstmt = (STMT_t *) pdbc->hstmt; pstmt != NULL; pstmt = (STMT_t *) pstmt->next) { if (pstmt->state >= en_stmt_needdata || pstmt->asyn_on != en_NullProc) /* In this case one need to call * SQLCancel() first */ { PUSHSQLERR (pdbc->herr, en_S1010); return SQL_ERROR; } } #if (ODBCVER >= 0x300) /* * Try to return the connected connection to the pool if * - connection was taken from the pool * - pooling is enabled and CPTimeout > 0 */ if ((pdbc->state == en_dbc_connected || pdbc->state == en_dbc_hstmt) && (pdbc->cp_pdbc != NULL || (genv->connection_pooling != SQL_CP_OFF && pdbc->cp_timeout > 0))) { if (_iodbcdm_pool_put_conn (pdbc) == 0) { _iodbcdm_finish_disconnect (pdbc, FALSE); return SQL_SUCCESS; } } #endif /* (ODBCVER >= 0x300) */ return _iodbcdm_finish_disconnect (pdbc, TRUE); } SQLRETURN SQL_API SQLDisconnect (SQLHDBC hdbc) { ENTER_HDBC (hdbc, 1, trace_SQLDisconnect (TRACE_ENTER, hdbc)); retcode = SQLDisconnect_Internal (hdbc); LEAVE_HDBC (hdbc, 1, trace_SQLDisconnect (TRACE_LEAVE, hdbc)); } SQLRETURN SQL_API SQLNativeSql_Internal (SQLHDBC hdbc, SQLPOINTER szSqlStrIn, SQLINTEGER cbSqlStrIn, SQLPOINTER szSqlStr, SQLINTEGER cbSqlStrMax, SQLINTEGER * pcbSqlStr, SQLCHAR waMode) { CONN (pdbc, hdbc); ENVR (penv, pdbc->henv); sqlstcode_t sqlstat = en_00000; SQLRETURN retcode = SQL_SUCCESS; HPROC hproc = SQL_NULL_HPROC; void * _SqlStrIn = NULL; void * _SqlStr = NULL; void * sqlStr = szSqlStr; CONV_DIRECT conv_direct = CD_NONE; DM_CONV *conv = &pdbc->conv; /* check argument */ if (szSqlStrIn == NULL) { sqlstat = en_S1009; } else if (cbSqlStrIn < 0 && cbSqlStrIn != SQL_NTS) { sqlstat = en_S1090; } if (sqlstat != en_00000) { PUSHSQLERR (pdbc->herr, sqlstat); return SQL_ERROR; } /* check state */ if (pdbc->state <= en_dbc_needdata) { PUSHSQLERR (pdbc->herr, en_08003); return SQL_ERROR; } if (penv->unicode_driver && waMode != 'W') conv_direct = CD_A2W; else if (!penv->unicode_driver && waMode == 'W') conv_direct = CD_W2A; else if (waMode == 'W' && conv->dm_cp!=conv->drv_cp) conv_direct = CD_W2W; if (conv_direct != CD_NONE) { if ((_SqlStr = malloc((cbSqlStrMax + 1) * WCHAR_MAXSIZE)) == NULL) { PUSHSQLERR (pdbc->herr, en_HY001); return SQL_ERROR; } _SqlStrIn = conv_text_m2d (conv, szSqlStrIn, SQL_NTS, conv_direct); szSqlStrIn = _SqlStrIn; cbSqlStrIn = SQL_NTS; sqlStr = _SqlStr; } /* call driver */ CALL_UDRIVER(hdbc, pdbc, retcode, hproc, penv->unicode_driver, en_NativeSql, ( pdbc->dhdbc, szSqlStrIn, cbSqlStrIn, sqlStr, cbSqlStrMax, pcbSqlStr)); MEM_FREE(_SqlStrIn); if (hproc == SQL_NULL_HPROC) { MEM_FREE(_SqlStr); PUSHSQLERR (pdbc->herr, en_IM001); return SQL_ERROR; } if (szSqlStr && conv_direct != CD_NONE && SQL_SUCCEEDED (retcode)) { if (conv_direct == CD_A2W) { /* ansi<=unicode*/ dm_StrCopyOut2_W2A_d2m (conv, sqlStr, (SQLCHAR *) szSqlStr, cbSqlStrMax, NULL, NULL); } else if (conv_direct == CD_W2A) { /* unicode<=ansi*/ dm_StrCopyOut2_A2W_d2m (conv, (SQLCHAR *) sqlStr, szSqlStr, cbSqlStrMax * DM_WCHARSIZE(conv), NULL, NULL); } else if (conv_direct == CD_W2W) { /* unicode<=unicode*/ dm_StrCopyOut2_W2W_d2m (conv, sqlStr, szSqlStr, cbSqlStrMax * DM_WCHARSIZE(conv), NULL, NULL); } } MEM_FREE(_SqlStr); return retcode; } SQLRETURN SQL_API SQLNativeSql ( SQLHDBC hdbc, SQLCHAR * szSqlStrIn, SQLINTEGER cbSqlStrIn, SQLCHAR * szSqlStr, SQLINTEGER cbSqlStrMax, SQLINTEGER * pcbSqlStr) { ENTER_HDBC (hdbc, 0, trace_SQLNativeSql (TRACE_ENTER, hdbc, szSqlStrIn, cbSqlStrIn, szSqlStr, cbSqlStrMax, pcbSqlStr)); retcode = SQLNativeSql_Internal ( hdbc, szSqlStrIn, cbSqlStrIn, szSqlStr, cbSqlStrMax, pcbSqlStr, 'A'); LEAVE_HDBC (hdbc, 0, trace_SQLNativeSql (TRACE_LEAVE, hdbc, szSqlStrIn, cbSqlStrIn, szSqlStr, cbSqlStrMax, pcbSqlStr)); } SQLRETURN SQL_API SQLNativeSqlA ( SQLHDBC hdbc, SQLCHAR * szSqlStrIn, SQLINTEGER cbSqlStrIn, SQLCHAR * szSqlStr, SQLINTEGER cbSqlStrMax, SQLINTEGER * pcbSqlStr) { ENTER_HDBC (hdbc, 0, trace_SQLNativeSql (TRACE_ENTER, hdbc, szSqlStrIn, cbSqlStrIn, szSqlStr, cbSqlStrMax, pcbSqlStr)); retcode = SQLNativeSql_Internal( hdbc, szSqlStrIn, cbSqlStrIn, szSqlStr, cbSqlStrMax, pcbSqlStr, 'A'); LEAVE_HDBC (hdbc, 0, trace_SQLNativeSql (TRACE_LEAVE, hdbc, szSqlStrIn, cbSqlStrIn, szSqlStr, cbSqlStrMax, pcbSqlStr)); } SQLRETURN SQL_API SQLNativeSqlW ( SQLHDBC hdbc, SQLWCHAR * szSqlStrIn, SQLINTEGER cbSqlStrIn, SQLWCHAR * szSqlStr, SQLINTEGER cbSqlStrMax, SQLINTEGER * pcbSqlStr) { ENTER_HDBC (hdbc, 0, trace_SQLNativeSqlW (TRACE_ENTER, hdbc, szSqlStrIn, cbSqlStrIn, szSqlStr, cbSqlStrMax, pcbSqlStr)); retcode = SQLNativeSql_Internal( hdbc, szSqlStrIn, cbSqlStrIn, szSqlStr, cbSqlStrMax, pcbSqlStr, 'W'); LEAVE_HDBC (hdbc, 0, trace_SQLNativeSqlW (TRACE_LEAVE, hdbc, szSqlStrIn, cbSqlStrIn, szSqlStr, cbSqlStrMax, pcbSqlStr)); } libiodbc-3.52.16/iodbc/hstmt.c0000664000175000017500000013530414424170750012757 00000000000000/* * hstmt.c * * $Id$ * * Query statement object management functions * * The iODBC driver manager. * * Copyright (C) 1995 Ke Jin * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include "unicode.h" #include "dlproc.h" #include "herr.h" #if (ODBCVER >= 0x0300) #include "hdesc.h" #endif #include "henv.h" #include "hdbc.h" #include "hstmt.h" #include "itrace.h" #if (ODBCVER >= 0x300) static const SQLINTEGER desc_attrs[4] = { SQL_ATTR_APP_ROW_DESC, SQL_ATTR_APP_PARAM_DESC, SQL_ATTR_IMP_ROW_DESC, SQL_ATTR_IMP_PARAM_DESC }; #endif #define XFREE(V) if (V) { free(V); V = NULL; } SQLRETURN SQLAllocStmt_Internal ( SQLHDBC hdbc, SQLHSTMT * phstmt) { CONN (pdbc, hdbc); STMT (pstmt, NULL); HPROC hproc2 = SQL_NULL_HPROC; HPROC hproc3 = SQL_NULL_HPROC; SQLRETURN retcode = SQL_SUCCESS; int i; SQLUINTEGER odbc_ver = ((GENV_t *) pdbc->genv)->odbc_ver; SQLUINTEGER dodbc_ver = ((ENV_t *) pdbc->henv)->dodbc_ver; if (phstmt == NULL) { PUSHSQLERR (pdbc->herr, en_S1009); return SQL_ERROR; } /* check state */ switch (pdbc->state) { case en_dbc_connected: case en_dbc_hstmt: break; case en_dbc_allocated: case en_dbc_needdata: PUSHSQLERR (pdbc->herr, en_08003); *phstmt = SQL_NULL_HSTMT; return SQL_ERROR; default: return SQL_INVALID_HANDLE; } pstmt = (STMT_t *) MEM_ALLOC (sizeof (STMT_t)); if (pstmt == NULL) { PUSHSQLERR (pdbc->herr, en_S1001); *phstmt = SQL_NULL_HSTMT; return SQL_ERROR; } pstmt->rc = 0; /* * Initialize this handle */ pstmt->type = SQL_HANDLE_STMT; /* initiate the object */ pstmt->herr = SQL_NULL_HERR; pstmt->hdbc = (HSTMT) hdbc; pstmt->state = en_stmt_allocated; pstmt->cursor_state = en_stmt_cursor_no; pstmt->prep_state = 0; pstmt->asyn_on = en_NullProc; pstmt->need_on = en_NullProc; pstmt->stmt_cip = 0; pstmt->err_rec = 0; memset (pstmt->vars, 0, sizeof (VAR_t) * STMT_VARS_MAX); pstmt->vars_inserted = 0; /* call driver's function */ pstmt->rowset_size = 1; pstmt->row_bind_type = SQL_BIND_BY_COLUMN; pstmt->row_bind_offset = 0; pstmt->param_bind_type = SQL_PARAM_BIND_BY_COLUMN; pstmt->param_bind_offset = 0; pstmt->st_pbinding = NULL; pstmt->st_pparam = NULL; pstmt->st_nparam = 0; pstmt->params_buf = NULL; pstmt->rows_buf = NULL; pstmt->conv_param_bind_type = SQL_PARAM_BIND_BY_COLUMN; pstmt->conv_row_bind_type = SQL_BIND_BY_COLUMN; #if (ODBCVER >= 0x0300) pstmt->row_array_size = 1; pstmt->fetch_bookmark_ptr = NULL; pstmt->params_processed_ptr = NULL; pstmt->paramset_size = 0; pstmt->rows_fetched_ptr = NULL; if (dodbc_ver == SQL_OV_ODBC2 && odbc_ver == SQL_OV_ODBC3) { /* if it's a odbc3 app calling odbc2 driver */ pstmt->row_status_ptr = MEM_ALLOC (sizeof (SQLUINTEGER) * pstmt->row_array_size); if (!pstmt->row_status_ptr) { PUSHSQLERR (pstmt->herr, en_HY001); *phstmt = SQL_NULL_HSTMT; pstmt->type = 0; MEM_FREE (pstmt); return SQL_ERROR; } pstmt->row_status_allocated = SQL_TRUE; } else { pstmt->row_status_ptr = NULL; pstmt->row_status_allocated = SQL_FALSE; } #endif hproc2 = _iodbcdm_getproc (pdbc, en_AllocStmt); #if (ODBCVER >= 0x0300) hproc3 = _iodbcdm_getproc (pdbc, en_AllocHandle); #endif if (odbc_ver == SQL_OV_ODBC2 && ( dodbc_ver == SQL_OV_ODBC2 || (dodbc_ver == SQL_OV_ODBC3 && hproc2 != SQL_NULL_HPROC))) hproc3 = SQL_NULL_HPROC; #if (ODBCVER >= 0x0300) if (hproc3) { CALL_DRIVER (pstmt->hdbc, pdbc, retcode, hproc3, (SQL_HANDLE_STMT, pdbc->dhdbc, &(pstmt->dhstmt))); } else #endif { if (hproc2 == SQL_NULL_HPROC) { PUSHSQLERR (pstmt->herr, en_IM001); *phstmt = SQL_NULL_HSTMT; pstmt->type = 0; MEM_FREE (pstmt); return SQL_ERROR; } CALL_DRIVER (hdbc, pdbc, retcode, hproc2, (pdbc->dhdbc, &(pstmt->dhstmt))); } if (!SQL_SUCCEEDED (retcode)) { *phstmt = SQL_NULL_HSTMT; pstmt->type = 0; MEM_FREE (pstmt); return retcode; } #if (ODBCVER >= 0x0300) /* get the descriptors */ memset (&pstmt->imp_desc, 0, sizeof (pstmt->imp_desc)); memset (&pstmt->desc, 0, sizeof (pstmt->desc)); if (dodbc_ver == SQL_OV_ODBC2) { /* * this is an ODBC2 driver - so alloc dummy implicit desc handles * (dhdesc = NULL) */ for (i = 0; i < 4; i++) { pstmt->imp_desc[i] = (DESC_t *) MEM_ALLOC (sizeof (DESC_t)); if (pstmt->imp_desc[i] == NULL) { PUSHSQLERR (pdbc->herr, en_HY001); goto alloc_stmt_failed; } memset (pstmt->imp_desc[i], 0, sizeof (DESC_t)); pstmt->imp_desc[i]->type = SQL_HANDLE_DESC; pstmt->imp_desc[i]->hstmt = pstmt; pstmt->imp_desc[i]->dhdesc = NULL; pstmt->imp_desc[i]->hdbc = hdbc; pstmt->imp_desc[i]->herr = NULL; } } else { /* the ODBC3 driver */ if (((ENV_t *) pdbc->henv)->unicode_driver) hproc3 = _iodbcdm_getproc (pdbc, en_GetStmtAttrW); else { hproc3 = _iodbcdm_getproc (pdbc, en_GetStmtAttr); if (hproc3 == SQL_NULL_HPROC) hproc3 = _iodbcdm_getproc (pdbc, en_GetStmtAttrA); } if (hproc3 == SQL_NULL_HPROC) { /* with no GetStmtAttr ! */ PUSHSQLERR (pdbc->herr, en_HYC00); goto alloc_stmt_failed; } else { /* get the implicit descriptors */ RETCODE rc1; for (i = 0; i < 4; i++) { int desc_type = 0; switch (i) { case APP_ROW_DESC: desc_type = SQL_ATTR_APP_ROW_DESC; break; case APP_PARAM_DESC: desc_type = SQL_ATTR_APP_PARAM_DESC; break; case IMP_ROW_DESC: desc_type = SQL_ATTR_IMP_ROW_DESC; break; case IMP_PARAM_DESC: desc_type = SQL_ATTR_IMP_PARAM_DESC; break; } pstmt->imp_desc[i] = (DESC_t *) MEM_ALLOC (sizeof (DESC_t)); if (pstmt->imp_desc[i] == NULL) { /* memory allocation error */ PUSHSQLERR (pdbc->herr, en_HY001); goto alloc_stmt_failed; } memset (pstmt->imp_desc[i], 0, sizeof (DESC_t)); pstmt->imp_desc[i]->type = SQL_HANDLE_DESC; pstmt->imp_desc[i]->hdbc = hdbc; pstmt->imp_desc[i]->hstmt = *phstmt; pstmt->imp_desc[i]->herr = NULL; CALL_DRIVER (hdbc, pstmt, rc1, hproc3, (pstmt->dhstmt, desc_type, &pstmt->imp_desc[i]->dhdesc, 0, NULL)); if (rc1 != SQL_SUCCESS && rc1 != SQL_SUCCESS_WITH_INFO) { /* no descriptor returned from the driver */ pdbc->rc = SQL_ERROR; goto alloc_stmt_failed; } } } } #endif /* insert into list */ pstmt->next = (STMT_t *) pdbc->hstmt; pdbc->hstmt = pstmt; *phstmt = (SQLHSTMT) pstmt; /* state transition */ pdbc->state = en_dbc_hstmt; return SQL_SUCCESS; /* * If statement allocation has failed, we need to make sure the driver * handle is also destroyed */ alloc_stmt_failed: /* * Deallocate any descriptors */ for (i = 0; i < 4; i++) { if (pstmt->imp_desc[i]) { pstmt->imp_desc[i]->type = 0; MEM_FREE (pstmt->imp_desc[i]); } } /* * Tell the driver to remove the statement handle */ hproc2 = SQL_NULL_HPROC; hproc3 = SQL_NULL_HPROC; hproc2 = _iodbcdm_getproc (pstmt->hdbc, en_FreeStmt); #if (ODBCVER >= 0x0300) hproc3 = _iodbcdm_getproc (pstmt->hdbc, en_FreeHandle); #endif if (odbc_ver == SQL_OV_ODBC2 && ( dodbc_ver == SQL_OV_ODBC2 || (dodbc_ver == SQL_OV_ODBC3 && hproc2 != SQL_NULL_HPROC))) hproc3 = SQL_NULL_HPROC; #if (ODBCVER >= 0x0300) if (hproc3 != SQL_NULL_HPROC) { CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc3, (SQL_HANDLE_STMT, pstmt->dhstmt)); } else #endif { if (hproc2 == SQL_NULL_HPROC) { PUSHSQLERR (pdbc->herr, en_IM001); return SQL_ERROR; } CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc2, (pstmt->dhstmt, SQL_DROP)); } /* * Invalidate and free the statement handle */ pstmt->type = 0; MEM_FREE (pstmt); return SQL_ERROR; } SQLRETURN SQL_API SQLAllocStmt ( SQLHDBC hdbc, SQLHSTMT * phstmt) { ENTER_HDBC (hdbc, 1, trace_SQLAllocStmt (TRACE_ENTER, hdbc, phstmt)); retcode = SQLAllocStmt_Internal (hdbc, phstmt); LEAVE_HDBC (hdbc, 1, trace_SQLAllocStmt (TRACE_LEAVE, hdbc, phstmt)); } SQLRETURN _iodbcdm_dropstmt (HSTMT hstmt) { STMT (pstmt, hstmt); STMT (tpstmt, NULL); CONN (pdbc, NULL); if (!IS_VALID_HSTMT (pstmt)) { return SQL_INVALID_HANDLE; } CLEAR_ERRORS (pstmt); pdbc = (DBC_t *) (pstmt->hdbc); for (tpstmt = (STMT_t *) pdbc->hstmt; tpstmt != NULL; tpstmt = tpstmt->next) { if (tpstmt == pstmt) { pdbc->hstmt = (HSTMT) pstmt->next; break; } if (tpstmt->next == pstmt) { tpstmt->next = pstmt->next; break; } } if (tpstmt == NULL) { return SQL_INVALID_HANDLE; } #if (ODBCVER >= 0x0300) if (pstmt->row_status_allocated == SQL_TRUE && pstmt->row_status_ptr) MEM_FREE(pstmt->row_status_ptr); /* drop the implicit descriptors */ if (pstmt->imp_desc[0]) { int i; for (i = 0; i < 4; i++) { _iodbcdm_freesqlerrlist (pstmt->imp_desc[i]->herr); pstmt->imp_desc[i]->type = 0; MEM_FREE(pstmt->imp_desc[i]); } } #endif MEM_FREE(pstmt->params_buf); MEM_FREE(pstmt->rows_buf); if (pstmt->vars_inserted > 0) _iodbcdm_FreeStmtVars(pstmt); _iodbcdm_FreeStmtParams(pstmt); /* * Invalidate this handle */ pstmt->type = 0; MEM_FREE (pstmt); return SQL_SUCCESS; } SQLRETURN SQLFreeStmt_Internal ( SQLHSTMT hstmt, SQLUSMALLINT fOption) { STMT (pstmt, hstmt); CONN (pdbc, pstmt->hdbc); HPROC hproc2 = SQL_NULL_HPROC; HPROC hproc3 = SQL_NULL_HPROC; SQLRETURN retcode = SQL_SUCCESS; SQLUINTEGER odbc_ver = ((GENV_t *) pdbc->genv)->odbc_ver; SQLUINTEGER dodbc_ver = ((ENV_t *) pdbc->henv)->dodbc_ver; /* check option */ switch (fOption) { case SQL_DROP: case SQL_CLOSE: case SQL_UNBIND: case SQL_RESET_PARAMS: break; default: PUSHSQLERR (pstmt->herr, en_S1092); return SQL_ERROR; } /* check state */ if (pstmt->state >= en_stmt_needdata || pstmt->asyn_on != en_NullProc) { PUSHSQLERR (pstmt->herr, en_S1010); return SQL_ERROR; } hproc2 = _iodbcdm_getproc (pstmt->hdbc, en_FreeStmt); #if (ODBCVER >= 0x0300) hproc3 = _iodbcdm_getproc (pstmt->hdbc, en_FreeHandle); #endif if (odbc_ver == SQL_OV_ODBC2 && ( dodbc_ver == SQL_OV_ODBC2 || (dodbc_ver == SQL_OV_ODBC3 && hproc2 != SQL_NULL_HPROC))) hproc3 = SQL_NULL_HPROC; #if (ODBCVER >= 0x0300) if (fOption == SQL_DROP && hproc3 != SQL_NULL_HPROC) { CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc3, (SQL_HANDLE_STMT, pstmt->dhstmt)); } #endif else { if (hproc2 == SQL_NULL_HPROC) { PUSHSQLERR (pstmt->herr, en_IM001); return SQL_ERROR; } CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc2, (pstmt->dhstmt, fOption)); } if (!SQL_SUCCEEDED (retcode)) { return retcode; } /* state transition */ switch (fOption) { case SQL_DROP: /* delete this object (ignore return) */ _iodbcdm_RemoveBind (pstmt); _iodbcdm_FreeStmtParams(pstmt); #if 0 _iodbcdm_dropstmt (pstmt); /* Delayed until last moment */ #endif break; case SQL_CLOSE: pstmt->cursor_state = en_stmt_cursor_no; /* This means cursor name set by * SQLSetCursorName() call will also * be erased. */ switch (pstmt->state) { case en_stmt_allocated: case en_stmt_prepared: break; case en_stmt_executed_with_info: case en_stmt_executed: case en_stmt_cursoropen: case en_stmt_fetched: case en_stmt_xfetched: if (pstmt->prep_state) { pstmt->state = en_stmt_prepared; } else { pstmt->state = en_stmt_allocated; } break; default: break; } break; case SQL_UNBIND: _iodbcdm_RemoveBind (pstmt); break; case SQL_RESET_PARAMS: _iodbcdm_FreeStmtParams(pstmt); break; default: break; } return retcode; } SQLRETURN SQL_API SQLFreeStmt ( SQLHSTMT hstmt, SQLUSMALLINT fOption) { ENTER_STMT (hstmt, trace_SQLFreeStmt (TRACE_ENTER, hstmt, fOption)); retcode = SQLFreeStmt_Internal (hstmt, fOption); LEAVE_STMT (hstmt, trace_SQLFreeStmt (TRACE_LEAVE, hstmt, fOption); if (fOption == SQL_DROP) _iodbcdm_dropstmt (hstmt); ); } static SQLRETURN SQLSetStmtOption_Internal ( SQLHSTMT hstmt, SQLUSMALLINT fOption, SQLUINTEGER vParam) { STMT (pstmt, hstmt); HPROC hproc2 = SQL_NULL_HPROC; HPROC hproc3 = SQL_NULL_HPROC; sqlstcode_t sqlstat = en_00000; SQLRETURN retcode; CONN (pdbc, pstmt->hdbc); SQLUINTEGER odbc_ver = ((GENV_t *) pdbc->genv)->odbc_ver; SQLUINTEGER dodbc_ver = ((ENV_t *) pdbc->henv)->dodbc_ver; #if (ODBCVER < 0x0300) /* check option */ if ( /* fOption < SQL_STMT_OPT_MIN || */ fOption > SQL_STMT_OPT_MAX) { PUSHSQLERR (pstmt->herr, en_S1092); return SQL_ERROR; } #endif /* ODBCVER < 0x0300 */ if (fOption == SQL_CONCURRENCY || fOption == SQL_CURSOR_TYPE || fOption == SQL_SIMULATE_CURSOR || fOption == SQL_USE_BOOKMARKS) { if (pstmt->asyn_on != en_NullProc) { if (pstmt->prep_state) { sqlstat = en_S1011; } } else { switch (pstmt->state) { case en_stmt_prepared: sqlstat = en_S1011; break; case en_stmt_executed_with_info: case en_stmt_executed: case en_stmt_cursoropen: case en_stmt_fetched: case en_stmt_xfetched: sqlstat = en_24000; break; case en_stmt_needdata: case en_stmt_mustput: case en_stmt_canput: if (pstmt->prep_state) { sqlstat = en_S1011; } break; default: break; } } } else { if (pstmt->asyn_on != en_NullProc) { if (!pstmt->prep_state) { sqlstat = en_S1010; } } else { if (pstmt->state >= en_stmt_needdata) { sqlstat = en_S1010; } } } if (sqlstat != en_00000) { PUSHSQLERR (pstmt->herr, sqlstat); return SQL_ERROR; } hproc2 = _iodbcdm_getproc (pstmt->hdbc, en_SetStmtOption); #if (ODBCVER >= 0x0300) hproc3 = _iodbcdm_getproc (pstmt->hdbc, en_SetStmtAttr); #endif if (odbc_ver == SQL_OV_ODBC2 && ( dodbc_ver == SQL_OV_ODBC2 || (dodbc_ver == SQL_OV_ODBC3 && hproc2 != SQL_NULL_HPROC))) hproc3 = SQL_NULL_HPROC; #if (ODBCVER >= 0x0300) if (hproc3 != SQL_NULL_HPROC) { switch ((int)fOption) { /* ODBC integer attributes */ case SQL_ATTR_ASYNC_ENABLE: case SQL_ATTR_CONCURRENCY: case SQL_ATTR_CURSOR_TYPE: case SQL_ATTR_KEYSET_SIZE: case SQL_ATTR_MAX_LENGTH: case SQL_ATTR_MAX_ROWS: case SQL_ATTR_NOSCAN: case SQL_ATTR_QUERY_TIMEOUT: case SQL_ATTR_RETRIEVE_DATA: case SQL_ATTR_ROW_BIND_TYPE: case SQL_ATTR_ROW_NUMBER: case SQL_ATTR_SIMULATE_CURSOR: case SQL_ATTR_USE_BOOKMARKS: CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc3, (pstmt->dhstmt, fOption, vParam, 0)); break; /* ODBC3 attributes */ case SQL_ATTR_APP_PARAM_DESC: case SQL_ATTR_APP_ROW_DESC: case SQL_ATTR_CURSOR_SCROLLABLE: case SQL_ATTR_CURSOR_SENSITIVITY: case SQL_ATTR_ENABLE_AUTO_IPD: case SQL_ATTR_FETCH_BOOKMARK_PTR: case SQL_ATTR_IMP_PARAM_DESC: case SQL_ATTR_IMP_ROW_DESC: case SQL_ATTR_METADATA_ID: case SQL_ATTR_PARAM_BIND_OFFSET_PTR: case SQL_ATTR_PARAM_BIND_TYPE: case SQL_ATTR_PARAM_STATUS_PTR: case SQL_ATTR_PARAMS_PROCESSED_PTR: case SQL_ATTR_PARAMSET_SIZE: case SQL_ATTR_ROW_ARRAY_SIZE: 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: PUSHSQLERR (pstmt->herr, en_IM001); return SQL_ERROR; default: CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc3, (pstmt->dhstmt, fOption, vParam, SQL_NTS)); } } else #endif { if (hproc2 == SQL_NULL_HPROC) { PUSHSQLERR (pstmt->herr, en_IM001); return SQL_ERROR; } CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc2, (pstmt->dhstmt, fOption, vParam)); } if (SQL_SUCCEEDED (retcode)) { if (fOption == SQL_ROWSET_SIZE || fOption == SQL_ATTR_ROW_ARRAY_SIZE) { pstmt->rowset_size = vParam; if (retcode == SQL_SUCCESS_WITH_INFO) { SQLUINTEGER data; if (SQLGetStmtOption_Internal (hstmt, SQL_ROWSET_SIZE, &data) == SQL_SUCCESS) pstmt->rowset_size = data; } } if (fOption == SQL_BIND_TYPE) pstmt->row_bind_type = vParam; } return retcode; } SQLRETURN SQL_API SQLSetStmtOption ( SQLHSTMT hstmt, SQLUSMALLINT fOption, SQLULEN vParam) { ENTER_STMT (hstmt, trace_SQLSetStmtOption (TRACE_ENTER, hstmt, fOption, vParam)); retcode = SQLSetStmtOption_Internal (hstmt, fOption, vParam); LEAVE_STMT (hstmt, trace_SQLSetStmtOption (TRACE_LEAVE, hstmt, fOption, vParam)); } #if ODBCVER >= 0x0300 SQLRETURN SQL_API SQLSetStmtOptionA ( SQLHSTMT hstmt, SQLUSMALLINT fOption, SQLULEN vParam) { ENTER_STMT (hstmt, trace_SQLSetStmtOption (TRACE_ENTER, hstmt, fOption, vParam)); retcode = SQLSetStmtOption_Internal (hstmt, fOption, vParam); LEAVE_STMT (hstmt, trace_SQLSetStmtOption (TRACE_LEAVE, hstmt, fOption, vParam)); } #endif SQLRETURN SQLGetStmtOption_Internal ( SQLHSTMT hstmt, SQLUSMALLINT fOption, SQLPOINTER pvParam) { STMT (pstmt, hstmt); HPROC hproc2 = SQL_NULL_HPROC; HPROC hproc3 = SQL_NULL_HPROC; sqlstcode_t sqlstat = en_00000; SQLRETURN retcode; CONN (pdbc, pstmt->hdbc); SQLUINTEGER odbc_ver = ((GENV_t *) pdbc->genv)->odbc_ver; SQLUINTEGER dodbc_ver = ((ENV_t *) pdbc->henv)->dodbc_ver; #if (ODBCVER < 0x0300) /* check option */ if ( /* fOption < SQL_STMT_OPT_MIN || */ fOption > SQL_STMT_OPT_MAX) { PUSHSQLERR (pstmt->herr, en_S1092); return SQL_ERROR; } #endif /* ODBCVER < 0x0300 */ /* check state */ if (pstmt->state >= en_stmt_needdata || pstmt->asyn_on != en_NullProc) { sqlstat = en_S1010; } else { switch (pstmt->state) { case en_stmt_allocated: case en_stmt_prepared: case en_stmt_executed_with_info: case en_stmt_executed: case en_stmt_cursoropen: if (fOption == SQL_ROW_NUMBER || fOption == SQL_GET_BOOKMARK) { sqlstat = en_24000; } break; default: break; } } if (sqlstat != en_00000) { PUSHSQLERR (pstmt->herr, sqlstat); return SQL_ERROR; } hproc2 = _iodbcdm_getproc (pstmt->hdbc, en_GetStmtOption); #if (ODBCVER >= 0x0300) hproc3 = _iodbcdm_getproc (pstmt->hdbc, en_GetStmtAttr); #endif if (odbc_ver == SQL_OV_ODBC2 && ( dodbc_ver == SQL_OV_ODBC2 || (dodbc_ver == SQL_OV_ODBC3 && hproc2 != SQL_NULL_HPROC))) hproc3 = SQL_NULL_HPROC; #if (ODBCVER >= 0x0300) if (hproc3 != SQL_NULL_HPROC) { switch ((int)fOption) { /* ODBC integer attributes */ case SQL_ATTR_ASYNC_ENABLE: case SQL_ATTR_CONCURRENCY: case SQL_ATTR_CURSOR_TYPE: case SQL_ATTR_KEYSET_SIZE: case SQL_ATTR_MAX_LENGTH: case SQL_ATTR_MAX_ROWS: case SQL_ATTR_NOSCAN: case SQL_ATTR_QUERY_TIMEOUT: case SQL_ATTR_RETRIEVE_DATA: case SQL_ATTR_ROW_BIND_TYPE: case SQL_ATTR_ROW_NUMBER: case SQL_ATTR_SIMULATE_CURSOR: case SQL_ATTR_USE_BOOKMARKS: CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc3, (pstmt->dhstmt, fOption, pvParam, 0, NULL)); break; /* ODBC3 attributes */ case SQL_ATTR_APP_PARAM_DESC: case SQL_ATTR_APP_ROW_DESC: case SQL_ATTR_CURSOR_SCROLLABLE: case SQL_ATTR_CURSOR_SENSITIVITY: case SQL_ATTR_ENABLE_AUTO_IPD: case SQL_ATTR_FETCH_BOOKMARK_PTR: case SQL_ATTR_IMP_PARAM_DESC: case SQL_ATTR_IMP_ROW_DESC: case SQL_ATTR_METADATA_ID: case SQL_ATTR_PARAM_BIND_OFFSET_PTR: case SQL_ATTR_PARAM_BIND_TYPE: case SQL_ATTR_PARAM_STATUS_PTR: case SQL_ATTR_PARAMS_PROCESSED_PTR: case SQL_ATTR_PARAMSET_SIZE: case SQL_ATTR_ROW_ARRAY_SIZE: 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: PUSHSQLERR (pstmt->herr, en_IM001); return SQL_ERROR; default: CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc3, (pstmt->dhstmt, fOption, pvParam, SQL_MAX_OPTION_STRING_LENGTH, NULL)); break; } } else #endif { if (hproc2 == SQL_NULL_HPROC) { PUSHSQLERR (pstmt->herr, en_IM001); return SQL_ERROR; } CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc2, (pstmt->dhstmt, fOption, pvParam)); } return retcode; } SQLRETURN SQL_API SQLGetStmtOption ( SQLHSTMT hstmt, SQLUSMALLINT fOption, SQLPOINTER pvParam) { ENTER_STMT (hstmt, trace_SQLGetStmtOption (TRACE_ENTER, hstmt, fOption, pvParam)); retcode = SQLGetStmtOption_Internal (hstmt, fOption, pvParam); LEAVE_STMT (hstmt, trace_SQLGetStmtOption (TRACE_LEAVE, hstmt, fOption, pvParam)); } #if ODBCVER >= 0x0300 SQLRETURN SQL_API SQLGetStmtOptionA ( SQLHSTMT hstmt, SQLUSMALLINT fOption, SQLPOINTER pvParam) { ENTER_STMT (hstmt, trace_SQLGetStmtOption (TRACE_ENTER, hstmt, fOption, pvParam)); retcode = SQLGetStmtOption_Internal (hstmt, fOption, pvParam); LEAVE_STMT (hstmt, trace_SQLGetStmtOption (TRACE_LEAVE, hstmt, fOption, pvParam)); } #endif static SQLRETURN SQLCancel_Internal (SQLHSTMT hstmt, int stmt_cip) { STMT (pstmt, hstmt); HPROC hproc; SQLRETURN retcode; /* check argument */ /* check state */ /* call driver */ hproc = _iodbcdm_getproc (pstmt->hdbc, en_Cancel); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (pstmt->herr, en_IM001); return SQL_ERROR; } CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc, (pstmt->dhstmt)); /* state transition */ if (!SQL_SUCCEEDED (retcode)) { return retcode; } if (stmt_cip == 0) { ODBC_LOCK(); switch (pstmt->state) { case en_stmt_allocated: case en_stmt_prepared: break; case en_stmt_executed_with_info: case en_stmt_executed: if (pstmt->prep_state) { pstmt->state = en_stmt_prepared; } else { pstmt->state = en_stmt_allocated; } break; case en_stmt_cursoropen: case en_stmt_fetched: case en_stmt_xfetched: if (pstmt->prep_state) { pstmt->state = en_stmt_prepared; } else { pstmt->state = en_stmt_allocated; } break; case en_stmt_needdata: case en_stmt_mustput: case en_stmt_canput: switch (pstmt->need_on) { case en_ExecDirect: pstmt->state = en_stmt_allocated; break; case en_Execute: pstmt->state = en_stmt_prepared; break; case en_SetPos: pstmt->state = en_stmt_xfetched; break; default: break; } pstmt->need_on = en_NullProc; break; default: break; } ODBC_UNLOCK(); } return retcode; } SQLRETURN SQL_API SQLCancel (SQLHSTMT hstmt) { ENTER_STMT_CANCEL (hstmt, trace_SQLCancel (TRACE_ENTER, hstmt)); retcode = SQLCancel_Internal (hstmt, stmt_cip); LEAVE_STMT_CANCEL (hstmt, trace_SQLCancel (TRACE_LEAVE, hstmt)); } void _iodbcdm_FreeStmtVars(STMT_t *pstmt) { int i; VAR_t *p; for(i= 0; i < STMT_VARS_MAX; i++) { p = &pstmt->vars[i]; if (p->data) { free(p->data); p->data = NULL; } p->length = 0; } pstmt->vars_inserted = 0; } void _iodbcdm_FreeStmtParams(STMT_t *pstmt) { PPARM pparm; int i, maxpar; if (pstmt->st_pparam) { maxpar = pstmt->st_nparam; pparm = pstmt->st_pparam; for (i = 0; i < maxpar; i++, pparm++) { if (pparm->pm_tmp) { free(pparm->pm_tmp); pparm->pm_tmp = NULL; } if (pparm->pm_tmp_Ind) { free(pparm->pm_tmp_Ind); pparm->pm_tmp_Ind = NULL; } } free (pstmt->st_pparam); pstmt->st_pparam = NULL; } pstmt->st_nparam = 0; } void * _iodbcdm_alloc_var(STMT_t *pstmt, int i, int size) { VAR_t *var; if (i > STMT_VARS_MAX - 1) return NULL; var = &pstmt->vars[i]; pstmt->vars_inserted = 1; if (size == 0) { MEM_FREE(var->data); var->data = NULL; var->length = 0; return NULL; } if (var->data == NULL || var->length < size) { MEM_FREE(var->data); var->length = 0; if ((var->data = MEM_ALLOC(size)) != NULL) var->length = size; } return var->data; } /** DM => DRV**/ void * _iodbcdm_conv_var(STMT_t *pstmt, int i, void *pData, int pDataLength, CONV_DIRECT direct) { VAR_t *var; size_t size; int count_alloc = 0; CONN (pdbc, pstmt->hdbc); ENVR (penv, pdbc->henv); DM_CONV *conv = &pdbc->conv; IODBC_CHARSET m_charset = (conv) ? conv->dm_cp : CP_DEF; IODBC_CHARSET d_charset = (conv) ? conv->drv_cp : CP_DEF; if (i > STMT_VARS_MAX - 1 || direct == CD_NONE) return NULL; var = &pstmt->vars[i]; pstmt->vars_inserted = 1; if (pData == NULL) { MEM_FREE(var->data); var->data = NULL; var->length = 0; return NULL; } if (pDataLength == SQL_NTS) { if (direct == CD_W2A || direct == CD_W2W) size = DM_WCSLEN(conv, pData); else size = strlen((char *) pData); } else size = pDataLength; if (direct == CD_W2A ) count_alloc = size * MB_CUR_MAX + 1; else count_alloc = (size + 1) * DRV_WCHARSIZE_ALLOC(conv); if (var->data == NULL || var->length < count_alloc) { MEM_FREE(var->data); var->length = 0; if ((var->data = MEM_ALLOC(count_alloc)) != NULL) var->length = count_alloc; } if (direct == CD_A2W) { size = dm_conv_A2W((char *)pData, pDataLength, var->data, count_alloc - DRV_WCHARSIZE(conv), d_charset); if (d_charset == CP_UTF8) *(char*)(var->data + size) = 0; else DRV_SetWCharAt(conv, var->data, size/DRV_WCHARSIZE(conv), 0); } else if (direct == CD_W2A) { size = dm_conv_W2A(pData, pDataLength, (char *)var->data, count_alloc - 1, m_charset); ((char*)var->data)[size] = '\0'; } else /* CD_W2W*/ { size = dm_conv_W2W(pData, pDataLength, (char *)var->data, count_alloc - DRV_WCHARSIZE(conv), m_charset, d_charset); if (d_charset == CP_UTF8) *(char*)(var->data + size) = 0; else DRV_SetWCharAt(conv, var->data, size/DRV_WCHARSIZE(conv), 0); } return (void *) var->data; } SQLRETURN _iodbcdm_BindColumn (STMT_t *pstmt, BIND_t *pbind) { PBLST pblst; PBLST prev; /* * Initialize the cell */ if ((pblst = (PBLST) calloc (1, sizeof (TBLST))) == NULL) { return SQL_ERROR; } pblst->bl_bind = *pbind; /* * First on the list? */ if (pstmt->st_pbinding == NULL) { pstmt->st_pbinding = pblst; return SQL_SUCCESS; } for (prev = pstmt->st_pbinding; ; prev = prev->bl_nextBind) { /* * Column already on the linked list? */ if (prev->bl_bind.bn_col == pbind->bn_col) { prev->bl_bind = *pbind; MEM_FREE (pblst); return SQL_SUCCESS; } if (prev->bl_nextBind == NULL) break; } prev->bl_nextBind = pblst; return SQL_SUCCESS; } /* * Remove a binding from the linked list */ int _iodbcdm_UnBindColumn (STMT_t *pstmt, BIND_t *pbind) { PBLST pNewNextBind; PBLST *pBindHistory; /* * Anything on the list? No? Nothing to do. */ if (pstmt->st_pbinding == NULL) return 0; for (pBindHistory = &pstmt->st_pbinding; (*pBindHistory); pBindHistory = &(*pBindHistory)->bl_nextBind) { /* * Column already on the linked list? */ if ((*pBindHistory)->bl_bind.bn_col == pbind->bn_col) { pNewNextBind = (*pBindHistory)->bl_nextBind; free (*pBindHistory); (*pBindHistory) = pNewNextBind; return 0; } } return 0; } /* * Remove all bindings */ void _iodbcdm_RemoveBind (STMT_t *pstmt) { BIND_t *col; PBLST pblst, pnext; if (pstmt->st_pbinding) { for (pblst = pstmt->st_pbinding; pblst; pblst = pnext) { col = &(pblst->bl_bind); MEM_FREE(col->bn_tmp); MEM_FREE(col->bn_tmp_Ind); pnext = pblst->bl_nextBind; free (pblst); } pstmt->st_pbinding = NULL; } } static void _iodbcdm_bindConv_A2W_d2m(char *data, SQLLEN *pInd, UDWORD size, DM_CONV *conv) { if (*pInd != SQL_NULL_DATA) { int count = 0; char *buf = calloc(size + 1, sizeof(char)); if (buf != NULL) { memcpy(buf, data, size); dm_StrCopyOut2_A2W_d2m (conv, (SQLCHAR *)buf, data, size, NULL, &count); MEM_FREE(buf); } if (pInd && *pInd != SQL_NTS) *pInd =(SQLLEN)count; } } static void _iodbcdm_bindConv_W2A_m2d(char *data, SQLLEN *pInd, UDWORD size, DM_CONV *conv) { if (*pInd != SQL_NULL_DATA) { int count = 0; char *buf = calloc(size + 1, sizeof(char)); if (buf != NULL) { memcpy(buf, data, size); dm_StrCopyOut2_W2A_m2d (conv, buf, (SQLCHAR *)data, size, NULL, &count); MEM_FREE(buf); } if (pInd && *pInd != SQL_NTS) *pInd =(SQLLEN)count; } } static void _iodbcdm_bindConv_W2W_d2m(char *data, SQLLEN *pInd, UDWORD size, DM_CONV *conv) { if (*pInd != SQL_NULL_DATA) { int count = 0; char *buf = calloc(size + WCHAR_MAXSIZE, sizeof(char)); if (buf != NULL) { memcpy(buf, data, size); dm_StrCopyOut2_W2W_d2m (conv, buf, data, size, NULL, &count); MEM_FREE(buf); } if (pInd && *pInd != SQL_NTS) *pInd =(SQLLEN)count; } } static void _iodbcdm_bindConv_W2W_m2d(char *data, SQLLEN *pInd, UDWORD size, DM_CONV *conv) { if (*pInd != SQL_NULL_DATA) { int count = 0; char *buf = calloc(size + WCHAR_MAXSIZE, sizeof(char)); if (buf != NULL) { memcpy(buf, data, size); dm_StrCopyOut2_W2W_m2d (conv, buf, data, size, NULL, &count); MEM_FREE(buf); } if (pInd && *pInd != SQL_NTS) *pInd =(SQLLEN)count; } } static SQLLEN GetColSize (BIND_t *col) { SQLLEN elementSize; if (col->bn_type == SQL_C_CHAR || col->bn_type == SQL_C_BINARY || col->bn_type == SQL_C_WCHAR) { elementSize = col->bn_size; } else /* fixed length types */ { elementSize = _iodbcdm_OdbcCTypeSize(col->bn_type); } return elementSize; } /** drv => dm **/ void _iodbcdm_ConvBindData (STMT_t *pstmt) { PBLST ptr; BIND_t *col; UDWORD i, size, row_size; CONN (pdbc, pstmt->hdbc); ENVR (penv, pdbc->henv); DM_CONV *conv = &pdbc->conv; IODBC_CHARSET m_charset = CP_DEF; IODBC_CHARSET d_charset = CP_DEF; SQLULEN cRows = pstmt->rowset_size; SQLUINTEGER bindOffset = pstmt->row_bind_offset; /* * Anything on the list? No? Nothing to do. */ if (pstmt->st_pbinding == NULL) return ; if (cRows == 0) cRows = 1; if (conv) { m_charset = conv ? conv->dm_cp: CP_DEF; d_charset = conv ? conv->drv_cp: CP_DEF; } for (ptr = pstmt->st_pbinding; ptr; ptr = ptr->bl_nextBind) { col = &(ptr->bl_bind); for (i = 0; i < cRows; i++) { void *val_dm = NULL; void *val_drv = NULL; SQLLEN *pInd_dm = NULL; SQLLEN *pInd_drv = NULL; SQLLEN len; size = GetColSize(col); if (pstmt->row_bind_type == SQL_BIND_BY_COLUMN) { if (col->bn_pInd) pInd_dm = &((SQLLEN*)((char*)col->bn_pInd + bindOffset))[i]; val_dm = (char *) col->bn_data + i * size + bindOffset; if (col->rebinded) { pInd_drv = &((SQLLEN*)col->bn_conv_pInd)[i]; val_drv = (char *) col->bn_conv_data + i * col->bn_conv_size; } } else /* row-wise binding */ { row_size = pstmt->row_bind_type; if (col->bn_pInd) pInd_dm = (SQLLEN *) ((char *) col->bn_pInd + i * row_size + bindOffset); val_dm = (char *) col->bn_data + i * row_size + bindOffset; if (col->rebinded) { pInd_drv = (SQLLEN *) ((char *) col->bn_conv_pInd + i * pstmt->conv_row_bind_type); val_drv = (char *) col->bn_conv_data + i * pstmt->conv_row_bind_type; } } if (col->rebinded) { if (*pInd_drv != SQL_NULL_DATA) { if (col->bn_type==SQL_C_WCHAR) { len = (SQLLEN)*pInd_drv; len = dm_conv_W2W(val_drv, len, val_dm, size, d_charset, m_charset); if (m_charset == CP_UTF8) *(char*)(val_dm + len) = 0; else DM_SetWCharAt(conv, val_dm, len/DM_WCHARSIZE(conv), 0); if (pInd_dm) *pInd_dm = (*pInd_drv != SQL_NTS)? len: SQL_NTS; } else { memcpy(val_dm, val_drv, size); if (pInd_dm) *pInd_dm = *pInd_drv; } } else { if (pInd_dm) *pInd_dm = *pInd_drv; } } else { if (col->direct == CD_A2W) _iodbcdm_bindConv_A2W_d2m(val_dm, pInd_dm, size, conv); else if (col->direct == CD_W2W) _iodbcdm_bindConv_W2W_d2m(val_dm, pInd_dm, size, conv); } } } } /** dm => drv **/ void _iodbcdm_ConvBindData_m2d (STMT_t *pstmt) { PBLST ptr; BIND_t *col; UDWORD i, size, row_size; CONN (pdbc, pstmt->hdbc); ENVR (penv, pdbc->henv); DM_CONV *conv = &pdbc->conv; IODBC_CHARSET m_charset = CP_DEF; IODBC_CHARSET d_charset = CP_DEF; SQLULEN cRows = pstmt->rowset_size; SQLUINTEGER bindOffset = pstmt->row_bind_offset; /* * Anything on the list? No? Nothing to do. */ if (pstmt->st_pbinding == NULL) return ; if (cRows == 0) cRows = 1; if (conv) { m_charset = conv ? conv->dm_cp: CP_DEF; d_charset = conv ? conv->drv_cp: CP_DEF; } for (ptr = pstmt->st_pbinding; ptr; ptr = ptr->bl_nextBind) { col = &(ptr->bl_bind); for (i = 0; i < cRows; i++) { void *val_dm = NULL; void *val_drv = NULL; SQLLEN *pInd_dm = NULL; SQLLEN *pInd_drv = NULL; SQLLEN len; size = GetColSize(col); if (pstmt->row_bind_type == SQL_BIND_BY_COLUMN) { if (col->bn_pInd) pInd_dm = &((SQLLEN*)((char*)col->bn_pInd + bindOffset))[i]; val_dm = (char *) col->bn_data + i * size + bindOffset; if (col->rebinded) { pInd_drv = &((SQLLEN*)col->bn_conv_pInd)[i]; val_drv = (char *) col->bn_conv_data + i * col->bn_conv_size; } } else /* row-wise binding */ { row_size = pstmt->row_bind_type; if (col->bn_pInd) pInd_dm = (SQLLEN *) ((char *) col->bn_pInd + i * row_size + bindOffset); val_dm = (char *) col->bn_data + i * row_size + bindOffset; if (col->rebinded) { pInd_drv = (SQLLEN *) ((char *) col->bn_conv_pInd + i * pstmt->conv_row_bind_type); val_drv = (char *) col->bn_conv_data + i * pstmt->conv_row_bind_type; } } if (col->rebinded) { if (*pInd_dm != SQL_NULL_DATA) { if (col->bn_type==SQL_C_WCHAR) { len = (SQLLEN)*pInd_dm; size = size/DM_WCHARSIZE(conv)*DRV_WCHARSIZE(conv); len = dm_conv_W2W(val_dm, len, val_drv, size, m_charset, d_charset); if (d_charset == CP_UTF8) *(char*)(val_dm + len) = 0; else DRV_SetWCharAt(conv, val_drv, len/DRV_WCHARSIZE(conv), 0); if (pInd_dm) *pInd_drv = (*pInd_dm != SQL_NTS)? len: SQL_NTS; } else { memcpy(val_drv, val_dm, size); if (pInd_dm) *pInd_drv = *pInd_dm; } } else { if (pInd_dm) *pInd_drv = *pInd_dm; } } else /* convert on place */ { if (col->direct == CD_A2W) _iodbcdm_bindConv_W2A_m2d(val_dm, pInd_dm, size, conv); else if (col->direct == CD_W2W) _iodbcdm_bindConv_W2W_m2d(val_dm, pInd_dm, size, conv); } } } } static SQLRETURN _ReBindCol (STMT_t *pstmt, BIND_t *col) { HPROC hproc = SQL_NULL_HPROC; SQLRETURN retcode = SQL_SUCCESS; hproc = _iodbcdm_getproc (pstmt->hdbc, en_BindCol); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (pstmt->herr, en_IM001); return SQL_ERROR; } CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc, (pstmt->dhstmt, col->bn_col, col->bn_type, col->bn_conv_data, col->bn_conv_size, col->bn_conv_pInd)); return retcode; } SQLRETURN _iodbcdm_FixColBindData (STMT_t *pstmt) { PBLST ptr; BIND_t *col; CONN (pdbc, pstmt->hdbc); ENVR (penv, pdbc->henv); SQLUINTEGER odbc_ver = ((GENV_t *) pdbc->genv)->odbc_ver; SQLUINTEGER dodbc_ver = ((ENV_t *) pdbc->henv)->dodbc_ver; DM_CONV *conv = &pdbc->conv; IODBC_CHARSET m_charset = CP_DEF; IODBC_CHARSET d_charset = CP_DEF; BOOL needRebind = FALSE; SQLLEN sz_mult = 1; SQLULEN cRows = pstmt->rowset_size; HPROC hproc2 = SQL_NULL_HPROC; HPROC hproc3 = SQL_NULL_HPROC; SQLRETURN retcode = SQL_SUCCESS; /* * Anything on the list? No? Nothing to do. */ if (pstmt->st_pbinding == NULL) return SQL_SUCCESS; if (cRows == 0) cRows = 1; if (conv) { m_charset = conv ? conv->dm_cp: CP_DEF; d_charset = conv ? conv->drv_cp: CP_DEF; if (m_charset==CP_UTF16 && d_charset==CP_UCS4) sz_mult = 2; else if (m_charset==CP_UTF8 && d_charset==CP_UCS4) sz_mult = 4; else if (m_charset==CP_UTF8 && d_charset==CP_UTF16) sz_mult = 2; else sz_mult = 1; } if (penv->unicode_driver) { if (conv==NULL || (conv && conv->dm_cp == conv->drv_cp)) { needRebind = FALSE; } else if ((m_charset==CP_UTF16 && d_charset==CP_UCS4) ||(m_charset==CP_UTF8 && d_charset==CP_UTF16) ||(m_charset==CP_UTF8 && d_charset==CP_UCS4)) { /* check if we need rebind columns */ for (ptr = pstmt->st_pbinding; ptr; ptr = ptr->bl_nextBind) { col = &(ptr->bl_bind); if (col->bn_type==SQL_C_WCHAR && col->direct==CD_W2W) { needRebind = TRUE; break; } } } } if (needRebind) { SQLULEN new_size = 0; void *buf = NULL; if (pstmt->row_bind_type == SQL_BIND_BY_COLUMN) { for (ptr = pstmt->st_pbinding; ptr; ptr = ptr->bl_nextBind) { col = &(ptr->bl_bind); XFREE(col->bn_tmp); XFREE(col->bn_tmp_Ind); col->bn_conv_size = GetColSize(col); if (col->bn_type==SQL_C_WCHAR) col->bn_conv_size *= sz_mult; new_size = cRows * col->bn_conv_size; buf = calloc(new_size, sizeof(char)); if (!buf) { PUSHSQLERR (pstmt->herr, en_HY001); return SQL_ERROR; } col->bn_tmp = col->bn_conv_data = buf; buf = calloc(cRows, sizeof(SQLLEN)); if (!buf) { PUSHSQLERR (pstmt->herr, en_HY001); return SQL_ERROR; } col->bn_tmp_Ind = col->bn_conv_pInd = (SQLLEN*)buf; retcode = _ReBindCol(pstmt, col); if (!SQL_SUCCEEDED (retcode)) return retcode; col->rebinded = TRUE; } } else /* row-wise bind*/ { /* calc new_size */ for (ptr = pstmt->st_pbinding; ptr; ptr = ptr->bl_nextBind) { col = &(ptr->bl_bind); new_size += sizeof(SQLLEN); col->bn_conv_size = GetColSize(col); if (col->bn_type==SQL_C_WCHAR) col->bn_conv_size *= sz_mult; new_size += col->bn_conv_size; } if (pstmt->rows_buf) { free(pstmt->rows_buf); pstmt->rows_buf = NULL; } buf = calloc((new_size*cRows), sizeof(char)); if (!buf) { PUSHSQLERR (pstmt->herr, en_HY001); return SQL_ERROR; } pstmt->rows_buf = buf; pstmt->conv_row_bind_type = new_size; /***** Set Bind_type in driver to new size *****/ if (dodbc_ver == SQL_OV_ODBC3) { CALL_UDRIVER(pstmt->hdbc, pstmt, retcode, hproc3, penv->unicode_driver, en_SetStmtAttr, (pstmt->dhstmt, (SQLINTEGER)SQL_ATTR_ROW_BIND_TYPE, (SQLPOINTER)new_size, 0)); if (hproc3 == SQL_NULL_HPROC) { PUSHSQLERR (pstmt->herr, en_IM001); return SQL_ERROR; } } else { hproc2 = _iodbcdm_getproc (pstmt->hdbc, en_SetStmtOption); if (hproc2 == SQL_NULL_HPROC) hproc2 = _iodbcdm_getproc (pstmt->hdbc, en_SetStmtOptionA); if (hproc2 == SQL_NULL_HPROC) { PUSHSQLERR (pstmt->herr, en_IM001); return SQL_ERROR; } CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc2, (pstmt->dhstmt, (SQLUSMALLINT)SQL_BIND_TYPE, (SQLUINTEGER)new_size)); } if (!SQL_SUCCEEDED (retcode)) return retcode; /* rebind parameters */ buf = pstmt->rows_buf; for (ptr = pstmt->st_pbinding; ptr; ptr = ptr->bl_nextBind) { col = &(ptr->bl_bind); col->bn_conv_data = buf; buf += col->bn_conv_size; col->bn_conv_pInd = (SQLLEN*)buf; buf += sizeof(SQLLEN); retcode = _ReBindCol(pstmt, col); if (!SQL_SUCCEEDED (retcode)) return retcode; col->rebinded = TRUE; } } /***** Set ColSet offset *****/ if (dodbc_ver == SQL_OV_ODBC3) { CALL_UDRIVER(pstmt->hdbc, pstmt, retcode, hproc3, penv->unicode_driver, en_SetStmtAttr, (pstmt->dhstmt, (SQLINTEGER)SQL_ATTR_ROW_BIND_OFFSET_PTR, (SQLPOINTER)0, 0)); if (hproc3 == SQL_NULL_HPROC) { PUSHSQLERR (pstmt->herr, en_IM001); return SQL_ERROR; } } #if 0 if (!SQL_SUCCEEDED (retcode)) return retcode; #endif } return SQL_SUCCESS; } libiodbc-3.52.16/iodbc/ithread.h0000664000175000017500000001234714424170750013246 00000000000000/* * ithread.h * * $Id$ * * Macros for locking & multithreading * * The iODBC driver manager. * * Copyright (C) 1995 Ke Jin * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef _ITHREAD_H #define _ITHREAD_H /* * Threading under windows */ #if defined (WIN32) && !defined (NO_THREADING) # define IODBC_THREADING # define THREAD_IDENT ((unsigned long) GetCurrentThreadId()) # define MUTEX_DECLARE(M) HANDLE M # define MUTEX_INIT(M) M = CreateMutex (NULL, FALSE, NULL) # define MUTEX_DONE(M) CloseHandle (M) # define MUTEX_LOCK(M) WaitForSingleObject (M, INFINITE) # define MUTEX_UNLOCK(M) ReleaseMutex (M) # define SPINLOCK_DECLARE(M) CRITICAL_SECTION M # define SPINLOCK_INIT(M) InitializeCriticalSection (&M) # define SPINLOCK_DONE(M) DeleteCriticalSection (&M) # define SPINLOCK_LOCK(M) EnterCriticalSection (&M) # define SPINLOCK_UNLOCK(M) LeaveCriticalSection (&M) /* * Threading with pthreads */ #elif defined (WITH_PTHREADS) #ifndef _REENTRANT # error Add -D_REENTRANT to your compiler flags #endif #include # define IODBC_THREADING # ifndef OLD_PTHREADS # define THREAD_IDENT ((unsigned long) (pthread_self ())) # else # define THREAD_IDENT 0UL # endif # define MUTEX_DECLARE(M) pthread_mutex_t M # define MUTEX_INIT(M) pthread_mutex_init (&M, NULL) # define MUTEX_DONE(M) pthread_mutex_destroy (&M) # define MUTEX_LOCK(M) pthread_mutex_lock(&M) # define MUTEX_UNLOCK(M) pthread_mutex_unlock(&M) # define SPINLOCK_DECLARE(M) MUTEX_DECLARE(M) # define SPINLOCK_INIT(M) MUTEX_INIT(M) # define SPINLOCK_DONE(M) MUTEX_DONE(M) # define SPINLOCK_LOCK(M) MUTEX_LOCK(M) # define SPINLOCK_UNLOCK(M) MUTEX_UNLOCK(M) /* * No threading */ #else # undef IODBC_THREADING # undef THREAD_IDENT # define MUTEX_DECLARE(M) int M # define MUTEX_INIT(M) M = 1 # define MUTEX_DONE(M) M = 1 # define MUTEX_LOCK(M) M = 1 # define MUTEX_UNLOCK(M) M = 1 # define SPINLOCK_DECLARE(M) MUTEX_DECLARE (M) # define SPINLOCK_INIT(M) MUTEX_INIT (M) # define SPINLOCK_DONE(M) MUTEX_DONE (M) # define SPINLOCK_LOCK(M) MUTEX_LOCK (M) # define SPINLOCK_UNLOCK(M) MUTEX_UNLOCK (M) #endif #endif /* _ITHREAD_H */ libiodbc-3.52.16/iodbc/install_libodbc.sh0000775000175000017500000001027614424170750015137 00000000000000#!/bin/sh # # install_libodbc.sh # # $Id$ # # The iODBC driver manager. # # Copyright (C) 1995 Ke Jin # Copyright (C) 1996-2023 OpenLink Software # All Rights Reserved. # # This software is released under the terms of either of the following # licenses: # # - GNU Library General Public License (see LICENSE.LGPL) # - The BSD License (see LICENSE.BSD). # # Note that the only valid version of the LGPL license as far as this # project is concerned is the original GNU Library General Public License # Version 2, dated June 1991. # # While not mandated by the BSD license, any patches you make to the # iODBC source code may be contributed back into the iODBC project # at your discretion. Contributions will benefit the Open Source and # Data Access community as a whole. Submissions may be made at: # # http://www.iodbc.org # # # GNU Library Generic Public License Version 2 # ============================================ # 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; only # Version 2 of the License dated June 1991. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # The BSD License # =============== # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. Neither the name of OpenLink Software Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # PREFIX="$1" MACHINE=`uname` # # Check if base installation completed # if test -z "$MACHINE" then echo "**ERROR: unknown machine type" exit 1 fi if test ! -d "$PREFIX" then echo "**ERROR: installation directory [$PREFIX] does not exist" exit 1 fi cd "$PREFIX" # # Create a dynamic libodbc.so library link (if available) # if test -f libiodbc.la then echo "Creating dynamic library for Generic ODBC driver Manager ..." . ./libiodbc.la for lib in $library_names do case $lib in libiodbc.so.*) rm -f libodbc.so ln -s $lib libodbc.so ;; libiodbc.sl.*) rm -f libodbc.sl ln -s $lib libodbc.sl ;; esac break done fi # # Create a static libodbc.a library link # echo "Creating static library for Generic ODBC driver Manager ..." case "$MACHINE" in AIX) echo "Special handling for AIX ..." rm -f libodbc.so libodbc.a odbc.so cat libiodbc.so.2 > odbc.so ar rv libodbc.a odbc.so rm -f odbc.so ;; *) rm -f libodbc.a ln -s libiodbc.a libodbc.a ;; esac libiodbc-3.52.16/iodbc/henv.ci0000664000175000017500000003660214424170750012732 00000000000000/* * henv.ci * * $Id$ * * Function names * * The iODBC driver manager. * * Copyright (C) 1995 Ke Jin * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* There are some exceptions : * on FreeBSD 2.x CLI is defined in Config.mk as "_SQL" * on HP/UX s300/s400, CLI is defined in Config.mk as "_SQL" * on AIX 3.x 4.x, CLI is defined in Config.mk as ".SQL" */ #ifndef CLI # if defined(NEED_USCORE) || defined (DLDAPI_DYLD) # define CLI "_SQL" # else # define CLI "SQL" # endif #endif FUNCDEF (SQL_API_SQLALLOCENV, en_AllocEnv, CLI "AllocEnv") FUNCDEF (SQL_API_SQLALLOCCONNECT, en_AllocConnect, CLI "AllocConnect") FUNCDEF (SQL_API_SQLCONNECT, en_Connect, CLI "Connect") FUNCDEF (SQL_API_SQLDRIVERCONNECT, en_DriverConnect, CLI "DriverConnect") FUNCDEF (SQL_API_SQLBROWSECONNECT, en_BrowseConnect, CLI "BrowseConnect") FUNCDEF (SQL_API_SQLDATASOURCES, en_DataSources, CLI "DataSources") FUNCDEF (SQL_API_SQLDRIVERS, en_Drivers, CLI "Drivers") FUNCDEF (SQL_API_SQLGETINFO, en_GetInfo, CLI "GetInfo") FUNCDEF (SQL_API_SQLGETFUNCTIONS, en_GetFunctions, CLI "GetFunctions") FUNCDEF (SQL_API_SQLGETTYPEINFO, en_GetTypeInfo, CLI "GetTypeInfo") FUNCDEF (SQL_API_SQLSETCONNECTOPTION, en_SetConnectOption, CLI "SetConnectOption") FUNCDEF (SQL_API_SQLGETCONNECTOPTION, en_GetConnectOption, CLI "GetConnectOption") FUNCDEF (SQL_API_SQLSETSTMTOPTION, en_SetStmtOption, CLI "SetStmtOption") FUNCDEF (SQL_API_SQLGETSTMTOPTION, en_GetStmtOption, CLI "GetStmtOption") FUNCDEF (SQL_API_SQLALLOCSTMT, en_AllocStmt, CLI "AllocStmt") FUNCDEF (SQL_API_SQLPREPARE, en_Prepare, CLI "Prepare") FUNCDEF (SQL_API_SQLBINDPARAMETER, en_BindParameter, CLI "BindParameter") FUNCDEF (SQL_API_SQLPARAMOPTIONS, en_ParamOptions, CLI "ParamOptions") FUNCDEF (SQL_API_SQLGETCURSORNAME, en_GetCursorName, CLI "GetCursorName") FUNCDEF (SQL_API_SQLSETCURSORNAME, en_SetCursorName, CLI "SetCursorName") FUNCDEF (SQL_API_SQLSETSCROLLOPTIONS, en_SetScrollOptions, CLI "SetScrollOptions") FUNCDEF (SQL_API_SQLSETPARAM, en_SetParam, CLI "SetParam") FUNCDEF (SQL_API_SQLEXECUTE, en_Execute, CLI "Execute") FUNCDEF (SQL_API_SQLEXECDIRECT, en_ExecDirect, CLI "ExecDirect") FUNCDEF (SQL_API_SQLNATIVESQL, en_NativeSql, CLI "NativeSql") FUNCDEF (SQL_API_SQLDESCRIBEPARAM, en_DescribeParam, CLI "DescribeParam") FUNCDEF (SQL_API_SQLNUMPARAMS, en_NumParams, CLI "NumParams") FUNCDEF (SQL_API_SQLPARAMDATA, en_ParamData, CLI "ParamData") FUNCDEF (SQL_API_SQLPUTDATA, en_PutData, CLI "PutData") FUNCDEF (SQL_API_SQLROWCOUNT, en_RowCount, CLI "RowCount") FUNCDEF (SQL_API_SQLNUMRESULTCOLS, en_NumResultCols, CLI "NumResultCols") FUNCDEF (SQL_API_SQLDESCRIBECOL, en_DescribeCol, CLI "DescribeCol") FUNCDEF (SQL_API_SQLCOLATTRIBUTES, en_ColAttributes, CLI "ColAttributes") FUNCDEF (SQL_API_SQLBINDCOL, en_BindCol, CLI "BindCol") FUNCDEF (SQL_API_SQLFETCH, en_Fetch, CLI "Fetch") FUNCDEF (SQL_API_SQLEXTENDEDFETCH, en_ExtendedFetch, CLI "ExtendedFetch") FUNCDEF (SQL_API_SQLGETDATA, en_GetData, CLI "GetData") FUNCDEF (SQL_API_SQLSETPOS, en_SetPos, CLI "SetPos") FUNCDEF (SQL_API_SQLMORERESULTS, en_MoreResults, CLI "MoreResults") FUNCDEF (SQL_API_SQLERROR, en_Error, CLI "Error") FUNCDEF (SQL_API_SQLCOLUMNPRIVILEGES, en_ColumnPrivileges, CLI "ColumnPrivileges") FUNCDEF (SQL_API_SQLCOLUMNS, en_Columns, CLI "Columns") FUNCDEF (SQL_API_SQLFOREIGNKEYS, en_ForeignKeys, CLI "ForeignKeys") FUNCDEF (SQL_API_SQLPRIMARYKEYS, en_PrimaryKeys, CLI "PrimaryKeys") FUNCDEF (SQL_API_SQLPROCEDURECOLUMNS, en_ProcedureColumns, CLI "ProcedureColumns") FUNCDEF (SQL_API_SQLPROCEDURES, en_Procedures, CLI "Procedures") FUNCDEF (SQL_API_SQLSPECIALCOLUMNS, en_SpecialColumns, CLI "SpecialColumns") FUNCDEF (SQL_API_SQLSTATISTICS, en_Statistics, CLI "Statistics") FUNCDEF (SQL_API_SQLTABLEPRIVILEGES, en_TablePrivileges, CLI "TablePrivileges") FUNCDEF (SQL_API_SQLTABLES, en_Tables, CLI "Tables") FUNCDEF (SQL_API_SQLFREESTMT, en_FreeStmt, CLI "FreeStmt") FUNCDEF (SQL_API_SQLCANCEL, en_Cancel, CLI "Cancel") FUNCDEF (SQL_API_SQLTRANSACT, en_Transact, CLI "Transact") FUNCDEF (SQL_API_SQLDISCONNECT, en_Disconnect, CLI "Disconnect") FUNCDEF (SQL_API_SQLFREECONNECT, en_FreeConnect, CLI "FreeConnect") FUNCDEF (SQL_API_SQLFREEENV, en_FreeEnv, CLI "FreeEnv") #if (ODBCVER >= 0x0300) FUNCDEF (SQL_API_SQLALLOCHANDLE, en_AllocHandle, CLI "AllocHandle") FUNCDEF (SQL_API_SQLBINDPARAM, en_BindParam, CLI "BindParam") FUNCDEF (SQL_API_SQLBULKOPERATIONS, en_BulkOperations, CLI "BulkOperations") FUNCDEF (SQL_API_SQLCLOSECURSOR, en_CloseCursor, CLI "CloseCursor") FUNCDEF (SQL_API_SQLCOLATTRIBUTE, en_ColAttribute, CLI "ColAttribute") FUNCDEF (SQL_API_SQLCOPYDESC, en_CopyDesc, CLI "CopyDesc") FUNCDEF (SQL_API_SQLENDTRAN, en_EndTran, CLI "EndTran") FUNCDEF (SQL_API_SQLFETCHSCROLL, en_FetchScroll, CLI "FetchScroll") FUNCDEF (SQL_API_SQLFREEHANDLE, en_FreeHandle, CLI "FreeHandle") FUNCDEF (SQL_API_SQLGETCONNECTATTR, en_GetConnectAttr, CLI "GetConnectAttr") FUNCDEF (SQL_API_SQLGETDESCFIELD, en_GetDescField, CLI "GetDescField") FUNCDEF (SQL_API_SQLGETDESCREC, en_GetDescRec, CLI "GetDescRec") FUNCDEF (SQL_API_SQLGETDIAGFIELD, en_GetDiagField, CLI "GetDiagField") FUNCDEF (SQL_API_SQLGETDIAGREC, en_GetDiagRec, CLI "GetDiagRec") FUNCDEF (SQL_API_SQLGETENVATTR, en_GetEnvAttr, CLI "GetEnvAttr") FUNCDEF (SQL_API_SQLGETSTMTATTR, en_GetStmtAttr, CLI "GetStmtAttr") FUNCDEF (SQL_API_SQLSETCONNECTATTR, en_SetConnectAttr, CLI "SetConnectAttr") FUNCDEF (SQL_API_SQLSETDESCFIELD, en_SetDescField, CLI "SetDescField") FUNCDEF (SQL_API_SQLSETDESCREC, en_SetDescRec, CLI "SetDescRec") FUNCDEF (SQL_API_SQLSETENVATTR, en_SetEnvAttr, CLI "SetEnvAttr") FUNCDEF (SQL_API_SQLSETSTMTATTR, en_SetStmtAttr, CLI "SetStmtAttr") #endif /* Unicode function set API */ #if (ODBCVER >= 0x0300) FUNCDEF (SQL_API_SQLCONNECT, en_ConnectW, CLI "ConnectW") FUNCDEF (SQL_API_SQLDRIVERCONNECT, en_DriverConnectW, CLI "DriverConnectW") FUNCDEF (SQL_API_SQLBROWSECONNECT, en_BrowseConnectW, CLI "BrowseConnectW") FUNCDEF (SQL_API_SQLDATASOURCES, en_DataSourcesW, CLI "DataSourcesW") FUNCDEF (SQL_API_SQLDRIVERS, en_DriversW, CLI "DriversW") FUNCDEF (SQL_API_SQLGETINFO, en_GetInfoW, CLI "GetInfoW") FUNCDEF (SQL_API_SQLGETTYPEINFO, en_GetTypeInfoW, CLI "GetTypeInfoW") FUNCDEF (SQL_API_SQLSETCONNECTOPTION, en_SetConnectOptionW, CLI "SetConnectOptionW") FUNCDEF (SQL_API_SQLGETCONNECTOPTION, en_GetConnectOptionW, CLI "GetConnectOptionW") FUNCDEF (SQL_API_SQLPREPARE, en_PrepareW, CLI "PrepareW") FUNCDEF (SQL_API_SQLGETCURSORNAME, en_GetCursorNameW, CLI "GetCursorNameW") FUNCDEF (SQL_API_SQLSETCURSORNAME, en_SetCursorNameW, CLI "SetCursorNameW") FUNCDEF (SQL_API_SQLEXECDIRECT, en_ExecDirectW, CLI "ExecDirectW") FUNCDEF (SQL_API_SQLNATIVESQL, en_NativeSqlW, CLI "NativeSqlW") FUNCDEF (SQL_API_SQLDESCRIBECOL, en_DescribeColW, CLI "DescribeColW") FUNCDEF (SQL_API_SQLCOLATTRIBUTES, en_ColAttributesW, CLI "ColAttributesW") FUNCDEF (SQL_API_SQLERROR, en_ErrorW, CLI "ErrorW") FUNCDEF (SQL_API_SQLCOLUMNPRIVILEGES, en_ColumnPrivilegesW, CLI "ColumnPrivilegesW") FUNCDEF (SQL_API_SQLCOLUMNS, en_ColumnsW, CLI "ColumnsW") FUNCDEF (SQL_API_SQLFOREIGNKEYS, en_ForeignKeysW, CLI "ForeignKeysW") FUNCDEF (SQL_API_SQLPRIMARYKEYS, en_PrimaryKeysW, CLI "PrimaryKeysW") FUNCDEF (SQL_API_SQLPROCEDURECOLUMNS, en_ProcedureColumnsW, CLI "ProcedureColumnsW") FUNCDEF (SQL_API_SQLPROCEDURES, en_ProceduresW, CLI "ProceduresW") FUNCDEF (SQL_API_SQLSPECIALCOLUMNS, en_SpecialColumnsW, CLI "SpecialColumnsW") FUNCDEF (SQL_API_SQLSTATISTICS, en_StatisticsW, CLI "StatisticsW") FUNCDEF (SQL_API_SQLTABLEPRIVILEGES, en_TablePrivilegesW, CLI "TablePrivilegesW") FUNCDEF (SQL_API_SQLTABLES, en_TablesW, CLI "TablesW") FUNCDEF (SQL_API_SQLCOLATTRIBUTE, en_ColAttributeW, CLI "ColAttributeW") FUNCDEF (SQL_API_SQLGETCONNECTATTR, en_GetConnectAttrW, CLI "GetConnectAttrW") FUNCDEF (SQL_API_SQLGETDESCFIELD, en_GetDescFieldW, CLI "GetDescFieldW") FUNCDEF (SQL_API_SQLGETDESCREC, en_GetDescRecW, CLI "GetDescRecW") FUNCDEF (SQL_API_SQLGETDIAGFIELD, en_GetDiagFieldW, CLI "GetDiagFieldW") FUNCDEF (SQL_API_SQLGETDIAGREC, en_GetDiagRecW, CLI "GetDiagRecW") FUNCDEF (SQL_API_SQLGETSTMTATTR, en_GetStmtAttrW, CLI "GetStmtAttrW") FUNCDEF (SQL_API_SQLSETCONNECTATTR, en_SetConnectAttrW, CLI "SetConnectAttrW") FUNCDEF (SQL_API_SQLSETDESCFIELD, en_SetDescFieldW, CLI "SetDescFieldW") FUNCDEF (SQL_API_SQLSETSTMTATTR, en_SetStmtAttrW, CLI "SetStmtAttrW") /* Ansi function set API */ FUNCDEF (SQL_API_SQLSETSTMTOPTION, en_SetStmtOptionA, CLI "SetStmtOptionA") FUNCDEF (SQL_API_SQLGETSTMTOPTION, en_GetStmtOptionA, CLI "GetStmtOptionA") FUNCDEF (SQL_API_SQLCONNECT, en_ConnectA, CLI "ConnectA") FUNCDEF (SQL_API_SQLDRIVERCONNECT, en_DriverConnectA, CLI "DriverConnectA") FUNCDEF (SQL_API_SQLBROWSECONNECT, en_BrowseConnectA, CLI "BrowseConnectA") FUNCDEF (SQL_API_SQLDATASOURCES, en_DataSourcesA, CLI "DataSourcesA") FUNCDEF (SQL_API_SQLDRIVERS, en_DriversA, CLI "DriversA") FUNCDEF (SQL_API_SQLGETINFO, en_GetInfoA, CLI "GetInfoA") FUNCDEF (SQL_API_SQLGETTYPEINFO, en_GetTypeInfoA, CLI "GetTypeInfoA") FUNCDEF (SQL_API_SQLSETCONNECTOPTION, en_SetConnectOptionA, CLI "SetConnectOptionA") FUNCDEF (SQL_API_SQLGETCONNECTOPTION, en_GetConnectOptionA, CLI "GetConnectOptionA") FUNCDEF (SQL_API_SQLPREPARE, en_PrepareA, CLI "PrepareA") FUNCDEF (SQL_API_SQLGETCURSORNAME, en_GetCursorNameA, CLI "GetCursorNameA") FUNCDEF (SQL_API_SQLSETCURSORNAME, en_SetCursorNameA, CLI "SetCursorNameA") FUNCDEF (SQL_API_SQLEXECDIRECT, en_ExecDirectA, CLI "ExecDirectA") FUNCDEF (SQL_API_SQLNATIVESQL, en_NativeSqlA, CLI "NativeSqlA") FUNCDEF (SQL_API_SQLDESCRIBECOL, en_DescribeColA, CLI "DescribeColA") FUNCDEF (SQL_API_SQLCOLATTRIBUTES, en_ColAttributesA, CLI "ColAttributesA") FUNCDEF (SQL_API_SQLERROR, en_ErrorA, CLI "ErrorA") FUNCDEF (SQL_API_SQLCOLUMNPRIVILEGES, en_ColumnPrivilegesA, CLI "ColumnPrivilegesA") FUNCDEF (SQL_API_SQLCOLUMNS, en_ColumnsA, CLI "ColumnsA") FUNCDEF (SQL_API_SQLFOREIGNKEYS, en_ForeignKeysA, CLI "ForeignKeysA") FUNCDEF (SQL_API_SQLPRIMARYKEYS, en_PrimaryKeysA, CLI "PrimaryKeysA") FUNCDEF (SQL_API_SQLPROCEDURECOLUMNS, en_ProcedureColumnsA, CLI "ProcedureColumnsA") FUNCDEF (SQL_API_SQLPROCEDURES, en_ProceduresA, CLI "ProceduresA") FUNCDEF (SQL_API_SQLSPECIALCOLUMNS, en_SpecialColumnsA, CLI "SpecialColumnsA") FUNCDEF (SQL_API_SQLSTATISTICS, en_StatisticsA, CLI "StatisticsA") FUNCDEF (SQL_API_SQLTABLEPRIVILEGES, en_TablePrivilegesA, CLI "TablePrivilegesA") FUNCDEF (SQL_API_SQLTABLES, en_TablesA, CLI "TablesA") FUNCDEF (SQL_API_SQLCOLATTRIBUTE, en_ColAttributeA, CLI "ColAttributeA") FUNCDEF (SQL_API_SQLGETCONNECTATTR, en_GetConnectAttrA, CLI "GetConnectAttrA") FUNCDEF (SQL_API_SQLGETDESCFIELD, en_GetDescFieldA, CLI "GetDescFieldA") FUNCDEF (SQL_API_SQLGETDESCREC, en_GetDescRecA, CLI "GetDescRecA") FUNCDEF (SQL_API_SQLGETDIAGFIELD, en_GetDiagFieldA, CLI "GetDiagFieldA") FUNCDEF (SQL_API_SQLGETDIAGREC, en_GetDiagRecA, CLI "GetDiagRecA") FUNCDEF (SQL_API_SQLGETSTMTATTR, en_GetStmtAttrA, CLI "GetStmtAttrA") FUNCDEF (SQL_API_SQLSETCONNECTATTR, en_SetConnectAttrA, CLI "SetConnectAttrA") FUNCDEF (SQL_API_SQLSETDESCFIELD, en_SetDescFieldA, CLI "SetDescFieldA") FUNCDEF (SQL_API_SQLSETSTMTATTR, en_SetStmtAttrA, CLI "SetStmtAttrA") #endif #undef CLI libiodbc-3.52.16/iodbc/Makefile.am0000664000175000017500000001045514424170750013507 00000000000000# # Makefile.am # # The iODBC driver manager. # # Copyright (C) 1995 Ke Jin # Copyright (C) 1996-2023 OpenLink Software # All Rights Reserved. # # This software is released under the terms of either of the following # licenses: # # - GNU Library General Public License (see LICENSE.LGPL) # - The BSD License (see LICENSE.BSD). # # Note that the only valid version of the LGPL license as far as this # project is concerned is the original GNU Library General Public License # Version 2, dated June 1991. # # While not mandated by the BSD license, any patches you make to the # iODBC source code may be contributed back into the iODBC project # at your discretion. Contributions will benefit the Open Source and # Data Access community as a whole. Submissions may be made at: # # http://www.iodbc.org # # # GNU Library Generic Public License Version 2 # ============================================ # 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; only # Version 2 of the License dated June 1991. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # The BSD License # =============== # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. Neither the name of OpenLink Software Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # SUBDIRS = trace . AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/iodbcinst lib_LTLIBRARIES = libiodbc.la libiodbc_la_LDFLAGS = -version-info @lib_version@ \ -export-symbols $(srcdir)/iodbc.exp libiodbc_la_LIBADD = trace/libiodbctrace.la \ ../iodbcinst/libiodbc_common.la \ $(LIBADD_DL) $(LIBADD_OS) libiodbc_la_SOURCES = catalog.c connect.c dlproc.c execute.c \ fetch.c hdbc.c henv.c herr.c hstmt.c info.c \ misc.c prepare.c result.c odbc3.c noinst_HEADERS = dlproc.h hdbc.h henv.h herr.h iodbc_misc.h \ hstmt.h itrace.h henv.ci herr.ci hdesc.h ithread.h if DARWIN libiodbc.la: $(libiodbc_la_OBJECTS) $(libiodbc_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libiodbc_la_LDFLAGS) $(libiodbc_la_OBJECTS) $(libiodbc_la_LIBADD) $(LIBS) -$(STRIP) -s $(top_srcdir)/mac/iodbc.exp -u .libs/*.dylib endif EXTRA_DIST = \ $(srcdir)/iodbc.def \ $(srcdir)/iodbc.exp \ $(srcdir)/main.c \ $(srcdir)/vmscompile.com \ $(srcdir)/install_libodbc.sh # # Add symbolic link for libodbc.so as some apps need this # install-exec-hook: if INSTALL_LIBODBC $(SHELL) $(srcdir)/install_libodbc.sh $(DESTDIR)$(libdir) endif libiodbc-3.52.16/iodbc/hdbc.c0000664000175000017500000007410314424170750012517 00000000000000/* * hdbc.c * * $Id$ * * Data source connect object management functions * * The iODBC driver manager. * * Copyright (C) 1995 Ke Jin * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include #include "unicode.h" #include "dlproc.h" #include "herr.h" #include "henv.h" #include "hdbc.h" #include "hstmt.h" #include "itrace.h" #include extern SQLRETURN _iodbcdm_driverunload (HDBC hdbc, int ver); static SQLRETURN _iodbcdm_drvopt_store (SQLHDBC hdbc, SQLUSMALLINT fOption, SQLULEN vParam, SQLCHAR waMode) { CONN (pdbc, hdbc); DRVOPT *popt; /* * Check if this option is already registered */ for (popt = pdbc->drvopt; popt != NULL; popt = popt->next) { if (popt->Option == fOption) break; } /* * New option */ if (popt == NULL) { if ((popt = (DRVOPT *) MEM_ALLOC (sizeof (DRVOPT))) == NULL) return SQL_ERROR; popt->Option = fOption; popt->next = pdbc->drvopt; pdbc->drvopt = popt; } /* * Store the value */ popt->Param = vParam; popt->waMode = waMode; return SQL_SUCCESS; } static SQLRETURN _iodbcdm_drvopt_free (SQLHDBC hdbc) { CONN (pdbc, hdbc); DRVOPT *popt; popt = pdbc->drvopt; while (popt != NULL) { DRVOPT *tmp = popt->next; free (popt); popt = tmp; } pdbc->drvopt = NULL; return SQL_SUCCESS; } SQLRETURN SQLAllocConnect_Internal ( SQLHENV henv, SQLHDBC * phdbc) { GENV (genv, henv); CONN (pdbc, NULL); if (phdbc == NULL) { PUSHSQLERR (genv->herr, en_S1009); return SQL_ERROR; } pdbc = (DBC_t *) MEM_ALLOC (sizeof (DBC_t)); if (pdbc == NULL) { *phdbc = SQL_NULL_HDBC; PUSHSQLERR (genv->herr, en_S1001); return SQL_ERROR; } pdbc->rc = 0; /* * Initialize this handle */ pdbc->type = SQL_HANDLE_DBC; /* insert this dbc entry into the link list */ pdbc->next = (DBC_t *) genv->hdbc; genv->hdbc = pdbc; #if (ODBCVER >= 0x0300) if (genv->odbc_ver == 0) genv->odbc_ver = SQL_OV_ODBC2; pdbc->hdesc = NULL; pdbc->cp_pdbc = NULL; pdbc->cp_in_use = FALSE; pdbc->cp_timeout = 0; pdbc->cp_expiry_time = 0; pdbc->cp_retry_wait = 0; pdbc->cp_probe = NULL; pdbc->cp_dsn = NULL; pdbc->cp_uid = NULL; pdbc->cp_pwd = NULL; pdbc->cp_connstr = NULL; #endif pdbc->genv = genv; pdbc->conv = genv->conv; pdbc->henv = SQL_NULL_HENV; pdbc->hstmt = SQL_NULL_HSTMT; pdbc->herr = SQL_NULL_HERR; pdbc->dhdbc = SQL_NULL_HDBC; pdbc->state = en_dbc_allocated; pdbc->drvopt = NULL; pdbc->dbc_cip = 0; pdbc->err_rec = 0; /* set connect options to default values */ pdbc->access_mode = SQL_MODE_DEFAULT; pdbc->autocommit = SQL_AUTOCOMMIT_DEFAULT; pdbc->current_qualifier = NULL; pdbc->login_timeout = 0UL; pdbc->odbc_cursors = SQL_CUR_DEFAULT; pdbc->packet_size = 0UL; pdbc->quiet_mode = (UDWORD) NULL; pdbc->txn_isolation = SQL_TXN_READ_UNCOMMITTED; pdbc->cb_commit = (SWORD) SQL_CB_DELETE; pdbc->cb_rollback = (SWORD) SQL_CB_DELETE; *phdbc = (SQLHDBC) pdbc; return SQL_SUCCESS; } SQLRETURN SQL_API SQLAllocConnect (SQLHENV henv, SQLHDBC * phdbc) { GENV (genv, henv); SQLRETURN retcode = SQL_SUCCESS; ODBC_LOCK (); if (!IS_VALID_HENV (genv)) { ODBC_UNLOCK (); return SQL_INVALID_HANDLE; } CLEAR_ERRORS (genv); TRACE (trace_SQLAllocConnect (TRACE_ENTER, henv, phdbc)); retcode = SQLAllocConnect_Internal (henv, phdbc); TRACE (trace_SQLAllocConnect (TRACE_LEAVE, henv, phdbc)); ODBC_UNLOCK (); return SQL_SUCCESS; } SQLRETURN SQLFreeConnect_Internal (SQLHDBC hdbc, int ver) { CONN (pdbc, hdbc); GENV (genv, pdbc->genv); CONN (tpdbc, NULL); /* check state */ if (pdbc->state != en_dbc_allocated) { PUSHSQLERR (pdbc->herr, en_S1010); return SQL_ERROR; } for (tpdbc = (DBC_t *) genv->hdbc; tpdbc != NULL; tpdbc = tpdbc->next) { if (pdbc == tpdbc) { genv->hdbc = pdbc->next; break; } if (pdbc == tpdbc->next) { tpdbc->next = pdbc->next; break; } } /* free this dbc */ _iodbcdm_driverunload (pdbc, 3); /* free driver connect options */ _iodbcdm_drvopt_free (pdbc); /* free probe */ if (pdbc->cp_probe) MEM_FREE (pdbc->cp_probe); /* * Invalidate this handle */ pdbc->type = 0; return SQL_SUCCESS; } SQLRETURN SQL_API SQLFreeConnect (SQLHDBC hdbc) { ENTER_HDBC (hdbc, 1, trace_SQLFreeConnect (TRACE_ENTER, hdbc)); retcode = SQLFreeConnect_Internal (hdbc, 2); LEAVE_HDBC (hdbc, 1, trace_SQLFreeConnect (TRACE_LEAVE, hdbc); MEM_FREE(hdbc); ); } SQLRETURN _iodbcdm_SetConnectOption ( SQLHDBC hdbc, SQLUSMALLINT fOption, SQLULEN vParam, SQLCHAR waMode) { CONN (pdbc, hdbc); ENVR (penv, pdbc->henv); STMT (pstmt, NULL); HPROC hproc2 = SQL_NULL_HPROC; HPROC hproc3 = SQL_NULL_HPROC; sqlstcode_t sqlstat = en_00000; SQLRETURN retcode = SQL_SUCCESS; SQLUINTEGER odbc_ver; SQLUINTEGER dodbc_ver; CONV_DIRECT conv_direct = CD_NONE; DM_CONV *conv = &pdbc->conv; odbc_ver = ((GENV_t *) pdbc->genv)->odbc_ver; dodbc_ver = (penv != SQL_NULL_HENV) ? penv->dodbc_ver : odbc_ver; #if (ODBCVER < 0x0300) /* check option */ if (fOption < SQL_CONN_OPT_MIN || (fOption > SQL_CONN_OPT_MAX && fOption < SQL_CONNECT_OPT_DRVR_START)) { PUSHSQLERR (pdbc->herr, en_S1092); return SQL_ERROR; } #endif /* check state of connection handle */ switch (pdbc->state) { case en_dbc_allocated: if (fOption == SQL_TRANSLATE_DLL || fOption == SQL_TRANSLATE_OPTION) { /* This two options are only meaningful * for specified driver. So, has to be * set after a driver has been loaded. */ sqlstat = en_08003; break; } /* * An option only meaningful for the driver is passed before the * driver was actually loaded. We save it here and pass it onto * the driver at a later stage. */ if (fOption >= SQL_CONNECT_OPT_DRVR_START && pdbc->henv == SQL_NULL_HENV) _iodbcdm_drvopt_store (hdbc, fOption, vParam, waMode); break; case en_dbc_needdata: sqlstat = en_S1010; break; case en_dbc_connected: case en_dbc_hstmt: if (fOption == SQL_ODBC_CURSORS) { sqlstat = en_08002; } break; default: break; } /* check state of statement handle(s) */ for (pstmt = (STMT_t *) pdbc->hstmt; pstmt != NULL && sqlstat == en_00000; pstmt = (STMT_t *) pstmt->next) { if (pstmt->state >= en_stmt_needdata || pstmt->asyn_on != en_NullProc) { sqlstat = en_S1010; } } if (sqlstat != en_00000) { PUSHSQLERR (pdbc->herr, sqlstat); return SQL_ERROR; } #if (ODBCVER >= 0x0300) if (fOption == SQL_OPT_TRACE || fOption == SQL_ATTR_TRACE) #else if (fOption == SQL_OPT_TRACE) #endif /* tracing flag can be set before and after connect * and only meaningful for driver manager(actually * there is only one tracing file under one global * environment). */ { switch ((SQLUINTEGER)vParam) { case SQL_OPT_TRACE_ON: trace_start (); break; case SQL_OPT_TRACE_OFF: trace_stop (); break; default: PUSHSQLERR (pdbc->herr, en_HY024); return SQL_ERROR; } if (sqlstat != en_00000) { PUSHSQLERR (pdbc->herr, sqlstat); } return retcode; } #if (ODBCVER >= 0x0300) if (fOption == SQL_OPT_TRACEFILE || fOption == SQL_ATTR_TRACEFILE) #else if (fOption == SQL_OPT_TRACEFILE) #endif /* Tracing file can be set before and after connect * and only meaningful for driver manager. */ { SQLCHAR *_vParam; SQLCHAR *tmp = NULL; if (((char *)vParam) == NULL || (waMode != 'W' && ((char *) vParam)[0] == '\0') || (waMode == 'W' && DM_GetWCharAt(conv, (void *)vParam, 0) == L'\0' )) { PUSHSQLERR (pdbc->herr, en_S1009); return SQL_ERROR; } _vParam = (SQLCHAR *)vParam; if (waMode == 'W') { if ((_vParam = tmp = DM_WtoU8(conv, (void *)vParam, SQL_NTS)) == NULL) { PUSHSQLERR (pdbc->herr, en_S1001); return SQL_ERROR; } } if (ODBCSharedTraceFlag) { PUSHSQLERR (pdbc->herr, en_IM013); return SQL_ERROR; } trace_set_filename ((char *) _vParam); MEM_FREE (tmp); return SQL_SUCCESS; } if (pdbc->state != en_dbc_allocated) { /* If already connected, then, driver's odbc call * will be invoked. Otherwise, we only save the options * and delay the setting process until the connection * been established. */ void * _vParam = NULL; if (penv->unicode_driver && waMode != 'W') conv_direct = CD_A2W; else if (!penv->unicode_driver && waMode == 'W') conv_direct = CD_W2A; else if (waMode == 'W' && conv->dm_cp!=conv->drv_cp) conv_direct = CD_W2W; switch (fOption) { case SQL_ATTR_TRACEFILE: case SQL_CURRENT_QUALIFIER: case SQL_TRANSLATE_DLL: case SQL_APPLICATION_NAME: case SQL_COPT_SS_ENLIST_IN_DTC: case SQL_COPT_SS_PERF_QUERY_LOG: case SQL_COPT_SS_PERF_DATA_LOG: case SQL_CURRENT_SCHEMA: if (conv_direct != CD_NONE) { _vParam = conv_text_m2d (conv, (void *)vParam, SQL_NTS, conv_direct); vParam = (SQLULEN)_vParam; } break; } if (penv->unicode_driver) { /* SQL_XXX_W */ #if (ODBCVER >= 0x0300) hproc3 = _iodbcdm_getproc (pdbc, en_SetConnectAttrW); #endif hproc2 = _iodbcdm_getproc (pdbc, en_SetConnectOptionW); } else { /* SQL_XXX */ /* SQL_XXX_A */ #if (ODBCVER >= 0x0300) hproc3 = _iodbcdm_getproc (pdbc, en_SetConnectAttr); if (hproc3 == SQL_NULL_HPROC) hproc3 = _iodbcdm_getproc (pdbc, en_SetConnectAttrA); #endif hproc2 = _iodbcdm_getproc (pdbc, en_SetConnectOption); if (hproc2 == SQL_NULL_HPROC) hproc2 = _iodbcdm_getproc (pdbc, en_SetConnectOptionA); } if (odbc_ver == SQL_OV_ODBC2 && (dodbc_ver == SQL_OV_ODBC2 || (dodbc_ver == SQL_OV_ODBC3 && hproc2 != SQL_NULL_HPROC))) hproc3 = SQL_NULL_HPROC; #if (ODBCVER >= 0x0300) if (hproc3 != SQL_NULL_HPROC) { switch (fOption) { /* integer attributes */ case SQL_ATTR_ACCESS_MODE: case SQL_ATTR_AUTOCOMMIT: case SQL_ATTR_LOGIN_TIMEOUT: case SQL_ATTR_ODBC_CURSORS: case SQL_ATTR_PACKET_SIZE: case SQL_ATTR_QUIET_MODE: case SQL_ATTR_TRANSLATE_OPTION: case SQL_ATTR_TXN_ISOLATION: CALL_DRIVER (hdbc, pdbc, retcode, hproc3, (pdbc->dhdbc, fOption, vParam, 0)); break; /* ODBC3 defined options */ case SQL_ATTR_ASYNC_ENABLE: case SQL_ATTR_AUTO_IPD: case SQL_ATTR_CONNECTION_DEAD: case SQL_ATTR_CONNECTION_TIMEOUT: case SQL_ATTR_METADATA_ID: PUSHSQLERR (pdbc->herr, en_IM001); MEM_FREE(_vParam); return SQL_ERROR; default: /* string & driver defined */ CALL_DRIVER (hdbc, pdbc, retcode, hproc3, (pdbc->dhdbc, fOption, vParam, SQL_NTS)); } } else #endif { if (hproc2 == SQL_NULL_HPROC) { PUSHSQLERR (pdbc->herr, en_IM001); MEM_FREE(_vParam); return SQL_ERROR; } CALL_DRIVER (hdbc, pdbc, retcode, hproc2, (pdbc->dhdbc, fOption, vParam)); } MEM_FREE(_vParam); if (!SQL_SUCCEEDED (retcode)) { return retcode; } } /* * Now, either driver's odbc call was successful or * driver has not been loaded yet. In the first case, we * need flip flag for(such as access_mode, autocommit, ...) * for our finit state machine. While in the second case, * we need save option values(such as current_qualifier, ...) * for delayed setting. So, ... */ /* No matter what state we are(i.e. allocated or connected, ..) * we need to flip the flag. */ switch (fOption) { case SQL_ACCESS_MODE: pdbc->access_mode = vParam; break; case SQL_AUTOCOMMIT: pdbc->autocommit = vParam; break; } /* state transition */ if (pdbc->state != en_dbc_allocated) { return retcode; } /* Only 'allocated' state is possible here, and we need to * save the options for delayed setting. */ switch (fOption) { case SQL_CURRENT_QUALIFIER: if (pdbc->current_qualifier != NULL) { MEM_FREE (pdbc->current_qualifier); } if (vParam == 0UL) { pdbc->current_qualifier = NULL; break; } if (waMode != 'W') pdbc->current_qualifier = (wchar_t *) MEM_ALLOC (STRLEN (vParam) + 1); else pdbc->current_qualifier = (wchar_t *) MEM_ALLOC((DM_WCSLEN (conv, (void *)vParam) + 1) * DM_WCHARSIZE(conv)); if (pdbc->current_qualifier == NULL) { PUSHSQLERR (pdbc->herr, en_S1001); return SQL_ERROR; } if (waMode != 'W') STRCPY ((char *)pdbc->current_qualifier, vParam); else DM_WCSCPY (conv, pdbc->current_qualifier, (void *)vParam); pdbc->current_qualifier_WA = waMode; break; case SQL_LOGIN_TIMEOUT: pdbc->login_timeout = vParam; break; case SQL_ODBC_CURSORS: pdbc->odbc_cursors = vParam; break; case SQL_PACKET_SIZE: pdbc->packet_size = vParam; break; case SQL_QUIET_MODE: pdbc->quiet_mode = vParam; break; case SQL_TXN_ISOLATION: pdbc->txn_isolation = vParam; break; default: /* Since we didn't save the option value for delayed * setting, we should raise an error here. */ break; } return retcode; } SQLRETURN SQL_API SQLSetConnectOption ( SQLHDBC hdbc, SQLUSMALLINT fOption, SQLULEN vParam) { ENTER_HDBC (hdbc, 0, trace_SQLSetConnectOption (TRACE_ENTER, hdbc, fOption, vParam)); retcode = _iodbcdm_SetConnectOption (hdbc, fOption, vParam, 'A'); LEAVE_HDBC (hdbc, 0, trace_SQLSetConnectOption (TRACE_LEAVE, hdbc, fOption, vParam)); } #if ODBCVER >= 0x0300 SQLRETURN SQL_API SQLSetConnectOptionA ( SQLHDBC hdbc, SQLUSMALLINT fOption, SQLULEN vParam) { ENTER_HDBC (hdbc, 0, trace_SQLSetConnectOption (TRACE_ENTER, hdbc, fOption, vParam)); retcode = _iodbcdm_SetConnectOption (hdbc, fOption, vParam, 'A'); LEAVE_HDBC (hdbc, 0, trace_SQLSetConnectOption (TRACE_LEAVE, hdbc, fOption, vParam)); } SQLRETURN SQL_API SQLSetConnectOptionW ( SQLHDBC hdbc, SQLUSMALLINT fOption, SQLULEN vParam) { ENTER_HDBC (hdbc, 0, trace_SQLSetConnectOptionW (TRACE_ENTER, hdbc, fOption, vParam)); retcode = _iodbcdm_SetConnectOption (hdbc, fOption, vParam, 'W'); LEAVE_HDBC (hdbc, 0, trace_SQLSetConnectOptionW (TRACE_LEAVE, hdbc, fOption, vParam)); } #endif SQLRETURN SQL_API _iodbcdm_GetConnectOption ( SQLHDBC hdbc, SQLUSMALLINT fOption, SQLPOINTER pvParam, SQLCHAR waMode) { CONN (pdbc, hdbc); ENVR (penv, pdbc->henv); HPROC hproc2 = SQL_NULL_HPROC; HPROC hproc3 = SQL_NULL_HPROC; sqlstcode_t sqlstat = en_00000; SQLRETURN retcode = SQL_SUCCESS; SQLUINTEGER odbc_ver; SQLUINTEGER dodbc_ver; CONV_DIRECT conv_direct = CD_NONE; DM_CONV *conv = &pdbc->conv; odbc_ver = ((GENV_t *) pdbc->genv)->odbc_ver; dodbc_ver = (penv != SQL_NULL_HENV) ? penv->dodbc_ver : odbc_ver; #if (ODBCVER < 0x0300) /* check option */ if (fOption < SQL_CONN_OPT_MIN || (fOption > SQL_CONN_OPT_MAX && fOption < SQL_CONNECT_OPT_DRVR_START)) { PUSHSQLERR (pdbc->herr, en_S1092); return SQL_ERROR; } #endif if (penv != SQL_NULL_HENV) { if (penv->unicode_driver && waMode != 'W') conv_direct = CD_A2W; else if (!penv->unicode_driver && waMode == 'W') conv_direct = CD_W2A; else if (waMode == 'W' && conv->dm_cp != conv->drv_cp) conv_direct = CD_W2W; } /* check state */ switch (pdbc->state) { case en_dbc_allocated: if (fOption != SQL_ACCESS_MODE && fOption != SQL_AUTOCOMMIT && fOption != SQL_LOGIN_TIMEOUT && fOption != SQL_OPT_TRACE && fOption != SQL_OPT_TRACEFILE) { sqlstat = en_08003; } /* MS ODBC SDK document only * allows SQL_ACCESS_MODE * and SQL_AUTOCOMMIT in this * dbc state. We allow another * two options, because they * are only meaningful for driver * manager. */ break; case en_dbc_needdata: sqlstat = en_S1010; break; default: break; } if (sqlstat != en_00000) { PUSHSQLERR (pdbc->herr, sqlstat); return SQL_ERROR; } /* Tracing and tracing file options are only * meaningful for driver manager */ #if (ODBCVER >= 0x0300) if (fOption == SQL_OPT_TRACE || fOption == SQL_ATTR_TRACE) #else if (fOption == SQL_OPT_TRACE) #endif { if (ODBCSharedTraceFlag) *((UDWORD *) pvParam) = (UDWORD) SQL_OPT_TRACE_ON; else *((UDWORD *) pvParam) = (UDWORD) SQL_OPT_TRACE_OFF; return SQL_SUCCESS; } #if (ODBCVER >= 0x0300) if (fOption == SQL_OPT_TRACEFILE || fOption == SQL_ATTR_TRACEFILE) #else if (fOption == SQL_OPT_TRACEFILE) #endif { char *fname; fname = trace_get_filename (); /* UTF8 format */ if (waMode != 'W') { STRCPY (pvParam, fname); } else { DM_strcpy_U8toW (conv, pvParam, (SQLCHAR *)fname); } free (fname); return SQL_SUCCESS; } if (pdbc->state != en_dbc_allocated) /* if already connected, we will invoke driver's function */ { void * _Param = NULL; void * paramOut = pvParam; switch (fOption) { case SQL_CURRENT_QUALIFIER: case SQL_TRANSLATE_DLL: if (conv_direct != CD_NONE) { if ((_Param = malloc(SQL_MAX_OPTION_STRING_LENGTH * WCHAR_MAXSIZE)) == NULL) { PUSHSQLERR (pdbc->herr, en_HY001); return SQL_ERROR; } paramOut = _Param; } break; } if (penv->unicode_driver) { /* SQL_XXX_W */ #if (ODBCVER >= 0x0300) hproc3 = _iodbcdm_getproc (pdbc, en_GetConnectAttrW); #endif hproc2 = _iodbcdm_getproc (pdbc, en_GetConnectOptionW); } else { /* SQL_XXX */ /* SQL_XXX_A */ #if (ODBCVER >= 0x0300) hproc3 = _iodbcdm_getproc (pdbc, en_GetConnectAttr); if (hproc3 == SQL_NULL_HPROC) hproc3 = _iodbcdm_getproc (pdbc, en_GetConnectAttrA); #endif hproc2 = _iodbcdm_getproc (pdbc, en_GetConnectOption); if (hproc2 == SQL_NULL_HPROC) hproc2 = _iodbcdm_getproc (pdbc, en_GetConnectOptionA); } if (odbc_ver == SQL_OV_ODBC2 && (dodbc_ver == SQL_OV_ODBC2 || (dodbc_ver == SQL_OV_ODBC3 && hproc2 != SQL_NULL_HPROC))) hproc3 = SQL_NULL_HPROC; #if (ODBCVER >= 0x0300) if (hproc3 != SQL_NULL_HPROC) { switch (fOption) { /* integer attributes */ case SQL_ATTR_ACCESS_MODE: case SQL_ATTR_AUTOCOMMIT: case SQL_ATTR_LOGIN_TIMEOUT: case SQL_ATTR_ODBC_CURSORS: case SQL_ATTR_PACKET_SIZE: case SQL_ATTR_QUIET_MODE: case SQL_ATTR_TRANSLATE_OPTION: case SQL_ATTR_TXN_ISOLATION: CALL_DRIVER (hdbc, pdbc, retcode, hproc3, (pdbc->dhdbc, fOption, paramOut, 0, NULL)); break; /* ODBC3 defined options */ case SQL_ATTR_ASYNC_ENABLE: case SQL_ATTR_AUTO_IPD: case SQL_ATTR_CONNECTION_DEAD: case SQL_ATTR_CONNECTION_TIMEOUT: case SQL_ATTR_METADATA_ID: PUSHSQLERR (pdbc->herr, en_IM001); MEM_FREE(_Param); return SQL_ERROR; default: /* string & driver defined */ CALL_DRIVER (hdbc, pdbc, retcode, hproc3, (pdbc->dhdbc, fOption, paramOut, SQL_MAX_OPTION_STRING_LENGTH, NULL)); } } else #endif { if (hproc2 == SQL_NULL_HPROC) { PUSHSQLERR (pdbc->herr, en_IM001); MEM_FREE(_Param); return SQL_ERROR; } CALL_DRIVER (hdbc, pdbc, retcode, hproc2, (pdbc->dhdbc, fOption, paramOut)); } if (pvParam && conv_direct != CD_NONE && SQL_SUCCEEDED (retcode)) { size_t sizeMax = SQL_MAX_OPTION_STRING_LENGTH; if (conv->dm_cp != CP_UTF8) sizeMax *= DM_WCHARSIZE(conv); switch (fOption) { case SQL_ATTR_TRACEFILE: case SQL_CURRENT_QUALIFIER: case SQL_TRANSLATE_DLL: if (conv_direct == CD_A2W) { /* ansi<=unicode*/ dm_StrCopyOut2_W2A_d2m (conv, paramOut, (SQLCHAR *)pvParam, SQL_MAX_OPTION_STRING_LENGTH, NULL, NULL); } else if (conv_direct == CD_W2A) { /* unicode<=ansi*/ dm_StrCopyOut2_A2W_d2m (conv, (SQLCHAR *)paramOut, pvParam, sizeMax, NULL, NULL); } else if (conv_direct == CD_W2W) { /* unicode<=unicode*/ dm_StrCopyOut2_W2W_d2m (conv, paramOut, pvParam, sizeMax, NULL, NULL); } break; } } MEM_FREE(_Param); return retcode; } /* We needn't to handle options which are not allowed * to be *get* at a allocated dbc state(and two tracing * options which has been handled and returned). Thus, * there are only two possible cases. */ switch (fOption) { case SQL_ACCESS_MODE: *((UDWORD *) pvParam) = pdbc->access_mode; break; case SQL_AUTOCOMMIT: *((UDWORD *) pvParam) = pdbc->autocommit; break; case SQL_LOGIN_TIMEOUT: *((UDWORD *) pvParam) = pdbc->login_timeout; break; default: break; } return SQL_SUCCESS; } SQLRETURN SQL_API SQLGetConnectOption (SQLHDBC hdbc, SQLUSMALLINT fOption, SQLPOINTER pvParam) { ENTER_HDBC (hdbc, 0, trace_SQLGetConnectOption (TRACE_ENTER, hdbc, fOption, pvParam)); retcode = _iodbcdm_GetConnectOption (hdbc, fOption, pvParam, 'A'); LEAVE_HDBC (hdbc, 0, trace_SQLGetConnectOption (TRACE_LEAVE, hdbc, fOption, pvParam)); } #if ODBCVER >= 0x0300 SQLRETURN SQL_API SQLGetConnectOptionA ( SQLHDBC hdbc, SQLUSMALLINT fOption, SQLPOINTER pvParam) { ENTER_HDBC (hdbc, 0, trace_SQLGetConnectOption (TRACE_ENTER, hdbc, fOption, pvParam)); retcode = _iodbcdm_GetConnectOption (hdbc, fOption, pvParam, 'A'); LEAVE_HDBC (hdbc, 0, trace_SQLGetConnectOption (TRACE_LEAVE, hdbc, fOption, pvParam)); } SQLRETURN SQL_API SQLGetConnectOptionW ( SQLHDBC hdbc, SQLUSMALLINT fOption, SQLPOINTER pvParam) { ENTER_HDBC (hdbc, 0, trace_SQLGetConnectOptionW (TRACE_ENTER, hdbc, fOption, pvParam)); retcode = _iodbcdm_GetConnectOption (hdbc, fOption, pvParam, 'W'); LEAVE_HDBC (hdbc, 0, trace_SQLGetConnectOptionW (TRACE_LEAVE, hdbc, fOption, pvParam)); } #endif static SQLRETURN _iodbcdm_transact ( HDBC hdbc, UWORD fType) { CONN (pdbc, hdbc); ENVR (penv, pdbc->henv); STMT (pstmt, NULL); HPROC hproc2 = SQL_NULL_HPROC; HPROC hproc3 = SQL_NULL_HPROC; SQLRETURN retcode; SQLUINTEGER odbc_ver; SQLUINTEGER dodbc_ver; odbc_ver = ((GENV_t *) pdbc->genv)->odbc_ver; dodbc_ver = (penv != SQL_NULL_HENV) ? penv->dodbc_ver : odbc_ver; /* check state */ switch (pdbc->state) { case en_dbc_allocated: case en_dbc_needdata: PUSHSQLERR (pdbc->herr, en_08003); return SQL_ERROR; case en_dbc_connected: return SQL_SUCCESS; case en_dbc_hstmt: default: break; } for (pstmt = (STMT_t *) (pdbc->hstmt); pstmt != NULL; pstmt = pstmt->next) { if (pstmt->state >= en_stmt_needdata || pstmt->asyn_on != en_NullProc) { PUSHSQLERR (pdbc->herr, en_S1010); return SQL_ERROR; } } hproc2 = _iodbcdm_getproc (pdbc, en_Transact); #if (ODBCVER >= 0x300) hproc3 = _iodbcdm_getproc (pdbc, en_EndTran); #endif if (odbc_ver == SQL_OV_ODBC2 && (dodbc_ver == SQL_OV_ODBC2 || (dodbc_ver == SQL_OV_ODBC3 && hproc2 != SQL_NULL_HPROC))) hproc3 = SQL_NULL_HPROC; #if (ODBCVER >= 0x300) if (hproc3 != SQL_NULL_HPROC) { CALL_DRIVER (hdbc, pdbc, retcode, hproc3, (SQL_HANDLE_DBC, pdbc->dhdbc, fType)); } else #endif { if (hproc2 == SQL_NULL_HPROC) { PUSHSQLERR (pdbc->herr, en_IM001); return SQL_ERROR; } CALL_DRIVER (hdbc, pdbc, retcode, hproc2, (SQL_NULL_HENV, pdbc->dhdbc, fType)); } /* state transition */ if (!SQL_SUCCEEDED (retcode)) { return retcode; } pdbc->state = en_dbc_hstmt; for (pstmt = (STMT_t *) (pdbc->hstmt); pstmt != NULL; pstmt = pstmt->next) { switch (pstmt->state) { case en_stmt_prepared: if (pdbc->cb_commit == SQL_CB_DELETE || pdbc->cb_rollback == SQL_CB_DELETE) { pstmt->state = en_stmt_allocated; pstmt->prep_state = 0; break; } break; case en_stmt_executed_with_info: case en_stmt_executed: case en_stmt_cursoropen: case en_stmt_fetched: case en_stmt_xfetched: if (!pstmt->prep_state && pdbc->cb_commit != SQL_CB_PRESERVE && pdbc->cb_rollback != SQL_CB_PRESERVE) { pstmt->state = en_stmt_allocated; pstmt->prep_state = 0; pstmt->cursor_state = en_stmt_cursor_no; break; } if (pstmt->prep_state) { if (pdbc->cb_commit == SQL_CB_DELETE || pdbc->cb_rollback == SQL_CB_DELETE) { pstmt->state = en_stmt_allocated; pstmt->prep_state = 0; pstmt->cursor_state = en_stmt_cursor_no; break; } if (pdbc->cb_commit == SQL_CB_CLOSE || pdbc->cb_rollback == SQL_CB_CLOSE) { pstmt->state = en_stmt_prepared; pstmt->cursor_state = en_stmt_cursor_no; break; } break; } break; default: break; } } return retcode; } SQLRETURN SQLTransact_Internal ( SQLHENV henv, SQLHDBC hdbc, SQLUSMALLINT fType) { GENV (genv, henv); CONN (pdbc, hdbc); HERR herr; SQLRETURN retcode = SQL_SUCCESS; if (IS_VALID_HDBC (pdbc)) { CLEAR_ERRORS (pdbc); herr = pdbc->herr; } else if (IS_VALID_HENV (genv)) { CLEAR_ERRORS (genv); herr = genv->herr; } else { return SQL_INVALID_HANDLE; } /* check argument */ if (fType != SQL_COMMIT && fType != SQL_ROLLBACK) { /* SQLHENV handle = IS_VALID_HDBC (pdbc) ? ((SQLHENV) pdbc) : genv;*/ PUSHSQLERR (herr, en_S1012); return SQL_ERROR; } if (hdbc != SQL_NULL_HDBC) { retcode = _iodbcdm_transact (pdbc, fType); } else { for (pdbc = (DBC_t *) (genv->hdbc); pdbc != NULL; pdbc = pdbc->next) { retcode |= _iodbcdm_transact (pdbc, fType); } } if (!SQL_SUCCEEDED (retcode)) { /* fail on one of the connection */ return SQL_ERROR; } return retcode; } SQLRETURN SQL_API SQLTransact ( SQLHENV henv, SQLHDBC hdbc, SQLUSMALLINT fType) { SQLRETURN retcode = SQL_SUCCESS; ODBC_LOCK (); TRACE (trace_SQLTransact (TRACE_ENTER, henv, hdbc, fType)); retcode = SQLTransact_Internal (henv, hdbc, fType); TRACE (trace_SQLTransact (TRACE_LEAVE, henv, hdbc, fType)); ODBC_UNLOCK (); return retcode; } libiodbc-3.52.16/iodbc/result.c0000664000175000017500000007534214424170750013143 00000000000000/* * result.c * * $Id$ * * Prepare for getting query result * * The iODBC driver manager. * * Copyright (C) 1995 Ke Jin * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include "unicode.h" #include "dlproc.h" #include "herr.h" #include "henv.h" #include "hdbc.h" #include "hstmt.h" #include "itrace.h" static SQLRETURN SQLBindCol_Internal ( SQLHSTMT hstmt, SQLUSMALLINT icol, SQLSMALLINT fCType, SQLPOINTER rgbValue, SQLLEN cbValueMax, SQLLEN *pcbValue) { STMT(pstmt, hstmt); CONN (pdbc, pstmt->hdbc); ENVR (penv, pdbc->henv); HPROC hproc = SQL_NULL_HPROC; SQLSMALLINT nCType; SQLRETURN retcode; /* check argument */ switch (fCType) { case SQL_C_DEFAULT: case SQL_C_BIT: case SQL_C_BINARY: case SQL_C_CHAR: case SQL_C_DATE: case SQL_C_DOUBLE: case SQL_C_FLOAT: case SQL_C_LONG: case SQL_C_SHORT: case SQL_C_SLONG: case SQL_C_SSHORT: case SQL_C_STINYINT: case SQL_C_TIME: case SQL_C_TIMESTAMP: case SQL_C_TINYINT: case SQL_C_ULONG: case SQL_C_USHORT: case SQL_C_UTINYINT: #if (ODBCVER >= 0x0300) case SQL_C_GUID: 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: case SQL_C_INTERVAL_MINUTE_TO_SECOND: case SQL_C_INTERVAL_MONTH: case SQL_C_INTERVAL_SECOND: case SQL_C_INTERVAL_YEAR: case SQL_C_INTERVAL_YEAR_TO_MONTH: case SQL_C_NUMERIC: case SQL_C_SBIGINT: case SQL_C_TYPE_DATE: case SQL_C_TYPE_TIME: case SQL_C_TYPE_TIMESTAMP: case SQL_C_UBIGINT: case SQL_C_WCHAR: #endif break; default: PUSHSQLERR (pstmt->herr, en_S1003); return SQL_ERROR; } if (cbValueMax < 0) { PUSHSQLERR (pstmt->herr, en_S1090); return SQL_ERROR; } /* check state */ if (pstmt->state > en_stmt_needdata || pstmt->asyn_on != en_NullProc) { PUSHSQLERR (pstmt->herr, en_S1010); return SQL_ERROR; } /* * Convert C type to ODBC version of driver */ nCType = _iodbcdm_map_c_type (fCType, penv->dodbc_ver); /* call driver's function */ hproc = _iodbcdm_getproc (pstmt->hdbc, en_BindCol); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (pstmt->herr, en_IM001); return SQL_ERROR; } if (icol != 0 && !penv->unicode_driver && nCType == SQL_C_WCHAR) { CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc, (pstmt->dhstmt, icol, SQL_C_CHAR, rgbValue, cbValueMax, pcbValue)); } else CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc, (pstmt->dhstmt, icol, nCType, rgbValue, cbValueMax, pcbValue)); if (SQL_SUCCEEDED (retcode)) { BIND_t tbind; tbind.bn_col = icol; tbind.bn_type = nCType; tbind.bn_data = rgbValue; tbind.bn_size = cbValueMax; tbind.bn_pInd = pcbValue; tbind.direct = CD_NONE; tbind.bn_conv_size = 0; tbind.bn_conv_data = NULL; tbind.bn_conv_pInd = NULL; tbind.bn_tmp = NULL; tbind.bn_tmp_Ind = NULL; tbind.rebinded = FALSE; if (nCType == SQL_C_WCHAR) tbind.direct = penv->unicode_driver ? CD_W2W : CD_A2W; if (rgbValue) _iodbcdm_BindColumn (pstmt, &tbind); else _iodbcdm_UnBindColumn (pstmt, &tbind); } return retcode; } SQLRETURN SQL_API SQLBindCol ( SQLHSTMT hstmt, SQLUSMALLINT icol, SQLSMALLINT fCType, SQLPOINTER rgbValue, SQLLEN cbValueMax, SQLLEN *pcbValue) { ENTER_STMT (hstmt, trace_SQLBindCol (TRACE_ENTER, hstmt, icol, fCType, rgbValue, cbValueMax, pcbValue)); retcode = SQLBindCol_Internal ( hstmt, icol, fCType, rgbValue, cbValueMax, pcbValue); LEAVE_STMT (hstmt, trace_SQLBindCol (TRACE_LEAVE, hstmt, icol, fCType, rgbValue, cbValueMax, pcbValue)); } SQLRETURN SQL_API SQLGetCursorName_Internal ( SQLHSTMT hstmt, SQLCHAR * szCursor, SQLSMALLINT cbCursorMax, SQLSMALLINT * pcbCursor, char waMode) { STMT(pstmt, hstmt); CONN (pdbc, pstmt->hdbc); ENVR (penv, pdbc->henv); HPROC hproc = SQL_NULL_HPROC; SQLRETURN retcode = SQL_SUCCESS; void * cursorOut = szCursor; void * _Cursor = NULL; CONV_DIRECT conv_direct = CD_NONE; DM_CONV *conv = &pdbc->conv; /* check argument */ if (cbCursorMax < (SWORD) 0) { PUSHSQLERR (pstmt->herr, en_S1090); return SQL_ERROR; } /* check state */ if (pstmt->state >= en_stmt_needdata || pstmt->asyn_on != en_NullProc) { PUSHSQLERR (pstmt->herr, en_S1010); return SQL_ERROR; } if (pstmt->state < en_stmt_cursoropen && pstmt->cursor_state == en_stmt_cursor_no) { PUSHSQLERR (pstmt->herr, en_S1015); return SQL_ERROR; } if (penv->unicode_driver && waMode != 'W') conv_direct = CD_A2W; else if (!penv->unicode_driver && waMode == 'W') conv_direct = CD_W2A; else if (waMode == 'W' && conv->dm_cp != conv->drv_cp) conv_direct = CD_W2W; /* call driver's function */ if (conv_direct == CD_A2W || conv_direct == CD_W2W) { /* ansi<=unicode*/ if ((_Cursor = malloc((cbCursorMax + 1) * DRV_WCHARSIZE_ALLOC(conv))) == NULL) { PUSHSQLERR (pstmt->herr, en_HY001); return SQL_ERROR; } cursorOut = _Cursor; } else if (conv_direct == CD_W2A) { /* unicode<=ansi*/ if ((_Cursor = malloc(cbCursorMax * MB_CUR_MAX + 1)) == NULL) { PUSHSQLERR (pstmt->herr, en_HY001); return SQL_ERROR; } cursorOut = _Cursor; } /* call driver */ CALL_UDRIVER(pstmt->hdbc, pstmt, retcode, hproc, penv->unicode_driver, en_GetCursorName, ( pstmt->dhstmt, cursorOut, cbCursorMax, pcbCursor)); if (hproc == SQL_NULL_HPROC) { MEM_FREE(_Cursor); PUSHSQLERR (pstmt->herr, en_IM001); return SQL_ERROR; } if (szCursor && conv_direct != CD_NONE && SQL_SUCCEEDED (retcode)) { if (conv_direct == CD_A2W) { /*ansi<=unicode*/ dm_StrCopyOut2_W2A_d2m (conv, cursorOut, (SQLCHAR *) szCursor, cbCursorMax, NULL, NULL); } else if (conv_direct == CD_W2A) { /*unicode<=ansi*/ dm_StrCopyOut2_A2W_d2m (conv, (SQLCHAR *) cursorOut, szCursor, cbCursorMax * DM_WCHARSIZE(conv), NULL, NULL); } else if (conv_direct == CD_W2W) { /*unicode<=unicode*/ dm_StrCopyOut2_W2W_d2m (conv, cursorOut, szCursor, cbCursorMax * DM_WCHARSIZE(conv), NULL, NULL); } } MEM_FREE(_Cursor); return retcode; } SQLRETURN SQL_API SQLGetCursorName ( SQLHSTMT hstmt, SQLCHAR * szCursor, SQLSMALLINT cbCursorMax, SQLSMALLINT * pcbCursor) { ENTER_STMT (hstmt, trace_SQLGetCursorName (TRACE_ENTER, hstmt, szCursor, cbCursorMax, pcbCursor)); retcode = SQLGetCursorName_Internal( hstmt, szCursor, cbCursorMax, pcbCursor, 'A'); LEAVE_STMT (hstmt, trace_SQLGetCursorName (TRACE_LEAVE, hstmt, szCursor, cbCursorMax, pcbCursor)); } #if ODBCVER >= 0x0300 SQLRETURN SQL_API SQLGetCursorNameA ( SQLHSTMT hstmt, SQLCHAR * szCursor, SQLSMALLINT cbCursorMax, SQLSMALLINT * pcbCursor) { ENTER_STMT (hstmt, trace_SQLGetCursorName (TRACE_ENTER, hstmt, szCursor, cbCursorMax, pcbCursor)); retcode = SQLGetCursorName_Internal( hstmt, szCursor, cbCursorMax, pcbCursor, 'A'); LEAVE_STMT (hstmt, trace_SQLGetCursorName (TRACE_LEAVE, hstmt, szCursor, cbCursorMax, pcbCursor)); } SQLRETURN SQL_API SQLGetCursorNameW (SQLHSTMT hstmt, SQLWCHAR * szCursor, SQLSMALLINT cbCursorMax, SQLSMALLINT * pcbCursor) { ENTER_STMT (hstmt, trace_SQLGetCursorNameW (TRACE_ENTER, hstmt, szCursor, cbCursorMax, pcbCursor)); retcode = SQLGetCursorName_Internal( hstmt, (SQLCHAR *) szCursor, cbCursorMax, pcbCursor, 'W'); LEAVE_STMT (hstmt, trace_SQLGetCursorNameW (TRACE_LEAVE, hstmt, szCursor, cbCursorMax, pcbCursor)); } #endif static SQLRETURN SQLRowCount_Internal ( SQLHSTMT hstmt, SQLLEN * pcrow) { STMT(pstmt, hstmt); HPROC hproc; SQLRETURN retcode; /* check state */ if (pstmt->state >= en_stmt_needdata || pstmt->state <= en_stmt_prepared || pstmt->asyn_on != en_NullProc) { PUSHSQLERR (pstmt->herr, en_S1010); return SQL_ERROR; } /* call driver */ hproc = _iodbcdm_getproc (pstmt->hdbc, en_RowCount); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (pstmt->herr, en_IM001); return SQL_ERROR; } CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc, (pstmt->dhstmt, pcrow)); return retcode; } SQLRETURN SQL_API SQLRowCount ( SQLHSTMT hstmt, SQLLEN * pcrow) { ENTER_STMT (hstmt, trace_SQLRowCount (TRACE_ENTER, hstmt, pcrow)); retcode = SQLRowCount_Internal (hstmt, pcrow); LEAVE_STMT (hstmt, trace_SQLRowCount (TRACE_LEAVE, hstmt, pcrow)); } SQLRETURN SQL_API _iodbcdm_NumResultCols ( SQLHSTMT hstmt, SQLSMALLINT * pccol) { STMT (pstmt, hstmt); HPROC hproc; SQLRETURN retcode; SWORD ccol; /* check state */ if (pstmt->asyn_on == en_NullProc) { if (pstmt->state == en_stmt_allocated || pstmt->state >= en_stmt_needdata) { PUSHSQLERR (pstmt->herr, en_S1010); return SQL_ERROR; } } else if (pstmt->asyn_on != en_NumResultCols) { PUSHSQLERR (pstmt->herr, en_S1010); return SQL_ERROR; } /* call driver */ hproc = _iodbcdm_getproc (pstmt->hdbc, en_NumResultCols); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (pstmt->herr, en_IM001); return SQL_ERROR; } CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc, (pstmt->dhstmt, &ccol)); /* state transition */ if (pstmt->asyn_on == en_NumResultCols) { switch (retcode) { case SQL_SUCCESS: case SQL_SUCCESS_WITH_INFO: case SQL_ERROR: pstmt->asyn_on = en_NullProc; case SQL_STILL_EXECUTING: default: break; } } switch (retcode) { case SQL_SUCCESS: case SQL_SUCCESS_WITH_INFO: break; case SQL_STILL_EXECUTING: ccol = 0; pstmt->asyn_on = en_NumResultCols; break; default: ccol = 0; break; } if (pccol) { *pccol = ccol; } return retcode; } SQLRETURN SQL_API SQLNumResultCols ( SQLHSTMT hstmt, SQLSMALLINT * pccol) { ENTER_STMT (hstmt, trace_SQLNumResultCols (TRACE_ENTER, hstmt, pccol)); retcode = _iodbcdm_NumResultCols (hstmt, pccol); LEAVE_STMT (hstmt, trace_SQLNumResultCols (TRACE_LEAVE, hstmt, pccol)); } SQLSMALLINT _iodbcdm_map_sql_type (int type, int odbcver) { switch (type) { case SQL_DATE: case SQL_TYPE_DATE: return (odbcver == SQL_OV_ODBC3) ? SQL_TYPE_DATE : SQL_DATE; case SQL_TIME: case SQL_TYPE_TIME: return (odbcver == SQL_OV_ODBC3) ? SQL_TYPE_TIME : SQL_TIME; case SQL_TIMESTAMP: case SQL_TYPE_TIMESTAMP: return (odbcver == SQL_OV_ODBC3) ? SQL_TYPE_TIMESTAMP : SQL_TIMESTAMP; } return type; } SQLSMALLINT _iodbcdm_map_c_type (int type, int odbcver) { switch (type) { case SQL_C_DATE: case SQL_C_TYPE_DATE: return (odbcver == SQL_OV_ODBC3) ? SQL_C_TYPE_DATE : SQL_C_DATE; case SQL_C_TIME: case SQL_C_TYPE_TIME: return (odbcver == SQL_OV_ODBC3) ? SQL_C_TYPE_TIME : SQL_C_TIME; case SQL_C_TIMESTAMP: case SQL_C_TYPE_TIMESTAMP: return (odbcver == SQL_OV_ODBC3) ? SQL_C_TYPE_TIMESTAMP : SQL_C_TIMESTAMP; } return type; } SQLRETURN SQL_API SQLDescribeCol_Internal ( SQLHSTMT hstmt, SQLUSMALLINT icol, SQLPOINTER szColName, SQLSMALLINT cbColNameMax, SQLSMALLINT * pcbColName, SQLSMALLINT * pfSqlType, SQLULEN * pcbColDef, SQLSMALLINT * pibScale, SQLSMALLINT * pfNullable, SQLCHAR waMode) { STMT(pstmt, hstmt); CONN (pdbc, pstmt->hdbc); ENVR (penv, pdbc->henv); GENV (genv, pdbc->genv); HPROC hproc = SQL_NULL_HPROC; SQLRETURN retcode = SQL_SUCCESS; void * _ColName = NULL; void * colNameOut = szColName; sqlstcode_t sqlstat = en_00000; CONV_DIRECT conv_direct = CD_NONE; DM_CONV *conv = &pdbc->conv; /* check arguments */ if (icol == 0) { sqlstat = en_S1002; } else if (cbColNameMax < 0) { sqlstat = en_S1090; } if (sqlstat != en_00000) { PUSHSQLERR (pstmt->herr, sqlstat); return SQL_ERROR; } #if (ODBCVER < 0x0300) /* check state */ if (pstmt->asyn_on == en_NullProc) { if (pstmt->state == en_stmt_allocated || pstmt->state >= en_stmt_needdata) { sqlstat = en_S1010; } } else if (pstmt->asyn_on != en_DescribeCol) { sqlstat = en_S1010; } #endif if (sqlstat != en_00000) { PUSHSQLERR (pstmt->herr, sqlstat); return SQL_ERROR; } if (penv->unicode_driver && waMode != 'W') conv_direct = CD_A2W; else if (!penv->unicode_driver && waMode == 'W') conv_direct = CD_W2A; else if (waMode == 'W' && conv->dm_cp != conv->drv_cp) conv_direct = CD_W2W; /* call driver */ if (szColName != NULL && cbColNameMax > 0) { if (conv_direct == CD_A2W || conv_direct == CD_W2W) { /*ansi<=unicode*/ if ((_ColName = _iodbcdm_alloc_var(pstmt, 0, cbColNameMax * DRV_WCHARSIZE_ALLOC(conv))) == NULL) { PUSHSQLERR (pstmt->herr, en_HY001); return SQL_ERROR; } colNameOut = _ColName; } else if (conv_direct == CD_W2A) { /*unicode<=ansi*/ if ((_ColName = _iodbcdm_alloc_var(pstmt, 0, cbColNameMax * MB_CUR_MAX + 1)) == NULL) { PUSHSQLERR (pstmt->herr, en_HY001); return SQL_ERROR; } colNameOut = _ColName; } } /* call driver */ CALL_UDRIVER(pstmt->hdbc, pstmt, retcode, hproc, penv->unicode_driver, en_DescribeCol, ( pstmt->dhstmt, icol, colNameOut, cbColNameMax, pcbColName, pfSqlType, pcbColDef, pibScale, pfNullable)); if (hproc == SQL_NULL_HPROC) { _iodbcdm_FreeStmtVars(pstmt); PUSHSQLERR (pstmt->herr, en_IM001); return SQL_ERROR; } /* * Convert sql type to ODBC version of application */ if (SQL_SUCCEEDED(retcode) && pfSqlType) *pfSqlType = _iodbcdm_map_sql_type (*pfSqlType, genv->odbc_ver); if (szColName && conv_direct != CD_NONE && SQL_SUCCEEDED (retcode)) { if (conv_direct == CD_A2W) { /*ansi<=unicode*/ dm_StrCopyOut2_W2A_d2m (conv, colNameOut, (SQLCHAR *) szColName, cbColNameMax, NULL, NULL); } else if (conv_direct == CD_W2A) { /*unicode<=ansi*/ dm_StrCopyOut2_A2W_d2m (conv, (SQLCHAR *) colNameOut, szColName, cbColNameMax * DM_WCHARSIZE(conv), NULL, NULL); } else if (conv_direct == CD_W2W) { /*unicode<=unicode*/ dm_StrCopyOut2_W2W_d2m (conv, colNameOut, szColName, cbColNameMax * DM_WCHARSIZE(conv), NULL, NULL); } } if (retcode != SQL_STILL_EXECUTING) _iodbcdm_FreeStmtVars(pstmt); /* state transition */ if (pstmt->asyn_on == en_DescribeCol) { switch (retcode) { case SQL_SUCCESS: case SQL_SUCCESS_WITH_INFO: case SQL_ERROR: pstmt->asyn_on = en_NullProc; break; default: return retcode; } } switch (pstmt->state) { case en_stmt_prepared: case en_stmt_cursoropen: case en_stmt_fetched: case en_stmt_xfetched: if (retcode == SQL_STILL_EXECUTING) { pstmt->asyn_on = en_DescribeCol; } break; default: break; } return retcode; } SQLRETURN SQL_API SQLDescribeCol (SQLHSTMT hstmt, SQLUSMALLINT icol, SQLCHAR * szColName, SQLSMALLINT cbColNameMax, SQLSMALLINT * pcbColName, SQLSMALLINT * pfSqlType, SQLULEN * pcbColDef, SQLSMALLINT * pibScale, SQLSMALLINT * pfNullable) { ENTER_STMT (hstmt, trace_SQLDescribeCol (TRACE_ENTER, hstmt, icol, szColName, cbColNameMax, pcbColName, pfSqlType, pcbColDef, pibScale, pfNullable)); retcode = SQLDescribeCol_Internal ( hstmt, icol, szColName, cbColNameMax, pcbColName, pfSqlType, pcbColDef, pibScale, pfNullable, 'A'); LEAVE_STMT (hstmt, trace_SQLDescribeCol (TRACE_LEAVE, hstmt, icol, szColName, cbColNameMax, pcbColName, pfSqlType, pcbColDef, pibScale, pfNullable)); } #if ODBCVER >= 0x0300 SQLRETURN SQL_API SQLDescribeColA (SQLHSTMT hstmt, SQLUSMALLINT icol, SQLCHAR * szColName, SQLSMALLINT cbColNameMax, SQLSMALLINT * pcbColName, SQLSMALLINT * pfSqlType, SQLULEN * pcbColDef, SQLSMALLINT * pibScale, SQLSMALLINT * pfNullable) { ENTER_STMT (hstmt, trace_SQLDescribeCol (TRACE_ENTER, hstmt, icol, szColName, cbColNameMax, pcbColName, pfSqlType, pcbColDef, pibScale, pfNullable)); retcode = SQLDescribeCol_Internal ( hstmt, icol, szColName, cbColNameMax, pcbColName, pfSqlType, pcbColDef, pibScale, pfNullable, 'A'); LEAVE_STMT (hstmt, trace_SQLDescribeCol (TRACE_LEAVE, hstmt, icol, szColName, cbColNameMax, pcbColName, pfSqlType, pcbColDef, pibScale, pfNullable)); } SQLRETURN SQL_API SQLDescribeColW ( SQLHSTMT hstmt, SQLUSMALLINT icol, SQLWCHAR * szColName, SQLSMALLINT cbColNameMax, SQLSMALLINT * pcbColName, SQLSMALLINT * pfSqlType, SQLULEN * pcbColDef, SQLSMALLINT * pibScale, SQLSMALLINT * pfNullable) { ENTER_STMT (hstmt, trace_SQLDescribeColW (TRACE_ENTER, hstmt, icol, szColName, cbColNameMax, pcbColName, pfSqlType, pcbColDef, pibScale, pfNullable)); retcode = SQLDescribeCol_Internal ( hstmt, icol, szColName, cbColNameMax, pcbColName, pfSqlType, pcbColDef, pibScale, pfNullable, 'W'); LEAVE_STMT (hstmt, trace_SQLDescribeColW (TRACE_LEAVE, hstmt, icol, szColName, cbColNameMax, pcbColName, pfSqlType, pcbColDef, pibScale, pfNullable)); } #endif SQLRETURN SQL_API SQLColAttributes_Internal ( SQLHSTMT hstmt, SQLUSMALLINT icol, SQLUSMALLINT fDescType, SQLPOINTER rgbDesc, SQLSMALLINT cbDescMax, SQLSMALLINT * pcbDesc, SQLLEN * pfDesc, SQLCHAR waMode) { STMT(pstmt, hstmt); CONN (pdbc, pstmt->hdbc); ENVR (penv, pdbc->henv); HPROC hproc2 = SQL_NULL_HPROC; HPROC hproc3 = SQL_NULL_HPROC; SQLRETURN retcode = SQL_SUCCESS; void * _Desc = NULL; void * descOut = rgbDesc; sqlstcode_t sqlstat = en_00000; SQLUSMALLINT new_attr = fDescType; SQLUINTEGER odbc_ver = ((GENV_t *) pdbc->genv)->odbc_ver; SQLUINTEGER dodbc_ver = ((ENV_t *) pdbc->henv)->dodbc_ver; CONV_DIRECT conv_direct = CD_NONE; DM_CONV *conv = &pdbc->conv; SQLSMALLINT _cbDescMax = cbDescMax; /* check arguments */ if (icol == 0 && fDescType != SQL_COLUMN_COUNT) { sqlstat = en_S1002; } else if (cbDescMax < 0) { sqlstat = en_S1090; } #if (ODBCVER < 0x0300) else if ( /* fDescType < SQL_COLATT_OPT_MIN || *//* turnoff warning */ (fDescType > SQL_COLATT_OPT_MAX && fDescType < SQL_COLUMN_DRIVER_START)) { sqlstat = en_S1091; } #endif /* ODBCVER < 0x0300 */ if (sqlstat != en_00000) { PUSHSQLERR (pstmt->herr, sqlstat); return SQL_ERROR; } /* check state */ if (pstmt->asyn_on == en_NullProc) { if (pstmt->state == en_stmt_allocated || pstmt->state >= en_stmt_needdata) { sqlstat = en_S1010; } } else if (pstmt->asyn_on != en_ColAttributes) { sqlstat = en_S1010; } if (sqlstat != en_00000) { PUSHSQLERR (pstmt->herr, sqlstat); return SQL_ERROR; } if (penv->unicode_driver && waMode != 'W') conv_direct = CD_A2W; else if (!penv->unicode_driver && waMode == 'W') conv_direct = CD_W2A; else if (waMode == 'W' && conv->dm_cp != conv->drv_cp) conv_direct = CD_W2W; /* call driver */ if (conv_direct != CD_NONE) { switch(fDescType) { 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: if (conv_direct == CD_A2W || conv_direct == CD_W2W) { /*ansi<=unicode*/ if (conv_direct == CD_W2W) _cbDescMax /= DM_WCHARSIZE(conv); if ((_Desc = _iodbcdm_alloc_var(pstmt, 0, (_cbDescMax + 1) * DRV_WCHARSIZE_ALLOC(conv))) == NULL) { PUSHSQLERR (pstmt->herr, en_HY001); return SQL_ERROR; } _cbDescMax *= DRV_WCHARSIZE_ALLOC(conv); descOut = _Desc; } else if (conv_direct == CD_W2A) { /*unicode<=ansi*/ if ((_Desc = _iodbcdm_alloc_var(pstmt, 0, _cbDescMax * MB_CUR_MAX + 1)) == NULL) { PUSHSQLERR (pstmt->herr, en_HY001); return SQL_ERROR; } _cbDescMax /= DM_WCHARSIZE(conv); descOut = _Desc; } break; } } #if (ODBCVER >= 0x0300) switch (new_attr) { case SQL_COLUMN_NAME: new_attr = SQL_DESC_NAME; break; case SQL_COLUMN_NULLABLE: new_attr = SQL_DESC_NULLABLE; break; case SQL_COLUMN_COUNT: new_attr = SQL_DESC_COUNT; break; } #endif if (penv->unicode_driver) { hproc2 = _iodbcdm_getproc (pdbc, en_ColAttributesW); #if (ODBCVER >= 0x0300) hproc3 = _iodbcdm_getproc (pdbc, en_ColAttributeW); #endif if (odbc_ver == SQL_OV_ODBC2 && ( dodbc_ver == SQL_OV_ODBC2 || (dodbc_ver == SQL_OV_ODBC3 && hproc2 != SQL_NULL_HPROC))) hproc3 = SQL_NULL_HPROC; #if (ODBCVER >= 0x0300) if (hproc3 != SQL_NULL_HPROC) { CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc3, ( pstmt->dhstmt, icol, new_attr, descOut, cbDescMax, pcbDesc, pfDesc)); } else #endif { if (hproc2 == SQL_NULL_HPROC) { _iodbcdm_FreeStmtVars(pstmt); PUSHSQLERR (pstmt->herr, en_IM001); return SQL_ERROR; } CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc2, ( pstmt->dhstmt, icol, fDescType, descOut, _cbDescMax, pcbDesc, pfDesc)); } } else { /* SQL_XXX */ /* SQL_XXX_A */ hproc2 = _iodbcdm_getproc (pdbc, en_ColAttributes); if (hproc2 == SQL_NULL_HPROC) hproc2 = _iodbcdm_getproc (pdbc, en_ColAttributesA); #if (ODBCVER >= 0x0300) hproc3 = _iodbcdm_getproc (pdbc, en_ColAttribute); if (hproc3 == SQL_NULL_HPROC) hproc3 = _iodbcdm_getproc (pdbc, en_ColAttributeA); #endif if (odbc_ver == SQL_OV_ODBC2 && ( dodbc_ver == SQL_OV_ODBC2 || (dodbc_ver == SQL_OV_ODBC3 && hproc2 != SQL_NULL_HPROC))) hproc3 = SQL_NULL_HPROC; #if (ODBCVER >= 0x0300) if (hproc3 != SQL_NULL_HPROC) { CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc3, ( pstmt->dhstmt, icol, new_attr, descOut, _cbDescMax, pcbDesc, pfDesc)); } else #endif { if (hproc2 == SQL_NULL_HPROC) { _iodbcdm_FreeStmtVars(pstmt); PUSHSQLERR (pstmt->herr, en_IM001); return SQL_ERROR; } CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc2, ( pstmt->dhstmt, icol, fDescType, descOut, _cbDescMax, pcbDesc, pfDesc)); } } if (rgbDesc && conv_direct != CD_NONE && SQL_SUCCEEDED (retcode)) { int count; switch(fDescType) { 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: if (conv_direct == CD_A2W) { /*ansi<=unicode*/ dm_StrCopyOut2_W2A_d2m (conv, descOut, (SQLCHAR *) rgbDesc, cbDescMax, NULL, &count); if (pcbDesc) *pcbDesc = (SQLSMALLINT)count; } else if (conv_direct == CD_W2A) { /*unicode<=ansi*/ dm_StrCopyOut2_A2W_d2m (conv, (SQLCHAR *) descOut, rgbDesc, cbDescMax, NULL, &count); if (pcbDesc) *pcbDesc = (SQLSMALLINT)count; } else if (conv_direct == CD_W2W) { /*unicode<=unicode*/ dm_StrCopyOut2_W2W_d2m (conv, descOut, rgbDesc, cbDescMax, NULL, &count); if (pcbDesc) *pcbDesc = (SQLSMALLINT)count; } } } if (retcode != SQL_STILL_EXECUTING) _iodbcdm_FreeStmtVars(pstmt); /* state transition */ if (pstmt->asyn_on == en_ColAttributes) { switch (retcode) { case SQL_SUCCESS: case SQL_SUCCESS_WITH_INFO: case SQL_ERROR: pstmt->asyn_on = en_NullProc; break; default: return retcode; } } switch (pstmt->state) { case en_stmt_prepared: case en_stmt_cursoropen: case en_stmt_fetched: case en_stmt_xfetched: if (retcode == SQL_STILL_EXECUTING) { pstmt->asyn_on = en_ColAttributes; } break; default: break; } return retcode; } RETCODE SQL_API SQLColAttributes ( SQLHSTMT statementHandle, SQLUSMALLINT icol, SQLUSMALLINT fDescType, SQLPOINTER rgbDesc, SQLSMALLINT cbDescMax, SQLSMALLINT * pcbDesc, SQLLEN * pfDesc) { ENTER_STMT (statementHandle, trace_SQLColAttributes (TRACE_ENTER, statementHandle, icol, fDescType, rgbDesc, cbDescMax, pcbDesc, pfDesc)); retcode = SQLColAttributes_Internal ( statementHandle, icol, fDescType, rgbDesc, cbDescMax, pcbDesc, pfDesc, 'A'); LEAVE_STMT (statementHandle, trace_SQLColAttributes (TRACE_LEAVE, statementHandle, icol, fDescType, rgbDesc, cbDescMax, pcbDesc, pfDesc)); } #if ODBCVER >= 0x0300 RETCODE SQL_API SQLColAttributesA ( SQLHSTMT statementHandle, SQLUSMALLINT icol, SQLUSMALLINT fDescType, SQLPOINTER rgbDesc, SQLSMALLINT cbDescMax, SQLSMALLINT * pcbDesc, SQLLEN * pfDesc) { ENTER_STMT (statementHandle, trace_SQLColAttributes (TRACE_ENTER, statementHandle, icol, fDescType, rgbDesc, cbDescMax, pcbDesc, pfDesc)); retcode = SQLColAttributes_Internal ( statementHandle, icol, fDescType, rgbDesc, cbDescMax, pcbDesc, pfDesc, 'A'); LEAVE_STMT (statementHandle, trace_SQLColAttributes (TRACE_LEAVE, statementHandle, icol, fDescType, rgbDesc, cbDescMax, pcbDesc, pfDesc)); } RETCODE SQL_API SQLColAttributesW ( SQLHSTMT statementHandle, SQLUSMALLINT icol, SQLUSMALLINT fDescType, SQLPOINTER rgbDesc, SQLSMALLINT cbDescMax, SQLSMALLINT * pcbDesc, SQLLEN * pfDesc) { ENTER_STMT (statementHandle, trace_SQLColAttributesW (TRACE_ENTER, statementHandle, icol, fDescType, rgbDesc, cbDescMax, pcbDesc, pfDesc)); retcode = SQLColAttributes_Internal ( statementHandle, icol, fDescType, rgbDesc, cbDescMax, pcbDesc, pfDesc, 'W'); LEAVE_STMT (statementHandle, trace_SQLColAttributesW (TRACE_LEAVE, statementHandle, icol, fDescType, rgbDesc, cbDescMax, pcbDesc, pfDesc)); } #endif libiodbc-3.52.16/iodbc/henv.h0000664000175000017500000001533614424170750012567 00000000000000/* * henv.h * * $Id$ * * Environment object management functions * * The iODBC driver manager. * * Copyright (C) 1995 Ke Jin * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef _HENV_H #define _HENV_H #include #include "dlproc.h" #include #include #include "ithread.h" enum odbcapi_t { en_NullProc = 0 #define FUNCDEF(A, B, C) ,B #include "henv.ci" #undef FUNCDEF , __LAST_API_FUNCTION__ } ; #if (ODBCVER >= 0x300) /* * SQL_ATTR_CONNECTION_POOLING value */ extern SQLINTEGER _iodbcdm_attr_connection_pooling; #endif typedef struct { int type; /* must be 1st field */ HERR herr; /* err list */ SQLRETURN rc; HENV henv; /* driver's env list */ HDBC hdbc; /* driver's dbc list */ int state; #if (ODBCVER >= 0x300) SQLUINTEGER odbc_ver; /* ODBC version of the application */ SQLINTEGER connection_pooling; /* SQL_ATTR_CONNECTION_POOLING value at the time of env creation */ SQLINTEGER cp_match; /* connection pool matching method */ struct DBC *pdbc_pool; /* connection pool */ #endif SQLSMALLINT err_rec; DM_CONV conv; } GENV_t; typedef struct { HENV next; /* next attached env handle */ int refcount; /* Driver's bookkeeping reference count */ HPROC dllproc_tab[__LAST_API_FUNCTION__]; /* driver api calls */ HENV dhenv; /* driver env handle */ HDLL hdll; /* driver share library handle */ SWORD thread_safe; /* Is the driver threadsafe? */ SWORD unicode_driver; /* Is the driver unicode? */ MUTEX_DECLARE (drv_lock); /* Used only when driver is not threadsafe */ #if (ODBCVER >= 0x300) SQLUINTEGER dodbc_ver; /* driver's ODBC version */ #endif DM_CONV conv; } ENV_t; #define IS_VALID_HENV(x) \ ((x) != SQL_NULL_HENV && ((GENV_t *)(x))->type == SQL_HANDLE_ENV) #define ENTER_HENV(henv, trace) \ GENV (genv, henv); \ SQLRETURN retcode = SQL_SUCCESS; \ ODBC_LOCK (); \ TRACE (trace); \ if (!IS_VALID_HENV (henv)) \ { \ retcode = SQL_INVALID_HANDLE; \ goto done; \ } \ CLEAR_ERRORS (genv) #define LEAVE_HENV(henv, trace) \ done: \ TRACE(trace); \ ODBC_UNLOCK (); \ return (retcode) /* * Multi threading */ #if defined (IODBC_THREADING) extern SPINLOCK_DECLARE(iodbcdm_global_lock); #define ODBC_LOCK() SPINLOCK_LOCK(iodbcdm_global_lock) #define ODBC_UNLOCK() SPINLOCK_UNLOCK(iodbcdm_global_lock) #else #define ODBC_LOCK() #define ODBC_UNLOCK() #endif /* * Prototypes */ void Init_iODBC(void); void Done_iODBC(void); /* Note: * * - ODBC applications only know about global environment handle, * a void pointer points to a GENV_t object. There is only one * this object per process(however, to make the library reentrant, * we still keep this object on heap). Applications only know * address of this object and needn't care about its detail. * * - ODBC driver manager knows about instance environment handles, * void pointers point to ENV_t objects. There are maybe more * than one this kind of objects per process. However, multiple * connections to a same data source(i.e. call same share library) * will share one instance environment object. * * - ODBC driver manager knows about their own environment handle, * a void pointer point to a driver defined object. Every driver * keeps one of its own environment object and driver manager * keeps address of it by the 'dhenv' field in the instance * environment object without care about its detail. * * - Applications can get driver's environment object handle by * SQLGetInfo() with fInfoType equals to SQL_DRIVER_HENV */ #endif libiodbc-3.52.16/iodbc/info.c0000664000175000017500000010201414424170750012543 00000000000000/* * info.c * * $Id$ * * Information functions * * The iODBC driver manager. * * Copyright (C) 1995 Ke Jin * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include #include "unicode.h" #include "dlproc.h" #include "herr.h" #include "henv.h" #include "hdbc.h" #include "hstmt.h" #include "itrace.h" #include #include #ifdef WIN32 #define SECT1 "ODBC 32 bit Data Sources" #define SECT2 "ODBC 32 bit Drivers" #else #define SECT1 "ODBC Data Sources" #define SECT2 "ODBC Drivers" #endif #define MAX_ENTRIES 1024 static int stricmp (const char *s1, const char *s2) { int cmp; while (*s1) { if ((cmp = toupper (*s1) - toupper (*s2)) != 0) return cmp; s1++; s2++; } return (*s2) ? -1 : 0; } static int SectSorter (const void *p1, const void *p2) { const char **s1 = (const char **) p1; const char **s2 = (const char **) p2; return stricmp (*s1, *s2); } SQLRETURN SQL_API SQLDataSources_Internal ( SQLHENV henv, SQLUSMALLINT fDir, SQLPOINTER szDSN, SQLSMALLINT cbDSNMax, SQLSMALLINT * pcbDSN, SQLPOINTER szDesc, SQLSMALLINT cbDescMax, SQLSMALLINT * pcbDesc, SQLCHAR waMode) { GENV (genv, henv); char buffer[4096], desc[1024], *ptr; int i, j, usernum = 0; static int cur_entry = -1; static int num_entries = 0; static void **sect = NULL; SQLUSMALLINT fDirOld = fDir; waMode = waMode; /*UNUSED*/ /* check argument */ if (cbDSNMax < 0 || cbDescMax < 0) { PUSHSQLERR (genv->herr, en_S1090); return SQL_ERROR; } if (fDir != SQL_FETCH_FIRST && fDir != SQL_FETCH_NEXT && fDir != SQL_FETCH_FIRST_USER && fDir != SQL_FETCH_FIRST_SYSTEM) { PUSHSQLERR (genv->herr, en_S1103); return SQL_ERROR; } if (cur_entry < 0 || fDir == SQL_FETCH_FIRST || fDir == SQL_FETCH_FIRST_USER || fDir == SQL_FETCH_FIRST_SYSTEM) { cur_entry = 0; num_entries = 0; /* * Free old section list */ if (sect) { for (i = 0; i < MAX_ENTRIES; i++) if (sect[i]) free (sect[i]); free (sect); } if ((sect = (void **) calloc (MAX_ENTRIES, sizeof (void *))) == NULL) { PUSHSQLERR (genv->herr, en_S1011); return SQL_ERROR; } if (fDirOld == SQL_FETCH_FIRST) fDir = SQL_FETCH_FIRST_USER; do { SQLSetConfigMode (fDir == SQL_FETCH_FIRST_SYSTEM ? ODBC_SYSTEM_DSN : ODBC_USER_DSN); SQLGetPrivateProfileString (SECT1, NULL, "", buffer, sizeof(buffer) / sizeof(SQLTCHAR), "odbc.ini"); /* For each datasources */ for(ptr = buffer, i = 1 ; *ptr && i ; ptr += STRLEN(ptr) + 1) { /* Add this section to the datasources list */ if (fDirOld == SQL_FETCH_FIRST && fDir == SQL_FETCH_FIRST_SYSTEM) { for(j = 0 ; j= MAX_ENTRIES) { i = 0; break; } /* Skip the rest */ /* Copy the datasource name */ sect[num_entries<<1] = STRDUP (ptr); /* ... and its description */ SQLSetConfigMode (fDir == SQL_FETCH_FIRST_SYSTEM ? ODBC_SYSTEM_DSN : ODBC_USER_DSN); SQLGetPrivateProfileString (SECT1, ptr, "", desc, sizeof(desc) / sizeof(SQLTCHAR), "odbc.ini"); sect[(num_entries++<<1) + 1] = STRDUP (desc); } switch(fDir) { case SQL_FETCH_FIRST_USER: fDir = SQL_FETCH_FIRST_SYSTEM; usernum = num_entries; break; case SQL_FETCH_FIRST_SYSTEM: fDir = SQL_FETCH_FIRST; break; }; } while (fDir!=SQL_FETCH_FIRST && fDirOld==SQL_FETCH_FIRST); fDir = fDirOld; /* * Sort all entries so we can present a nice list */ if (num_entries > 1) { qsort (sect, num_entries, sizeof (char **) + sizeof (char **), SectSorter); } } /* * Try to get to the next item */ if (cur_entry >= num_entries) { cur_entry = 0; /* Next time, start all over again */ return SQL_NO_DATA_FOUND; } /* * Copy DSN information */ STRNCPY (szDSN, sect[cur_entry << 1], cbDSNMax); if (pcbDSN) *pcbDSN = STRLEN (szDSN); /* * And find the description that goes with this entry */ STRNCPY (szDesc, sect[(cur_entry << 1) + 1], cbDescMax); if (pcbDesc) *pcbDesc = STRLEN (szDesc); /* * Next record */ cur_entry++; return SQL_SUCCESS; } SQLRETURN SQL_API SQLDataSources ( SQLHENV henv, SQLUSMALLINT fDir, SQLCHAR * szDSN, SQLSMALLINT cbDSNMax, SQLSMALLINT * pcbDSN, SQLCHAR * szDesc, SQLSMALLINT cbDescMax, SQLSMALLINT * pcbDesc) { ENTER_HENV (henv, trace_SQLDataSources (TRACE_ENTER, henv, fDir, szDSN, cbDSNMax, pcbDSN, szDesc, cbDescMax, pcbDesc)); retcode = SQLDataSources_Internal ( henv, fDir, szDSN, cbDSNMax, pcbDSN, szDesc, cbDescMax, pcbDesc, 'A'); LEAVE_HENV (henv, trace_SQLDataSources (TRACE_LEAVE, henv, fDir, szDSN, cbDSNMax, pcbDSN, szDesc, cbDescMax, pcbDesc)); } #if ODBCVER >= 0x0300 SQLRETURN SQL_API SQLDataSourcesA ( SQLHENV henv, SQLUSMALLINT fDir, SQLCHAR * szDSN, SQLSMALLINT cbDSNMax, SQLSMALLINT * pcbDSN, SQLCHAR * szDesc, SQLSMALLINT cbDescMax, SQLSMALLINT * pcbDesc) { ENTER_HENV (henv, trace_SQLDataSources (TRACE_ENTER, henv, fDir, szDSN, cbDSNMax, pcbDSN, szDesc, cbDescMax, pcbDesc)); retcode = SQLDataSources_Internal( henv, fDir, szDSN, cbDSNMax, pcbDSN, szDesc, cbDescMax, pcbDesc, 'A'); LEAVE_HENV (henv, trace_SQLDataSources (TRACE_LEAVE, henv, fDir, szDSN, cbDSNMax, pcbDSN, szDesc, cbDescMax, pcbDesc)); } SQLRETURN SQL_API SQLDataSourcesW ( SQLHENV henv, SQLUSMALLINT fDir, SQLWCHAR * szDSN, SQLSMALLINT cbDSNMax, SQLSMALLINT * pcbDSN, SQLWCHAR * szDesc, SQLSMALLINT cbDescMax, SQLSMALLINT * pcbDesc) { SQLCHAR *_DSN = NULL; SQLCHAR *_Desc = NULL; GENV (glenv, henv); DM_CONV *conv = &glenv->conv; ENTER_HENV (henv, trace_SQLDataSourcesW (TRACE_ENTER, henv, fDir, szDSN, cbDSNMax, pcbDSN, szDesc, cbDescMax, pcbDesc)); if (cbDSNMax > 0) { if ((_DSN = (SQLCHAR *) malloc (cbDSNMax * UTF8_MAX_CHAR_LEN + 1)) == NULL) { PUSHSQLERR (genv->herr, en_S1001); return SQL_ERROR; } } if (cbDescMax > 0) { if ((_Desc = (SQLCHAR *) malloc (cbDescMax * UTF8_MAX_CHAR_LEN + 1)) == NULL) { PUSHSQLERR (genv->herr, en_S1001); return SQL_ERROR; } } retcode = SQLDataSources_Internal ( henv, fDir, _DSN, cbDSNMax * UTF8_MAX_CHAR_LEN, pcbDSN, _Desc, cbDescMax * UTF8_MAX_CHAR_LEN, pcbDesc, 'W'); if (SQL_SUCCEEDED (retcode)) { dm_StrCopyOut2_U8toW_d2m (conv, _DSN, szDSN, cbDSNMax * DM_WCHARSIZE(conv), pcbDSN, NULL); dm_StrCopyOut2_U8toW_d2m (conv, _Desc, szDesc, cbDescMax * DM_WCHARSIZE(conv), pcbDesc, NULL); } MEM_FREE (_DSN); MEM_FREE (_Desc); LEAVE_HENV (henv, trace_SQLDataSourcesW (TRACE_LEAVE, henv, fDir, szDSN, cbDSNMax, pcbDSN, szDesc, cbDescMax, pcbDesc)); } #endif SQLRETURN SQL_API SQLDrivers_Internal ( SQLHENV henv, SQLUSMALLINT fDir, SQLPOINTER szDrvDesc, SQLSMALLINT cbDrvDescMax, SQLSMALLINT * pcbDrvDesc, SQLPOINTER szDrvAttr, SQLSMALLINT cbDrvAttrMax, SQLSMALLINT * pcbDrvAttr, SQLCHAR waMode) { GENV (genv, henv); char buffer[4096], desc[1024], *ptr; int i, j, usernum = 0; static int cur_entry = -1; static int num_entries = 0; static void **sect = NULL; SQLUSMALLINT fDirOld = fDir; waMode = waMode; /*UNUSED*/ /* check argument */ if (cbDrvDescMax < 0 || cbDrvAttrMax < 0) { PUSHSQLERR (genv->herr, en_S1090); return SQL_ERROR; } if (fDir != SQL_FETCH_FIRST && fDir != SQL_FETCH_NEXT) { PUSHSQLERR (genv->herr, en_S1103); return SQL_ERROR; } if (cur_entry < 0 || fDir == SQL_FETCH_FIRST) { cur_entry = 0; num_entries = 0; /* * Free old section list */ if (sect) { for (i = 0; i < MAX_ENTRIES; i++) if (sect[i]) free (sect[i]); free (sect); } if ((sect = (void **) calloc (MAX_ENTRIES, sizeof (void *))) == NULL) { PUSHSQLERR (genv->herr, en_S1011); return SQL_ERROR; } if (fDirOld == SQL_FETCH_FIRST) fDir = SQL_FETCH_FIRST_USER; do { SQLSetConfigMode (fDir == SQL_FETCH_FIRST_SYSTEM ? ODBC_SYSTEM_DSN : ODBC_USER_DSN); SQLGetPrivateProfileString (SECT2, NULL, "", buffer, sizeof(buffer) / sizeof(SQLTCHAR), "odbcinst.ini"); /* For each datasources */ for(ptr = buffer, i = 1 ; *ptr && i ; ptr += STRLEN(ptr) + 1) { /* Add this section to the datasources list */ if (fDirOld == SQL_FETCH_FIRST && fDir == SQL_FETCH_FIRST_SYSTEM) { for(j = 0 ; j= MAX_ENTRIES) { i = 0; break; } /* Skip the rest */ /* ... and its description */ SQLSetConfigMode (fDir == SQL_FETCH_FIRST_SYSTEM ? ODBC_SYSTEM_DSN : ODBC_USER_DSN); SQLGetPrivateProfileString (SECT2, ptr, "", desc, sizeof(desc) / sizeof(SQLTCHAR), "odbcinst.ini"); /* Check if the driver is installed */ if(!STRCASEEQ(desc, "Installed")) continue; /* Copy the driver name */ sect[num_entries<<1] = STRDUP (ptr); sect[(num_entries++<<1) + 1] = STRDUP (desc); } switch(fDir) { case SQL_FETCH_FIRST_USER: fDir = SQL_FETCH_FIRST_SYSTEM; usernum = num_entries; break; case SQL_FETCH_FIRST_SYSTEM: fDir = SQL_FETCH_FIRST; break; }; } while (fDir!=SQL_FETCH_FIRST && fDirOld==SQL_FETCH_FIRST); fDir = fDirOld; /* * Sort all entries so we can present a nice list */ if (num_entries > 1) { qsort (sect, num_entries, sizeof (char **) + sizeof (char **), SectSorter); } } /* * Try to get to the next item */ if (cur_entry >= num_entries) { cur_entry = 0; /* Next time, start all over again */ return SQL_NO_DATA_FOUND; } /* * Copy Driver information */ STRNCPY (szDrvDesc, sect[cur_entry << 1], cbDrvDescMax); if (pcbDrvDesc) *pcbDrvDesc = STRLEN (szDrvDesc); /* * And find the description that goes with this entry */ STRNCPY (szDrvAttr, sect[(cur_entry << 1) + 1], cbDrvAttrMax); if (pcbDrvAttr) *pcbDrvAttr = STRLEN (szDrvAttr); /* * Next record */ cur_entry++; return SQL_SUCCESS; } SQLRETURN SQL_API SQLDrivers ( SQLHENV henv, SQLUSMALLINT fDir, SQLCHAR * szDrvDesc, SQLSMALLINT cbDrvDescMax, SQLSMALLINT * pcbDrvDesc, SQLCHAR * szDrvAttr, SQLSMALLINT cbDrvAttrMax, SQLSMALLINT * pcbDrvAttr) { ENTER_HENV (henv, trace_SQLDrivers (TRACE_ENTER, henv, fDir, szDrvDesc, cbDrvDescMax, pcbDrvDesc, szDrvAttr, cbDrvAttrMax, pcbDrvAttr)); retcode = SQLDrivers_Internal( henv, fDir, szDrvDesc, cbDrvDescMax, pcbDrvDesc, szDrvAttr, cbDrvAttrMax, pcbDrvAttr, 'A'); LEAVE_HENV (henv, trace_SQLDrivers (TRACE_LEAVE, henv, fDir, szDrvDesc, cbDrvDescMax, pcbDrvDesc, szDrvAttr, cbDrvAttrMax, pcbDrvAttr)); } #if ODBCVER >= 0x0300 SQLRETURN SQL_API SQLDriversA ( SQLHENV henv, SQLUSMALLINT fDir, SQLCHAR * szDrvDesc, SQLSMALLINT cbDrvDescMax, SQLSMALLINT * pcbDrvDesc, SQLCHAR * szDrvAttr, SQLSMALLINT cbDrvAttrMax, SQLSMALLINT * pcbDrvAttr) { ENTER_HENV (henv, trace_SQLDrivers (TRACE_ENTER, henv, fDir, szDrvDesc, cbDrvDescMax, pcbDrvDesc, szDrvAttr, cbDrvAttrMax, pcbDrvAttr)); retcode = SQLDrivers_Internal( henv, fDir, szDrvDesc, cbDrvDescMax, pcbDrvDesc, szDrvAttr, cbDrvAttrMax, pcbDrvAttr, 'A'); LEAVE_HENV (henv, trace_SQLDrivers (TRACE_LEAVE, henv, fDir, szDrvDesc, cbDrvDescMax, pcbDrvDesc, szDrvAttr, cbDrvAttrMax, pcbDrvAttr)); } SQLRETURN SQL_API SQLDriversW (SQLHENV henv, SQLUSMALLINT fDir, SQLWCHAR * szDrvDesc, SQLSMALLINT cbDrvDescMax, SQLSMALLINT * pcbDrvDesc, SQLWCHAR * szDrvAttr, SQLSMALLINT cbDrvAttrMax, SQLSMALLINT * pcbDrvAttr) { SQLCHAR *_Driver = NULL; SQLCHAR *_Attrs = NULL; GENV (glenv, henv); DM_CONV *conv = &glenv->conv; ENTER_HENV (henv, trace_SQLDriversW (TRACE_ENTER, henv, fDir, szDrvDesc, cbDrvDescMax, pcbDrvDesc, szDrvAttr, cbDrvAttrMax, pcbDrvAttr)); if (cbDrvDescMax > 0) { if ((_Driver = (SQLCHAR *) malloc (cbDrvDescMax * UTF8_MAX_CHAR_LEN + 1)) == NULL) { PUSHSQLERR (genv->herr, en_S1001); return SQL_ERROR; } } if (cbDrvAttrMax > 0) { if ((_Attrs = (SQLCHAR *) malloc (cbDrvAttrMax * UTF8_MAX_CHAR_LEN + 1)) == NULL) { PUSHSQLERR (genv->herr, en_S1001); return SQL_ERROR; } } retcode = SQLDrivers_Internal ( henv, fDir, _Driver, cbDrvDescMax * UTF8_MAX_CHAR_LEN, pcbDrvDesc, _Attrs, cbDrvAttrMax * UTF8_MAX_CHAR_LEN, pcbDrvAttr, 'W'); if (SQL_SUCCEEDED (retcode)) { dm_StrCopyOut2_U8toW_d2m (conv, _Driver, szDrvDesc, cbDrvDescMax * DM_WCHARSIZE(conv), pcbDrvDesc, NULL); dm_StrCopyOut2_U8toW_d2m (conv, _Attrs, szDrvAttr, cbDrvAttrMax * DM_WCHARSIZE(conv), pcbDrvAttr, NULL); } MEM_FREE (_Driver); MEM_FREE (_Attrs); LEAVE_HENV (henv, trace_SQLDriversW (TRACE_LEAVE, henv, fDir, szDrvDesc, cbDrvDescMax, pcbDrvDesc, szDrvAttr, cbDrvAttrMax, pcbDrvAttr)); } #endif SQLRETURN SQL_API SQLGetInfo_Internal ( SQLHDBC hdbc, SQLUSMALLINT fInfoType, SQLPOINTER rgbInfoValue, SQLSMALLINT cbInfoValueMax, SQLSMALLINT * pcbInfoValue, SQLCHAR waMode) { CONN (pdbc, hdbc); ENVR (penv, pdbc->henv); STMT (pstmt, NULL); STMT (tpstmt, NULL); HPROC hproc = SQL_NULL_HPROC; SQLRETURN retcode = SQL_SUCCESS; void * _InfoValue = NULL; void * infoValueOut = rgbInfoValue; SQLPOINTER ptr = 0; SQLSMALLINT _cbInfoValueMax = cbInfoValueMax; CONV_DIRECT conv_direct = CD_NONE; DM_CONV *conv = &pdbc->conv; int size = 0, len = 0, ret = 0; wchar_t buf[20] = {'\0'}; if (cbInfoValueMax < 0) { PUSHSQLERR (pdbc->herr, en_S1090); return SQL_ERROR; } #if (ODBCVER < 0x0300) if ( /* fInfoType < SQL_INFO_FIRST || */ (fInfoType > SQL_INFO_LAST && fInfoType < SQL_INFO_DRIVER_START)) { PUSHSQLERR (pdbc->herr, en_S1096); return SQL_ERROR; } #endif if (fInfoType == SQL_ODBC_VER #if (ODBCVER >= 0x0300) || fInfoType == SQL_DM_VER #endif ) { #if (ODBCVER >= 0x0300) if (fInfoType == SQL_DM_VER) sprintf ((char*)buf, "%02d.%02d.%04d.%04d", SQL_SPEC_MAJOR, SQL_SPEC_MINOR, IODBC_BUILD / 10000, IODBC_BUILD % 10000); else #endif sprintf ((char*)buf, "%02d.%02d.0000", SQL_SPEC_MAJOR, SQL_SPEC_MINOR); if(waMode == 'W') { void *prov = DM_U8toW(conv, (SQLCHAR *)buf, SQL_NTS); if(prov) { DM_WCSNCPY(conv, buf, prov, sizeof(buf)/DM_WCHARSIZE(conv)); free(prov); } else DM_SetWCharAt(conv, buf, 0, 0); } if (rgbInfoValue != NULL && cbInfoValueMax > 0) { len = (waMode != 'W' ? STRLEN (buf) : DM_WCSLEN(conv, buf)); if (len > cbInfoValueMax - 1) { len = cbInfoValueMax - 1; PUSHSQLERR (pdbc->herr, en_01004); retcode = SQL_SUCCESS_WITH_INFO; } if (waMode != 'W') { STRNCPY (rgbInfoValue, buf, len); ((char *) rgbInfoValue)[len] = '\0'; } else { DM_WCSNCPY (conv, rgbInfoValue, buf, len); DM_SetWCharAt(conv, rgbInfoValue, len, 0); } } if (pcbInfoValue != NULL) { *pcbInfoValue = (SWORD) len; } return retcode; } if (pdbc->state == en_dbc_allocated || pdbc->state == en_dbc_needdata) { PUSHSQLERR (pdbc->herr, en_08003); return SQL_ERROR; } switch (fInfoType) { case SQL_DRIVER_HDBC: ptr = (SQLPOINTER) (pdbc->dhdbc); size = sizeof (ptr); break; case SQL_DRIVER_HENV: penv = (ENV_t *) (pdbc->henv); ptr = (SQLPOINTER) (penv->dhenv); size = sizeof (ptr); break; case SQL_DRIVER_HLIB: penv = (ENV_t *) (pdbc->henv); ptr = (SQLPOINTER) (penv->hdll); size = sizeof (ptr); break; case SQL_DRIVER_HSTMT: if (rgbInfoValue != NULL) { pstmt = *((STMT_t **) rgbInfoValue); } for (tpstmt = (STMT_t *) (pdbc->hstmt); tpstmt != NULL; tpstmt = tpstmt->next) { if (tpstmt == pstmt) { break; } } if (tpstmt == NULL) { PUSHSQLERR (pdbc->herr, en_S1009); return SQL_ERROR; } ptr = (SQLPOINTER) (pstmt->dhstmt); size = sizeof (ptr); break; case SQL_DRIVER_NAME: case SQL_DRIVER_ODBC_VER: case SQL_DRIVER_VER: case SQL_ODBC_INTERFACE_CONFORMANCE: break; default: /* NOTE : this was before the switch, just move here to let some information going through */ if (pdbc->state == en_dbc_allocated || pdbc->state == en_dbc_needdata) { PUSHSQLERR (pdbc->herr, en_08003); return SQL_ERROR; } } if (size) { if (rgbInfoValue != NULL) { rgbInfoValue = ptr; } if (pcbInfoValue != NULL) { *(pcbInfoValue) = (SWORD) size; } return SQL_SUCCESS; } #if (ODBCVER >= 0x0300) /* * This was a temp value in ODBC 2 */ if (((ENV_t *) pdbc->henv)->dodbc_ver == SQL_OV_ODBC2 && fInfoType == SQL_OJ_CAPABILITIES) fInfoType = 65003; #endif /* ODBCVER >= 0x0300 */ if (penv->unicode_driver && waMode != 'W') conv_direct = CD_A2W; else if (!penv->unicode_driver && waMode == 'W') conv_direct = CD_W2A; else if (waMode == 'W' && conv && conv->dm_cp!=conv->drv_cp) conv_direct = CD_W2W; if (conv_direct != CD_NONE) { switch(fInfoType) { 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 (conv_direct == CD_A2W || conv_direct == CD_W2W) { /* ansi<=unicode OR unicode<=unicode*/ if (conv_direct == CD_W2W) _cbInfoValueMax /= DM_WCHARSIZE(conv); if ((_InfoValue = malloc((_cbInfoValueMax + 1) * DRV_WCHARSIZE_ALLOC(conv))) == NULL) { PUSHSQLERR (pdbc->herr, en_HY001); return SQL_ERROR; } _cbInfoValueMax *= DRV_WCHARSIZE_ALLOC(conv); } else if (conv_direct == CD_W2A) { /* unicode<=ansi*/ if ((_InfoValue = malloc(_cbInfoValueMax * MB_CUR_MAX + 1)) == NULL) { PUSHSQLERR (pdbc->herr, en_HY001); return SQL_ERROR; } _cbInfoValueMax /= DM_WCHARSIZE(conv); } infoValueOut = _InfoValue; break; } } CALL_UDRIVER(hdbc, pdbc, retcode, hproc, penv->unicode_driver, en_GetInfo, (pdbc->dhdbc, fInfoType, infoValueOut, _cbInfoValueMax, pcbInfoValue)); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (pdbc->herr, en_IM001); return SQL_ERROR; } if (retcode == SQL_ERROR && fInfoType == SQL_DRIVER_ODBC_VER) { if (waMode != 'W') { STRCPY (buf, "01.00"); if (rgbInfoValue != NULL && cbInfoValueMax > 0) { len = STRLEN (buf); if (len > cbInfoValueMax - 1) { len = cbInfoValueMax - 1; ret = -1; } else { ret = 0; } STRNCPY (rgbInfoValue, buf, len); ((char *) rgbInfoValue)[len] = '\0'; } if (pcbInfoValue != NULL) *pcbInfoValue = (SWORD) len; } else { int count; ret = dm_StrCopyOut2_A2W_d2m (conv, (SQLCHAR *) "01.00", rgbInfoValue, cbInfoValueMax, NULL, &count); if (pcbInfoValue) *pcbInfoValue = (SQLSMALLINT)count; } if (ret == -1) { PUSHSQLERR (pdbc->herr, en_01004); retcode = SQL_SUCCESS_WITH_INFO; } else { retcode = SQL_SUCCESS; } } else if (rgbInfoValue && conv_direct != CD_NONE && SQL_SUCCEEDED (retcode)) { int count; switch(fInfoType) { 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 (conv_direct == CD_A2W) { /* ansi<=unicode*/ ret = dm_StrCopyOut2_W2A_d2m (conv, infoValueOut, (SQLCHAR *) rgbInfoValue, cbInfoValueMax, NULL, &count); if (pcbInfoValue) *pcbInfoValue = (SQLSMALLINT)count; } else if (conv_direct == CD_W2A) { /* unicode<=ansi*/ ret = dm_StrCopyOut2_A2W_d2m (conv, (SQLCHAR *) infoValueOut, rgbInfoValue, cbInfoValueMax, NULL, &count); if (pcbInfoValue) *pcbInfoValue = (SQLSMALLINT)count; } else if (conv_direct == CD_W2W) { /* unicode<=unicode*/ ret = dm_StrCopyOut2_W2W_d2m (conv, infoValueOut, rgbInfoValue, cbInfoValueMax, NULL, &count); if (pcbInfoValue) *pcbInfoValue = (SQLSMALLINT)count; } if (ret == -1) { PUSHSQLERR (pdbc->herr, en_01004); retcode = SQL_SUCCESS_WITH_INFO; } break; } } MEM_FREE(_InfoValue); return retcode; } SQLRETURN SQL_API SQLGetInfo (SQLHDBC hdbc, SQLUSMALLINT fInfoType, SQLPOINTER rgbInfoValue, SQLSMALLINT cbInfoValueMax, SQLSMALLINT * pcbInfoValue) { ENTER_HDBC (hdbc, 0, trace_SQLGetInfo (TRACE_ENTER, hdbc, fInfoType, rgbInfoValue, cbInfoValueMax, pcbInfoValue)); retcode = SQLGetInfo_Internal( hdbc, fInfoType, rgbInfoValue, cbInfoValueMax, pcbInfoValue, 'A'); LEAVE_HDBC (hdbc, 0, trace_SQLGetInfo (TRACE_LEAVE, hdbc, fInfoType, rgbInfoValue, cbInfoValueMax, pcbInfoValue)); } #if ODBCVER >= 0x0300 SQLRETURN SQL_API SQLGetInfoA (SQLHDBC hdbc, SQLUSMALLINT fInfoType, SQLPOINTER rgbInfoValue, SQLSMALLINT cbInfoValueMax, SQLSMALLINT * pcbInfoValue) { ENTER_HDBC (hdbc, 0, trace_SQLGetInfo (TRACE_ENTER, hdbc, fInfoType, rgbInfoValue, cbInfoValueMax, pcbInfoValue)); retcode = SQLGetInfo_Internal( hdbc, fInfoType, rgbInfoValue, cbInfoValueMax, pcbInfoValue, 'A'); LEAVE_HDBC (hdbc, 0, trace_SQLGetInfo (TRACE_LEAVE, hdbc, fInfoType, rgbInfoValue, cbInfoValueMax, pcbInfoValue)); } SQLRETURN SQL_API SQLGetInfoW ( SQLHDBC hdbc, SQLUSMALLINT fInfoType, SQLPOINTER rgbInfoValue, SQLSMALLINT cbInfoValueMax, SQLSMALLINT * pcbInfoValue) { ENTER_HDBC (hdbc, 0, trace_SQLGetInfoW (TRACE_ENTER, hdbc, fInfoType, rgbInfoValue, cbInfoValueMax, pcbInfoValue)); retcode = SQLGetInfo_Internal ( hdbc, fInfoType, rgbInfoValue, cbInfoValueMax, pcbInfoValue, 'W'); LEAVE_HDBC (hdbc, 0, trace_SQLGetInfoW (TRACE_LEAVE, hdbc, fInfoType, rgbInfoValue, cbInfoValueMax, pcbInfoValue)); } #endif static int FunctionNumbers[] = { 0 #define FUNCDEF(A,B,C) ,A #include "henv.ci" #undef FUNCDEF }; static SQLRETURN SQLGetFunctions_Internal ( SQLHDBC hdbc, SQLUSMALLINT fFunc, SQLUSMALLINT * pfExists) { CONN (pdbc, hdbc); HPROC hproc; SQLRETURN retcode; int i; UWORD functions2[100]; #if (ODBCVER >= 0x0300) UWORD functions3[SQL_API_ODBC3_ALL_FUNCTIONS_SIZE]; #endif if (pdbc->state == en_dbc_allocated || pdbc->state == en_dbc_needdata) { PUSHSQLERR (pdbc->herr, en_S1010); return SQL_ERROR; } if (pfExists == NULL) { return SQL_SUCCESS; } /* * These functions are supported by the iODBC driver manager */ if (fFunc == SQL_API_SQLDATASOURCES || fFunc == SQL_API_SQLDRIVERS #if (ODBCVER >= 0x0300) || fFunc == SQL_API_SQLGETENVATTR || fFunc == SQL_API_SQLSETENVATTR #endif ) { *pfExists = (UWORD) 1; return SQL_SUCCESS; } /* * Check if function number is within ODBC version context */ #if (ODBCVER < 0x0300) if (fFunc > SQL_EXT_API_LAST) { PUSHSQLERR (pdbc->herr, en_S1095); return SQL_ERROR; } #endif /* * In a ODBC 2.x driver context, the ODBC 3.x API calls are * mapped by the driver manager. */ #if (ODBCVER >= 0x0300) if (((ENV_t *) pdbc->henv)->dodbc_ver == SQL_OV_ODBC2) { switch (fFunc) { case SQL_API_ALL_FUNCTIONS: case SQL_API_ODBC3_ALL_FUNCTIONS: break; /* Mapped ODBC3 app -> ODBC2 driver functions */ case SQL_API_SQLALLOCHANDLE: case SQL_API_SQLFREEHANDLE: case SQL_API_SQLSETCONNECTATTR: case SQL_API_SQLGETCONNECTATTR: case SQL_API_SQLGETSTMTATTR: case SQL_API_SQLSETSTMTATTR: case SQL_API_SQLCOLATTRIBUTE: case SQL_API_SQLENDTRAN: case SQL_API_SQLBULKOPERATIONS: case SQL_API_SQLFETCHSCROLL: case SQL_API_SQLGETDIAGREC: case SQL_API_SQLGETDIAGFIELD: *pfExists = SQL_TRUE; return SQL_SUCCESS; case SQL_API_SQLBINDPARAM: fFunc = SQL_API_SQLBINDPARAMETER; break; default: if (fFunc > SQL_API_SQLBINDPARAMETER) { *pfExists = SQL_FALSE; return SQL_SUCCESS; } break; } } #endif /* * If the driver exports a SQLGetFunctions call, use it */ hproc = _iodbcdm_getproc (pdbc, en_GetFunctions); if (hproc != SQL_NULL_HPROC) { CALL_DRIVER (hdbc, pdbc, retcode, hproc, (pdbc->dhdbc, fFunc, pfExists)); return retcode; } /* * Map deprecated functions */ if (fFunc == SQL_API_SQLSETPARAM) { fFunc = SQL_API_SQLBINDPARAMETER; } /* * Initialize intermediate result arrays */ memset (functions2, '\0', sizeof (functions2)); #if (ODBCVER > 0x0300) memset (functions3, '\0', sizeof (functions3)); #endif /* * Build result array by scanning for all API calls */ for (i = 1; i < __LAST_API_FUNCTION__; i++) { int j = FunctionNumbers[i]; hproc = _iodbcdm_getproc (pdbc, i); if (hproc != SQL_NULL_HPROC) { if (j < 100) functions2[j] = 1; #if (ODBCVER >= 0x0300) functions3[j >> 4] |= (1 << (j & 0x000F)); #endif } } /* * Finally return the information */ if (fFunc == SQL_API_ALL_FUNCTIONS) { memcpy (pfExists, &functions2, sizeof (functions2)); } #if (ODBCVER < 0x0300) else { *pfExists = functions2[fFunc]; } #else else if (fFunc == SQL_API_ODBC3_ALL_FUNCTIONS) { memcpy (pfExists, &functions3, sizeof (functions3)); } else { *pfExists = SQL_FUNC_EXISTS (functions3, fFunc); } #endif return SQL_SUCCESS; } SQLRETURN SQL_API SQLGetFunctions ( SQLHDBC hdbc, SQLUSMALLINT fFunc, SQLUSMALLINT * pfExists) { ENTER_HDBC (hdbc, 0, trace_SQLGetFunctions (TRACE_ENTER, hdbc, fFunc, pfExists)); retcode = SQLGetFunctions_Internal ( hdbc, fFunc, pfExists); LEAVE_HDBC (hdbc, 0, trace_SQLGetFunctions (TRACE_LEAVE, hdbc, fFunc, pfExists)); } libiodbc-3.52.16/iodbc/hstmt.h0000664000175000017500000002371214424170750012763 00000000000000/* * hstmt.h * * $Id$ * * Query statement object management functions * * The iODBC driver manager. * * Copyright (C) 1995 Ke Jin * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef _HSTMT_H #define _HSTMT_H typedef struct VAR { void *data; int length; } VAR_t; #define STMT_VARS_MAX 8 #define STMT_MAX_PARAM 1024 /* * Binding parameter from SQLBindCol */ typedef struct BIND { UWORD bn_col; /* Column # */ SWORD bn_type; /* ODBC C data type */ void * bn_data; /* Pointer to data */ SDWORD bn_size; /* Size of data area */ SQLLEN *bn_pInd; /* Holds SQL_NULL_DATA | 0. * And length of returned char/bin data */ CONV_DIRECT direct; /* convert direction */ SQLLEN bn_conv_size; void* bn_conv_data; SQLLEN *bn_conv_pInd; void* bn_tmp; void* bn_tmp_Ind; BOOL rebinded; /* is col was rebinded */ } BIND_t; typedef struct SBLST TBLST, *PBLST; /* * Binding cell on the linked list */ struct SBLST { PBLST bl_nextBind; /* Next binding */ BIND_t bl_bind; /* Binding information */ }; typedef struct SPARM TPARM, *PPARM; struct SPARM { SQLUSMALLINT pm_par; /* Parameter # */ SQLSMALLINT pm_c_type; /* C Type */ SQLSMALLINT pm_c_type_orig; /* C Type original */ SQLLEN pm_size; /* size assoc. with pm_c_type or SQL_NTS */ SQLSMALLINT pm_sql_type; /* ODBC SQL Type */ SQLULEN pm_precision; /* Precision */ SQLSMALLINT pm_scale; /* Scale */ void *pm_data; /* Value / user handle */ SQLLEN *pm_pOctetLength; /* Length of char/bin parameter data */ SQLLEN *pm_pInd; /* Holds SQL_NULL_DATA | 0. Points to same * location as pm_pOctetLength for ODBC v2 */ SQLLEN pm_cbValueMax; /* cbValueMax */ SQLSMALLINT pm_usage; /* SQL_PARAM_INPUT, SQL_PARAM_OUTPUT etc */ void *pm_tmp; void *pm_tmp_Ind; void *pm_conv_data; SQLLEN *pm_conv_pInd; SQLLEN pm_conv_el_size; BOOL rebinded; /* is parameter was rebinded */ }; typedef struct STMT { int type; /* must be 1st field */ HERR herr; SQLRETURN rc; /* Return code of last function */ struct STMT *next; HDBC hdbc; /* back point to connection object */ HSTMT dhstmt; /* driver's stmt handle */ int state; int cursor_state; int prep_state; int asyn_on; /* async executing which odbc call */ int need_on; /* which call return SQL_NEED_DATA */ int stmt_cip; /* Call in progress on this handle */ SQLUINTEGER rowset_size; SQLUINTEGER row_bind_type; /* row_bind_type */ SQLUINTEGER row_bind_offset; SQLUINTEGER param_bind_type; /* param_bind_type */ SQLUINTEGER param_bind_offset; void *params_buf; /* buffer for W2W params conversion */ void *rows_buf; /* buffer for W2W params conversion */ SQLUINTEGER conv_param_bind_type; SQLUINTEGER conv_row_bind_type; #if (ODBCVER >= 0x0300) DESC_t * imp_desc[4]; DESC_t * desc[4]; SQLUINTEGER row_array_size; SQLPOINTER fetch_bookmark_ptr, params_processed_ptr; SQLUINTEGER paramset_size; SQLPOINTER row_status_ptr; SQLPOINTER rows_fetched_ptr; SQLUSMALLINT row_status_allocated; #endif SQLSMALLINT err_rec; VAR_t vars[STMT_VARS_MAX]; /* for a conversion parameters ansi<=>unicode*/ int vars_inserted; PBLST st_pbinding; /* API user bindings from SQLBindCol */ /* Binding variables */ PPARM st_pparam; /* API user parameters from SQLSetParam */ SQLUSMALLINT st_nparam; /* # params allocated */ PPARM st_need_param; } STMT_t; #define IS_VALID_HSTMT(x) \ ((x) != SQL_NULL_HSTMT && \ ((STMT_t *)(x))->type == SQL_HANDLE_STMT && \ ((STMT_t *)(x))->hdbc != SQL_NULL_HDBC) #define ENTER_STMT(hstmt, trace) \ STMT (pstmt, hstmt); \ SQLRETURN retcode = SQL_SUCCESS; \ ODBC_LOCK(); \ TRACE (trace); \ if (!IS_VALID_HSTMT (pstmt)) \ { \ retcode = SQL_INVALID_HANDLE; \ goto done; \ } \ else if (pstmt->stmt_cip) \ { \ PUSHSQLERR (pstmt->herr, en_S1010); \ retcode = SQL_ERROR; \ goto done; \ } \ pstmt->stmt_cip = 1; \ CLEAR_ERRORS (pstmt); \ if (pstmt->asyn_on == en_NullProc && pstmt->vars_inserted > 0) \ _iodbcdm_FreeStmtVars(pstmt); \ ODBC_UNLOCK() #define ENTER_STMT_CANCEL(hstmt, trace) \ STMT (pstmt, hstmt); \ SQLRETURN retcode = SQL_SUCCESS; \ int stmt_cip = 0; \ ODBC_LOCK(); \ TRACE (trace); \ if (!IS_VALID_HSTMT (pstmt)) \ { \ retcode = SQL_INVALID_HANDLE; \ goto done; \ } \ stmt_cip = pstmt->stmt_cip; \ CLEAR_ERRORS (pstmt); \ ODBC_UNLOCK() #define LEAVE_STMT(hstmt, trace) \ ODBC_LOCK (); \ pstmt->stmt_cip = 0; \ done: \ TRACE(trace); \ ODBC_UNLOCK (); \ return (retcode) #define LEAVE_STMT_CANCEL(hstmt, trace) \ ODBC_LOCK (); \ done: \ TRACE(trace); \ ODBC_UNLOCK (); \ return (retcode) enum { en_stmt_allocated = 0, en_stmt_prepared, en_stmt_executed_with_info, en_stmt_executed, en_stmt_cursoropen, en_stmt_fetched, en_stmt_xfetched, en_stmt_needdata, /* not call SQLParamData() yet */ en_stmt_mustput, /* not call SQLPutData() yet */ en_stmt_canput /* SQLPutData() called */ }; /* for statement handle state */ enum { en_stmt_cursor_no = 0, en_stmt_cursor_named, en_stmt_cursor_opened, en_stmt_cursor_fetched, en_stmt_cursor_xfetched }; /* for statement cursor state */ /* * Internal prototypes */ SQLRETURN _iodbcdm_dropstmt (HSTMT stmt); SQLLEN _iodbcdm_OdbcCTypeSize (SWORD fCType); void _iodbcdm_FreeStmtParams(STMT_t *pstmt); void _iodbcdm_FreeStmtVars(STMT_t *pstmt); void *_iodbcdm_alloc_var(STMT_t *pstmt, int i, int size); void *_iodbcdm_conv_var(STMT_t *pstmt, int i, void *pData, int pDataLength, CONV_DIRECT direct); void _iodbcdm_ConvBindData (STMT_t *pstmt); void _iodbcdm_ConvBindData_m2d (STMT_t *pstmt); SQLRETURN _iodbcdm_FixColBindData (STMT_t *pstmt); SQLRETURN _iodbcdm_BindColumn (STMT_t *pstmt, BIND_t *pbind); int _iodbcdm_UnBindColumn (STMT_t *pstmt, BIND_t *pbind); void _iodbcdm_RemoveBind (STMT_t *pstmt); void _iodbcdm_do_cursoropen (STMT_t * pstmt); SQLSMALLINT _iodbcdm_map_sql_type (int type, int odbcver); SQLSMALLINT _iodbcdm_map_c_type (int type, int odbcver); SQLRETURN SQL_API _iodbcdm_ExtendedFetch ( SQLHSTMT hstmt, SQLUSMALLINT fFetchType, SQLLEN irow, SQLULEN * pcrow, SQLUSMALLINT * rgfRowStatus); SQLRETURN SQL_API _iodbcdm_SetPos ( SQLHSTMT hstmt, SQLSETPOSIROW irow, SQLUSMALLINT fOption, SQLUSMALLINT fLock); SQLRETURN SQL_API _iodbcdm_NumResultCols ( SQLHSTMT hstmt, SQLSMALLINT * pccol); SQLRETURN SQLGetStmtOption_Internal ( SQLHSTMT hstmt, SQLUSMALLINT fOption, SQLPOINTER pvParam); #endif libiodbc-3.52.16/iodbc/Makefile.in0000664000175000017500000007357114424171020013517 00000000000000# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 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@ # # Makefile.am # # The iODBC driver manager. # # Copyright (C) 1995 Ke Jin # Copyright (C) 1996-2023 OpenLink Software # All Rights Reserved. # # This software is released under the terms of either of the following # licenses: # # - GNU Library General Public License (see LICENSE.LGPL) # - The BSD License (see LICENSE.BSD). # # Note that the only valid version of the LGPL license as far as this # project is concerned is the original GNU Library General Public License # Version 2, dated June 1991. # # While not mandated by the BSD license, any patches you make to the # iODBC source code may be contributed back into the iODBC project # at your discretion. Contributions will benefit the Open Source and # Data Access community as a whole. Submissions may be made at: # # http://www.iodbc.org # # # GNU Library Generic Public License Version 2 # ============================================ # 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; only # Version 2 of the License dated June 1991. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # The BSD License # =============== # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. Neither the name of OpenLink Software Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = iodbc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/admin/gtk-2.0.m4 \ $(top_srcdir)/admin/gtk.m4 $(top_srcdir)/admin/libtool.m4 \ $(top_srcdir)/admin/ltoptions.m4 \ $(top_srcdir)/admin/ltsugar.m4 \ $(top_srcdir)/admin/ltversion.m4 \ $(top_srcdir)/admin/lt~obsolete.m4 \ $(top_srcdir)/admin/openlink.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = libiodbc_la_DEPENDENCIES = trace/libiodbctrace.la \ ../iodbcinst/libiodbc_common.la $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) am_libiodbc_la_OBJECTS = catalog.lo connect.lo dlproc.lo execute.lo \ fetch.lo hdbc.lo henv.lo herr.lo hstmt.lo info.lo misc.lo \ prepare.lo result.lo odbc3.lo libiodbc_la_OBJECTS = $(am_libiodbc_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libiodbc_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libiodbc_la_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/admin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libiodbc_la_SOURCES) DIST_SOURCES = $(libiodbc_la_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/admin/depcomp \ $(top_srcdir)/admin/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_CONFIG = @GTK_CONFIG@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBADD_DL = @LIBADD_DL@ LIBADD_OS = @LIBADD_OS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ filedsnpath = @filedsnpath@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ inidir = @inidir@ install_sh = @install_sh@ lib_version = @lib_version@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ odbcmode = @odbcmode@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = trace . AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/iodbcinst lib_LTLIBRARIES = libiodbc.la libiodbc_la_LDFLAGS = -version-info @lib_version@ \ -export-symbols $(srcdir)/iodbc.exp libiodbc_la_LIBADD = trace/libiodbctrace.la \ ../iodbcinst/libiodbc_common.la \ $(LIBADD_DL) $(LIBADD_OS) libiodbc_la_SOURCES = catalog.c connect.c dlproc.c execute.c \ fetch.c hdbc.c henv.c herr.c hstmt.c info.c \ misc.c prepare.c result.c odbc3.c noinst_HEADERS = dlproc.h hdbc.h henv.h herr.h iodbc_misc.h \ hstmt.h itrace.h henv.ci herr.ci hdesc.h ithread.h EXTRA_DIST = \ $(srcdir)/iodbc.def \ $(srcdir)/iodbc.exp \ $(srcdir)/main.c \ $(srcdir)/vmscompile.com \ $(srcdir)/install_libodbc.sh all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu iodbc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu iodbc/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } @DARWIN_FALSE@libiodbc.la: $(libiodbc_la_OBJECTS) $(libiodbc_la_DEPENDENCIES) $(EXTRA_libiodbc_la_DEPENDENCIES) @DARWIN_FALSE@ $(AM_V_CCLD)$(libiodbc_la_LINK) -rpath $(libdir) $(libiodbc_la_OBJECTS) $(libiodbc_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/catalog.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/connect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dlproc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execute.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fetch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hdbc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/henv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/herr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hstmt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/info.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/odbc3.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prepare.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/result.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-libLTLIBRARIES @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: $(am__recursive_targets) install-am install-exec-am \ install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libLTLIBRARIES \ clean-libtool cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-exec-hook \ install-html install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES .PRECIOUS: Makefile @DARWIN_TRUE@libiodbc.la: $(libiodbc_la_OBJECTS) $(libiodbc_la_DEPENDENCIES) @DARWIN_TRUE@ $(LINK) -rpath $(libdir) $(libiodbc_la_LDFLAGS) $(libiodbc_la_OBJECTS) $(libiodbc_la_LIBADD) $(LIBS) @DARWIN_TRUE@ -$(STRIP) -s $(top_srcdir)/mac/iodbc.exp -u .libs/*.dylib # # Add symbolic link for libodbc.so as some apps need this # install-exec-hook: @INSTALL_LIBODBC_TRUE@ $(SHELL) $(srcdir)/install_libodbc.sh $(DESTDIR)$(libdir) # 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: libiodbc-3.52.16/iodbc/iodbc_misc.h0000664000175000017500000000674614424170750013727 00000000000000/* * iodbc_misc.h * * $Id$ * * Misc functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef _IODBC_MISC_H_ #define _IODBC_MISC_H_ #include "inifile.h" int _iodbcdm_cfg_init_str (PCONFIG *ppconf, void *str, int size, int wide, DM_CONV *conv); int _iodbcdm_cfg_parse_str (PCONFIG pconfig, void *str, int size, int wide, DM_CONV *conv); void *_iodbcdm_cfg_lookup (PCONFIG pconfig, const char *id); int _iodbcdm_cfg_to_string (PCONFIG pconfig, char *section, char *buf, size_t buf_sz); #endif /* _IODBC_MISC_H_ */ libiodbc-3.52.16/iodbc/herr.ci0000664000175000017500000002165614424170750012735 00000000000000/* * herr.ci * * $Id$ * * Error messages * * The iODBC driver manager. * * Copyright (C) 1995 Ke Jin * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ static sqlerrmsg_t 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_01S08, "01S08", "Error saving file DSN" }, { 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_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", "Syntax 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_HY001, "HY001", "Memory allocation error" }, { en_HY009, "HY009", "Invalid use of null pointer" }, { en_HY010, "HY010", "Function sequence error" }, { en_HY017, "HY017", "Invalid use of an automatically allocated descriptor handle" }, { en_HY024, "HY024", "Invalid attribute value" }, { en_HY091, "HY091", "Invalid descriptor field identifier" }, { en_HY092, "HY092", "Invalid attribute/option identifier" }, { en_HY110, "HY110", "Invalid driver completion" }, { en_HYC00, "HYC00", "Optional feature not implemented" }, { 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", "Invalid name of File DSN" }, { en_IM015, "IM015", "Corrupt file data source" }, { 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 number" }, { 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", "Uniqueness 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" }, { en_sqlstat_total, NULL, NULL } }; static char * sqlerrhd = "[iODBC][Driver Manager]"; libiodbc-3.52.16/iodbc/herr.h0000664000175000017500000001304714424170750012564 00000000000000/* * herr.h * * $Id$ * * Error stack management functions * * The iODBC driver manager. * * Copyright (C) 1995 Ke Jin * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef _HERR_H #define _HERR_H typedef enum { en_00000 = 0, en_01000, en_01002, en_01004, en_01006, en_01S00, en_01S01, en_01S02, en_01S03, en_01S04, en_01S08, en_07001, en_07006, en_08001, en_08002, en_08003, en_08004, en_08007, en_08S01, 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_HY001, en_HY009, en_HY010, en_HY017, en_HY024, en_HY091, en_HY092, en_HY110, en_HYC00, 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_IM015, 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, en_sqlstat_total } sqlstcode_t; typedef void *HERR; #define SQL_NULL_HERR ((HERR)NULL) typedef struct { sqlstcode_t code; char *stat; char *msg; } sqlerrmsg_t; typedef struct sqlerr { sqlstcode_t code; int idx; char *msg; struct sqlerr *next; } sqlerr_t; extern void _iodbcdm_freesqlerrlist (HERR herr); extern HERR _iodbcdm_pushsqlerr (HERR list, sqlstcode_t code, void *sysmsg); #define PUSHSYSERR(list, msg) \ list = (HERR) _iodbcdm_pushsqlerr ((HERR)(list), en_00000, msg) #define PUSHSQLERR(list, code) \ list = (HERR) _iodbcdm_pushsqlerr ((HERR)(list), (code), NULL) #define CLEAR_ERRORS(_handle) \ { \ _iodbcdm_freesqlerrlist ((_handle)->herr); \ (_handle)->herr = SQL_NULL_HERR; \ (_handle)->rc = SQL_SUCCESS; \ (_handle)->err_rec = 0; \ } #endif /* _SQLERR_H */ libiodbc-3.52.16/iodbc/odbc3.c0000664000175000017500000027341414424170750012617 00000000000000/* * odbc3.c * * $Id$ * * ODBC 3.x functions * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "iodbc.h" #include #include #include #if (ODBCVER >= 0x300) #include #include "unicode.h" #include "dlproc.h" #include "herr.h" #include "henv.h" #include "hdesc.h" #include "hdbc.h" #include "hstmt.h" #include "itrace.h" /* * SQL_ATTR_CONNECTION_POOLING value */ SQLINTEGER _iodbcdm_attr_connection_pooling = SQL_CP_DEFAULT; /* * Externals */ SQLRETURN SQLAllocEnv_Internal (SQLHENV * phenv, int odbc_ver); SQLRETURN SQLFreeEnv_Internal (SQLHENV henv); SQLRETURN SQLAllocConnect_Internal (SQLHENV henv, SQLHDBC * phdbc); SQLRETURN SQLFreeConnect_Internal (SQLHDBC hdbc, int ver); SQLRETURN SQLAllocStmt_Internal (SQLHDBC hdbc, SQLHSTMT * phstmt); SQLRETURN SQLFreeStmt_Internal (SQLHSTMT hstmt, SQLUSMALLINT fOption); SQLRETURN SQLTransact_Internal (SQLHENV henv, SQLHDBC hdbc, SQLUSMALLINT fType); SQLRETURN SQLAllocDesc_Internal ( SQLHDBC hdbc, SQLHDESC * phdesc) { CONN (pdbc, hdbc); SQLRETURN retcode = SQL_SUCCESS; HPROC hproc = SQL_NULL_HPROC; DESC_t *new_desc; SQLUINTEGER odbc_ver; SQLUINTEGER dodbc_ver; /* check state */ switch (pdbc->state) { case en_dbc_connected: case en_dbc_hstmt: break; case en_dbc_allocated: case en_dbc_needdata: PUSHSQLERR (pdbc->herr, en_08003); *phdesc = SQL_NULL_HSTMT; return SQL_ERROR; default: return SQL_INVALID_HANDLE; } odbc_ver = ((GENV_t *) pdbc->genv)->odbc_ver; dodbc_ver = (pdbc->henv != SQL_NULL_HENV) ? ((ENV_t *) pdbc->henv)->dodbc_ver : odbc_ver; if (odbc_ver == SQL_OV_ODBC2 || dodbc_ver == SQL_OV_ODBC2) { PUSHSQLERR (pdbc->herr, en_HYC00); return SQL_ERROR; } if (phdesc == NULL) { PUSHSQLERR (pdbc->herr, en_HY009); return SQL_ERROR; } hproc = _iodbcdm_getproc (pdbc, en_AllocHandle); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (pdbc->herr, en_IM001); return SQL_ERROR; } new_desc = (DESC_t *) MEM_ALLOC (sizeof (DESC_t)); if (!new_desc) { PUSHSQLERR (pdbc->herr, en_HY001); return SQL_ERROR; } memset (new_desc, 0, sizeof (DESC_t)); CALL_DRIVER (pdbc, pdbc, retcode, hproc, (SQL_HANDLE_DESC, pdbc->dhdbc, &new_desc->dhdesc)); if (!SQL_SUCCEEDED (retcode)) { MEM_FREE (new_desc); return SQL_ERROR; } new_desc->type = SQL_HANDLE_DESC; new_desc->hdbc = pdbc; new_desc->hstmt = NULL; new_desc->herr = NULL; new_desc->desc_cip = 0; *phdesc = new_desc; new_desc->next = (DESC_t *) pdbc->hdesc; pdbc->hdesc = new_desc; return SQL_SUCCESS; } RETCODE SQL_API SQLAllocHandle_Internal ( SQLSMALLINT handleType, SQLHANDLE inputHandle, SQLHANDLE * outputHandlePtr) { switch (handleType) { case SQL_HANDLE_ENV: return SQLAllocEnv_Internal (outputHandlePtr, 0); case SQL_HANDLE_DBC: { GENV (genv, inputHandle); if (!IS_VALID_HENV (genv)) { return SQL_INVALID_HANDLE; } CLEAR_ERRORS (genv); if (genv->odbc_ver == 0) { PUSHSQLERR (genv->herr, en_HY010); return SQL_ERROR; } return SQLAllocConnect_Internal (inputHandle, outputHandlePtr); } case SQL_HANDLE_STMT: { CONN (con, inputHandle); if (!IS_VALID_HDBC (con)) { return SQL_INVALID_HANDLE; } CLEAR_ERRORS (con); return SQLAllocStmt_Internal (inputHandle, outputHandlePtr); } case SQL_HANDLE_DESC: { CONN (con, inputHandle); if (!IS_VALID_HDBC (con)) { return SQL_INVALID_HANDLE; } CLEAR_ERRORS (con); return SQLAllocDesc_Internal (inputHandle, outputHandlePtr); } default: if (IS_VALID_HDBC (inputHandle)) { CONN (con, inputHandle); PUSHSQLERR (con->herr, en_HY092); return SQL_ERROR; } else if (IS_VALID_HENV (inputHandle)) { GENV (genv, inputHandle); PUSHSQLERR (genv->herr, en_HY092); return SQL_ERROR; } return SQL_INVALID_HANDLE; } } RETCODE SQL_API SQLAllocHandle ( SQLSMALLINT handleType, SQLHANDLE inputHandle, SQLHANDLE * outputHandlePtr) { int retcode = SQL_SUCCESS; if (handleType == SQL_HANDLE_ENV) { /* * One time initialization */ Init_iODBC(); ODBC_LOCK (); retcode = SQLAllocEnv_Internal (outputHandlePtr, 0); /* * Start tracing */ TRACE (trace_SQLAllocHandle (TRACE_ENTER, handleType, inputHandle, outputHandlePtr)); TRACE (trace_SQLAllocHandle (TRACE_LEAVE, handleType, inputHandle, outputHandlePtr)); ODBC_UNLOCK (); return retcode; } ODBC_LOCK (); TRACE (trace_SQLAllocHandle (TRACE_ENTER, handleType, inputHandle, outputHandlePtr)); retcode = SQLAllocHandle_Internal (handleType, inputHandle, outputHandlePtr); TRACE (trace_SQLAllocHandle (TRACE_LEAVE, handleType, inputHandle, outputHandlePtr)); ODBC_UNLOCK (); return retcode; } RETCODE SQL_API SQLAllocHandleStd ( SQLSMALLINT handleType, SQLHANDLE inputHandle, SQLHANDLE * outputHandlePtr) { int retcode = SQL_SUCCESS; if (handleType == SQL_HANDLE_ENV) { /* * One time initialization */ Init_iODBC(); ODBC_LOCK (); retcode = SQLAllocEnv_Internal (outputHandlePtr, SQL_OV_ODBC3); /* * Start tracing */ TRACE (trace_SQLAllocHandle (TRACE_ENTER, handleType, inputHandle, outputHandlePtr)); TRACE (trace_SQLAllocHandle (TRACE_LEAVE, handleType, inputHandle, outputHandlePtr)); ODBC_UNLOCK (); return retcode; } ODBC_LOCK (); TRACE (trace_SQLAllocHandle (TRACE_ENTER, handleType, inputHandle, outputHandlePtr)); retcode = SQLAllocHandle_Internal (handleType, inputHandle, outputHandlePtr); TRACE (trace_SQLAllocHandle (TRACE_LEAVE, handleType, inputHandle, outputHandlePtr)); ODBC_UNLOCK (); return retcode; } /**** SQLFreeHandle ****/ extern unsigned long _iodbc_env_counter; static RETCODE _SQLFreeHandle_ENV ( SQLSMALLINT handleType, SQLHANDLE handle) { int retcode = SQL_SUCCESS; ODBC_LOCK (); TRACE (trace_SQLFreeHandle (TRACE_ENTER, handleType, handle)); retcode = SQLFreeEnv_Internal ((SQLHENV) handle); TRACE (trace_SQLFreeHandle (TRACE_LEAVE, handleType, handle)); MEM_FREE (handle); /* * Close trace after last environment handle is freed */ if (--_iodbc_env_counter == 0) trace_stop(); ODBC_UNLOCK (); return retcode; } static RETCODE _SQLFreeHandle_DBC ( SQLSMALLINT handleType, SQLHANDLE handle) { ENTER_HDBC ((SQLHDBC) handle, 1, trace_SQLFreeHandle (TRACE_ENTER, handleType, handle)); retcode = SQLFreeConnect_Internal ((SQLHDBC) handle, 3); LEAVE_HDBC ((SQLHDBC) handle, 1, trace_SQLFreeHandle (TRACE_LEAVE, handleType, handle); MEM_FREE (handle) ); } static RETCODE _SQLFreeHandle_STMT ( SQLSMALLINT handleType, SQLHANDLE handle) { ENTER_STMT ((SQLHSTMT) handle, trace_SQLFreeHandle (TRACE_ENTER, handleType, handle)); retcode = SQLFreeStmt_Internal ((SQLHSTMT) handle, SQL_DROP); LEAVE_STMT ((SQLHSTMT) handle, trace_SQLFreeHandle (TRACE_LEAVE, handleType, handle); _iodbcdm_dropstmt ((SQLHSTMT) handle); ); } static RETCODE _SQLFreeHandle_DESC ( SQLSMALLINT handleType, SQLHANDLE handle) { DESC (pdesc, handle); CONN (pdbc, pdesc->hdbc); HPROC hproc; RETCODE retcode = SQL_SUCCESS; DESC_t *curr_desc; if (IS_VALID_HSTMT (pdesc->hstmt)) { /* the desc handle is implicit */ PUSHSQLERR (pdesc->herr, en_HY017); return SQL_ERROR; } CLEAR_ERRORS (pdesc); /* remove it from the dbc's list */ curr_desc = (DESC_t *) pdbc->hdesc; while (curr_desc) { if (curr_desc == pdesc) { pdbc->hdesc = pdesc->next; break; } if (curr_desc->next == pdesc) { curr_desc->next = pdesc->next; break; } curr_desc = curr_desc->next; } if (!curr_desc) return SQL_INVALID_HANDLE; /* and call the driver's function */ hproc = SQL_NULL_HPROC; if (pdesc->dhdesc) { /* the driver has descriptors */ hproc = _iodbcdm_getproc (pdbc, en_FreeHandle); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (pdesc->herr, en_IM001); retcode = SQL_ERROR; } else CALL_DRIVER (pdbc, pdesc, retcode, hproc, (handleType, pdesc->dhdesc)); } _iodbcdm_freesqlerrlist (pdesc->herr); /* invalidate the handle */ pdesc->type = 0; return retcode; } RETCODE SQL_API SQLFreeHandle ( SQLSMALLINT handleType, SQLHANDLE handle) { switch (handleType) { case SQL_HANDLE_ENV: return _SQLFreeHandle_ENV (handleType, handle); case SQL_HANDLE_DBC: return _SQLFreeHandle_DBC (handleType, handle); case SQL_HANDLE_STMT: return _SQLFreeHandle_STMT (handleType, handle); case SQL_HANDLE_DESC: { ENTER_DESC ((SQLHDESC) handle, trace_SQLFreeHandle (TRACE_ENTER, handleType, handle)); retcode = _SQLFreeHandle_DESC (handleType, handle); LEAVE_DESC ((SQLHDESC) handle, trace_SQLFreeHandle (TRACE_LEAVE, handleType, handle); MEM_FREE (handle); ); } break; default: if (IS_VALID_HDBC (handle)) { CONN (con, handle); PUSHSQLERR (con->herr, en_HY092); return SQL_ERROR; } else if (IS_VALID_HENV (handle)) { GENV (genv, handle); PUSHSQLERR (genv->herr, en_HY092); return SQL_ERROR; } } return SQL_INVALID_HANDLE; } /**** SQLSetEnvAttr ****/ static RETCODE SQLSetEnvAttr_Internal (SQLHENV environmentHandle, SQLINTEGER Attribute, SQLPOINTER ValuePtr, SQLINTEGER StringLength) { GENV (genv, environmentHandle); StringLength = StringLength; /*UNUSED*/ if (genv != NULL && genv->hdbc) { PUSHSQLERR (genv->herr, en_HY010); return SQL_ERROR; } switch (Attribute) { case SQL_ATTR_CONNECTION_POOLING: switch ((SQLINTEGER) (SQLULEN) ValuePtr) { case SQL_CP_OFF: case SQL_CP_ONE_PER_DRIVER: case SQL_CP_ONE_PER_HENV: _iodbcdm_attr_connection_pooling = (SQLINTEGER) (SQLULEN) ValuePtr; return SQL_SUCCESS; default: if (genv) PUSHSQLERR (genv->herr, en_HY024); return SQL_ERROR; } case SQL_ATTR_CP_MATCH: switch ((SQLINTEGER) (SQLULEN) ValuePtr) { case SQL_CP_STRICT_MATCH: case SQL_CP_RELAXED_MATCH: genv->cp_match = (SQLINTEGER) (SQLULEN) ValuePtr; return SQL_SUCCESS; default: PUSHSQLERR (genv->herr, en_HY024); return SQL_ERROR; } case SQL_ATTR_ODBC_VERSION: switch ((SQLINTEGER) (SQLULEN) ValuePtr) { case SQL_OV_ODBC2: case SQL_OV_ODBC3: genv->odbc_ver = (SQLINTEGER) (SQLULEN) ValuePtr; return (SQL_SUCCESS); default: PUSHSQLERR (genv->herr, en_HY024); return SQL_ERROR; } case SQL_ATTR_OUTPUT_NTS: switch ((SQLINTEGER) (SQLULEN) ValuePtr) { case SQL_TRUE: return SQL_SUCCESS; case SQL_FALSE: PUSHSQLERR (genv->herr, en_HYC00); return SQL_ERROR; default: PUSHSQLERR (genv->herr, en_HY024); return SQL_ERROR; } case SQL_ATTR_APP_UNICODE_TYPE: switch ((SQLINTEGER)(SQLULEN) ValuePtr) { case SQL_DM_CP_UTF16: genv->conv.dm_cp = CP_UTF16; break; case SQL_DM_CP_UCS4: genv->conv.dm_cp = CP_UCS4; break; case SQL_DM_CP_UTF8: genv->conv.dm_cp = CP_UTF8; break; default: PUSHSQLERR (genv->herr, en_HY024); return SQL_ERROR; } DPRINTF ((stderr, "DEBUG: SQLSetEnvAttr DiverManager AppUnicodeType=%s\n", genv->conv.dm_cp==CP_UCS4?"UCS4":(genv->conv.dm_cp==CP_UTF16?"UTF16":"UTF8"))); return SQL_SUCCESS; default: PUSHSQLERR (genv->herr, en_HY092); return SQL_ERROR; } } RETCODE SQL_API SQLSetEnvAttr ( SQLHENV EnvironmentHandle, SQLINTEGER Attribute, SQLPOINTER ValuePtr, SQLINTEGER StringLength) { if (Attribute == SQL_ATTR_CONNECTION_POOLING) { SQLRETURN retcode = SQL_SUCCESS; /* ENTER_HENV without EnvironmentHandle check */ ODBC_LOCK (); TRACE (trace_SQLSetEnvAttr (TRACE_ENTER, EnvironmentHandle, Attribute, ValuePtr, StringLength)); retcode = SQLSetEnvAttr_Internal ( EnvironmentHandle, Attribute, ValuePtr, StringLength); /* LEAVE_HENV without done: label */ TRACE (trace_SQLSetEnvAttr (TRACE_LEAVE, EnvironmentHandle, Attribute, ValuePtr, StringLength)); ODBC_UNLOCK (); return retcode; } else { ENTER_HENV (EnvironmentHandle, trace_SQLSetEnvAttr (TRACE_ENTER, EnvironmentHandle, Attribute, ValuePtr, StringLength)); retcode = SQLSetEnvAttr_Internal ( EnvironmentHandle, Attribute, ValuePtr, StringLength); LEAVE_HENV (EnvironmentHandle, trace_SQLSetEnvAttr (TRACE_LEAVE, EnvironmentHandle, Attribute, ValuePtr, StringLength)); return retcode; } } static RETCODE SQLGetEnvAttr_Internal ( SQLHENV environmentHandle, SQLINTEGER Attribute, SQLPOINTER ValuePtr, SQLINTEGER BufferLength, SQLINTEGER * StringLengthPtr) { GENV (genv, environmentHandle); SQLRETURN retcode = SQL_SUCCESS; if (Attribute != SQL_ATTR_CONNECTION_POOLING && Attribute != SQL_ATTR_CP_MATCH && Attribute != SQL_ATTR_ODBC_VERSION && Attribute != SQL_ATTR_OUTPUT_NTS && Attribute != SQL_ATTR_WCHAR_SIZE) { PUSHSQLERR (genv->herr, en_HY092); return SQL_ERROR; } /* ODBC DM env attributes */ if (Attribute == SQL_ATTR_ODBC_VERSION) { if (ValuePtr) *((SQLINTEGER *) ValuePtr) = genv->odbc_ver; return SQL_SUCCESS; } if (Attribute == SQL_ATTR_CONNECTION_POOLING) { if (ValuePtr) *((SQLUINTEGER *) ValuePtr) = _iodbcdm_attr_connection_pooling; return SQL_SUCCESS; } if (Attribute == SQL_ATTR_CP_MATCH) { if (ValuePtr) *((SQLUINTEGER *) ValuePtr) = genv->cp_match; return SQL_SUCCESS; } if (Attribute == SQL_ATTR_OUTPUT_NTS) { if (ValuePtr) *((SQLINTEGER *) ValuePtr) = SQL_TRUE; return SQL_SUCCESS; } if (Attribute == SQL_ATTR_WCHAR_SIZE) { if (ValuePtr) *((SQLINTEGER *) ValuePtr) = sizeof(wchar_t); return SQL_SUCCESS; } /* fall back to the first driver */ if (IS_VALID_HDBC (genv->hdbc)) { CONN (con, genv->hdbc); HPROC hproc = _iodbcdm_getproc (con, en_GetEnvAttr); if (hproc != SQL_NULL_HPROC) { ENVR (env, con->henv); CALL_DRIVER (con, genv, retcode, hproc, (env->dhenv, Attribute, ValuePtr, BufferLength, StringLengthPtr)); return retcode; } else { /* possibly an ODBC2 driver */ PUSHSQLERR (genv->herr, en_IM001); return SQL_ERROR; } } else { switch ((SQLINTEGER) Attribute) { case SQL_ATTR_CONNECTION_POOLING: if (ValuePtr) *((SQLINTEGER *) ValuePtr) = SQL_CP_OFF; break; case SQL_ATTR_CP_MATCH: if (ValuePtr) *((SQLINTEGER *) ValuePtr) = SQL_CP_STRICT_MATCH; break; case SQL_ATTR_ODBC_VERSION: if (ValuePtr) *((SQLINTEGER *) ValuePtr) = genv->odbc_ver; break; } } return SQL_SUCCESS; } RETCODE SQL_API SQLGetEnvAttr ( SQLHENV EnvironmentHandle, SQLINTEGER Attribute, SQLPOINTER ValuePtr, SQLINTEGER BufferLength, SQLINTEGER * StringLengthPtr) { if (Attribute == SQL_ATTR_CONNECTION_POOLING) { SQLRETURN retcode = SQL_SUCCESS; /* ENTER_HENV without EnvironmentHandle check */ ODBC_LOCK (); TRACE (trace_SQLGetEnvAttr (TRACE_ENTER, EnvironmentHandle, Attribute, ValuePtr, BufferLength, StringLengthPtr)); retcode = SQLGetEnvAttr_Internal ( EnvironmentHandle, Attribute, ValuePtr, BufferLength, StringLengthPtr); /* LEAVE_HENV without done: label */ TRACE (trace_SQLGetEnvAttr (TRACE_LEAVE, EnvironmentHandle, Attribute, ValuePtr, BufferLength, StringLengthPtr)); ODBC_UNLOCK (); return retcode; } else { ENTER_HENV (EnvironmentHandle, trace_SQLGetEnvAttr (TRACE_ENTER, EnvironmentHandle, Attribute, ValuePtr, BufferLength, StringLengthPtr)); retcode = SQLGetEnvAttr_Internal ( EnvironmentHandle, Attribute, ValuePtr, BufferLength, StringLengthPtr); LEAVE_HENV (EnvironmentHandle, trace_SQLGetEnvAttr (TRACE_LEAVE, EnvironmentHandle, Attribute, ValuePtr, BufferLength, StringLengthPtr)); } } RETCODE SQL_API SQLGetStmtAttr_Internal ( SQLHSTMT statementHandle, SQLINTEGER Attribute, SQLPOINTER ValuePtr, SQLINTEGER BufferLength, SQLINTEGER * StringLengthPtr, SQLCHAR waMode) { STMT (stmt, statementHandle); CONN (pdbc, stmt->hdbc); ENVR (penv, pdbc->henv); HPROC hproc = SQL_NULL_HPROC; SQLRETURN retcode = SQL_SUCCESS; waMode = waMode; /*UNUSED*/ switch (Attribute) { case SQL_ATTR_IMP_PARAM_DESC: if (ValuePtr) { if (IS_VALID_HDESC (stmt->desc[IMP_PARAM_DESC])) *((SQLHANDLE *) ValuePtr) = (SQLHANDLE *) stmt->desc[IMP_PARAM_DESC]; else if (IS_VALID_HDESC (stmt->imp_desc[IMP_PARAM_DESC])) *((SQLHANDLE *) ValuePtr) = (SQLHANDLE *) stmt->imp_desc[IMP_PARAM_DESC]; else { PUSHSQLERR (stmt->herr, en_IM001); return SQL_ERROR; } } if (StringLengthPtr) *StringLengthPtr = SQL_IS_POINTER; return SQL_SUCCESS; case SQL_ATTR_APP_PARAM_DESC: if (ValuePtr) { if (IS_VALID_HDESC (stmt->desc[APP_PARAM_DESC])) *((SQLHANDLE *) ValuePtr) = (SQLHANDLE *) stmt->desc[APP_PARAM_DESC]; else if (IS_VALID_HDESC (stmt->imp_desc[APP_PARAM_DESC])) *((SQLHANDLE *) ValuePtr) = (SQLHANDLE *) stmt->imp_desc[APP_PARAM_DESC]; else { PUSHSQLERR (stmt->herr, en_IM001); return SQL_ERROR; } } if (StringLengthPtr) *StringLengthPtr = SQL_IS_POINTER; return SQL_SUCCESS; case SQL_ATTR_IMP_ROW_DESC: if (ValuePtr) { if (IS_VALID_HDESC (stmt->desc[IMP_ROW_DESC])) *((SQLHANDLE *) ValuePtr) = (SQLHANDLE *) stmt->desc[IMP_ROW_DESC]; else if (IS_VALID_HDESC (stmt->imp_desc[IMP_ROW_DESC])) *((SQLHANDLE *) ValuePtr) = (SQLHANDLE *) stmt->imp_desc[IMP_ROW_DESC]; else { PUSHSQLERR (stmt->herr, en_IM001); return SQL_ERROR; } } if (StringLengthPtr) *StringLengthPtr = SQL_IS_POINTER; return SQL_SUCCESS; case SQL_ATTR_APP_ROW_DESC: if (ValuePtr) { if (IS_VALID_HDESC (stmt->desc[APP_ROW_DESC])) *((SQLHANDLE *) ValuePtr) = (SQLHANDLE *) stmt->desc[APP_ROW_DESC]; else if (IS_VALID_HDESC (stmt->imp_desc[APP_ROW_DESC])) *((SQLHANDLE *) ValuePtr) = (SQLHANDLE *) stmt->imp_desc[APP_ROW_DESC]; else { PUSHSQLERR (stmt->herr, en_IM001); return SQL_ERROR; } } if (StringLengthPtr) *StringLengthPtr = SQL_IS_POINTER; return SQL_SUCCESS; case SQL_ATTR_ROW_ARRAY_SIZE: if (((ENV_t *) ((DBC_t *) stmt->hdbc)->henv)->dodbc_ver == SQL_OV_ODBC3) { CALL_UDRIVER(stmt->hdbc, stmt, retcode, hproc, penv->unicode_driver, en_GetStmtAttr, (stmt->dhstmt, Attribute, ValuePtr, BufferLength, StringLengthPtr)); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (stmt->herr, en_IM001); return SQL_ERROR; } return retcode; } else { /* an ODBC2 driver */ if (ValuePtr) *((SQLUINTEGER *) ValuePtr) = stmt->row_array_size; return SQL_SUCCESS; } case SQL_ATTR_ENABLE_AUTO_IPD: case SQL_ATTR_CURSOR_SENSITIVITY: case SQL_ATTR_CURSOR_SCROLLABLE: case SQL_ATTR_PARAM_BIND_TYPE: case SQL_ATTR_PARAM_OPERATION_PTR: case SQL_ATTR_PARAM_STATUS_PTR: case SQL_ATTR_PARAM_BIND_OFFSET_PTR: case SQL_ATTR_ROW_BIND_OFFSET_PTR: case SQL_ATTR_ROW_OPERATION_PTR: CALL_UDRIVER(stmt->hdbc, stmt, retcode, hproc, penv->unicode_driver, en_GetStmtAttr, (stmt->dhstmt, Attribute, ValuePtr, BufferLength, StringLengthPtr)); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (stmt->herr, en_IM001); return SQL_ERROR; } return retcode; case SQL_ATTR_FETCH_BOOKMARK_PTR: if (((ENV_t *) ((DBC_t *) stmt->hdbc)->henv)->dodbc_ver == SQL_OV_ODBC3) { CALL_UDRIVER(stmt->hdbc, stmt, retcode, hproc, penv->unicode_driver, en_GetStmtAttr, (stmt->dhstmt, Attribute, ValuePtr, BufferLength, StringLengthPtr)); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (stmt->herr, en_IM001); return SQL_ERROR; } return retcode; } else { /* an ODBC2 driver */ if (ValuePtr) *((SQLPOINTER *) ValuePtr) = stmt->fetch_bookmark_ptr; return SQL_SUCCESS; } case SQL_ATTR_ROWS_FETCHED_PTR: if (((ENV_t *) ((DBC_t *) stmt->hdbc)->henv)->dodbc_ver == SQL_OV_ODBC3) { CALL_UDRIVER(stmt->hdbc, stmt, retcode, hproc, penv->unicode_driver, en_GetStmtAttr, (stmt->dhstmt, Attribute, ValuePtr, BufferLength, StringLengthPtr)); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (stmt->herr, en_IM001); return SQL_ERROR; } return retcode; } else { /* an ODBC2 driver */ if (ValuePtr) *((SQLPOINTER *) ValuePtr) = stmt->rows_fetched_ptr; return SQL_SUCCESS; } case SQL_ATTR_METADATA_ID: if (((ENV_t *) ((DBC_t *) stmt->hdbc)->henv)->dodbc_ver == SQL_OV_ODBC3) { CALL_UDRIVER(stmt->hdbc, stmt, retcode, hproc, penv->unicode_driver, en_GetStmtAttr, (stmt->dhstmt, Attribute, ValuePtr, BufferLength, StringLengthPtr)); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (stmt->herr, en_IM001); return SQL_ERROR; } return retcode; } else { /* an ODBC2 driver */ if (ValuePtr) *((SQLUINTEGER *) ValuePtr) = SQL_FALSE; return SQL_SUCCESS; } case SQL_ATTR_PARAMS_PROCESSED_PTR: if (((ENV_t *) ((DBC_t *) stmt->hdbc)->henv)->dodbc_ver == SQL_OV_ODBC3) { CALL_UDRIVER(stmt->hdbc, stmt, retcode, hproc, penv->unicode_driver, en_GetStmtAttr, (stmt->dhstmt, Attribute, ValuePtr, BufferLength, StringLengthPtr)); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (stmt->herr, en_IM001); return SQL_ERROR; } return retcode; } else { /* an ODBC2 driver */ if (ValuePtr) *((SQLUINTEGER **) ValuePtr) = (SQLUINTEGER *) stmt->params_processed_ptr; return SQL_SUCCESS; } case SQL_ATTR_PARAMSET_SIZE: if (((ENV_t *) ((DBC_t *) stmt->hdbc)->henv)->dodbc_ver == SQL_OV_ODBC3) { CALL_UDRIVER(stmt->hdbc, stmt, retcode, hproc, penv->unicode_driver, en_GetStmtAttr, (stmt->dhstmt, Attribute, ValuePtr, BufferLength, StringLengthPtr)); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (stmt->herr, en_IM001); return SQL_ERROR; } if (ValuePtr) stmt->paramset_size = *((SQLUINTEGER *) ValuePtr); return retcode; } else { /* an ODBC2 driver */ if (ValuePtr) *((SQLUINTEGER *) ValuePtr) = stmt->paramset_size; return SQL_SUCCESS; } case SQL_ATTR_ROW_STATUS_PTR: if (((ENV_t *) ((DBC_t *) stmt->hdbc)->henv)->dodbc_ver == SQL_OV_ODBC3) { CALL_UDRIVER(stmt->hdbc, stmt, retcode, hproc, penv->unicode_driver, en_GetStmtAttr, (stmt->dhstmt, Attribute, ValuePtr, BufferLength, StringLengthPtr)); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (stmt->herr, en_IM001); return SQL_ERROR; } return retcode; } else { /* an ODBC2 driver */ if (ValuePtr) *((SQLUINTEGER **) ValuePtr) = stmt->row_status_allocated == SQL_FALSE ? (SQLUINTEGER *) stmt->row_status_ptr : NULL; return SQL_SUCCESS; } case SQL_ATTR_ASYNC_ENABLE: case SQL_ATTR_MAX_ROWS: case SQL_ATTR_QUERY_TIMEOUT: case SQL_ATTR_CONCURRENCY: case SQL_ROWSET_SIZE: case SQL_ATTR_CURSOR_TYPE: case SQL_ATTR_KEYSET_SIZE: case SQL_ATTR_NOSCAN: case SQL_ATTR_RETRIEVE_DATA: case SQL_ATTR_ROW_BIND_TYPE: case SQL_ATTR_ROW_NUMBER: case SQL_ATTR_SIMULATE_CURSOR: case SQL_ATTR_USE_BOOKMARKS: case SQL_ATTR_MAX_LENGTH: if (((ENV_t *) ((DBC_t *) stmt->hdbc)->henv)->dodbc_ver == SQL_OV_ODBC3) { CALL_UDRIVER(stmt->hdbc, stmt, retcode, hproc, penv->unicode_driver, en_GetStmtAttr, (stmt->dhstmt, Attribute, ValuePtr, BufferLength, StringLengthPtr)); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (stmt->herr, en_IM001); return SQL_ERROR; } return retcode; } else { /* an ODBC2 driver */ if ((hproc = _iodbcdm_getproc (stmt->hdbc, en_GetStmtOption)) != SQL_NULL_HPROC) { CALL_DRIVER (stmt->hdbc, stmt, retcode, hproc, (stmt->dhstmt, Attribute, ValuePtr)); return retcode; } else if ((hproc = _iodbcdm_getproc (stmt->hdbc, en_GetStmtOptionA)) != SQL_NULL_HPROC) { CALL_DRIVER (stmt->hdbc, stmt, retcode, hproc, (stmt->dhstmt, Attribute, ValuePtr)); return retcode; } else { PUSHSQLERR (stmt->herr, en_IM001); return SQL_ERROR; } } default: CALL_UDRIVER(stmt->hdbc, stmt, retcode, hproc, penv->unicode_driver, en_GetStmtAttr, (stmt->dhstmt, Attribute, ValuePtr, BufferLength, StringLengthPtr)); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (stmt->herr, en_IM001); return SQL_ERROR; } return retcode; } return SQL_SUCCESS; } RETCODE SQL_API SQLGetStmtAttr ( SQLHSTMT statementHandle, SQLINTEGER Attribute, SQLPOINTER ValuePtr, SQLINTEGER BufferLength, SQLINTEGER * StringLengthPtr) { ENTER_STMT (statementHandle, trace_SQLGetStmtAttr (TRACE_ENTER, statementHandle, Attribute, ValuePtr, BufferLength, StringLengthPtr)); retcode = SQLGetStmtAttr_Internal(statementHandle, Attribute, ValuePtr, BufferLength, StringLengthPtr, 'A'); LEAVE_STMT (statementHandle, trace_SQLGetStmtAttr (TRACE_LEAVE, statementHandle, Attribute, ValuePtr, BufferLength, StringLengthPtr)); } RETCODE SQL_API SQLGetStmtAttrA ( SQLHSTMT statementHandle, SQLINTEGER Attribute, SQLPOINTER ValuePtr, SQLINTEGER BufferLength, SQLINTEGER * StringLengthPtr) { ENTER_STMT (statementHandle, trace_SQLGetStmtAttr (TRACE_ENTER, statementHandle, Attribute, ValuePtr, BufferLength, StringLengthPtr)); retcode = SQLGetStmtAttr_Internal(statementHandle, Attribute, ValuePtr, BufferLength, StringLengthPtr, 'A'); LEAVE_STMT (statementHandle, trace_SQLGetStmtAttr (TRACE_LEAVE, statementHandle, Attribute, ValuePtr, BufferLength, StringLengthPtr)); } RETCODE SQL_API SQLGetStmtAttrW ( SQLHSTMT statementHandle, SQLINTEGER Attribute, SQLPOINTER ValuePtr, SQLINTEGER BufferLength, SQLINTEGER * StringLengthPtr) { ENTER_STMT (statementHandle, trace_SQLGetStmtAttrW (TRACE_ENTER, statementHandle, Attribute, ValuePtr, BufferLength, StringLengthPtr)); retcode = SQLGetStmtAttr_Internal ( statementHandle, Attribute, ValuePtr, BufferLength, StringLengthPtr, 'W'); LEAVE_STMT (statementHandle, trace_SQLGetStmtAttrW (TRACE_LEAVE, statementHandle, Attribute, ValuePtr, BufferLength, StringLengthPtr)); } /**** SQLSetStmtAttr ****/ RETCODE SQL_API SQLSetStmtAttr_Internal ( SQLHSTMT statementHandle, SQLINTEGER Attribute, SQLPOINTER ValuePtr, SQLINTEGER StringLength, SQLCHAR waMode) { STMT (stmt, statementHandle); CONN (pdbc, stmt->hdbc); ENVR (penv, pdbc->henv); HPROC hproc = SQL_NULL_HPROC; SQLRETURN retcode = SQL_SUCCESS; waMode = waMode; /*UNUSED*/ if (stmt->state == en_stmt_needdata) { PUSHSQLERR (stmt->herr, en_HY010); return SQL_ERROR; } switch (Attribute) { case SQL_ATTR_APP_PARAM_DESC: if (ValuePtr == SQL_NULL_HDESC || ValuePtr == stmt->imp_desc[APP_PARAM_DESC]) { HDESC hdesc = ValuePtr == SQL_NULL_HDESC ? ValuePtr : stmt->imp_desc[APP_PARAM_DESC]->dhdesc; CALL_UDRIVER(stmt->hdbc, stmt, retcode, hproc, penv->unicode_driver, en_SetStmtAttr, (stmt->dhstmt, Attribute, hdesc, StringLength)); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (stmt->herr, en_IM001); return SQL_ERROR; } if (!SQL_SUCCEEDED (retcode)) return SQL_ERROR; stmt->desc[APP_PARAM_DESC] = SQL_NULL_HDESC; return SQL_SUCCESS; } if (!IS_VALID_HDESC (ValuePtr)) { PUSHSQLERR (stmt->herr, en_HY024); return SQL_ERROR; } else { DESC (pdesc, ValuePtr); if (pdesc->hdbc != stmt->hdbc || IS_VALID_HSTMT (pdesc->hstmt)) { PUSHSQLERR (stmt->herr, en_HY017); return SQL_ERROR; } CALL_UDRIVER(stmt->hdbc, stmt, retcode, hproc, penv->unicode_driver, en_SetStmtAttr, (stmt->dhstmt, Attribute, pdesc->dhdesc, StringLength)); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (stmt->herr, en_IM001); return SQL_ERROR; } if (!SQL_SUCCEEDED (retcode)) return SQL_ERROR; stmt->desc[APP_PARAM_DESC] = (DESC_t *) ValuePtr; return SQL_SUCCESS; } case SQL_ATTR_APP_ROW_DESC: if (ValuePtr == SQL_NULL_HDESC || ValuePtr == stmt->imp_desc[APP_ROW_DESC]) { HDESC hdesc = ValuePtr == SQL_NULL_HDESC ? ValuePtr : stmt->imp_desc[APP_ROW_DESC]->dhdesc; CALL_UDRIVER(stmt->hdbc, stmt, retcode, hproc, penv->unicode_driver, en_SetStmtAttr, (stmt->dhstmt, Attribute, hdesc, StringLength)); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (stmt->herr, en_IM001); return SQL_ERROR; } if (!SQL_SUCCEEDED (retcode)) return SQL_ERROR; stmt->desc[APP_ROW_DESC] = SQL_NULL_HDESC; return SQL_SUCCESS; } if (!IS_VALID_HDESC (ValuePtr)) { PUSHSQLERR (stmt->herr, en_HY024); return SQL_ERROR; } else { DESC (pdesc, ValuePtr); if (pdesc->hdbc != stmt->hdbc || IS_VALID_HSTMT (pdesc->hstmt)) { PUSHSQLERR (stmt->herr, en_HY017); return SQL_ERROR; } CALL_UDRIVER(stmt->hdbc, stmt, retcode, hproc, penv->unicode_driver, en_SetStmtAttr, (stmt->dhstmt, Attribute, pdesc->dhdesc, StringLength)); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (stmt->herr, en_IM001); return SQL_ERROR; } if (!SQL_SUCCEEDED (retcode)) return SQL_ERROR; stmt->desc[APP_ROW_DESC] = (DESC_t *) ValuePtr; return SQL_SUCCESS; } case SQL_ATTR_CURSOR_SCROLLABLE: case SQL_ATTR_CURSOR_SENSITIVITY: case SQL_ATTR_ENABLE_AUTO_IPD: case SQL_ATTR_METADATA_ID: case SQL_ATTR_PARAM_BIND_OFFSET_PTR: case SQL_ATTR_PARAM_BIND_TYPE: case SQL_ATTR_PARAM_OPERATION_PTR: case SQL_ATTR_PARAM_STATUS_PTR: case SQL_ATTR_ROW_BIND_OFFSET_PTR: case SQL_ATTR_ROW_OPERATION_PTR: CALL_UDRIVER(stmt->hdbc, stmt, retcode, hproc, penv->unicode_driver, en_SetStmtAttr, (stmt->dhstmt, Attribute, ValuePtr, StringLength)); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (stmt->herr, en_IM001); return SQL_ERROR; } if (Attribute == SQL_ATTR_PARAM_BIND_TYPE) stmt->param_bind_type = (SQLUINTEGER) (SQLULEN) ValuePtr; else if (Attribute == SQL_ATTR_PARAM_BIND_OFFSET_PTR) stmt->param_bind_offset = (SQLUINTEGER) (SQLULEN) ValuePtr; else if (Attribute == SQL_ATTR_ROW_BIND_OFFSET_PTR) stmt->row_bind_offset = (SQLUINTEGER) (SQLULEN) ValuePtr; return retcode; case SQL_ATTR_ROWS_FETCHED_PTR: if (((ENV_t *) ((DBC_t *) stmt->hdbc)->henv)->dodbc_ver == SQL_OV_ODBC3) { CALL_UDRIVER(stmt->hdbc, stmt, retcode, hproc, penv->unicode_driver, en_SetStmtAttr, (stmt->dhstmt, Attribute, ValuePtr, StringLength)); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (stmt->herr, en_IM001); return SQL_ERROR; } return retcode; } else { /* an ODBC2 driver */ stmt->rows_fetched_ptr = ValuePtr; return SQL_SUCCESS; } case SQL_ATTR_FETCH_BOOKMARK_PTR: if (((ENV_t *) ((DBC_t *) stmt->hdbc)->henv)->dodbc_ver == SQL_OV_ODBC3) { CALL_UDRIVER(stmt->hdbc, stmt, retcode, hproc, penv->unicode_driver, en_SetStmtAttr, (stmt->dhstmt, Attribute, ValuePtr, StringLength)); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (stmt->herr, en_IM001); return SQL_ERROR; } return retcode; } else { /* an ODBC2 driver */ stmt->fetch_bookmark_ptr = ValuePtr; return SQL_SUCCESS; } case SQL_ATTR_PARAMS_PROCESSED_PTR: if (((ENV_t *) ((DBC_t *) stmt->hdbc)->henv)->dodbc_ver == SQL_OV_ODBC3) { CALL_UDRIVER(stmt->hdbc, stmt, retcode, hproc, penv->unicode_driver, en_SetStmtAttr, (stmt->dhstmt, Attribute, ValuePtr, StringLength)); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (stmt->herr, en_IM001); return SQL_ERROR; } return retcode; } else { /* an ODBC2 driver */ stmt->params_processed_ptr = ValuePtr; return SQL_SUCCESS; } case SQL_ATTR_PARAMSET_SIZE: if (((ENV_t *) ((DBC_t *) stmt->hdbc)->henv)->dodbc_ver == SQL_OV_ODBC3) { CALL_UDRIVER(stmt->hdbc, stmt, retcode, hproc, penv->unicode_driver, en_SetStmtAttr, (stmt->dhstmt, Attribute, ValuePtr, StringLength)); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (stmt->herr, en_IM001); return SQL_ERROR; } stmt->paramset_size = (SQLUINTEGER) (SQLULEN) ValuePtr; return retcode; } else { /* an ODBC2 driver */ stmt->paramset_size = (SQLUINTEGER) (SQLULEN) ValuePtr; return SQL_SUCCESS; } case SQL_ATTR_ROW_ARRAY_SIZE: if (((ENV_t *) ((DBC_t *) stmt->hdbc)->henv)->dodbc_ver == SQL_OV_ODBC3) { CALL_UDRIVER(stmt->hdbc, stmt, retcode, hproc, penv->unicode_driver, en_SetStmtAttr, (stmt->dhstmt, Attribute, ValuePtr, StringLength)); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (stmt->herr, en_IM001); return SQL_ERROR; } if (SQL_SUCCEEDED (retcode)) { stmt->rowset_size = (SQLUINTEGER) (SQLULEN) ValuePtr; if (retcode == SQL_SUCCESS_WITH_INFO) { SQLUINTEGER data; if (SQLGetStmtAttr_Internal (statementHandle, SQL_ROWSET_SIZE, &data, 0, NULL, 'A') == SQL_SUCCESS) stmt->rowset_size = data; } } return retcode; } else { /* an ODBC2 driver */ if ((SQLUINTEGER) (SQLULEN) ValuePtr < 1) { PUSHSQLERR (stmt->herr, en_HY024); return SQL_ERROR; } stmt->row_array_size = (SQLUINTEGER) (SQLULEN) ValuePtr; /* reallocate the row_status_ptr */ if (stmt->row_status_ptr && stmt->row_status_allocated == SQL_TRUE) { MEM_FREE (stmt->row_status_ptr); stmt->row_status_allocated = SQL_FALSE; } stmt->row_status_ptr = MEM_ALLOC (sizeof (SQLUINTEGER) * stmt->row_array_size); if (!stmt->row_status_ptr) { PUSHSQLERR (stmt->herr, en_HY001); return SQL_ERROR; } stmt->row_status_allocated = SQL_TRUE; /* * Tell the driver the rowset size has changed */ if ((hproc = _iodbcdm_getproc (stmt->hdbc, en_SetStmtOption)) != SQL_NULL_HPROC) { CALL_DRIVER (stmt->hdbc, stmt, retcode, hproc, (stmt->dhstmt, SQL_ROWSET_SIZE, stmt->row_array_size)); if (SQL_SUCCEEDED (retcode)) { stmt->rowset_size = (SQLUINTEGER) (SQLULEN) ValuePtr; if (retcode == SQL_SUCCESS_WITH_INFO) { SQLUINTEGER data; if (SQLGetStmtOption_Internal (statementHandle, SQL_ROWSET_SIZE, &data) == SQL_SUCCESS) stmt->rowset_size = data; } } return retcode; } else if ((hproc = _iodbcdm_getproc (stmt->hdbc, en_SetStmtOptionA)) != SQL_NULL_HPROC) { CALL_DRIVER (stmt->hdbc, stmt, retcode, hproc, (stmt->dhstmt, SQL_ROWSET_SIZE, stmt->row_array_size)); if (SQL_SUCCEEDED (retcode)) { stmt->rowset_size = (SQLUINTEGER) (SQLULEN) ValuePtr; if (retcode == SQL_SUCCESS_WITH_INFO) { SQLUINTEGER data; if (SQLGetStmtOption_Internal (statementHandle, SQL_ROWSET_SIZE, &data) == SQL_SUCCESS) stmt->rowset_size = data; } } return retcode; } else { PUSHSQLERR (stmt->herr, en_IM001); return SQL_ERROR; } return SQL_SUCCESS; } case SQL_ATTR_ROW_STATUS_PTR: if (((ENV_t *) ((DBC_t *) stmt->hdbc)->henv)->dodbc_ver == SQL_OV_ODBC3) { CALL_UDRIVER(stmt->hdbc, stmt, retcode, hproc, penv->unicode_driver, en_SetStmtAttr, (stmt->dhstmt, Attribute, ValuePtr, StringLength)); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (stmt->herr, en_IM001); return SQL_ERROR; } return retcode; } else { /* an ODBC2 driver */ /* free the implicit row status ptr (if any) */ if (stmt->row_status_ptr && stmt->row_status_allocated == SQL_TRUE) { MEM_FREE (stmt->row_status_ptr); stmt->row_status_allocated = SQL_FALSE; } stmt->row_status_ptr = ValuePtr; return SQL_SUCCESS; } case SQL_ATTR_ASYNC_ENABLE: case SQL_ATTR_CONCURRENCY: case SQL_ATTR_CURSOR_TYPE: case SQL_ATTR_KEYSET_SIZE: case SQL_ATTR_MAX_ROWS: case SQL_ATTR_NOSCAN: case SQL_ATTR_QUERY_TIMEOUT: case SQL_ATTR_RETRIEVE_DATA: case SQL_ATTR_ROW_BIND_TYPE: case SQL_ATTR_ROW_NUMBER: case SQL_ATTR_SIMULATE_CURSOR: case SQL_ATTR_USE_BOOKMARKS: case SQL_ROWSET_SIZE: case SQL_ATTR_MAX_LENGTH: if (((ENV_t *) ((DBC_t *) stmt->hdbc)->henv)->dodbc_ver == SQL_OV_ODBC3) { CALL_UDRIVER(stmt->hdbc, stmt, retcode, hproc, penv->unicode_driver, en_SetStmtAttr, (stmt->dhstmt, Attribute, ValuePtr, StringLength)); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (stmt->herr, en_IM001); return SQL_ERROR; } if (Attribute == SQL_ATTR_ROW_BIND_TYPE && SQL_SUCCEEDED (retcode)) stmt->row_bind_type = (SQLUINTEGER) (SQLULEN) ValuePtr; return retcode; } else { /* an ODBC2 driver */ if ((hproc = _iodbcdm_getproc (stmt->hdbc, en_SetStmtOption)) != SQL_NULL_HPROC) { CALL_DRIVER (stmt->hdbc, stmt, retcode, hproc, (stmt->dhstmt, Attribute, ValuePtr)); if (Attribute == SQL_ATTR_ROW_BIND_TYPE && SQL_SUCCEEDED (retcode)) stmt->row_bind_type = (SQLUINTEGER) (SQLULEN) ValuePtr; return retcode; } else if ((hproc = _iodbcdm_getproc (stmt->hdbc, en_SetStmtOptionA)) != SQL_NULL_HPROC) { CALL_DRIVER (stmt->hdbc, stmt, retcode, hproc, (stmt->dhstmt, Attribute, ValuePtr)); if (Attribute == SQL_ATTR_ROW_BIND_TYPE && SQL_SUCCEEDED (retcode)) stmt->row_bind_type = (SQLUINTEGER) (SQLULEN) ValuePtr; return retcode; } else { PUSHSQLERR (stmt->herr, en_IM001); return SQL_ERROR; } } default: if ((hproc = _iodbcdm_getproc (stmt->hdbc, en_SetStmtOption)) != SQL_NULL_HPROC) { CALL_DRIVER (stmt->hdbc, stmt, retcode, hproc, (stmt->dhstmt, Attribute, ValuePtr)); return retcode; } else if ((hproc = _iodbcdm_getproc (stmt->hdbc, en_SetStmtOptionA)) != SQL_NULL_HPROC) { CALL_DRIVER (stmt->hdbc, stmt, retcode, hproc, (stmt->dhstmt, Attribute, ValuePtr)); return retcode; } else { PUSHSQLERR (stmt->herr, en_IM001); return SQL_ERROR; } } return SQL_SUCCESS; } RETCODE SQL_API SQLSetStmtAttr ( SQLHSTMT statementHandle, SQLINTEGER Attribute, SQLPOINTER ValuePtr, SQLINTEGER StringLength) { ENTER_STMT (statementHandle, trace_SQLSetStmtAttr (TRACE_ENTER, statementHandle, Attribute, ValuePtr, StringLength)); retcode = SQLSetStmtAttr_Internal( statementHandle, Attribute, ValuePtr, StringLength, 'A'); LEAVE_STMT (statementHandle, trace_SQLSetStmtAttr (TRACE_LEAVE, statementHandle, Attribute, ValuePtr, StringLength)); } RETCODE SQL_API SQLSetStmtAttrA ( SQLHSTMT statementHandle, SQLINTEGER Attribute, SQLPOINTER ValuePtr, SQLINTEGER StringLength) { ENTER_STMT (statementHandle, trace_SQLSetStmtAttr (TRACE_ENTER, statementHandle, Attribute, ValuePtr, StringLength)); retcode = SQLSetStmtAttr_Internal( statementHandle, Attribute, ValuePtr, StringLength, 'A'); LEAVE_STMT (statementHandle, trace_SQLSetStmtAttr (TRACE_LEAVE, statementHandle, Attribute, ValuePtr, StringLength)); } RETCODE SQL_API SQLSetStmtAttrW ( SQLHSTMT statementHandle, SQLINTEGER Attribute, SQLPOINTER ValuePtr, SQLINTEGER StringLength) { ENTER_STMT (statementHandle, trace_SQLSetStmtAttrW (TRACE_ENTER, statementHandle, Attribute, ValuePtr, StringLength)); retcode = SQLSetStmtAttr_Internal( statementHandle, Attribute, ValuePtr, StringLength, 'W'); LEAVE_STMT (statementHandle, trace_SQLSetStmtAttrW (TRACE_LEAVE, statementHandle, Attribute, ValuePtr, StringLength)); } static RETCODE SQLSetConnectAttr_Internal ( SQLHDBC connectionHandle, SQLINTEGER Attribute, SQLPOINTER ValuePtr, SQLINTEGER StringLength, SQLCHAR waMode) { CONN (con, connectionHandle); ENVR (penv, con->henv); HPROC hproc = SQL_NULL_HPROC; HPROC hproc2 = SQL_NULL_HPROC; SQLRETURN retcode = SQL_SUCCESS; void * _ValuePtr = NULL; SWORD unicode_driver = (penv ? penv->unicode_driver : 0); SQLUINTEGER odbc_ver; SQLUINTEGER dodbc_ver; CONV_DIRECT conv_direct = CD_NONE; DM_CONV *conv = &con->conv; odbc_ver = ((GENV_t *) con->genv)->odbc_ver; dodbc_ver = (penv != SQL_NULL_HENV) ? penv->dodbc_ver : odbc_ver; if (con->state == en_dbc_needdata) { PUSHSQLERR (con->herr, en_HY010); return SQL_ERROR; } if (unicode_driver && waMode != 'W') conv_direct = CD_A2W; else if (!unicode_driver && waMode == 'W') conv_direct = CD_W2A; else if (waMode == 'W' && conv->dm_cp != conv->drv_cp) conv_direct = CD_W2W; if (conv_direct != CD_NONE) { switch(Attribute) { case SQL_ATTR_CURRENT_CATALOG: case SQL_ATTR_TRACEFILE: case SQL_ATTR_TRANSLATE_LIB: if (waMode == 'W') StringLength = (StringLength != SQL_NTS) ? (SQLINTEGER) (StringLength / DM_WCHARSIZE(conv)) : SQL_NTS; _ValuePtr = conv_text_m2d (conv, ValuePtr, StringLength, conv_direct); ValuePtr = _ValuePtr; StringLength = SQL_NTS; break; } } GET_UHPROC(con, hproc2, en_SetConnectOption, unicode_driver); if (dodbc_ver == SQL_OV_ODBC3 && ( odbc_ver == SQL_OV_ODBC3 || (odbc_ver == SQL_OV_ODBC2 && hproc2 == SQL_NULL_HPROC))) { CALL_UDRIVER(con, con, retcode, hproc, unicode_driver, en_SetConnectAttr, (con->dhdbc, Attribute, ValuePtr, StringLength)); if (hproc != SQL_NULL_HPROC) { if (retcode == SQL_SUCCESS && Attribute == SQL_ATTR_APP_WCHAR_TYPE) { switch((IODBC_CHARSET)(SQLULEN) ValuePtr) { case CP_UTF16: penv->conv.drv_cp = CP_UTF16; break; case CP_UTF8: penv->conv.drv_cp = CP_UTF8; break; case CP_UCS4: penv->conv.drv_cp = CP_UCS4; break; } } return retcode; } } switch (Attribute) { case SQL_ATTR_AUTO_IPD: PUSHSQLERR (con->herr, en_HY092); return SQL_ERROR; default: retcode = _iodbcdm_SetConnectOption (con, Attribute, (SQLULEN) ValuePtr, waMode); return retcode; } } RETCODE SQL_API SQLSetConnectAttr ( SQLHDBC connectionHandle, SQLINTEGER Attribute, SQLPOINTER ValuePtr, SQLINTEGER StringLength) { ENTER_HDBC (connectionHandle, 0, trace_SQLSetConnectAttr (TRACE_ENTER, connectionHandle, Attribute, ValuePtr, StringLength)); retcode = SQLSetConnectAttr_Internal ( connectionHandle, Attribute, ValuePtr, StringLength, 'A'); LEAVE_HDBC (connectionHandle, 0, trace_SQLSetConnectAttr (TRACE_LEAVE, connectionHandle, Attribute, ValuePtr, StringLength)); } RETCODE SQL_API SQLSetConnectAttrA ( SQLHDBC connectionHandle, SQLINTEGER Attribute, SQLPOINTER ValuePtr, SQLINTEGER StringLength) { ENTER_HDBC (connectionHandle, 0, trace_SQLSetConnectAttr (TRACE_ENTER, connectionHandle, Attribute, ValuePtr, StringLength)); retcode = SQLSetConnectAttr_Internal ( connectionHandle, Attribute, ValuePtr, StringLength, 'A'); LEAVE_HDBC (connectionHandle, 0, trace_SQLSetConnectAttr (TRACE_LEAVE, connectionHandle, Attribute, ValuePtr, StringLength)); } RETCODE SQL_API SQLSetConnectAttrW ( SQLHDBC connectionHandle, SQLINTEGER Attribute, SQLPOINTER ValuePtr, SQLINTEGER StringLength) { ENTER_HDBC (connectionHandle, 0, trace_SQLSetConnectAttrW (TRACE_ENTER, connectionHandle, Attribute, ValuePtr, StringLength)); retcode = SQLSetConnectAttr_Internal ( connectionHandle, Attribute, ValuePtr, StringLength, 'W'); LEAVE_HDBC (connectionHandle, 0, trace_SQLSetConnectAttrW (TRACE_LEAVE, connectionHandle, Attribute, ValuePtr, StringLength)); } static RETCODE SQLGetConnectAttr_Internal ( SQLHDBC connectionHandle, SQLINTEGER Attribute, SQLPOINTER ValuePtr, SQLINTEGER StringLength, SQLINTEGER * StringLengthPtr, SQLCHAR waMode) { CONN (con, connectionHandle); ENVR (penv, con->henv); HPROC hproc = SQL_NULL_HPROC; HPROC hproc2 = SQL_NULL_HPROC; RETCODE retcode = SQL_SUCCESS; void * _Value = NULL; void * valueOut = ValuePtr; SWORD unicode_driver = (penv ? penv->unicode_driver : 0); SQLUINTEGER odbc_ver; SQLUINTEGER dodbc_ver; CONV_DIRECT conv_direct = CD_NONE; DM_CONV *conv = &con->conv; SQLINTEGER _StringLength = StringLength; odbc_ver = ((GENV_t *) con->genv)->odbc_ver; dodbc_ver = (penv != SQL_NULL_HENV) ? penv->dodbc_ver : odbc_ver; if (con->state == en_dbc_needdata) { PUSHSQLERR (con->herr, en_HY010); return SQL_ERROR; } if (unicode_driver && waMode != 'W') conv_direct = CD_A2W; else if (!unicode_driver && waMode == 'W') conv_direct = CD_W2A; else if (waMode == 'W' && conv->dm_cp != conv->drv_cp) conv_direct = CD_W2W; if (penv && conv_direct != CD_NONE) { switch(Attribute) { case SQL_ATTR_CURRENT_CATALOG: case SQL_ATTR_TRACEFILE: case SQL_ATTR_TRANSLATE_LIB: if (conv_direct == CD_A2W || conv_direct == CD_W2W) { /*ansi<=unicode*/ if (conv_direct == CD_W2W) _StringLength /= DM_WCHARSIZE(conv); if ((_Value = malloc((_StringLength + 1) * DRV_WCHARSIZE_ALLOC(conv))) == NULL) { PUSHSQLERR (con->herr, en_HY001); return SQL_ERROR; } _StringLength *= DRV_WCHARSIZE_ALLOC(conv); valueOut = _Value; } else if (conv_direct == CD_W2A) { /*unicode<=ansi*/ if ((_Value = malloc(StringLength * MB_CUR_MAX + 1)) == NULL) { PUSHSQLERR (con->herr, en_HY001); return SQL_ERROR; } _StringLength /= DM_WCHARSIZE(conv); valueOut = _Value; } break; } } GET_UHPROC(con, hproc2, en_GetConnectOption, unicode_driver); if (dodbc_ver == SQL_OV_ODBC3 && ( odbc_ver == SQL_OV_ODBC3 || (odbc_ver == SQL_OV_ODBC2 && hproc2 == SQL_NULL_HPROC))) { CALL_UDRIVER(con, con, retcode, hproc, unicode_driver, en_GetConnectAttr, (con->dhdbc, Attribute, valueOut, _StringLength, StringLengthPtr)); } if (hproc != SQL_NULL_HPROC) { if (ValuePtr && conv_direct != CD_NONE && SQL_SUCCEEDED (retcode)) { int count; switch(Attribute) { case SQL_ATTR_CURRENT_CATALOG: case SQL_ATTR_TRACEFILE: case SQL_ATTR_TRANSLATE_LIB: if (conv_direct == CD_A2W) { /*ansi<=unicode*/ dm_StrCopyOut2_W2A_d2m (conv, valueOut, (SQLCHAR *) ValuePtr, StringLength, NULL, &count); if (StringLengthPtr) *StringLengthPtr = (SQLSMALLINT)count; } else if (conv_direct == CD_W2A) { /*unicode<=ansi*/ dm_StrCopyOut2_A2W_d2m (conv, (SQLCHAR *) valueOut, ValuePtr, StringLength, NULL, &count); if (StringLengthPtr) *StringLengthPtr = (SQLSMALLINT)count; } else if (conv_direct == CD_W2W) { /*unicode<=unicode*/ dm_StrCopyOut2_W2W_d2m (conv, valueOut, ValuePtr, StringLength, NULL, &count); if (StringLengthPtr) *StringLengthPtr = (SQLSMALLINT)count; } } } MEM_FREE(_Value); return retcode; } MEM_FREE(_Value); retcode = _iodbcdm_GetConnectOption (con, Attribute, ValuePtr, waMode); if (!SQL_SUCCEEDED (retcode)) return retcode; if (StringLengthPtr) { *StringLengthPtr = 0; if (ValuePtr) switch (Attribute) { case SQL_ATTR_CURRENT_CATALOG: case SQL_ATTR_TRACEFILE: case SQL_ATTR_TRANSLATE_LIB: if (waMode != 'W') *StringLengthPtr = STRLEN (ValuePtr); else *StringLengthPtr = DM_WCSLEN (conv, ValuePtr) * DM_WCHARSIZE(conv); } } return retcode; } RETCODE SQL_API SQLGetConnectAttr ( SQLHDBC connectionHandle, SQLINTEGER Attribute, SQLPOINTER ValuePtr, SQLINTEGER StringLength, SQLINTEGER * StringLengthPtr) { ENTER_HDBC (connectionHandle, 0, trace_SQLGetConnectAttr (TRACE_ENTER, connectionHandle, Attribute, ValuePtr, StringLength, StringLengthPtr)); retcode = SQLGetConnectAttr_Internal( connectionHandle, Attribute, ValuePtr, StringLength, StringLengthPtr, 'A'); LEAVE_HDBC (connectionHandle, 0, trace_SQLGetConnectAttr (TRACE_LEAVE, connectionHandle, Attribute, ValuePtr, StringLength, StringLengthPtr)); } RETCODE SQL_API SQLGetConnectAttrA ( SQLHDBC connectionHandle, SQLINTEGER Attribute, SQLPOINTER ValuePtr, SQLINTEGER StringLength, SQLINTEGER * StringLengthPtr) { ENTER_HDBC (connectionHandle, 0, trace_SQLGetConnectAttr (TRACE_ENTER, connectionHandle, Attribute, ValuePtr, StringLength, StringLengthPtr)); retcode = SQLGetConnectAttr_Internal( connectionHandle, Attribute, ValuePtr, StringLength, StringLengthPtr, 'A'); LEAVE_HDBC (connectionHandle, 0, trace_SQLGetConnectAttr (TRACE_LEAVE, connectionHandle, Attribute, ValuePtr, StringLength, StringLengthPtr)); } RETCODE SQL_API SQLGetConnectAttrW (SQLHDBC connectionHandle, SQLINTEGER Attribute, SQLPOINTER ValuePtr, SQLINTEGER StringLength, SQLINTEGER * StringLengthPtr) { ENTER_HDBC (connectionHandle, 0, trace_SQLGetConnectAttrW (TRACE_ENTER, connectionHandle, Attribute, ValuePtr, StringLength, StringLengthPtr)); retcode = SQLGetConnectAttr_Internal( connectionHandle, Attribute, ValuePtr, StringLength, StringLengthPtr, 'W'); LEAVE_HDBC (connectionHandle, 0, trace_SQLGetConnectAttrW (TRACE_LEAVE, connectionHandle, Attribute, ValuePtr, StringLength, StringLengthPtr)); } RETCODE SQL_API SQLGetDescField_Internal ( SQLHDESC descriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER ValuePtr, SQLINTEGER BufferLength, SQLINTEGER * StringLengthPtr, SQLCHAR waMode) { DESC (desc, descriptorHandle); CONN (pdbc, desc->hdbc); ENVR (penv, pdbc->henv); HPROC hproc = SQL_NULL_HPROC; SQLRETURN retcode = SQL_SUCCESS; void * valueOut = ValuePtr; void * _ValuePtr = NULL; CONV_DIRECT conv_direct = CD_NONE; DM_CONV *conv = &pdbc->conv; SQLINTEGER _BufferLength = BufferLength; if (penv->unicode_driver && waMode != 'W') conv_direct = CD_A2W; else if (!penv->unicode_driver && waMode == 'W') conv_direct = CD_W2A; else if (waMode == 'W' && conv->dm_cp != conv->drv_cp) conv_direct = CD_W2W; if (conv_direct != CD_NONE) { switch(FieldIdentifier) { 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 (conv_direct == CD_A2W || conv_direct == CD_W2W) { /*ansi<=unicode*/ if (conv_direct == CD_W2W) _BufferLength /= DM_WCHARSIZE(conv); if ((_ValuePtr = malloc((_BufferLength + 1) * DRV_WCHARSIZE_ALLOC(conv))) == NULL) { PUSHSQLERR (desc->herr, en_HY001); return SQL_ERROR; } _BufferLength *= DRV_WCHARSIZE_ALLOC(conv); valueOut = _ValuePtr; } else if (conv_direct == CD_W2A) { /*unicode<=ansi*/ if ((_ValuePtr = malloc(_BufferLength * MB_CUR_MAX + 1)) == NULL) { PUSHSQLERR (desc->herr, en_HY001); return SQL_ERROR; } _BufferLength /= DM_WCHARSIZE(conv); valueOut = _ValuePtr; } break; } } CALL_UDRIVER(desc->hdbc, desc, retcode, hproc, penv->unicode_driver, en_GetDescField, (desc->dhdesc, RecNumber, FieldIdentifier, valueOut, _BufferLength, StringLengthPtr)); if (hproc == SQL_NULL_HPROC) { MEM_FREE(_ValuePtr); PUSHSQLERR (desc->herr, en_IM001); return SQL_ERROR; } if (ValuePtr && conv_direct != CD_NONE && SQL_SUCCEEDED (retcode)) { int count; switch(FieldIdentifier) { 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 (conv_direct == CD_A2W) { /* ansi<=unicode*/ dm_StrCopyOut2_W2A_d2m (conv, valueOut, (SQLCHAR *) ValuePtr, BufferLength, NULL, &count); if (StringLengthPtr) *StringLengthPtr = (SQLSMALLINT)count; } else if (conv_direct == CD_W2A) { /* unicode<=ansi*/ dm_StrCopyOut2_A2W_d2m (conv, (SQLCHAR *) valueOut, ValuePtr, BufferLength, NULL, &count); if (StringLengthPtr) *StringLengthPtr = (SQLSMALLINT)count; } else if (conv_direct == CD_W2W) { /* unicode<=unicode*/ dm_StrCopyOut2_W2W_d2m (conv, valueOut, ValuePtr, BufferLength, NULL, &count); if (StringLengthPtr) *StringLengthPtr = (SQLSMALLINT)count; } break; } } MEM_FREE(_ValuePtr); return retcode; } RETCODE SQL_API SQLGetDescField ( SQLHDESC descriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER ValuePtr, SQLINTEGER BufferLength, SQLINTEGER * StringLengthPtr) { ENTER_DESC (descriptorHandle, trace_SQLGetDescField (TRACE_ENTER, descriptorHandle, RecNumber, FieldIdentifier, ValuePtr, BufferLength, StringLengthPtr)); retcode = SQLGetDescField_Internal( descriptorHandle, RecNumber, FieldIdentifier, ValuePtr, BufferLength, StringLengthPtr, 'A'); LEAVE_DESC (descriptorHandle, trace_SQLGetDescField (TRACE_LEAVE, descriptorHandle, RecNumber, FieldIdentifier, ValuePtr, BufferLength, StringLengthPtr)); } RETCODE SQL_API SQLGetDescFieldA ( SQLHDESC descriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER ValuePtr, SQLINTEGER BufferLength, SQLINTEGER * StringLengthPtr) { ENTER_DESC (descriptorHandle, trace_SQLGetDescField (TRACE_ENTER, descriptorHandle, RecNumber, FieldIdentifier, ValuePtr, BufferLength, StringLengthPtr)); retcode = SQLGetDescField_Internal ( descriptorHandle, RecNumber, FieldIdentifier, ValuePtr, BufferLength, StringLengthPtr, 'A'); LEAVE_DESC (descriptorHandle, trace_SQLGetDescField (TRACE_LEAVE, descriptorHandle, RecNumber, FieldIdentifier, ValuePtr, BufferLength, StringLengthPtr)); } RETCODE SQL_API SQLGetDescFieldW ( SQLHDESC descriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER ValuePtr, SQLINTEGER BufferLength, SQLINTEGER * StringLengthPtr) { ENTER_DESC (descriptorHandle, trace_SQLGetDescFieldW (TRACE_ENTER, descriptorHandle, RecNumber, FieldIdentifier, ValuePtr, BufferLength, StringLengthPtr)); retcode = SQLGetDescField_Internal ( descriptorHandle, RecNumber, FieldIdentifier, ValuePtr, BufferLength, StringLengthPtr, 'W'); LEAVE_DESC (descriptorHandle, trace_SQLGetDescFieldW (TRACE_LEAVE, descriptorHandle, RecNumber, FieldIdentifier, ValuePtr, BufferLength, StringLengthPtr)); } RETCODE SQL_API SQLSetDescField_Internal ( SQLHDESC descriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER ValuePtr, SQLINTEGER BufferLength, SQLCHAR waMode) { DESC (desc, descriptorHandle); CONN (pdbc, desc->hdbc); ENVR (penv, pdbc->henv); HPROC hproc = SQL_NULL_HPROC; SQLRETURN retcode = SQL_SUCCESS; void * _ValuePtr = NULL; CONV_DIRECT conv_direct = CD_NONE; DM_CONV *conv = &pdbc->conv; if (penv->unicode_driver && waMode != 'W') conv_direct = CD_A2W; else if (!penv->unicode_driver && waMode == 'W') conv_direct = CD_W2A; else if (waMode == 'W' && conv->dm_cp != conv->drv_cp) conv_direct = CD_W2W; if (conv_direct != CD_NONE) { switch(FieldIdentifier) { 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 (waMode == 'W') BufferLength = (BufferLength != SQL_NTS) ? (SQLINTEGER) (BufferLength / DM_WCHARSIZE(conv)) : SQL_NTS; _ValuePtr = conv_text_m2d (conv, ValuePtr, BufferLength, conv_direct); ValuePtr = _ValuePtr; BufferLength = SQL_NTS; break; } } CALL_UDRIVER(desc->hdbc, desc, retcode, hproc, penv->unicode_driver, en_SetDescField, (desc->dhdesc, RecNumber, FieldIdentifier, ValuePtr, BufferLength)); MEM_FREE(_ValuePtr); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (desc->herr, en_IM001); return SQL_ERROR; } return retcode; } RETCODE SQL_API SQLSetDescField ( SQLHDESC descriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER ValuePtr, SQLINTEGER BufferLength) { ENTER_DESC (descriptorHandle, trace_SQLSetDescField (TRACE_ENTER, descriptorHandle, RecNumber, FieldIdentifier, ValuePtr, BufferLength)); retcode = SQLSetDescField_Internal (descriptorHandle, RecNumber, FieldIdentifier, ValuePtr, BufferLength, 'A'); LEAVE_DESC (descriptorHandle, trace_SQLSetDescField (TRACE_LEAVE, descriptorHandle, RecNumber, FieldIdentifier, ValuePtr, BufferLength)); } RETCODE SQL_API SQLSetDescFieldA ( SQLHDESC descriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER ValuePtr, SQLINTEGER BufferLength) { ENTER_DESC (descriptorHandle, trace_SQLSetDescField (TRACE_ENTER, descriptorHandle, RecNumber, FieldIdentifier, ValuePtr, BufferLength)); retcode = SQLSetDescField_Internal (descriptorHandle, RecNumber, FieldIdentifier, ValuePtr, BufferLength, 'A'); LEAVE_DESC (descriptorHandle, trace_SQLSetDescField (TRACE_LEAVE, descriptorHandle, RecNumber, FieldIdentifier, ValuePtr, BufferLength)); } RETCODE SQL_API SQLSetDescFieldW ( SQLHDESC descriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER ValuePtr, SQLINTEGER BufferLength) { ENTER_DESC (descriptorHandle, trace_SQLSetDescFieldW (TRACE_ENTER, descriptorHandle, RecNumber, FieldIdentifier, ValuePtr, BufferLength)); retcode = SQLSetDescField_Internal (descriptorHandle, RecNumber, FieldIdentifier, ValuePtr, BufferLength, 'W'); LEAVE_DESC (descriptorHandle, trace_SQLSetDescFieldW (TRACE_LEAVE, descriptorHandle, RecNumber, FieldIdentifier, ValuePtr, BufferLength)); } RETCODE SQL_API SQLGetDescRec_Internal ( SQLHDESC descriptorHandle, SQLSMALLINT RecNumber, SQLPOINTER Name, SQLSMALLINT BufferLength, SQLSMALLINT * StringLengthPtr, SQLSMALLINT * TypePtr, SQLSMALLINT * SubTypePtr, SQLLEN * LengthPtr, SQLSMALLINT * PrecisionPtr, SQLSMALLINT * ScalePtr, SQLSMALLINT * NullablePtr, SQLCHAR waMode) { DESC (desc, descriptorHandle); CONN (pdbc, desc->hdbc); ENVR (penv, pdbc->henv); HPROC hproc = SQL_NULL_HPROC; SQLRETURN retcode = SQL_SUCCESS; void * nameOut = Name; void * _Name = NULL; CONV_DIRECT conv_direct = CD_NONE; DM_CONV *conv = &pdbc->conv; if (penv->unicode_driver && waMode != 'W') conv_direct = CD_A2W; else if (!penv->unicode_driver && waMode == 'W') conv_direct = CD_W2A; else if (waMode == 'W' && conv->dm_cp != conv->drv_cp) conv_direct = CD_W2W; if (conv_direct == CD_A2W || conv_direct == CD_W2W) { /* ansi<=unicode*/ if ((_Name = malloc((BufferLength + 1) * DRV_WCHARSIZE_ALLOC(conv))) == NULL) { PUSHSQLERR (desc->herr, en_HY001); return SQL_ERROR; } nameOut = _Name; } else if (conv_direct == CD_W2A) { /* unicode<=ansi*/ if ((_Name = malloc(BufferLength * MB_CUR_MAX + 1)) == NULL) { PUSHSQLERR (desc->herr, en_HY001); return SQL_ERROR; } nameOut = _Name; } CALL_UDRIVER(desc->hdbc, desc, retcode, hproc, penv->unicode_driver, en_GetDescRec, (desc->dhdesc, RecNumber, nameOut, BufferLength, StringLengthPtr, TypePtr, SubTypePtr, LengthPtr, PrecisionPtr, ScalePtr, NullablePtr)); if (hproc == SQL_NULL_HPROC) { MEM_FREE(_Name); PUSHSQLERR (desc->herr, en_IM001); return SQL_ERROR; } if (Name && conv_direct != CD_NONE && SQL_SUCCEEDED (retcode)) { int count; if (conv_direct == CD_A2W) { /* ansi<=unicode*/ dm_StrCopyOut2_W2A_d2m (conv, nameOut, (SQLCHAR *) Name, BufferLength, NULL, &count); if (StringLengthPtr) *StringLengthPtr = (SQLSMALLINT)count; } else if (conv_direct == CD_W2A) { /* unicode<=ansi*/ dm_StrCopyOut2_A2W_d2m (conv, (SQLCHAR *) nameOut, Name, BufferLength, NULL, &count); if (StringLengthPtr) *StringLengthPtr = (SQLSMALLINT)count; } else if (conv_direct == CD_W2W) { /* unicode<=unicode*/ dm_StrCopyOut2_W2W_d2m (conv, nameOut, Name, BufferLength, NULL, &count); if (StringLengthPtr) *StringLengthPtr = (SQLSMALLINT)count; } } MEM_FREE(_Name); return retcode; } RETCODE SQL_API SQLGetDescRec ( SQLHDESC descriptorHandle, SQLSMALLINT RecNumber, SQLCHAR * Name, SQLSMALLINT BufferLength, SQLSMALLINT * StringLengthPtr, SQLSMALLINT * TypePtr, SQLSMALLINT * SubTypePtr, SQLLEN * LengthPtr, SQLSMALLINT * PrecisionPtr, SQLSMALLINT * ScalePtr, SQLSMALLINT * NullablePtr) { ENTER_DESC (descriptorHandle, trace_SQLGetDescRec (TRACE_ENTER, descriptorHandle, RecNumber, Name, BufferLength, StringLengthPtr, TypePtr, SubTypePtr, LengthPtr, PrecisionPtr, ScalePtr, NullablePtr)); retcode = SQLGetDescRec_Internal( descriptorHandle, RecNumber, Name, BufferLength, StringLengthPtr, TypePtr, SubTypePtr, LengthPtr, PrecisionPtr, ScalePtr, NullablePtr, 'A'); LEAVE_DESC (descriptorHandle, trace_SQLGetDescRec (TRACE_LEAVE, descriptorHandle, RecNumber, Name, BufferLength, StringLengthPtr, TypePtr, SubTypePtr, LengthPtr, PrecisionPtr, ScalePtr, NullablePtr)); } RETCODE SQL_API SQLGetDescRecA ( SQLHDESC descriptorHandle, SQLSMALLINT RecNumber, SQLCHAR * Name, SQLSMALLINT BufferLength, SQLSMALLINT * StringLengthPtr, SQLSMALLINT * TypePtr, SQLSMALLINT * SubTypePtr, SQLLEN * LengthPtr, SQLSMALLINT * PrecisionPtr, SQLSMALLINT * ScalePtr, SQLSMALLINT * NullablePtr) { ENTER_DESC (descriptorHandle, trace_SQLGetDescRec (TRACE_ENTER, descriptorHandle, RecNumber, Name, BufferLength, StringLengthPtr, TypePtr, SubTypePtr, LengthPtr, PrecisionPtr, ScalePtr, NullablePtr)); retcode = SQLGetDescRec_Internal( descriptorHandle, RecNumber, Name, BufferLength, StringLengthPtr, TypePtr, SubTypePtr, LengthPtr, PrecisionPtr, ScalePtr, NullablePtr, 'A'); LEAVE_DESC (descriptorHandle, trace_SQLGetDescRec (TRACE_LEAVE, descriptorHandle, RecNumber, Name, BufferLength, StringLengthPtr, TypePtr, SubTypePtr, LengthPtr, PrecisionPtr, ScalePtr, NullablePtr)); } RETCODE SQL_API SQLGetDescRecW ( SQLHDESC descriptorHandle, SQLSMALLINT RecNumber, SQLWCHAR * Name, SQLSMALLINT BufferLength, SQLSMALLINT * StringLengthPtr, SQLSMALLINT * TypePtr, SQLSMALLINT * SubTypePtr, SQLLEN * LengthPtr, SQLSMALLINT * PrecisionPtr, SQLSMALLINT * ScalePtr, SQLSMALLINT * NullablePtr) { ENTER_DESC (descriptorHandle, trace_SQLGetDescRecW (TRACE_ENTER, descriptorHandle, RecNumber, Name, BufferLength, StringLengthPtr, TypePtr, SubTypePtr, LengthPtr, PrecisionPtr, ScalePtr, NullablePtr)); retcode = SQLGetDescRec_Internal( descriptorHandle, RecNumber, Name, BufferLength, StringLengthPtr, TypePtr, SubTypePtr, LengthPtr, PrecisionPtr, ScalePtr, NullablePtr, 'W'); LEAVE_DESC (descriptorHandle, trace_SQLGetDescRecW (TRACE_LEAVE, descriptorHandle, RecNumber, Name, BufferLength, StringLengthPtr, TypePtr, SubTypePtr, LengthPtr, PrecisionPtr, ScalePtr, NullablePtr)); } static RETCODE SQLSetDescRec_Internal ( SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT Type, SQLSMALLINT SubType, SQLLEN Length, SQLSMALLINT Precision, SQLSMALLINT Scale, SQLPOINTER Data, SQLLEN * StringLength, SQLLEN * Indicator) { DESC (desc, DescriptorHandle); HPROC hproc; RETCODE retcode; hproc = _iodbcdm_getproc (desc->hdbc, en_SetDescRec); if (!hproc) { PUSHSQLERR (desc->herr, en_IM001); return SQL_ERROR; } CALL_DRIVER (desc->hdbc, desc, retcode, hproc, (desc->dhdesc, RecNumber, Type, SubType, Length, Precision, Scale, Data, StringLength, Indicator)); return retcode; } RETCODE SQL_API SQLSetDescRec ( SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT Type, SQLSMALLINT SubType, SQLLEN Length, SQLSMALLINT Precision, SQLSMALLINT Scale, SQLPOINTER Data, SQLLEN * StringLength, SQLLEN * Indicator) { ENTER_DESC (DescriptorHandle, trace_SQLSetDescRec (TRACE_ENTER, DescriptorHandle, RecNumber, Type, SubType, Length, Precision, Scale, Data, StringLength, Indicator)); retcode = SQLSetDescRec_Internal ( DescriptorHandle, RecNumber, Type, SubType, Length, Precision, Scale, Data, StringLength, Indicator); LEAVE_DESC (DescriptorHandle, trace_SQLSetDescRec (TRACE_LEAVE, DescriptorHandle, RecNumber, Type, SubType, Length, Precision, Scale, Data, StringLength, Indicator)); } static RETCODE SQLCopyDesc_Internal ( SQLHDESC SourceDescHandle, SQLHDESC TargetDescHandle) { DESC (desc, SourceDescHandle); DESC (desc1, TargetDescHandle); HPROC hproc; RETCODE retcode; hproc = _iodbcdm_getproc (desc->hdbc, en_CopyDesc); if (!hproc) { PUSHSQLERR (desc->herr, en_IM001); return SQL_ERROR; } CALL_DRIVER (desc->hdbc, desc, retcode, hproc, (desc->dhdesc, desc1->dhdesc)); return retcode; } RETCODE SQL_API SQLCopyDesc ( SQLHDESC SourceDescHandle, SQLHDESC TargetDescHandle) { ENTER_DESC (SourceDescHandle, trace_SQLCopyDesc (TRACE_ENTER, SourceDescHandle, TargetDescHandle)); retcode = SQLCopyDesc_Internal ( SourceDescHandle, TargetDescHandle); LEAVE_DESC (SourceDescHandle, trace_SQLCopyDesc (TRACE_LEAVE, SourceDescHandle, TargetDescHandle)); } RETCODE SQL_API SQLColAttribute_Internal ( SQLHSTMT statementHandle, SQLUSMALLINT ColumnNumber, SQLUSMALLINT FieldIdentifier, SQLPOINTER CharacterAttributePtr, SQLSMALLINT BufferLength, SQLSMALLINT * StringLengthPtr, SQLLEN * NumericAttributePtr, SQLCHAR waMode) { STMT (stmt, statementHandle); CONN (pdbc, stmt->hdbc); ENVR (penv, pdbc->henv); GENV (genv, pdbc->genv); HPROC hproc = SQL_NULL_HPROC; HPROC hproc2 = SQL_NULL_HPROC; SQLRETURN retcode = SQL_SUCCESS; void * charAttrOut = CharacterAttributePtr; void * _charAttr = NULL; SQLUINTEGER odbc_ver; SQLUINTEGER dodbc_ver; CONV_DIRECT conv_direct = CD_NONE; DM_CONV *conv = &pdbc->conv; SQLSMALLINT _BufferLength = BufferLength; odbc_ver = ((GENV_t *) pdbc->genv)->odbc_ver; dodbc_ver = (penv != SQL_NULL_HENV) ? penv->dodbc_ver : odbc_ver; if (penv->unicode_driver && waMode != 'W') conv_direct = CD_A2W; else if (!penv->unicode_driver && waMode == 'W') conv_direct = CD_W2A; else if (waMode == 'W' && conv->dm_cp != conv->drv_cp) conv_direct = CD_W2W; if (conv_direct != CD_NONE) { switch(FieldIdentifier) { case SQL_COLUMN_NAME: 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 (conv_direct == CD_A2W || conv_direct == CD_W2W) { /*ansi<=unicode*/ if (conv_direct == CD_W2W) _BufferLength /= DM_WCHARSIZE(conv); if ((_charAttr = malloc((_BufferLength + 1) * DRV_WCHARSIZE_ALLOC(conv))) == NULL) { PUSHSQLERR (stmt->herr, en_HY001); return SQL_ERROR; } _BufferLength *= DRV_WCHARSIZE_ALLOC(conv); charAttrOut = _charAttr; } else if (conv_direct == CD_W2A) { /*unicode<=ansi*/ if ((_charAttr = malloc(BufferLength * MB_CUR_MAX + 1)) == NULL) { PUSHSQLERR (stmt->herr, en_HY001); return SQL_ERROR; } _BufferLength /= DM_WCHARSIZE(conv); charAttrOut = _charAttr; } break; } } GET_UHPROC(stmt->hdbc, hproc2, en_ColAttributes, penv->unicode_driver); if (dodbc_ver == SQL_OV_ODBC3 && ( odbc_ver == SQL_OV_ODBC3 || (odbc_ver == SQL_OV_ODBC2 && hproc2 == SQL_NULL_HPROC))) { CALL_UDRIVER(stmt->hdbc, stmt, retcode, hproc, penv->unicode_driver, en_ColAttribute, (stmt->dhstmt, ColumnNumber, FieldIdentifier, charAttrOut, _BufferLength, StringLengthPtr, NumericAttributePtr)); } if (hproc != SQL_NULL_HPROC) { if (SQL_SUCCEEDED (retcode) && FieldIdentifier == SQL_DESC_CONCISE_TYPE) { SQLINTEGER *ptr = (SQLINTEGER *)NumericAttributePtr; /* * Convert sql type to ODBC version of application */ if (ptr) *ptr = _iodbcdm_map_sql_type (*ptr, genv->odbc_ver); } if (CharacterAttributePtr && conv_direct != CD_NONE && SQL_SUCCEEDED (retcode)) { int count; switch(FieldIdentifier) { case SQL_COLUMN_NAME: 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 (conv_direct == CD_A2W) { /*ansi<=unicode*/ dm_StrCopyOut2_W2A_d2m (conv, charAttrOut, (SQLCHAR *) CharacterAttributePtr, BufferLength, NULL, &count); if (StringLengthPtr) *StringLengthPtr = (SQLSMALLINT)count; } else if (conv_direct == CD_W2A) { /*unicode<=ansi*/ dm_StrCopyOut2_A2W_d2m (conv, (SQLCHAR *) charAttrOut, CharacterAttributePtr, BufferLength, NULL, &count); if (StringLengthPtr) *StringLengthPtr = (SQLSMALLINT)count; } else if (conv_direct == CD_W2W) { /*unicode<=unicode*/ dm_StrCopyOut2_W2W_d2m (conv, charAttrOut, CharacterAttributePtr, BufferLength, NULL, &count); if (StringLengthPtr) *StringLengthPtr = (SQLSMALLINT)count; } } } MEM_FREE(_charAttr); return retcode; } if (ColumnNumber == 0) { char *szval = ""; int isSz = 0; SQLINTEGER val = 0; MEM_FREE(_charAttr); switch (FieldIdentifier) { case SQL_DESC_AUTO_UNIQUE_VALUE: case SQL_DESC_CASE_SENSITIVE: case SQL_DESC_FIXED_PREC_SCALE: case SQL_DESC_UNSIGNED: val = SQL_FALSE; break; case SQL_DESC_LABEL: case SQL_DESC_CATALOG_NAME: 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: isSz = 1; break; case SQL_DESC_CONCISE_TYPE: case SQL_DESC_TYPE: val = SQL_BINARY; break; case SQL_DESC_COUNT: hproc = _iodbcdm_getproc (stmt->hdbc, en_NumResultCols); if (!hproc) { PUSHSQLERR (stmt->herr, en_IM001); return SQL_ERROR; } CALL_DRIVER (stmt->hdbc, stmt, retcode, hproc, (stmt->dhstmt, NumericAttributePtr)); return retcode; case SQL_DESC_LENGTH: case SQL_DESC_DATETIME_INTERVAL_CODE: case SQL_DESC_SCALE: val = 0; break; case SQL_DESC_DISPLAY_SIZE: val = 8; break; case SQL_DESC_NULLABLE: val = SQL_NO_NULLS; break; case SQL_DESC_OCTET_LENGTH: case SQL_DESC_PRECISION: val = 4; break; case SQL_DESC_SEARCHABLE: val = SQL_PRED_NONE; break; case SQL_DESC_UNNAMED: val = SQL_UNNAMED; break; case SQL_DESC_UPDATABLE: val = SQL_ATTR_READONLY; break; default: PUSHSQLERR (stmt->herr, en_HYC00); return SQL_ERROR; } if (isSz) { int len = STRLEN (szval), len1; len1 = len > BufferLength ? BufferLength - 1 : len; if (CharacterAttributePtr) { STRNCPY (CharacterAttributePtr, szval, len1); ((SQLCHAR *) CharacterAttributePtr)[len1] = 0; } if (StringLengthPtr) *StringLengthPtr = len; } else { if (NumericAttributePtr) *((SQLINTEGER *) NumericAttributePtr) = val; } return SQL_SUCCESS; } else { /* all other */ switch (FieldIdentifier) { case SQL_DESC_SCALE: FieldIdentifier = SQL_COLUMN_SCALE; break; case SQL_DESC_LENGTH: FieldIdentifier = SQL_COLUMN_LENGTH; break; case SQL_DESC_PRECISION: FieldIdentifier = SQL_COLUMN_PRECISION; break; case SQL_DESC_COUNT: FieldIdentifier = SQL_COLUMN_COUNT; break; case SQL_DESC_NAME: FieldIdentifier = SQL_COLUMN_NAME; break; case SQL_DESC_NULLABLE: FieldIdentifier = SQL_COLUMN_NULLABLE; break; case SQL_DESC_TYPE: FieldIdentifier = SQL_COLUMN_TYPE; break; 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_NUM_PREC_RADIX: case SQL_DESC_OCTET_LENGTH: case SQL_DESC_UNNAMED: MEM_FREE(_charAttr); PUSHSQLERR (stmt->herr, en_HY091); return SQL_ERROR; } CALL_UDRIVER(stmt->hdbc, stmt, retcode, hproc, penv->unicode_driver, en_ColAttributes, (stmt->dhstmt, ColumnNumber, FieldIdentifier, charAttrOut, _BufferLength, StringLengthPtr, NumericAttributePtr)); if (hproc == SQL_NULL_HPROC) { MEM_FREE(_charAttr); PUSHSQLERR (stmt->herr, en_IM001); return SQL_ERROR; } if (SQL_SUCCEEDED (retcode) && FieldIdentifier == SQL_DESC_CONCISE_TYPE) { SQLINTEGER *ptr = (SQLINTEGER *)NumericAttributePtr; /* * Convert sql type to ODBC version of application */ if (ptr) *ptr = _iodbcdm_map_sql_type (*ptr, genv->odbc_ver); } if (CharacterAttributePtr && conv_direct != CD_NONE && SQL_SUCCEEDED (retcode)) { int count; switch(FieldIdentifier) { 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 (conv_direct == CD_A2W) { /*ansi<=unicode*/ dm_StrCopyOut2_W2A_d2m (conv, charAttrOut, (SQLCHAR *) CharacterAttributePtr, BufferLength, NULL, &count); if (StringLengthPtr) *StringLengthPtr = (SQLSMALLINT)count; } else if (conv_direct == CD_W2A) { /*unicode<=ansi*/ dm_StrCopyOut2_A2W_d2m (conv, (SQLCHAR *) charAttrOut, CharacterAttributePtr, BufferLength, NULL, &count); if (StringLengthPtr) *StringLengthPtr = (SQLSMALLINT)count; } else if (conv_direct == CD_W2W) { /*unicode<=unicode*/ dm_StrCopyOut2_W2W_d2m (conv, charAttrOut, CharacterAttributePtr, BufferLength, NULL, &count); if (StringLengthPtr) *StringLengthPtr = (SQLSMALLINT)count; } } } MEM_FREE(_charAttr); return retcode; } } RETCODE SQL_API SQLColAttribute ( SQLHSTMT statementHandle, SQLUSMALLINT ColumnNumber, SQLUSMALLINT FieldIdentifier, SQLPOINTER CharacterAttributePtr, SQLSMALLINT BufferLength, SQLSMALLINT * StringLengthPtr, SQLLEN * NumericAttributePtr) { ENTER_STMT (statementHandle, trace_SQLColAttribute (TRACE_ENTER, statementHandle, ColumnNumber, FieldIdentifier, CharacterAttributePtr, BufferLength, StringLengthPtr, NumericAttributePtr)); retcode = SQLColAttribute_Internal ( statementHandle, ColumnNumber, FieldIdentifier, CharacterAttributePtr, BufferLength, StringLengthPtr, NumericAttributePtr, 'A'); LEAVE_STMT (statementHandle, trace_SQLColAttribute (TRACE_LEAVE, statementHandle, ColumnNumber, FieldIdentifier, CharacterAttributePtr, BufferLength, StringLengthPtr, NumericAttributePtr)); } RETCODE SQL_API SQLColAttributeA ( SQLHSTMT statementHandle, SQLUSMALLINT ColumnNumber, SQLUSMALLINT FieldIdentifier, SQLPOINTER CharacterAttributePtr, SQLSMALLINT BufferLength, SQLSMALLINT * StringLengthPtr, SQLLEN * NumericAttributePtr) { ENTER_STMT (statementHandle, trace_SQLColAttribute (TRACE_ENTER, statementHandle, ColumnNumber, FieldIdentifier, CharacterAttributePtr, BufferLength, StringLengthPtr, NumericAttributePtr)); retcode = SQLColAttribute_Internal ( statementHandle, ColumnNumber, FieldIdentifier, CharacterAttributePtr, BufferLength, StringLengthPtr, NumericAttributePtr, 'A'); LEAVE_STMT (statementHandle, trace_SQLColAttribute (TRACE_LEAVE, statementHandle, ColumnNumber, FieldIdentifier, CharacterAttributePtr, BufferLength, StringLengthPtr, NumericAttributePtr)); } RETCODE SQL_API SQLColAttributeW ( SQLHSTMT statementHandle, SQLUSMALLINT ColumnNumber, SQLUSMALLINT FieldIdentifier, SQLPOINTER CharacterAttributePtr, SQLSMALLINT BufferLength, SQLSMALLINT * StringLengthPtr, SQLLEN * NumericAttributePtr) { ENTER_STMT (statementHandle, trace_SQLColAttributeW (TRACE_ENTER, statementHandle, ColumnNumber, FieldIdentifier, CharacterAttributePtr, BufferLength, StringLengthPtr, NumericAttributePtr)); retcode = SQLColAttribute_Internal ( statementHandle, ColumnNumber, FieldIdentifier, CharacterAttributePtr, BufferLength, StringLengthPtr, NumericAttributePtr, 'W'); LEAVE_STMT (statementHandle, trace_SQLColAttributeW (TRACE_LEAVE, statementHandle, ColumnNumber, FieldIdentifier, CharacterAttributePtr, BufferLength, StringLengthPtr, NumericAttributePtr)); } static RETCODE SQLEndTran_Internal ( SQLSMALLINT handleType, SQLHANDLE Handle, SQLSMALLINT completionType) { switch (handleType) { case SQL_HANDLE_DBC: case SQL_HANDLE_ENV: break; default: return SQL_INVALID_HANDLE; } return SQLTransact_Internal ( handleType == SQL_HANDLE_ENV ? Handle : SQL_NULL_HENV, handleType == SQL_HANDLE_DBC ? Handle : SQL_NULL_HDBC, completionType); } RETCODE SQL_API SQLEndTran ( SQLSMALLINT handleType, SQLHANDLE Handle, SQLSMALLINT completionType) { SQLRETURN retcode = SQL_SUCCESS; ODBC_LOCK (); TRACE (trace_SQLEndTran (TRACE_ENTER, handleType, Handle, completionType)); retcode = SQLEndTran_Internal (handleType, Handle, completionType); TRACE (trace_SQLEndTran (TRACE_LEAVE, handleType, Handle, completionType)); ODBC_UNLOCK (); return retcode; } static RETCODE SQLBulkOperations_Internal ( SQLHSTMT statementHandle, SQLSMALLINT Operation) { STMT (stmt, statementHandle); HPROC hproc; RETCODE retcode; switch (Operation) { case SQL_ADD: case SQL_UPDATE_BY_BOOKMARK: case SQL_DELETE_BY_BOOKMARK: case SQL_FETCH_BY_BOOKMARK: break; default: PUSHSQLERR (stmt->herr, en_HY092); return SQL_ERROR; } if (Operation == SQL_FETCH_BY_BOOKMARK ) { if ((retcode = _iodbcdm_FixColBindData (stmt)) != SQL_SUCCESS) return retcode; } if (Operation == SQL_ADD || Operation == SQL_UPDATE_BY_BOOKMARK || Operation == SQL_DELETE_BY_BOOKMARK) { _iodbcdm_ConvBindData_m2d (stmt); } hproc = _iodbcdm_getproc (stmt->hdbc, en_BulkOperations); if (hproc) { CALL_DRIVER (stmt->hdbc, stmt, retcode, hproc, (stmt->dhstmt, Operation)); if (Operation == SQL_FETCH_BY_BOOKMARK && SQL_SUCCEEDED (retcode)) _iodbcdm_ConvBindData (stmt); return retcode; } switch (Operation) { case SQL_ADD: retcode = _iodbcdm_SetPos (statementHandle, 0, SQL_ADD, SQL_LOCK_NO_CHANGE); return retcode; default: PUSHSQLERR (stmt->herr, en_HYC00); return SQL_ERROR; } } RETCODE SQL_API SQLBulkOperations ( SQLHSTMT StatementHandle, SQLSMALLINT Operation) { ENTER_STMT (StatementHandle, trace_SQLBulkOperations (TRACE_ENTER, StatementHandle, Operation)); retcode = SQLBulkOperations_Internal (StatementHandle, Operation); LEAVE_STMT (StatementHandle, trace_SQLBulkOperations (TRACE_LEAVE, StatementHandle, Operation)); } static RETCODE SQLFetchScroll_Internal ( SQLHSTMT statementHandle, SQLSMALLINT fetchOrientation, SQLLEN fetchOffset) { STMT (stmt, statementHandle); HPROC hproc = SQL_NULL_HPROC; RETCODE retcode; CONN (pdbc, stmt->hdbc); HPROC hproc2 = SQL_NULL_HPROC; SQLUINTEGER odbc_ver = ((GENV_t *) pdbc->genv)->odbc_ver; SQLUINTEGER dodbc_ver = ((ENV_t *) pdbc->henv)->dodbc_ver; /* check arguments */ switch (fetchOrientation) { case SQL_FETCH_NEXT: case SQL_FETCH_PRIOR: case SQL_FETCH_FIRST: case SQL_FETCH_LAST: case SQL_FETCH_ABSOLUTE: case SQL_FETCH_RELATIVE: case SQL_FETCH_BOOKMARK: break; default: PUSHSQLERR (stmt->herr, en_HY092); return SQL_ERROR; } /* check state */ if (stmt->asyn_on == en_NullProc) { switch (stmt->state) { case en_stmt_allocated: case en_stmt_prepared: case en_stmt_needdata: case en_stmt_mustput: case en_stmt_canput: PUSHSQLERR (stmt->herr, en_S1010); return SQL_ERROR; default: break; } } else if (stmt->asyn_on != en_FetchScroll) { PUSHSQLERR (stmt->herr, en_S1010); return SQL_ERROR; } hproc2 = _iodbcdm_getproc (stmt->hdbc, en_ExtendedFetch); if (dodbc_ver == SQL_OV_ODBC3 && ( odbc_ver == SQL_OV_ODBC3 || (odbc_ver == SQL_OV_ODBC2 && hproc2 == SQL_NULL_HPROC))) { hproc = _iodbcdm_getproc (stmt->hdbc, en_FetchScroll); if (hproc) { CALL_DRIVER (stmt->hdbc, stmt, retcode, hproc, (stmt->dhstmt, fetchOrientation, fetchOffset)); } } if (hproc == SQL_NULL_HPROC) { if (!stmt->row_status_ptr) { PUSHSQLERR (stmt->herr, en_HYC00); return SQL_ERROR; } if (fetchOrientation == SQL_FETCH_BOOKMARK) { if (fetchOffset) { PUSHSQLERR (stmt->herr, en_HYC00); return SQL_ERROR; } retcode = _iodbcdm_ExtendedFetch (statementHandle, fetchOrientation, stmt->fetch_bookmark_ptr ? *((SQLINTEGER *) stmt->fetch_bookmark_ptr) : 0, (SQLULEN *) stmt->rows_fetched_ptr, (SQLUSMALLINT *) stmt->row_status_ptr); } else retcode = _iodbcdm_ExtendedFetch (statementHandle, fetchOrientation, fetchOffset, (SQLULEN *) stmt->rows_fetched_ptr, (SQLUSMALLINT *) stmt->row_status_ptr); } /* state transition */ if (stmt->asyn_on == en_FetchScroll) { switch (retcode) { case SQL_SUCCESS: case SQL_SUCCESS_WITH_INFO: case SQL_NO_DATA_FOUND: case SQL_ERROR: stmt->asyn_on = en_NullProc; break; case SQL_STILL_EXECUTING: default: return retcode; } } switch (stmt->state) { case en_stmt_cursoropen: case en_stmt_fetched: case en_stmt_xfetched: switch (retcode) { case SQL_SUCCESS: case SQL_SUCCESS_WITH_INFO: case SQL_NO_DATA_FOUND: stmt->state = en_stmt_xfetched; stmt->cursor_state = en_stmt_cursor_xfetched; break; case SQL_STILL_EXECUTING: stmt->asyn_on = en_FetchScroll; break; default: break; } break; default: break; } return retcode; } RETCODE SQL_API SQLFetchScroll ( SQLHSTMT StatementHandle, SQLSMALLINT FetchOrientation, SQLLEN FetchOffset) { ENTER_STMT (StatementHandle, trace_SQLFetchScroll (TRACE_ENTER, StatementHandle, FetchOrientation, FetchOffset)); retcode = _iodbcdm_FixColBindData ((STMT_t *) StatementHandle); if (retcode != SQL_SUCCESS) return retcode; retcode = SQLFetchScroll_Internal ( StatementHandle, FetchOrientation, FetchOffset); if (SQL_SUCCEEDED (retcode)) _iodbcdm_ConvBindData ((STMT_t *) StatementHandle); LEAVE_STMT (StatementHandle, trace_SQLFetchScroll (TRACE_LEAVE, StatementHandle, FetchOrientation, FetchOffset)); } SQLRETURN SQL_API SQLBindParam ( SQLHSTMT hstmt, SQLUSMALLINT ipar, SQLSMALLINT fCType, SQLSMALLINT fSqlType, SQLULEN cbParamDef, SQLSMALLINT ibScale, SQLPOINTER rgbValue, SQLLEN *pcbValue) { return SQLBindParameter (hstmt, ipar, SQL_PARAM_INPUT, fCType, fSqlType, cbParamDef, ibScale, rgbValue, SQL_MAX_OPTION_STRING_LENGTH, pcbValue); } static SQLRETURN SQLCloseCursor_Internal (SQLHSTMT hstmt) { STMT (pstmt, hstmt); CONN (pdbc, pstmt->hdbc); HPROC hproc = SQL_NULL_HPROC; SQLRETURN retcode = SQL_SUCCESS; HPROC hproc2 = SQL_NULL_HPROC; SQLUINTEGER odbc_ver = ((GENV_t *) pdbc->genv)->odbc_ver; SQLUINTEGER dodbc_ver = ((ENV_t *) pdbc->henv)->dodbc_ver; /* check state */ if (pstmt->state >= en_stmt_needdata || pstmt->asyn_on != en_NullProc) { PUSHSQLERR (pstmt->herr, en_S1010); return SQL_ERROR; } hproc2 = _iodbcdm_getproc (pstmt->hdbc, en_FreeStmt); if (dodbc_ver == SQL_OV_ODBC3 && ( odbc_ver == SQL_OV_ODBC3 || (odbc_ver == SQL_OV_ODBC2 && hproc2 == SQL_NULL_HPROC))) { hproc = _iodbcdm_getproc (pstmt->hdbc, en_CloseCursor); if (hproc) { CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc, (pstmt->dhstmt)); } } if (hproc == SQL_NULL_HPROC) { hproc = _iodbcdm_getproc (pstmt->hdbc, en_FreeStmt); if (hproc == SQL_NULL_HPROC) { PUSHSQLERR (pstmt->herr, en_IM001); return SQL_ERROR; } CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc, (pstmt->dhstmt, SQL_CLOSE)); } if (retcode != SQL_SUCCESS && retcode != SQL_SUCCESS_WITH_INFO) { return retcode; } /* * State transition */ pstmt->cursor_state = en_stmt_cursor_no; switch (pstmt->state) { case en_stmt_allocated: case en_stmt_prepared: break; case en_stmt_executed_with_info: case en_stmt_executed: case en_stmt_cursoropen: case en_stmt_fetched: case en_stmt_xfetched: if (pstmt->prep_state) pstmt->state = en_stmt_prepared; else pstmt->state = en_stmt_allocated; break; default: break; } return retcode; } SQLRETURN SQL_API SQLCloseCursor (SQLHSTMT hstmt) { ENTER_STMT (hstmt, trace_SQLCloseCursor (TRACE_ENTER, hstmt)); retcode = SQLCloseCursor_Internal (hstmt); LEAVE_STMT (hstmt, trace_SQLCloseCursor (TRACE_LEAVE, hstmt)); } #endif /* ODBCVER >= 0x0300 */ libiodbc-3.52.16/iodbc/dlproc.h0000664000175000017500000001012014424170750013074 00000000000000/* * dlproc.h * * $Id$ * * Load driver and resolve driver's function entry point * * The iODBC driver manager. * * Copyright (C) 1995 Ke Jin * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef _DLPROC_H #define _DLPROC_H #include #if defined(_MAC) || defined (__cplusplus) typedef SQLRETURN (* HPROC) (...); #else typedef SQLRETURN (* HPROC) (); #endif #ifdef DLDAPI_SVR4_DLFCN #include #endif #ifdef DLDAPI_HP_SHL #include typedef shl_t HDLL; #elif !defined(WIN32) typedef void *HDLL; #endif typedef struct _dl_s { char * path; HDLL dll; unsigned int refcount; int safe_unload; struct _dl_s * next; } dlproc_t; /* dlproc.c */ HPROC _iodbcdm_getproc (HDBC hdbc, int idx); HDLL _iodbcdm_dllopen (char *path); HPROC _iodbcdm_dllproc (HDLL hdll, char *sym); int _iodbcdm_dllclose (HDLL hdll); char *_iodbcdm_dllerror (void); void _iodbcdm_safe_unload (HDLL hdll); #define SQL_NULL_HDLL ((HDLL)NULL) #define SQL_NULL_HPROC ((HPROC)NULL) #endif libiodbc-3.52.16/README.md0000664000175000017500000003300414424170750011645 00000000000000# iODBC Driver Manager Copyright (C) 1995 Ke Jin . Copyright (C) 1996-2023 OpenLink Software . ## License Copyright 1996-2023 [OpenLink Software](http://www.openlinksw.com) This software is released under either the GNU Library General Public License (see [LICENSE.LGPL](./LICENSE.LGPL)) or the BSD License (see [LICENSE.BSD](./LICENSE.BSD)). **Note**: The only valid version of the GPL license as far as this project is concerned is the original GNU General Public License Version 2, dated June 1991. ### Contributions While not mandated by the BSD license, any patches you make to the iODBC project may be contributed back into the project at your discretion. Contributions will benefit the Open Source and Data Access community as a whole. Submissions may be made via the [iODBC Github project](https://github.com/openlink/iODBC/) or via email to [iodbc@openlinksw.com](mailto:iodbc@openlinksw.com). ## Introduction Welcome to the iODBC driver manager maintained by [OpenLink Software](http://www.openlinksw.com/). This kit will provide you with everything you need to develop ODBC-compliant applications under Unix without having to pay royalties to other parties. This kit consists of a number of parts: * **The iODBC driver manager.** This is a complete implementation of an ODBC driver manager, released under either the GNU Library General Public License or the BSD License. We fully comply with these licenses by giving you this product in source form (as well as the binary form). You can download the latest version of the driver manager from the [iODBC website](http://www.iodbc.org/). * **A simple example application, `iodbctest.c`**, which gives you a command-line interface to SQL. You can fit this to your purposes, but at the very least this is useful for verification of your ODBC installation. You can use either part stand-alone, if you wish. An ODBC driver is still needed to affect your connection architecture. You may build a driver with the iODBC components or obtain an ODBC driver from a commercial vendor. OpenLink Software produces cross-platform commercial drivers as well as maintaining the iODBC distribution: evaluation copies may be obtained via download from the [OpenLink Software website](http://www.openlinksw.com/). Any ODBC-compliant driver will work with the iODBC Driver Manager. You can see the [iODBC website](http://www.iodbc.org/) for pointers to various ODBC drivers. ## Installation of run-time distribution You have probably already unpacked this distribution. The next step is to make sure that your applications can find all the dynamic link libraries. Depending on your system's implementation of dynamic link libraries, you have a number of options: * Install the libraries in a directory that is searched by your linker by default. Typical locations are `/usr/lib` and `/usr/local/lib`. * Install the libraries in some other place, and make sure that the environment variable your dynamic linker uses to find extra locations for dynamic link libraries. Most systems use the environment variable `LD_LIBRARY_PATH` to this end. Known exceptions include AIX which uses `LIBPATH`, and HP/UX which uses `SHLIB_PATH` for 32-bit libraries. If your system has a C compiler, you can verify the installation by compiling the `iodbctest` program. Otherwise, you may have ODBC applications installed on your system which you can use. ## Configuration of run-time distribution The iODBC driver manager looks for a file `~/.odbc.ini`, where the tilde stands for the user's home directory. This file initially contains only a default section where you can select which driver library to use. Copy the `odbc.ini` file from the examples directory to `~/.odbc.ini` and make sure the right path and filename is used for your installation. A data source is a section (enclosed in square brackets), and the attributes for a data source are given within this section. The most important attribute to iODBC for each datasource is the `Driver` attribute. This must point to the shared library for the ODBC driver associated with the data source. For example, the OpenLink Enterprise Edition (Multi-Tier) ODBC drivers have a number of attributes which can be set for a data source. Here is a description: | `odbc.ini` keyword | ODBC connect string keyword | Description | |--------------------|-----------------------------|-----| | `Host` | `HOST` | The hostname where the database resides. | | `ServerType` | `SVT` | The type of Database Agent. (See `oplrqb.ini` on the server.) | | `ServerOptions` | `SVO` | Server-specific extra options. See Enterprise Edition server-side documentation for Agents which can use this. | | `Database` | `DATABASE` | The database to use. | | `Options` | `OPTIONS` | Connect options for the database. | | `UserName` | `UID` | The name of the database user. | | `Password` | `PWD` | The password of the database user. | | `ReadOnly` | `READONLY` | A `Yes`/`No` value in order to make the connection read-only. | | `FetchBufferSize` | `FBS` | The number of records that are transferred in a single call to the server. Default is `5`; maximum is `999`; minimum is `1`. | | `Protocol` | `PROTO` | The protocol to use. Set to `TCP` for Release 3.x and later. | Apart from these data source-specific settings, you may add a section called `[Communications]`, which you may use to tune the OpenLink Enterprise Edition (Multi-Tier) driver further: | `odbc.ini` keyword | Description | |--------------------|-------------| | `ReceiveTimeout` | The time in seconds that the client application will wait for the Database Agent to start sending results. Default is `60`. | | `BrokerTimeout` | The time in seconds that the client application will wait for the Request Broker to accept or reject a database connection request. Default is `30`. | | `SendSize` | RPC send buffer size. A value of `0` (the default) will cause the application to use system-dependent defaults. | | `ReceiveSize` | RPC receive buffer size. A value of `0` (the default) will cause the application to use system-dependent defaults. | | `DebugFile` | If set, the name of a file to which debugging output from the driver should be directed. | ## iODBC driver manager platform availability The iODBC driver manager has been ported to following platforms: | OS | Version | Processor | |------------------|---------------|----------------------------------------------- | | BSDi BSD/OS | 2.x | x86 | | DEC Unix (OSF/1) | 3.x - 5.x | DEC Alpha | | DG/UX | 5.x | Aviion | | FreeBSD | 2.x - 9.x | x86 | | HP/UX | 9.x - 11.x | HP9000 s700/s800 | | HP/UX | 9.x | HP9000 s300/s400 | | IBM AIX | 3.x - 5.x | IBM RS6000, ppc32, ppc64 | | Linux ELF | 1.x, 2.x | x86, x86_64, IA_64, ppc32, ppc64, arm32, arm64 | | macOS | 10.x – 11.x | ppc32, ppc64, x86, x86_64, arm64 | | Max/OS SVR4 | 1.x | Concurrent Maxion 9200 MP | | NCR SVR4 | 3.x | NCR 3435 | | OpenVMS | 6.x | DEC Alpha | | SCO OpenServer | 5.x | x86 | | SGI Irix SVR4 | 5.x, 6.x | IP12 MIPS, IP22 MIPS | | SunOS | 4.1.x | Sun Sparc | | Sun Solaris | 2.x | Sun Sparc, x86, x86_64 | | UnixWare SVR4.2 | 1.x, 2.x | x86 | | Windows NT | 4.x | x86 | As the iODBC driver manager uses `autoconf`/`automake`/`libtool`, it should be portable to most modern UNIX-like OS out of the box. However, if you do need to make changes to the code or the configuration files, we would appreciate it if you would share your changes with the rest of the internet community by mailing your patches to [iodbc@openlinksw.com](mailto:iodbc@openlinksw.com), so we can include them for the next build. Porting the iODBC driver manager to some non-UNIX-like operating systems, such as the Windows family (3.x, 95, NT, 200x, etc.), IBM OS/2, or Mac Classic, is supported, but has not been compiled or tested recently. Of course, you will need to supply a `make`/`build` file and a short `LibMain` for creating the `iodbc.dll`. ## How to build the iODBC driver manager Users of macOS should read the separate [README_MACOSX](./README_MACOSX.md) document for more detail of porting to this platform. Users of all other UNIX-like OS: 1. Run `configure` to adjust to target platform 2. Run `make` 3. Run `make install` The `configure` program will examine your system for various compiler flags, system options, etc. In some cases, extra flags need to be added for the `C` compiler to work properly; for instance, on HP systems, you may need: $ CFLAGS="-Ae -O" ./configure --prefix=/usr/local .......... ### File Hierarchy Note that the path of the system wide `odbc.ini` file is calculated as follows (based on flags to `./configure`): ``` no --prefix default is /etc/odbc.ini --prefix=/usr /etc/odbc.ini --prefix=/xxx/yyy /xxx/yyy/etc/odbc.ini --sysconfdir=/xxx/yyy /xxx/yyy/odbc.ini --with-iodbc-inidir=/xxx/yyy /xxx/yyy/odbc.ini ``` If the **`--with-layout=`** option is set, then the `prefix` and `sysconfdir` parameters will be changed accordingly. Currently, this parameter understands values of **`gentoo`**, **`redhat`**, **`gnu`**, **`debian`**, or **`opt`** (with everything going into `/opt/iodbc/`). If both are specified, `--prefix` argument will overrule `--with-layout`. ### Example ``` $ ./configure --prefix=/usr/local --with-iodbc-inidir=/etc ... ... ... $ make ... ... ... $ su # make install ... ... ... ``` ## `odbc.ini` Driver manager and drivers use the `odbc.ini` file or connection string when establishing a data source connection. On Windows, `odbc.ini` is located in the Windows directory. On UNIX-like OS, the iODBC driver manager looks for the `odbc.ini` file in the following sequence: 1. check environment variable `ODBCINI` 2. check `$HOME/.odbc.ini` 3. check home in `/etc/passwd` and try `.odbc.ini` in there 4. system-wide `odbc.ini` (settable at configuration time) Item 1 is the easiest, as most drivers will also look at this variable. The format of `odbc.ini` (or `~/.odbc.ini`) is defined as: ``` odbc.ini ::= data_source_list data_source_list ::= /* empty */ | data_source '\n' data_source_list data_source ::= '[' data_source_name ']' '\n' data_source_desc data_source_name ::= 'default' | [A-Za-z]*[A-Za-z0-9_]* data_source_desc ::= /* empty */ | attrib_desc '\n' data_source_desc addrib_desc ::= Attrib '=' attrib_value Attrib ::= 'Driver' | 'PID' | 'UID' | driver_def_attrib driver_def_attrib ::= [A-Za-z]*[A-Za-z0-9_]* ``` An example of an `odbc.ini` file: ``` ; ; odbc.ini ; [ODBC Data Sources] Myodbc = Myodbc Sample = OpenLink Generic ODBC Driver Virtuoso = Virtuoso [ODBC] TraceFile = /tmp/odbc.trace Trace = 0 ; set to 1 to enable tracing [Sample] Driver = /usr/local/openlink/lib/oplodbc.so.1 Description = Sample OpenLink DSN Host = localhost UserName = openlink Password = xxxx ServerType = Oracle 8.1.x Database = FetchBufferSize = 99 ReadOnly = no [Virtuoso] Driver = /usr/local/virtuoso/lib/virtodbc.so.1 Address = localhost:1112 Database = Demo [Myodbc] Driver = /usr/lib/libmyodbc.so HOST = localhost [Default] Driver = /usr/local/openlink/lib/oplodbc.so.1 ``` ## Tracing The iODBC driver manager traces driver's ODBC call invoked by the driver manager. Default tracing file is `./odbc.log`. Tracing option (i.e., on/off or optional tracing file name) can be set in `odbc.ini` file under the `[ODBC]` heading, as: ``` [ODBC] TraceFile = Trace = ON | On | on | 1 | OFF | Off | off | 0 ``` If `` is `stderr` or `stdout`, i.e. -- TraceFile = stderr -- or -- TraceFile = stdout -- the tracing message will go to the terminal screen (if available). ## Further Information Sources * [iODBC Website](http://www.iodbc.org/) containing binaries, sources and documentation. * [iODBC Project page on GitHub](https://github.com/openlink/iODBC/) containing source archives, GIT tree, issues forum. * [iODBC Project page on Sourceforge](http://sourceforge.net/projects/iodbc) containing source archives, GIT tree, mailing lists, forums, bug reports. * [OpenLink Software Website](http://www.openlinksw.com/) containing free trials and support for OpenLink's ODBC drivers. * [Microsoft ODBC Documentation](https://msdn.microsoft.com/en-us/library/ms714177) containing the ODBC API Reference Guide. libiodbc-3.52.16/drvproxy/0000775000175000017500000000000014424171430012337 500000000000000libiodbc-3.52.16/drvproxy/mac/0000775000175000017500000000000014424171430013077 500000000000000libiodbc-3.52.16/drvproxy/mac/Base.lproj/0000775000175000017500000000000014424171430015076 500000000000000libiodbc-3.52.16/drvproxy/mac/Base.lproj/IODBCProxy_LoginController.xib0000664000175000017500000002356314424170750022615 00000000000000 NSAllRomanInputSourcesLocaleIdentifier libiodbc-3.52.16/drvproxy/mac/Base.lproj/IODBCProxy_SetupController.xib0000664000175000017500000005222314424170750022640 00000000000000 ... ... key val libiodbc-3.52.16/drvproxy/mac/IODBCProxy_LoginController.h0000664000175000017500000000755014424170750020261 00000000000000/* * IODBCProxy_LoginController.h * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import #import BOOL showLogin(const char* title, const char *username, const char *password, TLOGIN *log_t); @interface IODBCProxy_LoginController : NSWindowController { NSTextField *fld_UID; NSSecureTextField *fld_PWD; NSString *d_title; NSString *d_uid; NSString *d_pwd; int _dialogCode; } @property (assign) IBOutlet NSTextField *fld_UID; @property (assign) IBOutlet NSSecureTextField *fld_PWD; @property (nonatomic, retain) NSString *d_title; @property (nonatomic, retain) NSString *d_uid; @property (nonatomic, retain) NSString *d_pwd; - (IBAction)call_Cancel:(id)sender; - (IBAction)call_OK:(id)sender; @end libiodbc-3.52.16/drvproxy/mac/IODBCProxy_SetupController.h0000664000175000017500000001034714424170750020307 00000000000000/* * IODBCProxy_SetupController.h * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import #import char* showSetup(char* dsn, char* attrs, BOOL addEnable); @interface IODBCProxy_SetupController : NSWindowController { NSTextField *fld_DSN; NSTextField *fld_Comment; NSButton *btn_Add; NSButton *btn_Remove; NSString *d_dsn; NSString *d_comment; int _dialogCode; int _curMode; BOOL _addEnabled; NSMutableArray *_Attrs_list; NSArrayController *Attrs_ArrController; } @property (assign) IBOutlet NSArrayController *Attrs_ArrController; @property (assign) IBOutlet NSTextField *fld_DSN; @property (assign) IBOutlet NSTextField *fld_Comment; @property (assign) IBOutlet NSButton *btn_Add; @property (assign) IBOutlet NSButton *btn_Remove; @property (nonatomic, retain) NSString *d_dsn; @property (nonatomic, retain) NSString *d_comment; @property (assign) BOOL _addEnabled; @property (nonatomic, retain) NSMutableArray *Attrs_list; - (id)initWithAttrs:(const char*)attrs; - (IBAction)call_Cancel:(id)sender; - (IBAction)call_Ok:(id)sender; @end libiodbc-3.52.16/drvproxy/mac/utils.h0000664000175000017500000000703214424170750014336 00000000000000/* * utils.h * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import #import #include #include NSString* conv_wchar_to_NSString(const wchar_t* str); wchar_t* conv_NSString_to_wchar(NSString* str); char* conv_NSString_to_char(NSString* str); NSString* conv_char_to_NSString(const char* str); NSString* conv_to_NSString(const void * str, char waMode); libiodbc-3.52.16/drvproxy/mac/loginbox.c0000664000175000017500000000702514424170750015014 00000000000000/* * loginbox.c * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include extern BOOL showLogin(const char* title, const char *username, const char *password, TLOGIN *log_t); void create_login (HWND hwnd, LPCSTR username, LPCSTR password, LPCSTR dsn, TLOGIN * log_t) { BOOL rc = showLogin(dsn, username, password, log_t); log_t->ok = rc; }libiodbc-3.52.16/drvproxy/mac/gui.h0000664000175000017500000000647014424170750013767 00000000000000/* * gui.h * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #ifndef _MACXGUI_H #define _MACXGUI_H typedef struct TLOGIN { char *user, *pwd; int ok; } TLOGIN; #endif libiodbc-3.52.16/drvproxy/mac/confirm.png0000664000175000017500000000267314013216212015162 00000000000000PNG  IHDR&&=gAMA a cHRMz&u0`:pQ< pHYsodtEXtSoftwarePaint.NET v3.5.5I IDATXGXIH]IllIHȢBH/z7ٹt .%qYl,ڊ('8~Dћ{.>Wݐ˫_unտvԶ_5^dr{j?y=`Λ;݃R~lnn>][[@SSS4>>N###gcx9<5yk:~ (Ǭ&1~>[ZZrMLLPgg'Qoo/8moo?==M===*zXgl϶_FtSccd]nKoLa߮.Q~Mb֝o#ĖT VnZYYttxH"۵e# peBˮ_ 9証<AߩAgMMxr A>^dCާR\\: [ju X&0Wק_deeQll ja;oHg8›XW?SLL 6*** `0Gr I-*Ұa"@:::*|szz%166F"GRչ Abh @ND}x؍3"cLg-0 9x}ё@rr#l61G8QtEq0u8Ӫ4"JEYYh @H8+++%{{{ZDWul\RRB{|Q())I}E],_xOCi @PttsZG`[o ruO|Hrɡ(1fɞM#lQHDvy***3 y AnnUUGb!{~Ciq` p\CC{*Ot))3`ķ[K0K=1ȐCM S$xmCA{/,.K~!xx^-+x:2tH>pCY("pA"777Kkkk)77W6`Ej'J6{[5p9G^pN@r Fl}}=Y+ W]p238!'KKK% {1U5SB})VWarQ\9V[X<_983?~_S`R yO񌉟pif˳iSc㉿0Wy1r@,IENDB`libiodbc-3.52.16/drvproxy/mac/IODBCProxy_SetupController.m0000664000175000017500000002200214424170750020303 00000000000000/* * IODBCProxy_SetupController.m * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import "IODBCProxy_SetupController.h" #import "utils.h" static char *STRCONN = "DSN=%s\0Description=%s\0\0"; static int STRCONN_NB_TOKENS = 2; char* showSetup(char* dsn, char* attrs, BOOL addEnable) { char *connstr = (char*) - 1L; @autoreleasepool { NSApplication *app = [NSApplication sharedApplication]; IODBCProxy_SetupController *dlg = [[IODBCProxy_SetupController alloc] initWithAttrs:attrs]; if (dsn) dlg.d_dsn = conv_char_to_NSString(dsn); dlg._addEnabled = addEnable; NSInteger rc = [app runModalForWindow:dlg.window]; [dlg.window orderOut:dlg.window]; if (rc == 1){ char *cour, *curr; int i = 0, size = 0; char *val,*key; char *dsn,*comment; Size len; dsn = (char*)conv_NSString_to_char(dlg.d_dsn); comment = (char*)conv_NSString_to_char(dlg.d_comment); len = (dsn!=NULL)?strlen(dsn):0; size += len + strlen("DSN=") + 1; len = (comment!=NULL)?strlen(comment):0; size += len + strlen("Description=") + 1; // Malloc it if ((connstr = (char *) malloc (++size))) { for (curr = STRCONN, cour = connstr; i < STRCONN_NB_TOKENS; i++, curr += (strlen(curr) + 1)) { switch (i) { case 0: sprintf (cour, curr, dsn?dsn:""); cour += (strlen(cour) + 1); break; case 1: sprintf (cour, curr, comment?comment:""); cour += (strlen(cour) + 1); break; } } for (i = 0; i < dlg.Attrs_list.count; i++) { NSDictionary *row = [dlg.Attrs_list objectAtIndex:i]; NSString *nskey = (NSString*)[row valueForKey:@"key"]; int alen = 0; if ([nskey isEqualToString:@"..."] || nskey.length==0) continue; key = (char*)conv_NSString_to_char(nskey); alen += key ? strlen(key) : 0; val = (char*)conv_NSString_to_char((NSString*)[row valueForKey:@"val"]); alen += val ? strlen(val) : 0; cour = connstr; connstr = (char*) malloc (size + alen + 2); if (connstr) { memcpy (connstr, cour, size); sprintf (connstr + size - 1, "%s=%s", key?key:"", val?val:""); free (cour); size += alen + 2; } else connstr = cour; if (key!=NULL) free(key); if (val!=NULL) free(val); } connstr[size - 1] = '\0'; if (dsn!=NULL) free(dsn); if (comment!=NULL) free(comment); } } [dlg release]; return connstr; } } #define MODE_ADD 1 #define MODE_VIEW 0 @interface IODBCProxy_SetupController () @end @implementation IODBCProxy_SetupController @synthesize Attrs_ArrController; @synthesize fld_DSN; @synthesize fld_Comment; @synthesize btn_Add; @synthesize btn_Remove; @synthesize d_dsn, d_comment, _addEnabled; @synthesize Attrs_list=_Attrs_list; - (id)initWithAttrs:(const char*)attrs { self = [super initWithWindowNibName:@"IODBCProxy_SetupController"]; if (self) { self.Attrs_list = [NSMutableArray arrayWithCapacity:16]; [self parse_attrs:attrs]; } return self; } - (void)dealloc { [d_dsn release]; [d_comment release]; [_Attrs_list release]; [super dealloc]; } - (id)initWithWindow:(NSWindow *)window { self = [super initWithWindow:window]; if (self) { // Initialization code here. } return self; } - (void)parse_attrs:(const char *)attrs { char *curr, *cour; for (curr = (char*) attrs; *curr; curr += (strlen(curr) + 1)) { if (!strncasecmp (curr, "Description=", strlen("Description="))) self.d_comment = conv_char_to_NSString(curr + strlen("Description=")); if (!strncasecmp (curr, "DSN=", strlen("DSN=")) || !strncasecmp (curr, "Driver=", strlen("Driver=")) || !strncasecmp (curr, "Description=", strlen("Description="))) continue; if ((cour = strchr (curr, '='))) { NSString *key, *val; *cour = '\0'; key = conv_char_to_NSString(curr); *cour = '='; val = conv_char_to_NSString(cour+1); [_Attrs_list addObject:[NSMutableDictionary dictionaryWithObjectsAndKeys:key!=nil?key:@"", @"key", val!=nil?val:@"", @"val", nil]]; } } } - (void)windowDidLoad { [super windowDidLoad]; _dialogCode = 0; _curMode = MODE_VIEW; [[self window] center]; // Center the window. if (d_dsn!=nil){ self.window.title = [NSString stringWithFormat:@"Setup of %@", d_dsn]; self.fld_DSN.stringValue = d_dsn; } if (d_comment!=nil) self.fld_Comment.stringValue = d_comment; } - (void)windowWillClose:(NSNotification*)notification { [NSApp stopModalWithCode:_dialogCode]; } - (IBAction)call_Ok:(id)sender { _dialogCode = 1; self.d_dsn = fld_DSN.stringValue; self.d_comment = fld_Comment.stringValue; [self.window close]; } - (IBAction)call_Cancel:(id)sender { _dialogCode = 0; [self.window close]; } @end libiodbc-3.52.16/drvproxy/mac/utils.m0000664000175000017500000001541714424170750014351 00000000000000/* * utils.m * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import "utils.h" #define OPL_W2A(XW, XA, SIZE) wcstombs((char *) XA, (wchar_t *) XW, SIZE) #define OPL_A2W(XA, XW, SIZE) mbstowcs((wchar_t *) XW, (char *) XA, SIZE) static char *str_W2A (const wchar_t *inStr) { char *outStr = NULL; size_t len; if (inStr == NULL) return NULL; len = wcslen (inStr); if ((outStr = (char *) malloc (len*4 + 1)) != NULL) /* for multi-byte encodings */ { if (len > 0) OPL_W2A (inStr, outStr, len); outStr[len] = '\0'; } return outStr; } static wchar_t* str_A2W (const char *inStr) { wchar_t *outStr = NULL; size_t len; if (inStr == NULL) return NULL; len = strlen (inStr); if ((outStr = (wchar_t*) calloc (len + 1, sizeof (wchar_t))) != NULL) { if (len > 0) OPL_A2W (inStr, outStr, len); outStr[len] = L'\0'; } return outStr; } NSString* conv_wchar_to_NSString(const wchar_t* str) { if (!str) return nil; int num = 1; if(*(char *)&num == 1) return [[[NSString alloc] initWithBytes:str length:wcslen(str)*sizeof(wchar_t) encoding:NSUTF32LittleEndianStringEncoding] autorelease]; else return [[[NSString alloc] initWithBytes:str length:wcslen(str)*sizeof(wchar_t) encoding:NSUTF32BigEndianStringEncoding] autorelease]; } #if OLD_1 NSString* conv_wchar_to_NSString(const wchar_t* str) { if (!str) return nil; CFMutableStringRef prov = CFStringCreateMutable(NULL, 0); CFIndex i; UniChar c; if(prov) { for(i = 0 ; str[i] != L'\0' ; i++) { c = (UniChar)str[i]; CFStringAppendCharacters(prov, &c, 1); } } return (NSString*)prov; } #endif wchar_t* conv_NSString_to_wchar(NSString* str) { if (str == nil) return NULL; int len = str.length; wchar_t *prov = malloc(sizeof(wchar_t) * (len+1)); CFIndex i; if(prov) { for(i = 0 ; i * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import "IODBCProxy_LoginController.h" #import "utils.h" BOOL showLogin(const char* title, const char *username, const char *password, TLOGIN *log_t) { if (log_t) { log_t->user = NULL; log_t->pwd = NULL; log_t->ok = 0; } @autoreleasepool { NSApplication *app = [NSApplication sharedApplication]; IODBCProxy_LoginController *dlg = [[IODBCProxy_LoginController alloc] init]; if (title) dlg.d_title = conv_char_to_NSString(title); if (username) dlg.d_uid = conv_char_to_NSString(username); if (password) dlg.d_pwd = conv_char_to_NSString(password); [dlg.window makeKeyAndOrderFront:nil]; NSInteger rc = [app runModalForWindow:dlg.window]; [dlg.window orderOut:dlg.window]; if (log_t && rc == 1){ log_t->user = (char*)conv_NSString_to_char(dlg.d_uid); log_t->pwd = (char*)conv_NSString_to_char(dlg.d_pwd); log_t->ok = 1; } [dlg release]; return rc == 1 ? TRUE : FALSE; } } @interface IODBCProxy_LoginController () @end @implementation IODBCProxy_LoginController @synthesize fld_UID; @synthesize fld_PWD; @synthesize d_title, d_uid, d_pwd; - (id)init { return [super initWithWindowNibName:@"IODBCProxy_LoginController"]; } - (void)dealloc { [d_title release]; [d_uid release]; [d_pwd release]; [super dealloc]; } - (id)initWithWindow:(NSWindow *)window { self = [super initWithWindow:window]; if (self) { // Initialization code here. } return self; } - (void)windowDidLoad { [super windowDidLoad]; _dialogCode = 0; [[self window] center]; // Center the window. if (d_title!=nil) self.window.title = d_title; if (d_uid!=nil) self.fld_UID.stringValue = d_uid; if (d_pwd!=nil) self.fld_PWD.stringValue = d_pwd; } - (void)windowWillClose:(NSNotification*)notification { [NSApp stopModalWithCode:_dialogCode]; } - (IBAction)call_OK:(id)sender { _dialogCode = 1; self.d_uid = fld_UID.stringValue; self.d_pwd = fld_PWD.stringValue; [self.window close]; } - (IBAction)call_Cancel:(id)sender { _dialogCode = 0; [self.window close]; } @end libiodbc-3.52.16/drvproxy/mac/confirm.c0000664000175000017500000000704414424170750014631 00000000000000/* * confirm.c * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include extern BOOL showConfirm(const void *title, const void *message, char waMode); BOOL create_confirm (HWND hwnd, LPCSTR dsn, LPCSTR text) { return showConfirm((SQLPOINTER)dsn, (SQLPOINTER)text, 'A'); } BOOL create_confirmw (HWND hwnd, LPCWSTR dsn, LPCWSTR text) { return showConfirm((SQLPOINTER)dsn, (SQLPOINTER)text, 'W'); } libiodbc-3.52.16/drvproxy/mac/gensetup.c0000664000175000017500000000664114424170750015030 00000000000000/* * gensetup.c * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include extern char* showSetup(char* dsn, char* attrs, BOOL addEnable); LPSTR create_gensetup (HWND hwnd, LPCSTR dsn, LPCSTR attrs, BOOL add) { return showSetup((char*)dsn, (char*)attrs, add); }libiodbc-3.52.16/drvproxy/drvproxy.exp0000664000175000017500000000012514013216212014660 00000000000000ConfigDriver ConfigDSN _iodbcdm_drvconn_dialbox _iodbcdm_loginbox iodbcproxy_version libiodbc-3.52.16/drvproxy/ConfigDSN.c0000664000175000017500000002114414424170750014203 00000000000000/* * ConfigDSN.c * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* ----------- Finished and tested with shadowing ----------- */ #include #include #include #include #include "gui.h" BOOL INSTAPI ConfigDSN ( HWND hwndParent, WORD fRequest, LPCSTR lpszDriver, LPCSTR lpszAttributes) { char *dsn = NULL, *connstr = NULL, *curr, *cour = NULL; char dsnread[4096] = { 0 }; char prov[4096] = { 0 }; int driver_type = -1, flags = 0; BOOL retcode = FALSE; UWORD confMode = ODBC_USER_DSN; /* Map the request User/System */ if (fRequest < ODBC_ADD_DSN || fRequest > ODBC_REMOVE_DSN) { SQLPostInstallerError (ODBC_ERROR_INVALID_REQUEST_TYPE, NULL); goto done; } if (!lpszDriver || !STRLEN (lpszDriver)) { SQLPostInstallerError (ODBC_ERROR_INVALID_NAME, NULL); goto done; } /* Retrieve the config mode */ SQLGetConfigMode (&confMode); /* Retrieve the DSN if one exist */ for (curr = (LPSTR) lpszAttributes; curr && *curr; curr += (STRLEN (curr) + 1)) { if (!strncmp (curr, "DSN=", STRLEN ("DSN="))) { dsn = curr + STRLEN ("DSN="); break; } } /* Retrieve the corresponding driver */ #if !defined (__APPLE__) if (strstr (lpszDriver, "OpenLink") || strstr (lpszDriver, "Openlink") || strstr (lpszDriver, "oplodbc")) { driver_type = 0; for (curr = (LPSTR) lpszAttributes, cour = prov; curr && *curr; curr += (STRLEN (curr) + 1), cour += (STRLEN (cour) + 1)) { if (!strncasecmp (curr, "Host=", STRLEN ("Host=")) && STRLEN (curr + STRLEN ("Host="))) { STRCPY (cour, curr); flags |= 0x1; continue; } if (!strncasecmp (curr, "ServerType=", STRLEN ("ServerType=")) && STRLEN (curr + STRLEN ("ServerType="))) { STRCPY (cour, curr); flags |= 0x2; continue; } STRCPY (cour, curr); } if (cour && !(flags & 1)) { STRCPY (cour, "Host=localhost\0"); cour += (STRLEN (cour) + 1); } if (cour && !(flags & 2)) { STRCPY (cour, "ServerType=Proxy\0"); cour += (STRLEN (cour) + 1); } if (cour) *cour = 0; } else if ((strstr (lpszDriver, "Virtuoso") || strstr (lpszDriver, "virtodbc"))) driver_type = 1; #endif /* For each request */ switch (fRequest) { case ODBC_ADD_DSN: /* Check if the DSN with this name already exists */ SQLSetConfigMode (confMode); #ifdef WIN32 if (hwndParent && dsn && SQLGetPrivateProfileString ("ODBC 32 bit Data Sources", dsn, "", dsnread, sizeof (dsnread), NULL) && !create_confirm (hwndParent, dsn, "Are you sure you want to overwrite this DSN ?")) #else if (hwndParent && dsn && SQLGetPrivateProfileString ("ODBC Data Sources", dsn, "", dsnread, sizeof (dsnread), NULL) && !create_confirm (hwndParent, dsn, "Are you sure you want to overwrite this DSN ?")) #endif goto done; /* Call the right setup function */ connstr = create_gensetup (hwndParent, dsn, STRLEN (prov) ? prov : lpszAttributes, TRUE); /* Check output parameters */ if (!connstr) { SQLPostInstallerError (ODBC_ERROR_OUT_OF_MEM, NULL); goto done; } if (connstr == (LPSTR) - 1L) goto done; /* Add the DSN to the ODBC Data Sources */ SQLSetConfigMode (confMode); if (!SQLWriteDSNToIni (dsn = connstr + STRLEN ("DSN="), lpszDriver)) goto done; /* Add each keyword and values */ for (curr = connstr; *curr; curr += (STRLEN (curr) + 1)) { if (strncmp (curr, "DSN=", STRLEN ("DSN="))) { STRCPY (dsnread, curr); cour = strchr (dsnread, '='); if (cour) *cour = 0; SQLSetConfigMode (confMode); if (!SQLWritePrivateProfileString (dsn, dsnread, (cour && STRLEN (cour + 1)) ? cour + 1 : NULL, NULL)) goto done; } } break; case ODBC_CONFIG_DSN: if (!dsn || !STRLEN (dsn)) { SQLPostInstallerError (ODBC_ERROR_INVALID_KEYWORD_VALUE, NULL); goto done; } /* Call the right setup function */ connstr = create_gensetup (hwndParent, dsn, STRLEN (prov) ? prov : lpszAttributes, FALSE); /* Check output parameters */ if (!connstr) { SQLPostInstallerError (ODBC_ERROR_OUT_OF_MEM, NULL); goto done; } if (connstr == (LPSTR) - 1L) goto done; /* Remove the previous DSN */ SQLSetConfigMode (confMode); if (!SQLRemoveDSNFromIni (dsn)) goto done; /* Add the new DSN section */ SQLSetConfigMode (confMode); if (!SQLWriteDSNToIni (dsn = connstr + STRLEN ("DSN="), lpszDriver)) goto done; /* Add each keyword and values */ for (curr = connstr; *curr; curr += (STRLEN (curr) + 1)) { if (strncmp (curr, "DSN=", STRLEN ("DSN="))) { STRCPY (dsnread, curr); cour = strchr (dsnread, '='); if (cour) *cour = 0; SQLSetConfigMode (confMode); if (!SQLWritePrivateProfileString (dsn, dsnread, (cour && STRLEN (cour + 1)) ? cour + 1 : NULL, NULL)) goto done; } } break; case ODBC_REMOVE_DSN: if (!dsn || !STRLEN (dsn)) { SQLPostInstallerError (ODBC_ERROR_INVALID_KEYWORD_VALUE, NULL); goto done; } /* Just remove the DSN */ SQLSetConfigMode (confMode); if (!SQLRemoveDSNFromIni (dsn)) goto done; break; }; quit: retcode = TRUE; done: if (connstr && connstr != (LPSTR) - 1L && connstr != lpszAttributes && connstr != prov) free (connstr); return retcode; } libiodbc-3.52.16/drvproxy/Info.c0000664000175000017500000000635514424170750013333 00000000000000/* * info.c * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include char *iodbcproxy_version = VERSION; libiodbc-3.52.16/drvproxy/ConfigDriver.c0000664000175000017500000001476214424170750015022 00000000000000/* * ConfigDriver.c * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include "gui.h" BOOL INSTAPI ConfigDriver ( HWND hwndParent, WORD fRequest, LPCSTR lpszDriver, LPCSTR lpszArgs, LPSTR lpszMsg, WORD cbMsgMax, WORD * pcbMsgOut) { char *curr, *cour; char driverread[4096] = { 0 }; BOOL retcode = FALSE; UWORD confMode = ODBC_USER_DSN; /* Map the request User/System */ if (fRequest < ODBC_INSTALL_DRIVER || fRequest > ODBC_CONFIG_DRIVER_MAX) { SQLPostInstallerError (ODBC_ERROR_INVALID_REQUEST_TYPE, NULL); goto done; } if (!lpszDriver || !STRLEN (lpszDriver)) { SQLPostInstallerError (ODBC_ERROR_INVALID_NAME, NULL); goto done; } /* Retrieve the config mode */ SQLGetConfigMode (&confMode); /* Treat corresponding to the request */ switch (fRequest) { case ODBC_INSTALL_DRIVER: /* Check if the DRIVER with this name already exists */ SQLSetConfigMode (confMode); #ifdef WIN32 if (hwndParent && SQLGetPrivateProfileString ("ODBC 32 bit Drivers", lpszDriver, "", driverread, sizeof (driverread), "odbcinst.ini") && !create_confirm (hwndParent, NULL, "Are you sure you want to overwrite this driver ?")) #else # ifdef _MACX if (hwndParent && SQLGetPrivateProfileString ("ODBC Drivers", lpszDriver, "", driverread, sizeof (driverread), "odbcinst.ini") && !create_confirm (hwndParent, NULL, "Are you sure you want to overwrite this driver ?")) # else if (hwndParent && SQLGetPrivateProfileString ("ODBC Drivers", lpszDriver, "", driverread, sizeof (driverread), "odbcinst.ini") && !create_confirm (hwndParent, NULL, "Are you sure you want to overwrite this driver ?")) # endif #endif { SQLPostInstallerError (ODBC_ERROR_DRIVER_SPECIFIC, "Driver already installed previously."); goto done; } /* Add the Driver to the ODBC Drivers */ SQLSetConfigMode (confMode); if (!SQLInstallDriverEx (lpszArgs, NULL, driverread, sizeof (driverread), NULL, ODBC_INSTALL_COMPLETE, NULL)) { SQLPostInstallerError (ODBC_ERROR_DRIVER_SPECIFIC, "Could not add the driver information."); goto done; } break; case ODBC_CONFIG_DRIVER: if (!lpszArgs || !STRLEN (lpszArgs)) { SQLPostInstallerError (ODBC_ERROR_DRIVER_SPECIFIC, "No enough parameters for configururation."); goto done; } /* Add each keyword and values */ for (curr = (LPSTR) lpszArgs; *curr; curr += (STRLEN (curr) + 1)) { STRCPY (driverread, curr); cour = strchr (driverread, '='); if (cour) *cour = 0; SQLSetConfigMode (confMode); if (!SQLWritePrivateProfileString (lpszDriver, driverread, (cour && STRLEN (cour + 1)) ? cour + 1 : NULL, "odbcinst.ini")) goto done; } break; case ODBC_REMOVE_DRIVER: /* Remove the Driver to the ODBC Drivers */ SQLSetConfigMode (confMode); if (!SQLRemoveDriver (lpszDriver, TRUE, NULL)) { SQLPostInstallerError (ODBC_ERROR_DRIVER_SPECIFIC, "Could not remove driver information."); goto done; } break; default: SQLPostInstallerError (ODBC_ERROR_REQUEST_FAILED, NULL); goto done; }; quit: retcode = TRUE; done: if (pcbMsgOut) *pcbMsgOut = 0; return retcode; } libiodbc-3.52.16/drvproxy/drvconn.c0000664000175000017500000001264114424170750014104 00000000000000/* * drvconn.c * * $Id$ * * The data_sources dialog for SQLDriverConnect and a login box procedures * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "gui.h" #include #include "herr.h" #include "dlproc.h" SQLRETURN SQL_API _iodbcdm_drvconn_dialbox ( HWND hwnd, LPSTR szInOutConnStr, DWORD cbInOutConnStr, int * sqlStat, SQLUSMALLINT fDriverCompletion, UWORD * config) { RETCODE retcode = SQL_ERROR; char *szDSN = NULL, *szDriver = NULL, *szUID = NULL, *szPWD = NULL, *curr; TLOGIN log_t; /* Check input parameters */ if (!hwnd || !szInOutConnStr || cbInOutConnStr < 1) goto quit; /* Check if the DSN is already set or DRIVER */ for (curr = szInOutConnStr; *curr; curr += (STRLEN (curr) + 1)) { if (!strncasecmp (curr, "DSN=", STRLEN ("DSN="))) { szDSN = curr + STRLEN ("DSN="); continue; } if (!strncasecmp (curr, "DRIVER=", STRLEN ("DRIVER="))) { szDriver = curr + STRLEN ("DRIVER="); continue; } if (!strncasecmp (curr, "UID=", STRLEN ("UID="))) { szUID = curr + STRLEN ("UID="); continue; } if (!strncasecmp (curr, "UserName=", STRLEN ("UserName="))) { szUID = curr + STRLEN ("UserName="); continue; } if (!strncasecmp (curr, "LastUser=", STRLEN ("LastUser="))) { szUID = curr + STRLEN ("LastUser="); continue; } if (!strncasecmp (curr, "PWD=", STRLEN ("PWD="))) { szPWD = curr + STRLEN ("PWD="); continue; } if (!strncasecmp (curr, "Password=", STRLEN ("Password="))) { szPWD = curr + STRLEN ("Password="); continue; } } if (fDriverCompletion != SQL_DRIVER_NOPROMPT && (!szUID || !szPWD)) { create_login (hwnd, szUID, szPWD, szDSN ? szDSN : "(File DSN)", &log_t); if (log_t.user && !szUID) { sprintf (curr, "UID=%s", log_t.user); curr += STRLEN (curr); *curr++ = '\0'; free (log_t.user); } if (log_t.pwd && !szPWD) { sprintf (curr, "PWD=%s", log_t.pwd); curr += STRLEN (curr); *curr++ = '\0'; free (log_t.pwd); } /* add list-terminating '\0' */ *curr = '\0'; } retcode = log_t.ok == TRUE ? SQL_SUCCESS : SQL_NO_DATA_FOUND; quit: for (curr = szInOutConnStr; *curr; curr = szDSN + 1) { szDSN = curr + STRLEN (curr); if (szDSN[1]) szDSN[0] = ';'; } return retcode; } libiodbc-3.52.16/drvproxy/gui.h0000664000175000017500000000741414424170750013226 00000000000000/* * gui.h * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #if defined(__BEOS__) #include "be/gui.h" #elif defined(macintosh) #include "mac/gui.h" #elif defined(__GTK__) #include "gtk/gui.h" #elif defined(__QT__) #include "qt/gui.h" #elif defined(__APPLE__) #include "mac/gui.h" #endif #ifdef __cplusplus extern "C" { #endif #ifndef _GUI_H #define _GUI_H LPSTR create_gensetup (HWND hwnd, LPCSTR dsn, LPCSTR attrs, BOOL add); void create_login (HWND hwnd, LPCSTR username, LPCSTR password, LPCSTR dsn, TLOGIN *log_t); BOOL create_confirm (HWND hwnd, LPCSTR dsn, LPCSTR text); #ifdef __cplusplus } #endif #endif libiodbc-3.52.16/drvproxy/gtk/0000775000175000017500000000000014424171430013124 500000000000000libiodbc-3.52.16/drvproxy/gtk/gensetup.c0000664000175000017500000005565014424170750015061 00000000000000/* * gensetup.c * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "gui.h" static char* STRCONN = "DSN=%s\0Description=%s\0\0"; static int STRCONN_NB_TOKENS = 2; static char *szKeysColumnNames[] = { "Keyword", "Value" }; static char *szKeysButtons[] = { "_Add", "_Update" }; static void addkeywords_to_list(GtkWidget* widget, LPCSTR attrs, TGENSETUP *gensetup_t) { char *curr, *cour; char *data[2]; if (!GTK_IS_CLIST (widget)) return; gtk_clist_clear (GTK_CLIST (widget)); for (curr = (LPSTR) attrs; *curr; curr += (STRLEN (curr) + 1)) { if (!strncasecmp (curr, "Description=", STRLEN ("Description="))) gtk_entry_set_text (GTK_ENTRY (gensetup_t->comment_entry), curr + STRLEN ("Description=")); if (!strncasecmp (curr, "DSN=", STRLEN ("DSN=")) || !strncasecmp (curr, "Driver=", STRLEN ("Driver=")) || !strncasecmp (curr, "Description=", STRLEN ("Description="))) continue; if ((cour = strchr (curr, '='))) { *cour = '\0'; data[0] = curr; data[1] = cour + 1; gtk_clist_append (GTK_CLIST (widget), data); *cour = '='; } else { data[0] = ""; gtk_clist_append (GTK_CLIST (widget), data); } } if (GTK_CLIST (widget)->rows > 0) gtk_clist_sort (GTK_CLIST (widget)); } static void parse_attribute_line(TGENSETUP *gensetup_t, LPCSTR dsn, LPCSTR attrs, BOOL add) { if (dsn) { gtk_entry_set_text (GTK_ENTRY (gensetup_t->dsn_entry), dsn); if (add) gtk_widget_set_sensitive (gensetup_t->dsn_entry, TRUE); else gtk_widget_set_sensitive (gensetup_t->dsn_entry, FALSE); } addkeywords_to_list (gensetup_t->key_list, attrs, gensetup_t); } static void gensetup_add_clicked(GtkWidget* widget, TGENSETUP *gensetup_t) { char *szKey; char *data[2]; int i = 0; if (gensetup_t) { data[0] = (char*)gtk_entry_get_text (GTK_ENTRY (gensetup_t->key_entry)); if (STRLEN (data[0])) { data[1] = (char*)gtk_entry_get_text (GTK_ENTRY (gensetup_t->value_entry)); /* Try to see if the keyword already exists */ for (i = 0; i < GTK_CLIST (gensetup_t->key_list)->rows; i++) { gtk_clist_get_text (GTK_CLIST (gensetup_t->key_list), i, 0, &szKey); if (STREQ (data[0], szKey)) goto done; } /* An update operation */ if (i < GTK_CLIST (gensetup_t->key_list)->rows) { gtk_clist_set_text (GTK_CLIST (gensetup_t->key_list), i, 1, data[1]); } else if (STRLEN (data[1])) { gtk_clist_append (GTK_CLIST (gensetup_t->key_list), data); } } gtk_clist_sort (GTK_CLIST (gensetup_t->key_list)); done: gtk_entry_set_text (GTK_ENTRY (gensetup_t->key_entry), ""); gtk_entry_set_text (GTK_ENTRY (gensetup_t->value_entry), ""); } } static void gensetup_update_clicked(GtkWidget* widget, TGENSETUP *gensetup_t) { char *data[2]; int i; if (gensetup_t) { data[0] = (char*)gtk_entry_get_text (GTK_ENTRY (gensetup_t->key_entry)); if (STRLEN (data[0])) { data[1] = (char*)gtk_entry_get_text (GTK_ENTRY (gensetup_t->value_entry)); if (GTK_CLIST (gensetup_t->key_list)->selection != NULL) i = GPOINTER_TO_INT (GTK_CLIST (gensetup_t->key_list)->selection-> data); else i = 0; /* An update operation */ if (i < GTK_CLIST (gensetup_t->key_list)->rows) { gtk_clist_set_text (GTK_CLIST (gensetup_t->key_list), i, 0, data[0]); gtk_clist_set_text (GTK_CLIST (gensetup_t->key_list), i, 1, data[1]); } } gtk_entry_set_text (GTK_ENTRY (gensetup_t->key_entry), ""); gtk_entry_set_text (GTK_ENTRY (gensetup_t->value_entry), ""); } } static void gensetup_list_select(GtkWidget* widget, gint row, gint column, GdkEvent *event, TGENSETUP *gensetup_t) { char *szKey, *szValue; if (gensetup_t && GTK_CLIST (gensetup_t->key_list)->selection != NULL) { gtk_clist_get_text (GTK_CLIST (gensetup_t->key_list), GPOINTER_TO_INT (GTK_CLIST (gensetup_t->key_list)->selection->data), 0, &szKey); gtk_clist_get_text (GTK_CLIST (gensetup_t->key_list), GPOINTER_TO_INT (GTK_CLIST (gensetup_t->key_list)->selection->data), 1, &szValue); gtk_entry_set_text (GTK_ENTRY (gensetup_t->key_entry), szKey); gtk_entry_set_text (GTK_ENTRY (gensetup_t->value_entry), szValue); gtk_widget_set_sensitive (gensetup_t->bupdate, TRUE); } } static void gensetup_list_unselect(GtkWidget* widget, gint row, gint column, GdkEvent *event, TGENSETUP *gensetup_t) { if (gensetup_t) { gtk_widget_set_sensitive (gensetup_t->bupdate, FALSE); gtk_entry_set_text (GTK_ENTRY (gensetup_t->key_entry), ""); gtk_entry_set_text (GTK_ENTRY (gensetup_t->value_entry), ""); } } static void gensetup_ok_clicked(GtkWidget* widget, TGENSETUP *gensetup_t) { char *curr, *cour, *szKey, *szValue; int i = 0, size = 0; if (gensetup_t) { /* What is the size of the block to malloc */ size += STRLEN (gtk_entry_get_text (GTK_ENTRY (gensetup_t->dsn_entry))) + STRLEN ("DSN=") + 1; size += STRLEN (gtk_entry_get_text (GTK_ENTRY (gensetup_t-> comment_entry))) + STRLEN ("Description=") + 1; /* Malloc it (+1 for list-terminating NUL) */ if ((gensetup_t->connstr = (char *) malloc (size + 1))) { for (curr = STRCONN, cour = gensetup_t->connstr; i < STRCONN_NB_TOKENS; i++, curr += (STRLEN (curr) + 1)) switch (i) { case 0: sprintf (cour, curr, gtk_entry_get_text (GTK_ENTRY (gensetup_t->dsn_entry))); cour += (STRLEN (cour) + 1); break; case 1: sprintf (cour, curr, gtk_entry_get_text (GTK_ENTRY (gensetup_t-> comment_entry))); cour += (STRLEN (cour) + 1); break; }; for (i = 0; i < GTK_CLIST (gensetup_t->key_list)->rows; i++) { gtk_clist_get_text (GTK_CLIST (gensetup_t->key_list), i, 0, &szKey); gtk_clist_get_text (GTK_CLIST (gensetup_t->key_list), i, 1, &szValue); cour = gensetup_t->connstr; gensetup_t->connstr = (char *) malloc (size + STRLEN (szKey) + STRLEN (szValue) + 2); if (gensetup_t->connstr) { memcpy (gensetup_t->connstr, cour, size); sprintf (gensetup_t->connstr + size, "%s=%s", szKey, szValue); free (cour); size += STRLEN (szKey) + STRLEN (szValue) + 2; } else gensetup_t->connstr = cour; } /* add list-terminating NUL */ gensetup_t->connstr[size] = '\0'; } gensetup_t->dsn_entry = gensetup_t->comment_entry = NULL; gensetup_t->key_list = NULL; gtk_signal_disconnect_by_func (GTK_OBJECT (gensetup_t->mainwnd), GTK_SIGNAL_FUNC (gtk_main_quit), NULL); gtk_main_quit (); gtk_widget_destroy (gensetup_t->mainwnd); } } static void gensetup_cancel_clicked(GtkWidget* widget, TGENSETUP *gensetup_t) { if (gensetup_t) { gensetup_t->connstr = (LPSTR) - 1L; gensetup_t->dsn_entry = gensetup_t->comment_entry = NULL; gensetup_t->key_list = NULL; gtk_signal_disconnect_by_func (GTK_OBJECT (gensetup_t->mainwnd), GTK_SIGNAL_FUNC (gtk_main_quit), NULL); gtk_main_quit (); gtk_widget_destroy (gensetup_t->mainwnd); } } static gint delete_event( GtkWidget *widget, GdkEvent *event, TGENSETUP *gensetup_t) { gensetup_cancel_clicked (widget, gensetup_t); return FALSE; } LPSTR create_gensetup (HWND hwnd, LPCSTR dsn, LPCSTR attrs, BOOL add) { GtkWidget *dgensetup; GtkWidget *vbox42; GtkWidget *vbox43; GtkWidget *frame100; GtkWidget *alignment84; GtkWidget *label166; GtkWidget *frame103; GtkWidget *alignment87; GtkWidget *table11; GtkWidget *label171; GtkWidget *label172; GtkWidget *t_dsn; GtkWidget *t_comment; GtkWidget *frame101; GtkWidget *alignment85; GtkWidget *scrolledwindow22; GtkWidget *clist1; GtkWidget *label167; GtkWidget *label168; GtkWidget *frame102; GtkWidget *alignment86; GtkWidget *hbox58; GtkWidget *table10; GtkWidget *label169; GtkWidget *t_value; GtkWidget *b_update; GtkWidget *b_add; GtkWidget *t_keyword; GtkWidget *label170; GtkWidget *hbuttonbox4; GtkWidget *b_cancel; GtkWidget *b_ok; TGENSETUP gensetup_t; char buff[1024]; if (hwnd == NULL || !GTK_IS_WIDGET (hwnd)) return (LPSTR) attrs; dgensetup = gtk_dialog_new (); gtk_widget_set_name (dgensetup, "dgensetup"); gtk_widget_set_size_request (dgensetup, 356, 445); sprintf (buff, "Setup of DSN %s ...", (dsn) ? dsn : "Unknown"); gtk_window_set_title (GTK_WINDOW (dgensetup), buff); gtk_window_set_position (GTK_WINDOW (dgensetup), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (dgensetup), TRUE); gtk_window_set_default_size (GTK_WINDOW (dgensetup), 600, 450); gtk_window_set_type_hint (GTK_WINDOW (dgensetup), GDK_WINDOW_TYPE_HINT_DIALOG); #if GTK_CHECK_VERSION(2,0,0) gtk_widget_show (dgensetup); #endif vbox42 = GTK_DIALOG (dgensetup)->vbox; gtk_widget_set_name (vbox42, "vbox42"); gtk_widget_show (vbox42); vbox43 = gtk_vbox_new (FALSE, 0); gtk_widget_set_name (vbox43, "vbox43"); gtk_widget_show (vbox43); gtk_box_pack_start (GTK_BOX (vbox42), vbox43, TRUE, TRUE, 0); frame100 = gtk_frame_new (NULL); gtk_widget_set_name (frame100, "frame100"); gtk_widget_show (frame100); gtk_box_pack_start (GTK_BOX (vbox43), frame100, FALSE, TRUE, 0); gtk_frame_set_shadow_type (GTK_FRAME (frame100), GTK_SHADOW_NONE); alignment84 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment84, "alignment84"); gtk_widget_show (alignment84); gtk_container_add (GTK_CONTAINER (frame100), alignment84); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment84), 4, 4, 0, 0); label166 = gtk_label_new (_("Generic ODBC driver Setup")); gtk_widget_set_name (label166, "label166"); gtk_widget_show (label166); gtk_container_add (GTK_CONTAINER (alignment84), label166); frame103 = gtk_frame_new (NULL); gtk_widget_set_name (frame103, "frame103"); gtk_widget_show (frame103); gtk_box_pack_start (GTK_BOX (vbox43), frame103, FALSE, TRUE, 0); gtk_frame_set_shadow_type (GTK_FRAME (frame103), GTK_SHADOW_NONE); alignment87 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment87, "alignment87"); gtk_widget_show (alignment87); gtk_container_add (GTK_CONTAINER (frame103), alignment87); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment87), 6, 0, 0, 0); table11 = gtk_table_new (2, 2, FALSE); gtk_widget_set_name (table11, "table11"); gtk_widget_show (table11); gtk_container_add (GTK_CONTAINER (alignment87), table11); gtk_table_set_row_spacings (GTK_TABLE (table11), 6); gtk_table_set_col_spacings (GTK_TABLE (table11), 4); label171 = gtk_label_new (_("Data Source Name (DSN) :")); gtk_widget_set_name (label171, "label171"); gtk_widget_show (label171); gtk_table_attach (GTK_TABLE (table11), label171, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label171), 0, 0.5); label172 = gtk_label_new (_(" Comment :")); gtk_widget_set_name (label172, "label172"); gtk_widget_show (label172); gtk_table_attach (GTK_TABLE (table11), label172, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label172), 0, 0.5); t_dsn = gtk_entry_new (); gtk_widget_set_name (t_dsn, "t_dsn"); gtk_widget_show (t_dsn); gtk_table_attach (GTK_TABLE (table11), t_dsn, 1, 2, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); t_comment = gtk_entry_new (); gtk_widget_set_name (t_comment, "t_comment"); gtk_widget_show (t_comment); gtk_table_attach (GTK_TABLE (table11), t_comment, 1, 2, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); frame101 = gtk_frame_new (NULL); gtk_widget_set_name (frame101, "frame101"); gtk_widget_show (frame101); gtk_box_pack_start (GTK_BOX (vbox43), frame101, TRUE, TRUE, 0); gtk_frame_set_shadow_type (GTK_FRAME (frame101), GTK_SHADOW_NONE); alignment85 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment85, "alignment85"); gtk_widget_show (alignment85); gtk_container_add (GTK_CONTAINER (frame101), alignment85); scrolledwindow22 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_set_name (scrolledwindow22, "scrolledwindow22"); gtk_widget_show (scrolledwindow22); gtk_container_add (GTK_CONTAINER (alignment85), scrolledwindow22); clist1 = gtk_clist_new (2); gtk_widget_set_name (clist1, "clist1"); gtk_widget_show (clist1); gtk_container_add (GTK_CONTAINER (scrolledwindow22), clist1); gtk_clist_set_column_width (GTK_CLIST (clist1), 0, 137); gtk_clist_set_column_width (GTK_CLIST (clist1), 1, 80); gtk_clist_column_titles_show (GTK_CLIST (clist1)); label167 = gtk_label_new (_("Keyword")); gtk_widget_set_name (label167, "label167"); gtk_widget_show (label167); gtk_clist_set_column_widget (GTK_CLIST (clist1), 0, label167); gtk_widget_set_size_request (label167, 137, -1); label168 = gtk_label_new (_("Value")); gtk_widget_set_name (label168, "label168"); gtk_widget_show (label168); gtk_clist_set_column_widget (GTK_CLIST (clist1), 1, label168); frame102 = gtk_frame_new (NULL); gtk_widget_set_name (frame102, "frame102"); gtk_widget_show (frame102); gtk_box_pack_start (GTK_BOX (vbox43), frame102, FALSE, TRUE, 0); gtk_frame_set_shadow_type (GTK_FRAME (frame102), GTK_SHADOW_NONE); alignment86 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment86, "alignment86"); gtk_widget_show (alignment86); gtk_container_add (GTK_CONTAINER (frame102), alignment86); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment86), 3, 0, 0, 0); hbox58 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox58, "hbox58"); gtk_widget_show (hbox58); gtk_container_add (GTK_CONTAINER (alignment86), hbox58); table10 = gtk_table_new (2, 3, FALSE); gtk_widget_set_name (table10, "table10"); gtk_widget_show (table10); gtk_box_pack_start (GTK_BOX (hbox58), table10, TRUE, TRUE, 0); label169 = gtk_label_new (_("Value : ")); gtk_widget_set_name (label169, "label169"); gtk_widget_show (label169); gtk_table_attach (GTK_TABLE (table10), label169, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); t_value = gtk_entry_new (); gtk_widget_set_name (t_value, "t_value"); gtk_widget_show (t_value); gtk_table_attach (GTK_TABLE (table10), t_value, 1, 2, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); b_update = gtk_button_new_with_mnemonic (_(" _Update ")); gtk_widget_set_name (b_update, "b_update"); gtk_widget_show (b_update); gtk_table_attach (GTK_TABLE (table10), b_update, 2, 3, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (b_update), 6); b_add = gtk_button_new_from_stock ("gtk-add"); gtk_widget_set_name (b_add, "b_add"); gtk_widget_show (b_add); gtk_table_attach (GTK_TABLE (table10), b_add, 2, 3, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (b_add), 6); t_keyword = gtk_entry_new (); gtk_widget_set_name (t_keyword, "t_keyword"); gtk_widget_show (t_keyword); gtk_table_attach (GTK_TABLE (table10), t_keyword, 1, 2, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); label170 = gtk_label_new (_("Keyword : ")); gtk_widget_set_name (label170, "label170"); gtk_widget_show (label170); gtk_table_attach (GTK_TABLE (table10), label170, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); hbuttonbox4 = GTK_DIALOG (dgensetup)->action_area; gtk_widget_set_name (hbuttonbox4, "hbuttonbox4"); gtk_widget_show (hbuttonbox4); gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox4), GTK_BUTTONBOX_END); b_cancel = gtk_button_new_from_stock ("gtk-cancel"); gtk_widget_set_name (b_cancel, "b_cancel"); gtk_widget_show (b_cancel); gtk_dialog_add_action_widget (GTK_DIALOG (dgensetup), b_cancel, GTK_RESPONSE_CANCEL); GTK_WIDGET_SET_FLAGS (b_cancel, GTK_CAN_DEFAULT); b_ok = gtk_button_new_from_stock ("gtk-ok"); gtk_widget_set_name (b_ok, "b_ok"); gtk_widget_show (b_ok); gtk_dialog_add_action_widget (GTK_DIALOG (dgensetup), b_ok, GTK_RESPONSE_OK); GTK_WIDGET_SET_FLAGS (b_ok, GTK_CAN_DEFAULT); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (dgensetup, dgensetup, "dgensetup"); GLADE_HOOKUP_OBJECT_NO_REF (dgensetup, vbox42, "vbox42"); GLADE_HOOKUP_OBJECT (dgensetup, vbox43, "vbox43"); GLADE_HOOKUP_OBJECT (dgensetup, frame100, "frame100"); GLADE_HOOKUP_OBJECT (dgensetup, alignment84, "alignment84"); GLADE_HOOKUP_OBJECT (dgensetup, label166, "label166"); GLADE_HOOKUP_OBJECT (dgensetup, frame103, "frame103"); GLADE_HOOKUP_OBJECT (dgensetup, alignment87, "alignment87"); GLADE_HOOKUP_OBJECT (dgensetup, table11, "table11"); GLADE_HOOKUP_OBJECT (dgensetup, label171, "label171"); GLADE_HOOKUP_OBJECT (dgensetup, label172, "label172"); GLADE_HOOKUP_OBJECT (dgensetup, t_dsn, "t_dsn"); GLADE_HOOKUP_OBJECT (dgensetup, t_comment, "t_comment"); GLADE_HOOKUP_OBJECT (dgensetup, frame101, "frame101"); GLADE_HOOKUP_OBJECT (dgensetup, alignment85, "alignment85"); GLADE_HOOKUP_OBJECT (dgensetup, scrolledwindow22, "scrolledwindow22"); GLADE_HOOKUP_OBJECT (dgensetup, clist1, "clist1"); GLADE_HOOKUP_OBJECT (dgensetup, label167, "label167"); GLADE_HOOKUP_OBJECT (dgensetup, label168, "label168"); GLADE_HOOKUP_OBJECT (dgensetup, frame102, "frame102"); GLADE_HOOKUP_OBJECT (dgensetup, alignment86, "alignment86"); GLADE_HOOKUP_OBJECT (dgensetup, hbox58, "hbox58"); GLADE_HOOKUP_OBJECT (dgensetup, table10, "table10"); GLADE_HOOKUP_OBJECT (dgensetup, label169, "label169"); GLADE_HOOKUP_OBJECT (dgensetup, t_value, "t_value"); GLADE_HOOKUP_OBJECT (dgensetup, b_update, "b_update"); GLADE_HOOKUP_OBJECT (dgensetup, b_add, "b_add"); GLADE_HOOKUP_OBJECT (dgensetup, t_keyword, "t_keyword"); GLADE_HOOKUP_OBJECT (dgensetup, label170, "label170"); GLADE_HOOKUP_OBJECT_NO_REF (dgensetup, hbuttonbox4, "hbuttonbox4"); GLADE_HOOKUP_OBJECT (dgensetup, b_cancel, "b_cancel"); GLADE_HOOKUP_OBJECT (dgensetup, b_ok, "b_ok"); /* Ok button events */ gtk_signal_connect (GTK_OBJECT (b_ok), "clicked", GTK_SIGNAL_FUNC (gensetup_ok_clicked), &gensetup_t); /* Cancel button events */ gtk_signal_connect (GTK_OBJECT (b_cancel), "clicked", GTK_SIGNAL_FUNC (gensetup_cancel_clicked), &gensetup_t); /* Add button events */ gtk_signal_connect (GTK_OBJECT (b_add), "clicked", GTK_SIGNAL_FUNC (gensetup_add_clicked), &gensetup_t); /* Update button events */ gtk_signal_connect (GTK_OBJECT (b_update), "clicked", GTK_SIGNAL_FUNC (gensetup_update_clicked), &gensetup_t); /* Close window button events */ gtk_signal_connect (GTK_OBJECT (dgensetup), "delete_event", GTK_SIGNAL_FUNC (delete_event), &gensetup_t); gtk_signal_connect (GTK_OBJECT (dgensetup), "destroy", GTK_SIGNAL_FUNC (gtk_main_quit), NULL); /* List events */ gtk_signal_connect (GTK_OBJECT (clist1), "select_row", GTK_SIGNAL_FUNC (gensetup_list_select), &gensetup_t); gtk_signal_connect (GTK_OBJECT (clist1), "unselect_row", GTK_SIGNAL_FUNC (gensetup_list_unselect), &gensetup_t); gensetup_t.dsn_entry = t_dsn; gensetup_t.comment_entry = t_comment; gensetup_t.key_list = clist1; gensetup_t.bupdate = b_update; gensetup_t.key_entry = t_keyword; gensetup_t.value_entry = t_value; gensetup_t.mainwnd = dgensetup; /* Parse the attributes line */ parse_attribute_line (&gensetup_t, dsn, attrs, add); gtk_widget_show_all (dgensetup); gtk_main (); return gensetup_t.connstr; } libiodbc-3.52.16/drvproxy/gtk/loginbox.c0000664000175000017500000002413314424170750015040 00000000000000/* * loginbox.c * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "gui.h" static void login_ok_clicked (GtkWidget *widget, TLOGIN *log_t) { if (log_t) { log_t->user = (char *) malloc (sizeof (char) * (STRLEN (gtk_entry_get_text (GTK_ENTRY (log_t->username))) + 1)); log_t->pwd = (char *) malloc (sizeof (char) * (STRLEN (gtk_entry_get_text (GTK_ENTRY (log_t->password))) + 1)); if (log_t->user) strcpy (log_t->user, gtk_entry_get_text (GTK_ENTRY (log_t->username))); if (log_t->pwd) strcpy (log_t->pwd, gtk_entry_get_text (GTK_ENTRY (log_t->password))); log_t->username = log_t->password = NULL; log_t->ok = TRUE; gtk_signal_disconnect_by_func (GTK_OBJECT (log_t->mainwnd), GTK_SIGNAL_FUNC (gtk_main_quit), NULL); gtk_main_quit (); gtk_widget_destroy (log_t->mainwnd); } } static void login_cancel_clicked (GtkWidget *widget, TLOGIN *log_t) { if (log_t) { log_t->user = log_t->pwd = NULL; log_t->username = log_t->password = NULL; log_t->ok = FALSE; gtk_signal_disconnect_by_func (GTK_OBJECT (log_t->mainwnd), GTK_SIGNAL_FUNC (gtk_main_quit), NULL); gtk_main_quit (); gtk_widget_destroy (log_t->mainwnd); } } static gint delete_event (GtkWidget *widget, GdkEvent *event, TLOGIN *log_t) { login_cancel_clicked (widget, log_t); return FALSE; } void create_login (HWND hwnd, LPCSTR username, LPCSTR password, LPCSTR dsn, TLOGIN *log_t) { GtkWidget *login; GtkWidget *dialog_vbox8; GtkWidget *frame99; GtkWidget *alignment83; GtkWidget *table9; GtkWidget *label165; GtkWidget *t_user; GtkWidget *t_password; GtkWidget *label164; GtkWidget *dialog_action_area8; GtkWidget *b_ok; GtkWidget *b_cancel; char buff[1024]; if (hwnd == (HWND) - 1L) { gtk_init (0, NULL); hwnd = gtk_window_new (GTK_WINDOW_TOPLEVEL); } if (hwnd == NULL || !GTK_IS_WIDGET (hwnd)) return; login = gtk_dialog_new (); gtk_widget_set_name (login, "login"); gtk_widget_set_size_request (login, 400, 150); sprintf (buff, "Login for DSN %s ...", (dsn) ? dsn : "Unknown"); gtk_window_set_title (GTK_WINDOW (login), buff); gtk_window_set_position (GTK_WINDOW (login), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (login), TRUE); gtk_window_set_default_size (GTK_WINDOW (login), 400, 150); gtk_window_set_type_hint (GTK_WINDOW (login), GDK_WINDOW_TYPE_HINT_DIALOG); #if GTK_CHECK_VERSION(2,0,0) gtk_widget_show (login); #endif dialog_vbox8 = GTK_DIALOG (login)->vbox; gtk_widget_set_name (dialog_vbox8, "dialog_vbox8"); gtk_widget_show (dialog_vbox8); frame99 = gtk_frame_new (NULL); gtk_widget_set_name (frame99, "frame99"); gtk_widget_show (frame99); gtk_box_pack_start (GTK_BOX (dialog_vbox8), frame99, TRUE, TRUE, 0); gtk_frame_set_shadow_type (GTK_FRAME (frame99), GTK_SHADOW_NONE); alignment83 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment83, "alignment83"); gtk_widget_show (alignment83); gtk_container_add (GTK_CONTAINER (frame99), alignment83); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment83), 4, 0, 6, 7); table9 = gtk_table_new (2, 2, FALSE); gtk_widget_set_name (table9, "table9"); gtk_widget_show (table9); gtk_container_add (GTK_CONTAINER (alignment83), table9); gtk_table_set_row_spacings (GTK_TABLE (table9), 10); gtk_table_set_col_spacings (GTK_TABLE (table9), 6); label165 = gtk_label_new (_("Password :")); gtk_widget_set_name (label165, "label165"); gtk_widget_show (label165); gtk_table_attach (GTK_TABLE (table9), label165, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label165), 0, 0.5); t_user = gtk_entry_new (); gtk_widget_set_name (t_user, "t_user"); gtk_widget_show (t_user); gtk_table_attach (GTK_TABLE (table9), t_user, 1, 2, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); if (username && STRLEN (username)) gtk_entry_set_text (GTK_ENTRY (t_user), username); t_password = gtk_entry_new (); gtk_widget_set_name (t_password, "t_password"); gtk_widget_show (t_password); gtk_table_attach (GTK_TABLE (table9), t_password, 1, 2, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_visibility (GTK_ENTRY (t_password), FALSE); if (password && STRLEN (password)) gtk_entry_set_text (GTK_ENTRY (t_password), password); label164 = gtk_label_new (_("Username :")); gtk_widget_set_name (label164, "label164"); gtk_widget_show (label164); gtk_table_attach (GTK_TABLE (table9), label164, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label164), 0, 0.5); dialog_action_area8 = GTK_DIALOG (login)->action_area; gtk_widget_set_name (dialog_action_area8, "dialog_action_area8"); gtk_widget_show (dialog_action_area8); gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area8), GTK_BUTTONBOX_END); b_cancel = gtk_button_new_from_stock ("gtk-cancel"); gtk_widget_set_name (b_cancel, "b_cancel"); gtk_widget_show (b_cancel); gtk_dialog_add_action_widget (GTK_DIALOG (login), b_cancel, GTK_RESPONSE_CANCEL); GTK_WIDGET_SET_FLAGS (b_cancel, GTK_CAN_DEFAULT); b_ok = gtk_button_new_from_stock ("gtk-ok"); gtk_widget_set_name (b_ok, "b_ok"); gtk_widget_show (b_ok); gtk_dialog_add_action_widget (GTK_DIALOG (login), b_ok, GTK_RESPONSE_OK); GTK_WIDGET_SET_FLAGS (b_ok, GTK_CAN_DEFAULT); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (login, login, "login"); GLADE_HOOKUP_OBJECT_NO_REF (login, dialog_vbox8, "dialog_vbox8"); GLADE_HOOKUP_OBJECT (login, frame99, "frame99"); GLADE_HOOKUP_OBJECT (login, alignment83, "alignment83"); GLADE_HOOKUP_OBJECT (login, table9, "table9"); GLADE_HOOKUP_OBJECT (login, label165, "label165"); GLADE_HOOKUP_OBJECT (login, t_user, "t_user"); GLADE_HOOKUP_OBJECT (login, t_password, "t_password"); GLADE_HOOKUP_OBJECT (login, label164, "label164"); GLADE_HOOKUP_OBJECT_NO_REF (login, dialog_action_area8, "dialog_action_area8"); GLADE_HOOKUP_OBJECT (login, b_ok, "b_ok"); GLADE_HOOKUP_OBJECT (login, b_cancel, "b_cancel"); /* Ok button events */ gtk_signal_connect (GTK_OBJECT (b_ok), "clicked", GTK_SIGNAL_FUNC (login_ok_clicked), log_t); /* Cancel button events */ gtk_signal_connect (GTK_OBJECT (b_cancel), "clicked", GTK_SIGNAL_FUNC (login_cancel_clicked), log_t); /* Close window button events */ gtk_signal_connect (GTK_OBJECT (login), "delete_event", GTK_SIGNAL_FUNC (delete_event), log_t); gtk_signal_connect (GTK_OBJECT (login), "destroy", GTK_SIGNAL_FUNC (gtk_main_quit), NULL); log_t->username = t_user; log_t->password = t_password; log_t->user = log_t->pwd = NULL; log_t->mainwnd = login; gtk_widget_show_all (login); gtk_main (); } libiodbc-3.52.16/drvproxy/gtk/Makefile.in0000664000175000017500000005261514424171020015115 00000000000000# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 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@ # # Makefile.am # # The iODBC driver manager. # # Copyright (C) 1996-2023 OpenLink Software # All Rights Reserved. # # This software is released under the terms of either of the following # licenses: # # - GNU Library General Public License (see LICENSE.LGPL) # - The BSD License (see LICENSE.BSD). # # Note that the only valid version of the LGPL license as far as this # project is concerned is the original GNU Library General Public License # Version 2, dated June 1991. # # While not mandated by the BSD license, any patches you make to the # iODBC source code may be contributed back into the iODBC project # at your discretion. Contributions will benefit the Open Source and # Data Access community as a whole. Submissions may be made at: # # http://www.iodbc.org # # # GNU Library Generic Public License Version 2 # ============================================ # 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; only # Version 2 of the License dated June 1991. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # The BSD License # =============== # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. Neither the name of OpenLink Software Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = drvproxy/gtk ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/admin/gtk-2.0.m4 \ $(top_srcdir)/admin/gtk.m4 $(top_srcdir)/admin/libtool.m4 \ $(top_srcdir)/admin/ltoptions.m4 \ $(top_srcdir)/admin/ltsugar.m4 \ $(top_srcdir)/admin/ltversion.m4 \ $(top_srcdir)/admin/lt~obsolete.m4 \ $(top_srcdir)/admin/openlink.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libdrvproxy_gtk_la_DEPENDENCIES = am_libdrvproxy_gtk_la_OBJECTS = gensetup.lo loginbox.lo libdrvproxy_gtk_la_OBJECTS = $(am_libdrvproxy_gtk_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libdrvproxy_gtk_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libdrvproxy_gtk_la_LDFLAGS) \ $(LDFLAGS) -o $@ @GTK_TRUE@am_libdrvproxy_gtk_la_rpath = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/admin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdrvproxy_gtk_la_SOURCES) DIST_SOURCES = $(libdrvproxy_gtk_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/admin/depcomp \ $(top_srcdir)/admin/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_CONFIG = @GTK_CONFIG@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBADD_DL = @LIBADD_DL@ LIBADD_OS = @LIBADD_OS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ filedsnpath = @filedsnpath@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ inidir = @inidir@ install_sh = @install_sh@ lib_version = @lib_version@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ odbcmode = @odbcmode@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @GTK_TRUE@noinst_LTLIBRARIES = libdrvproxy-gtk.la AM_CPPFLAGS = \ -I$(top_srcdir)/include -I$(top_srcdir)/iodbc \ @GTK_CFLAGS@ -D__GTK__ libdrvproxy_gtk_la_LDFLAGS = #-static libdrvproxy_gtk_la_LIBADD = @GTK_LIBS@ libdrvproxy_gtk_la_SOURCES = \ gensetup.c \ loginbox.c noinst_HEADERS = gui.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu drvproxy/gtk/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu drvproxy/gtk/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdrvproxy-gtk.la: $(libdrvproxy_gtk_la_OBJECTS) $(libdrvproxy_gtk_la_DEPENDENCIES) $(EXTRA_libdrvproxy_gtk_la_DEPENDENCIES) $(AM_V_CCLD)$(libdrvproxy_gtk_la_LINK) $(am_libdrvproxy_gtk_la_rpath) $(libdrvproxy_gtk_la_OBJECTS) $(libdrvproxy_gtk_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gensetup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loginbox.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # 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: libiodbc-3.52.16/drvproxy/gtk/gui.h0000664000175000017500000000773114424170750014015 00000000000000/* * gui.h * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #ifndef _GTKGUI_H #define _GTKGUI_H #define GLADE_HOOKUP_OBJECT(component,widget,name) \ gtk_widget_ref(widget); \ gtk_object_set_data_full (GTK_OBJECT (component), name, \ widget, (GtkDestroyNotify) gtk_widget_unref) #define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \ gtk_object_set_data (GTK_OBJECT (component), name, widget) #define _(X) X typedef struct TLOGIN { GtkWidget *username, *password, *mainwnd; char *user, *pwd; BOOL ok; } TLOGIN; typedef struct TGENSETUP { GtkWidget *dsn_entry, *comment_entry, *key_list, *bupdate; GtkWidget *key_entry, *value_entry; GtkWidget *mainwnd; LPSTR connstr; } TGENSETUP; typedef struct TCONFIRM { GtkWidget *mainwnd; BOOL yes_no; } TCONFIRM; #endif libiodbc-3.52.16/drvproxy/gtk/Makefile.am0000664000175000017500000000663314424170750015114 00000000000000# # Makefile.am # # The iODBC driver manager. # # Copyright (C) 1996-2023 OpenLink Software # All Rights Reserved. # # This software is released under the terms of either of the following # licenses: # # - GNU Library General Public License (see LICENSE.LGPL) # - The BSD License (see LICENSE.BSD). # # Note that the only valid version of the LGPL license as far as this # project is concerned is the original GNU Library General Public License # Version 2, dated June 1991. # # While not mandated by the BSD license, any patches you make to the # iODBC source code may be contributed back into the iODBC project # at your discretion. Contributions will benefit the Open Source and # Data Access community as a whole. Submissions may be made at: # # http://www.iodbc.org # # # GNU Library Generic Public License Version 2 # ============================================ # 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; only # Version 2 of the License dated June 1991. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # The BSD License # =============== # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. Neither the name of OpenLink Software Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # if GTK noinst_LTLIBRARIES = libdrvproxy-gtk.la endif AM_CPPFLAGS = \ -I$(top_srcdir)/include -I$(top_srcdir)/iodbc \ @GTK_CFLAGS@ -D__GTK__ libdrvproxy_gtk_la_LDFLAGS = #-static libdrvproxy_gtk_la_LIBADD = @GTK_LIBS@ libdrvproxy_gtk_la_SOURCES = \ gensetup.c \ loginbox.c noinst_HEADERS = gui.h libiodbc-3.52.16/drvproxy/login.c0000664000175000017500000001075414424170750013546 00000000000000/* * login.c * * $Id$ * * The data_sources dialog for SQLDriverConnect and a login box procedures * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include "gui.h" SQLRETURN SQL_API _iodbcdm_loginbox ( HWND hwnd, LPSTR szInOutConnStr, DWORD cbInOutConnStr, int * sqlStat) { RETCODE retcode = SQL_ERROR; char *szUID = NULL, *szPWD = NULL, *szDSN = NULL, *curr; TLOGIN log_t; /* Check input parameters */ if (!hwnd || !szInOutConnStr || cbInOutConnStr < 1) goto quit; /* Check if the user and password are put */ for (curr = szInOutConnStr; *curr; curr += (STRLEN (curr) + 1)) { if (!strncasecmp (curr, "DSN=", STRLEN ("DSN="))) szDSN = curr + STRLEN ("DSN="); if (!strncasecmp (curr, "UID=", STRLEN ("UID="))) szUID = curr + STRLEN ("UID="); if (!strncasecmp (curr, "PWD=", STRLEN ("PWD="))) szPWD = curr + STRLEN ("PWD="); } if (!szUID || !szPWD) { create_login (hwnd, szUID, szPWD, szDSN, &log_t); if (log_t.user && !szUID) { sprintf (curr, "UID=%s\0", log_t.user); curr += (STRLEN (curr) + 1); free (log_t.user); *curr = 0; } if (log_t.pwd) { sprintf (curr, "PWD=%s\0", log_t.pwd); curr += (STRLEN (curr) + 1); free (log_t.pwd); *curr = 0; } } retcode = SQL_SUCCESS; quit: return retcode; } libiodbc-3.52.16/drvproxy/Makefile.am0000664000175000017500000001034014424170750014315 00000000000000# # Makefile.am # # The iODBC driver manager. # # Copyright (C) 1996-2023 OpenLink Software # All Rights Reserved. # # This software is released under the terms of either of the following # licenses: # # - GNU Library General Public License (see LICENSE.LGPL) # - The BSD License (see LICENSE.BSD). # # Note that the only valid version of the LGPL license as far as this # project is concerned is the original GNU Library General Public License # Version 2, dated June 1991. # # While not mandated by the BSD license, any patches you make to the # iODBC source code may be contributed back into the iODBC project # at your discretion. Contributions will benefit the Open Source and # Data Access community as a whole. Submissions may be made at: # # http://www.iodbc.org # # # GNU Library Generic Public License Version 2 # ============================================ # 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; only # Version 2 of the License dated June 1991. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # The BSD License # =============== # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. Neither the name of OpenLink Software Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # if GUI SUBDIRS = gtk lib_LTLIBRARIES = libdrvproxy.la endif if GTK AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/iodbc \ -I$(top_srcdir)/iodbcinst \ -I$(top_srcdir)/iodbcadm \ @GTK_CFLAGS@ -D__GTK__ else AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/iodbc \ -I$(top_srcdir)/iodbcinst\ -I$(top_srcdir)/iodbcadm endif libdrvproxy_la_LDFLAGS = -version-info @lib_version@ \ -export-symbols $(srcdir)/drvproxy.exp if GTK libdrvproxy_la_LIBADD = \ $(LIBADD_DL) \ ../iodbcadm/libiodbcadm.la \ ../drvproxy/gtk/libdrvproxy-gtk.la \ ../iodbcinst/libiodbc_common.la \ ../iodbcinst/libiodbcinst.la \ @GTK_LIBS@ else libdrvproxy_la_LIBADD = \ $(LIBADD_DL) \ ../iodbcadm/libiodbcadm.la \ ../iodbcinst/libiodbc_common.la \ ../iodbcinst/libiodbcinst.la endif libdrvproxy_la_SOURCES = \ ConfigDSN.c \ ConfigDriver.c \ Info.c \ drvconn.c noinst_HEADERS = gui.h EXTRA_DIST = \ $(srcdir)/*.c \ $(srcdir)/*.h \ $(srcdir)/drvproxy.exp \ $(srcdir)/gtk/*.c \ $(srcdir)/gtk/*.h \ $(srcdir)/mac/*.c \ $(srcdir)/mac/*.h \ $(srcdir)/mac/*.m \ $(srcdir)/mac/*.png \ $(srcdir)/mac/Base.lproj/*.xib libiodbc-3.52.16/drvproxy/Makefile.in0000664000175000017500000007300114424171020014320 00000000000000# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 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@ # # Makefile.am # # The iODBC driver manager. # # Copyright (C) 1996-2023 OpenLink Software # All Rights Reserved. # # This software is released under the terms of either of the following # licenses: # # - GNU Library General Public License (see LICENSE.LGPL) # - The BSD License (see LICENSE.BSD). # # Note that the only valid version of the LGPL license as far as this # project is concerned is the original GNU Library General Public License # Version 2, dated June 1991. # # While not mandated by the BSD license, any patches you make to the # iODBC source code may be contributed back into the iODBC project # at your discretion. Contributions will benefit the Open Source and # Data Access community as a whole. Submissions may be made at: # # http://www.iodbc.org # # # GNU Library Generic Public License Version 2 # ============================================ # 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; only # Version 2 of the License dated June 1991. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # The BSD License # =============== # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. Neither the name of OpenLink Software Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = drvproxy ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/admin/gtk-2.0.m4 \ $(top_srcdir)/admin/gtk.m4 $(top_srcdir)/admin/libtool.m4 \ $(top_srcdir)/admin/ltoptions.m4 \ $(top_srcdir)/admin/ltsugar.m4 \ $(top_srcdir)/admin/ltversion.m4 \ $(top_srcdir)/admin/lt~obsolete.m4 \ $(top_srcdir)/admin/openlink.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = @GTK_FALSE@libdrvproxy_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ @GTK_FALSE@ ../iodbcadm/libiodbcadm.la \ @GTK_FALSE@ ../iodbcinst/libiodbc_common.la \ @GTK_FALSE@ ../iodbcinst/libiodbcinst.la @GTK_TRUE@libdrvproxy_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ @GTK_TRUE@ ../iodbcadm/libiodbcadm.la \ @GTK_TRUE@ ../drvproxy/gtk/libdrvproxy-gtk.la \ @GTK_TRUE@ ../iodbcinst/libiodbc_common.la \ @GTK_TRUE@ ../iodbcinst/libiodbcinst.la am_libdrvproxy_la_OBJECTS = ConfigDSN.lo ConfigDriver.lo Info.lo \ drvconn.lo libdrvproxy_la_OBJECTS = $(am_libdrvproxy_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libdrvproxy_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libdrvproxy_la_LDFLAGS) $(LDFLAGS) -o \ $@ @GUI_TRUE@am_libdrvproxy_la_rpath = -rpath $(libdir) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/admin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdrvproxy_la_SOURCES) DIST_SOURCES = $(libdrvproxy_la_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = gtk am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/admin/depcomp \ $(top_srcdir)/admin/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_CONFIG = @GTK_CONFIG@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBADD_DL = @LIBADD_DL@ LIBADD_OS = @LIBADD_OS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ filedsnpath = @filedsnpath@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ inidir = @inidir@ install_sh = @install_sh@ lib_version = @lib_version@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ odbcmode = @odbcmode@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @GUI_TRUE@SUBDIRS = gtk @GUI_TRUE@lib_LTLIBRARIES = libdrvproxy.la @GTK_FALSE@AM_CPPFLAGS = \ @GTK_FALSE@ -I$(top_srcdir)/include \ @GTK_FALSE@ -I$(top_srcdir)/iodbc \ @GTK_FALSE@ -I$(top_srcdir)/iodbcinst\ @GTK_FALSE@ -I$(top_srcdir)/iodbcadm @GTK_TRUE@AM_CPPFLAGS = \ @GTK_TRUE@ -I$(top_srcdir)/include \ @GTK_TRUE@ -I$(top_srcdir)/iodbc \ @GTK_TRUE@ -I$(top_srcdir)/iodbcinst \ @GTK_TRUE@ -I$(top_srcdir)/iodbcadm \ @GTK_TRUE@ @GTK_CFLAGS@ -D__GTK__ libdrvproxy_la_LDFLAGS = -version-info @lib_version@ \ -export-symbols $(srcdir)/drvproxy.exp @GTK_FALSE@libdrvproxy_la_LIBADD = \ @GTK_FALSE@ $(LIBADD_DL) \ @GTK_FALSE@ ../iodbcadm/libiodbcadm.la \ @GTK_FALSE@ ../iodbcinst/libiodbc_common.la \ @GTK_FALSE@ ../iodbcinst/libiodbcinst.la @GTK_TRUE@libdrvproxy_la_LIBADD = \ @GTK_TRUE@ $(LIBADD_DL) \ @GTK_TRUE@ ../iodbcadm/libiodbcadm.la \ @GTK_TRUE@ ../drvproxy/gtk/libdrvproxy-gtk.la \ @GTK_TRUE@ ../iodbcinst/libiodbc_common.la \ @GTK_TRUE@ ../iodbcinst/libiodbcinst.la \ @GTK_TRUE@ @GTK_LIBS@ libdrvproxy_la_SOURCES = \ ConfigDSN.c \ ConfigDriver.c \ Info.c \ drvconn.c noinst_HEADERS = gui.h EXTRA_DIST = \ $(srcdir)/*.c \ $(srcdir)/*.h \ $(srcdir)/drvproxy.exp \ $(srcdir)/gtk/*.c \ $(srcdir)/gtk/*.h \ $(srcdir)/mac/*.c \ $(srcdir)/mac/*.h \ $(srcdir)/mac/*.m \ $(srcdir)/mac/*.png \ $(srcdir)/mac/Base.lproj/*.xib all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu drvproxy/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu drvproxy/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdrvproxy.la: $(libdrvproxy_la_OBJECTS) $(libdrvproxy_la_DEPENDENCIES) $(EXTRA_libdrvproxy_la_DEPENDENCIES) $(AM_V_CCLD)$(libdrvproxy_la_LINK) $(am_libdrvproxy_la_rpath) $(libdrvproxy_la_OBJECTS) $(libdrvproxy_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ConfigDSN.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ConfigDriver.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Info.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drvconn.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libLTLIBRARIES \ clean-libtool cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES .PRECIOUS: Makefile # 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: libiodbc-3.52.16/configure0000775000175000017500000171165214424171020012301 00000000000000#! /bin/sh # From configure.ac Id. # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for iODBC Driver Manager 3.52.16. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: iodbc@openlinksw.com about your system, including any $0: error possibly output before this message. Then install $0: a modern shell, or manually run the script under such a $0: shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error 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 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # 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 } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' 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='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # 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'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/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= # Identity of this package. PACKAGE_NAME='iODBC Driver Manager' PACKAGE_TARNAME='libiodbc' PACKAGE_VERSION='3.52.16' PACKAGE_STRING='iODBC Driver Manager 3.52.16' PACKAGE_BUGREPORT='iodbc@openlinksw.com' PACKAGE_URL='' ac_unique_file="include/isql.h" ac_default_prefix=/usr/local # 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='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS LIBADD_OS DARWIN_FALSE DARWIN_TRUE INSTALL_LIBODBC_FALSE INSTALL_LIBODBC_TRUE filedsnpath inidir lib_version odbcmode LIBADD_DL GTK_FALSE GTK_TRUE GUI_FALSE GUI_TRUE GTK_CONFIG GTK_LIBS GTK_CFLAGS PKG_CONFIG LT_SYS_LIBRARY_PATH OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR DLLTOOL OBJDUMP NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED LIBTOOL LN_S CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE host_os host_vendor host_cpu host build_os build_vendor build_cpu build AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir runstatedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_maintainer_mode with_layout enable_dependency_tracking enable_shared enable_static with_pic enable_fast_install with_aix_soname with_gnu_ld with_sysroot enable_libtool_lock enable_gui enable_gtktest with_gtk_prefix with_gtk_exec_prefix enable_odbc3 with_iodbc_inidir with_iodbc_filedsnpath enable_libodbc with_pthreads enable_pthreads ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP LT_SYS_LIBRARY_PATH' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' runstatedir='${localstatedir}/run' 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= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -runstatedir | --runstatedir | --runstatedi | --runstated \ | --runstate | --runstat | --runsta | --runst | --runs \ | --run | --ru | --r) ac_prev=runstatedir ;; -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ | --run=* | --ru=* | --r=*) runstatedir=$ac_optarg ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" 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 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" 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 iODBC Driver Manager 3.52.16 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] --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --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/libiodbc] --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 iODBC Driver Manager 3.52.16:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --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-gui build GUI applications (default) --disable-gui build GUI applications --disable-gtktest do not try to compile and run a test GTK+ program --disable-gtktest Do not try to compile and run a test GTK program --enable-odbc3 build ODBC 3.x compatible driver manager (default) --disable-odbc3 build ODBC 2.x compatible driver manager --enable-libodbc install extra libodbc.so library (default) --disable-libodbc do not install extra libodbc.so library --enable-pthreads build threaded libraries and applications (default) --disable-pthreads build non-threaded libraries and applications Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-layout=LAYOUT Choose installation layout --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-aix-soname=aix|svr4|both shared library versioning (aka "SONAME") variant to provide on AIX, [default=aix]. --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-gtk-prefix=PFX Prefix where GTK is installed (optional) --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional) --with-iodbc-inidir=DIR where the system odbc.ini file should be located (default is /etc) --with-iodbc-filedsnpath=DIR default location for FILEDSN data sources (default is $inidir/ODBCDataSources) 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 (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor LT_SYS_LIBRARY_PATH User-defined run-time library search path. 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" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF iODBC Driver Manager configure 3.52.16 generated by GNU Autoconf 2.69 Copyright (C) 2012 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 ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* 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 $2 (); /* 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_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ----------------------------------- ## ## Report this to iodbc@openlinksw.com ## ## ----------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel 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 iODBC Driver Manager $as_me 3.52.16, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append 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 as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset 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 $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; 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 $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_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 $as_echo "/* confdefs.h */" > 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 cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } 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. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_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,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in admin "$srcdir"/admin; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in admin \"$srcdir\"/admin" "$LINENO" 5 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. ac_config_headers="$ac_config_headers include/config.h" am__api_version='1.15' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_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 rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file 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 if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='libiodbc' VERSION='3.52.16' 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"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE ########################################################################## ## ## ## Version information ## ## ## ######################################################################### # # Version information for SQLGetInfo(SQL_DM_VER) call # BUILD_MAJOR="16" # last digit of version number BUILD_MINOR="230502" # year/month/day of release BUILD_VER="${BUILD_MAJOR}${BUILD_MINOR}" # # Library version numbers # lib3_version=3:31:1 # ODBC 3.x mode lib2_version=2:55:0 # ODBC 2.x mode (do not change) ########################################################################## ## ## ## Check whether config.cache belongs to this machine ## ## ## ########################################################################## { $as_echo "$as_me:${as_lineno-$LINENO}: checking cached information" >&5 $as_echo_n "checking cached information... " >&6; } hostcheck="$host" if ${ac_cv_hostcheck+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_hostcheck="$hostcheck" fi if test "$ac_cv_hostcheck" != "$hostcheck"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: changed" >&5 $as_echo "changed" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Running on a different architecture." >&5 $as_echo "$as_me: WARNING: Running on a different architecture." >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't use cached values." >&5 $as_echo "$as_me: WARNING: Can't use cached values." >&2;} as_fn_error $? "Please remove the invalid config.cache file, then try again." "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi ########################################################################## ## ## ## Save configuration for later reuse ## ## ## ########################################################################## rm -f config.nice cat >config.nice <<-CONFIG_NICE_EOF #!$SHELL # # Created by configure for $PACKAGE_STRING # CONFIG_NICE_EOF export_names="export" for var in SHELL CFLAGS CXXFLAGS CPPFLAGS LDFLAGS INCLUDES LIBS CC CXX do eval val=\$$var if test -n "$val"; then echo "$var='$val'" >> config.nice export_names="$export_names $var" fi done echo "$export_names" >> config.nice echo "" >> config.nice echo "# configure" >> config.nice eval "set -- $ac_configure_args" echo "$SHELL \"$0\" \\" >> config.nice for arg do echo "'$arg' \\" >> config.nice done echo '"$@"' >> config.nice chmod +x config.nice ########################################################################## ## ## ## Set Layout for iODBC ## ## ## ########################################################################## { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iODBC installation layout" >&5 $as_echo_n "checking for iODBC installation layout... " >&6; } # Check whether --with-layout was given. if test "${with_layout+set}" = set; then : withval=$with_layout; case "${withval}" in yes|no) IODBC_LAYOUT=unset ;; *) IODBC_LAYOUT=${withval} ;; esac else IODBC_LAYOUT=unset fi # # Defaults for Layout # install_libodbc=true case ${IODBC_LAYOUT} in unset) # No Layout set iodbc_layout="default" inidir=/etc ;; [Gg][Nn][Uu]) # GNU iodbc_layout="GNU" test "x$prefix" = xNONE && prefix=/usr/local inidir=${prefix}/etc/iodbc ;; [Dd][Ee][Bb][Ii][Aa][Nn]) # Debian iodbc_layout="Debian" test "x$prefix" = xNONE && prefix=/usr inidir=/etc install_libodbc=false ;; [Gg][Ee][Nn][Tt][Oo][Oo]) # Gentoo iodbc_layout="Gentoo" test "x$prefix" = xNONE && prefix=/usr includedir='${prefix}/include/iodbc' inidir=/etc/iodbc install_libodbc=false ;; [Rr][Ee][Dd][Hh][Aa][Tt]) # RedHat iodbc_layout=RedHat test "x$prefix" = xNONE && prefix=/usr inidir=/etc ;; [Ff][Rr][Ee][Ee][Bb][Ss][Dd]) # FreeBSD iodbc_layout=FreeBSD test "x$prefix" = xNONE && prefix=/usr inidir=/etc ;; [Oo][Pp][Tt]) # /opt iodbc_layout=opt test "x$prefix" = xNONE && prefix=/opt/iodbc inidir=/etc ;; [Oo][Pp][Ee][Nn][Ll][Ii][Nn][Kk]) # OpenLink iodbc_layout=openlink prefix=/usr/local/iODBC inidir=/etc ;; *) # UNKNOWN { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5 $as_echo "unknown" >&6; } echo "" echo "Supported layouts: Debian FreeBSD GNU OpenLink opt RedHat" echo "" as_fn_error $? "unable to continue" "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${iodbc_layout}" >&5 $as_echo "${iodbc_layout}" >&6; } ########################################################################## ## ## ## Check for C compiler ## ## ## ########################################################################## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* 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" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi case $ac_cv_prog_cc_stdc in #( no) : ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #( *) : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; } if ${ac_cv_prog_cc_c99+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include #include // Check varargs macros. These examples are taken from C99 6.10.3.5. #define debug(...) fprintf (stderr, __VA_ARGS__) #define showlist(...) puts (#__VA_ARGS__) #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) static void test_varargs_macros (void) { int x = 1234; int y = 5678; debug ("Flag"); debug ("X = %d\n", x); showlist (The first, second, and third items.); report (x>y, "x is %d but y is %d", x, y); } // Check long long types. #define BIG64 18446744073709551615ull #define BIG32 4294967295ul #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) #if !BIG_OK your preprocessor is broken; #endif #if BIG_OK #else your preprocessor is broken; #endif static long long int bignum = -9223372036854775807LL; static unsigned long long int ubignum = BIG64; struct incomplete_array { int datasize; double data[]; }; struct named_init { int number; const wchar_t *name; double average; }; typedef const char *ccp; static inline int test_restrict (ccp restrict text) { // See if C++-style comments work. // Iterate through items via the restricted pointer. // Also check for declarations in for loops. for (unsigned int i = 0; *(text+i) != '\0'; ++i) continue; return 0; } // Check varargs and va_copy. static void test_varargs (const char *format, ...) { va_list args; va_start (args, format); va_list args_copy; va_copy (args_copy, args); const char *str; int number; float fnumber; while (*format) { switch (*format++) { case 's': // string str = va_arg (args_copy, const char *); break; case 'd': // int number = va_arg (args_copy, int); break; case 'f': // float fnumber = va_arg (args_copy, double); break; default: break; } } va_end (args_copy); va_end (args); } int main () { // Check bool. _Bool success = false; // Check restrict. if (test_restrict ("String literal") == 0) success = true; char *restrict newvar = "Another string"; // Check varargs. test_varargs ("s, d' f .", "string", 65, 34.234); test_varargs_macros (); // Check flexible array members. struct incomplete_array *ia = malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); ia->datasize = 10; for (int i = 0; i < ia->datasize; ++i) ia->data[i] = i * 1.234; // Check named initializers. struct named_init ni = { .number = 34, .name = L"Test wide string", .average = 543.34343, }; ni.number = 58; int dynamic_array[ni.number]; dynamic_array[ni.number - 1] = 543; // work around unused variable warnings return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' || dynamic_array[ni.number - 1] != 543); ; return 0; } _ACEOF for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99 do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c99=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c99" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c99" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;; esac if test "x$ac_cv_prog_cc_c99" != xno; then : ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* 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" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 else ac_cv_prog_cc_stdc=no fi fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; } if ${ac_cv_prog_cc_stdc+:} false; then : $as_echo_n "(cached) " >&6 fi case $ac_cv_prog_cc_stdc in #( no) : { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; #( '') : { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; #( *) : { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5 $as_echo "$ac_cv_prog_cc_stdc" >&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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* 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 sort of thing. */ char tx; char *t = &tx; 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 sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; 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 if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi ########################################################################## ## ## ## Check for standard programs ## ## ## ########################################################################## { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.6' macro_revision='2.4.6' ltmain=$ac_aux_dir/ltmain.sh # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case $ECHO in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. 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; ;; bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n "$lt_cv_sys_max_cmd_len"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test yes != "$GCC"; then reload_cmds=false fi ;; darwin*) if test yes = "$GCC"; then reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) 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])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test ia64 = "$host_cpu"; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 $as_echo "$with_sysroot" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 $as_echo_n "checking for a working dd... " >&6; } if ${ac_cv_path_lt_DD+:} false; then : $as_echo_n "(cached) " >&6 else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} if test -z "$lt_DD"; then ac_path_lt_DD_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in dd; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_lt_DD" || continue if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi $ac_path_lt_DD_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_lt_DD"; then : fi else ac_cv_path_lt_DD=$lt_DD fi rm -f conftest.i conftest2.i conftest.out fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 $as_echo "$ac_cv_path_lt_DD" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 $as_echo_n "checking how to truncate binary pipes... " >&6; } if ${lt_cv_truncate_bin+:} false; then : $as_echo_n "(cached) " >&6 else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 $as_echo "$lt_cv_truncate_bin" >&6; } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test no = "$enable_libtool_lock" || 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 what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; 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 what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test yes = "$lt_cv_prog_gnu_ld"; 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* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then emul=elf case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[012][,.]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done # Set options enable_dlopen=no enable_win32_dll=no # 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 --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac else pic_mode=default 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 shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[5-9]*,yes) { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 $as_echo_n "checking which variant of shared library versioning to provide... " >&6; } # Check whether --with-aix-soname was given. if test "${with_aix_soname+set}" = set; then : withval=$with_aix_soname; case $withval in aix|svr4|both) ;; *) as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 ;; esac lt_cv_with_aix_soname=$with_aix_soname else if ${lt_cv_with_aix_soname+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_with_aix_soname=aix fi with_aix_soname=$lt_cv_with_aix_soname fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 $as_echo "$with_aix_soname" >&6; } if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o func_cc_basename $compiler cc_basename=$func_cc_basename_result # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/${ac_tool_prefix}file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC=$CC ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test yes = "$GCC"; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment # 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:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $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 "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; 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= if test yes = "$GCC"; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi lt_prog_compiler_pic='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; 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 ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment # 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:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $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 "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works"; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test yes = "$lt_cv_prog_compiler_static_works"; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $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 "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $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 "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test no = "$hard_links"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; 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 | $SED -e 's/(^)\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, 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 install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='$wl--export-all-symbols' 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/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' link_all_deplibs=yes ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # 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; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) export_dynamic_flag_spec='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) 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 $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $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 no = "$ld_shlibs"; 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 yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test ia64 = "$host_cpu"; 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 GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX 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") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | 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 # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. hardcode_direct=no hardcode_direct_absolute=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; 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 yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi export_dynamic_flag_spec='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; 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. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath_ 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' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # 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 $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper 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 `func_echo_all "$deplibs" | $SED '\''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' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test yes = "$lt_cv_ld_force_load"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test yes = "$GCC"; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='$wl-E' ;; hpux10*) if test yes,no = "$GCC,$with_gnu_ld"; then archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test yes = "$lt_cv_prog_compiler__b"; then archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test yes = "$GCC"; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test yes = "$lt_cv_irix_exported_symbol"; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi link_all_deplibs=no else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler ld_shlibs=yes archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; 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 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='$wl-rpath,$libdir' fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes ;; osf3*) if test yes = "$GCC"; 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" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$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='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-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; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-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 archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test yes = "$GCC"; then wlarc='$wl' archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; then whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='$wl-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='$wl-z,text' allow_undefined_flag='$wl-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='$wl-Bexport' runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='$wl-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test no = "$ld_shlibs" && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test yes,yes = "$GCC,$enable_shared"; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([A-Za-z]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; 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 # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # 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' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a(lib.so.V)' # 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' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; 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 dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. 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 # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor 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 ;; 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[23].*) 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$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" 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=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 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 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; 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' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor 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 ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # 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 dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. hardcode_libdir_flag_spec='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # 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 # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;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' ;; netbsdelf*-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='NetBSD ld.elf_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 # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi 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 shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor 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 yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test yes = "$hardcode_automatic"; then # We can hardcode non-existent directories. if test no != "$hardcode_direct" && # 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 no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && test no != "$hardcode_minus_L"; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test relink = "$hardcode_action" || test yes = "$inherit_rpath"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; 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 ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen=shl_load else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen=dlopen else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi fi fi fi fi fi ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 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; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 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; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report what library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test no = "$can_build_shared" && 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 yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC=$lt_save_CC ac_config_commands="$ac_config_commands libtool" # Only expand once: ########################################################################## ## ## ## Check for standard header files ## ## ## ########################################################################## { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_time=yes else ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi for ac_header in wchar.h do : ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default" if test "x$ac_cv_header_wchar_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_WCHAR_H 1 _ACEOF fi done ########################################################################## ## ## ## Check for specific library functions ## ## ## ########################################################################## for ac_func in strerror setenv asprintf snprintf gettimeofday localtime_r do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in wcslen wcscpy wcsncpy wcschr wcscat wcscmp towlower wcsncasecmp do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done ########################################################################## ## ## ## Check if we want to build the GUI applications and libraries ## ## ## ########################################################################## # Check whether --enable-gui was given. if test "${enable_gui+set}" = set; then : enableval=$enable_gui; case "${enableval}" in yes) USE_GUI=true ;; no) USE_GUI=false ;; *) as_fn_error $? "bad value ${enableval} for --enable-gui" "$LINENO" 5 ;; esac else USE_GUI=true fi ########################################################################## ## ## ## Check for GTK library functions ## ## ## ########################################################################## USE_GTK=false if test x$USE_GUI = xtrue then no_gtk="" # Check for GTK+ 2.x # Check whether --enable-gtktest was given. if test "${enable_gtktest+set}" = set; then : enableval=$enable_gtktest; else enable_gtktest=yes fi pkg_config_args=gtk+-2.0 for module in . do case "$module" in gthread) pkg_config_args="$pkg_config_args gthread-2.0" ;; esac done no_gtk="" # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test x$PKG_CONFIG != xno ; then if pkg-config --atleast-pkgconfig-version 0.7 ; then : else echo *** pkg-config too old; version 0.7 or better required. no_gtk=yes PKG_CONFIG=no fi else no_gtk=yes fi min_gtk_version=2.0.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK+ - version >= $min_gtk_version" >&5 $as_echo_n "checking for GTK+ - version >= $min_gtk_version... " >&6; } if test x$PKG_CONFIG != xno ; then ## don't try to run the test against uninstalled libtool libs if $PKG_CONFIG --uninstalled $pkg_config_args; then echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH" enable_gtktest=no fi if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then : else no_gtk=yes fi fi if test x"$no_gtk" = x ; then GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags` GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs` gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` if test "x$enable_gtktest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$GTK_LIBS $LIBS" rm -f conf.gtktest if test "$cross_compiling" = yes; then : echo $ac_n "cross compiling; assumed OK... $ac_c" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { int major, minor, micro; char *tmp_version; system ("touch conf.gtktest"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = g_strdup("$min_gtk_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_gtk_version"); exit(1); } if ((gtk_major_version != $gtk_config_major_version) || (gtk_minor_version != $gtk_config_minor_version) || (gtk_micro_version != $gtk_config_micro_version)) { printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, gtk_major_version, gtk_minor_version, gtk_micro_version); printf ("*** was found! If pkg-config was correct, then it is best\n"); printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); printf("*** to point to the correct configuration files\n"); } else if ((gtk_major_version != GTK_MAJOR_VERSION) || (gtk_minor_version != GTK_MINOR_VERSION) || (gtk_micro_version != GTK_MICRO_VERSION)) { printf("*** GTK+ header files (version %d.%d.%d) do not match\n", GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); printf("*** library (version %d.%d.%d)\n", gtk_major_version, gtk_minor_version, gtk_micro_version); } else { if ((gtk_major_version > major) || ((gtk_major_version == major) && (gtk_minor_version > minor)) || ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", gtk_major_version, gtk_minor_version, gtk_micro_version); printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", major, minor, micro); printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n"); printf("*** correct copy of pkg-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else no_gtk=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_gtk" = x ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version)" >&5 $as_echo "yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version)" >&6; } : else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if test "$PKG_CONFIG" = "no" ; then echo "*** A new enough version of pkg-config was not found." echo "*** See http://pkgconfig.sourceforge.net" else if test -f conf.gtktest ; then : else echo "*** Could not run GTK+ test program, checking why..." ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GTK+ or finding the wrong" echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" else echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means GTK+ is incorrectly installed." fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi GTK_CFLAGS="" GTK_LIBS="" : fi rm -f conf.gtktest if test x$no_gtk != x then # Try GTK 1.2.x instead no_gtk="" # Check whether --with-gtk-prefix was given. if test "${with_gtk_prefix+set}" = set; then : withval=$with_gtk_prefix; gtk_config_prefix="$withval" else gtk_config_prefix="" fi # Check whether --with-gtk-exec-prefix was given. if test "${with_gtk_exec_prefix+set}" = set; then : withval=$with_gtk_exec_prefix; gtk_config_exec_prefix="$withval" else gtk_config_exec_prefix="" fi # Check whether --enable-gtktest was given. if test "${enable_gtktest+set}" = set; then : enableval=$enable_gtktest; else enable_gtktest=yes fi for module in . do case "$module" in gthread) gtk_config_args="$gtk_config_args gthread" ;; esac done if test x$gtk_config_exec_prefix != x ; then gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix" if test x${GTK_CONFIG+set} != xset ; then GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config fi fi if test x$gtk_config_prefix != x ; then gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix" if test x${GTK_CONFIG+set} != xset ; then GTK_CONFIG=$gtk_config_prefix/bin/gtk-config fi fi # Extract the first word of "gtk-config", so it can be a program name with args. set dummy gtk-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GTK_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $GTK_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GTK_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no" ;; esac fi GTK_CONFIG=$ac_cv_path_GTK_CONFIG if test -n "$GTK_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CONFIG" >&5 $as_echo "$GTK_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi min_gtk_version=1.2.3 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5 $as_echo_n "checking for GTK - version >= $min_gtk_version... " >&6; } no_gtk="" if test "$GTK_CONFIG" = "no" ; then no_gtk=yes else GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags` GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs` gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` if test "x$enable_gtktest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$GTK_LIBS $LIBS" rm -f conf.gtktest if test "$cross_compiling" = yes; then : echo $ac_n "cross compiling; assumed OK... $ac_c" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { int major, minor, micro; char *tmp_version; system ("touch conf.gtktest"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = g_strdup("$min_gtk_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_gtk_version"); exit(1); } if ((gtk_major_version != $gtk_config_major_version) || (gtk_minor_version != $gtk_config_minor_version) || (gtk_micro_version != $gtk_config_micro_version)) { printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, gtk_major_version, gtk_minor_version, gtk_micro_version); printf ("*** was found! If gtk-config was correct, then it is best\n"); printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n"); printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n"); printf("*** before re-running configure\n"); } #if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION) else if ((gtk_major_version != GTK_MAJOR_VERSION) || (gtk_minor_version != GTK_MINOR_VERSION) || (gtk_micro_version != GTK_MICRO_VERSION)) { printf("*** GTK+ header files (version %d.%d.%d) do not match\n", GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); printf("*** library (version %d.%d.%d)\n", gtk_major_version, gtk_minor_version, gtk_micro_version); } #endif /* defined (GTK_MAJOR_VERSION) ... */ else { if ((gtk_major_version > major) || ((gtk_major_version == major) && (gtk_minor_version > minor)) || ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", gtk_major_version, gtk_minor_version, gtk_micro_version); printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", major, minor, micro); printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the gtk-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n"); printf("*** correct copy of gtk-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else no_gtk=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_gtk" = x ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if test "$GTK_CONFIG" = "no" ; then echo "*** The gtk-config script installed by GTK could not be found" echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the GTK_CONFIG environment variable to the" echo "*** full path to gtk-config." else if test -f conf.gtktest ; then : else echo "*** Could not run GTK test program, checking why..." CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GTK or finding the wrong" echo "*** version of GTK. If it is not finding GTK, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" echo "***" echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" echo "*** came with the system with the command" echo "***" echo "*** rpm --erase --nodeps gtk gtk-devel" else echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means GTK was incorrectly installed" echo "*** or that you have moved GTK since it was installed. In the latter case, you" echo "*** may want to edit the gtk-config script: $GTK_CONFIG" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi GTK_CFLAGS="" GTK_LIBS="" : fi rm -f conf.gtktest fi if test x$no_gtk = x then USE_GTK=true fi fi ########################################################################## ## ## ## Now make the final checks whether we can use GUI extensions ## ## ## ########################################################################## if test x$USE_GTK = xfalse then USE_GUI=false fi if test x$USE_GUI = xtrue then $as_echo "#define GUI 1" >>confdefs.h fi if test x$USE_GUI = xtrue; then GUI_TRUE= GUI_FALSE='#' else GUI_TRUE='#' GUI_FALSE= fi if test x$USE_GTK = xtrue; then GTK_TRUE= GTK_FALSE='#' else GTK_TRUE='#' GTK_FALSE= fi ########################################################################## ## ## ## Check for dynamic load module ## ## ## ########################################################################## for ac_header in dlfcn.h dl.h dld.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done save_LIBS="$LIBS" LIBADD_DL="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : $as_echo "#define HAVE_LIBDL 1" >>confdefs.h LIBADD_DL="-ldl" LIBS="$LIBS -ldl" fi for ac_func in dlopen _dlopen dlsym dladdr do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dlsym() requires a leading underscore in symbol names" >&5 $as_echo_n "checking whether dlsym() requires a leading underscore in symbol names... " >&6; } if test yes = "$cross_compiling"; then : else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 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; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && 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) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; x$lt_dlneed_uscore) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define NEED_USCORE 1" >>confdefs.h ;; x$lt_dlunknown|x*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac else : # compilation failed { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi rm -fr conftest* ########################################################################## ## Check if the dl library has the Dl_info structure ## ########################################################################## { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Dl_info" >&5 $as_echo_n "checking for Dl_info... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef _GNU_SOURCE #define _GNU_SOURCE 1 #endif #include int main () { Dl_info* info = 0; dladdr(0, info); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE_DL_INFO 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ########################################################################## ## Check for dynamic load module (hpux) ## ########################################################################## ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : $as_echo "#define HAVE_SHL_LOAD 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : $as_echo "#define HAVE_SHL_LOAD 1" >>confdefs.h LIBADD_DL="-ldld" fi fi ########################################################################## ## Check for dynamic load module (hpux) ## ########################################################################## { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : $as_echo "#define HAVE_DLD 1" >>confdefs.h test "x$ac_cv_lib_dld_shl_load" = yes || LIBADD_DL="-ldld" fi ########################################################################## ## Check for dynamic load module (macos) ## ########################################################################## ac_fn_c_check_func "$LINENO" "NSCreateObjectFileImageFromFile" "ac_cv_func_NSCreateObjectFileImageFromFile" if test "x$ac_cv_func_NSCreateObjectFileImageFromFile" = xyes; then : $as_echo "#define HAVE_DYLD 1" >>confdefs.h fi LIBS="$save_LIBS" ########################################################################## ## ## ## Set version information ## ## ## ########################################################################## { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iODBC mode" >&5 $as_echo_n "checking for iODBC mode... " >&6; } # Check whether --enable-odbc3 was given. if test "${enable_odbc3+set}" = set; then : enableval=$enable_odbc3; case "${enableval}" in yes) odbcmode=3 ;; no) odbcmode=2 as_fn_error $? "--disable-odbc3 temporarily disabled" "$LINENO" 5 ;; *) as_fn_error $? "bad value ${enableval} for --enable-odbc3" "$LINENO" 5 ;; esac else odbcmode=3 # set default to ODBC 3.x mode fi if test "x$odbcmode" = "x3" then lib_version=$lib3_version CFLAGS="$CFLAGS -DODBCVER=0x0350 -DIODBC_BUILD=$BUILD_VER" { $as_echo "$as_me:${as_lineno-$LINENO}: result: ODBC 3.x compatible mode" >&5 $as_echo "ODBC 3.x compatible mode" >&6; } else lib_version=$lib2_version CFLAGS="$CFLAGS -DODBCVER=0x0250 -DIODBC_BUILD=$BUILD_VER" { $as_echo "$as_me:${as_lineno-$LINENO}: result: ODBC 2.x compatible mode" >&5 $as_echo "ODBC 2.x compatible mode" >&6; } fi ########################################################################## ## ## ## Where to find the system odbc.ini file ** ## ## ########################################################################## # # First determine the systemwide default directory according # to GNU specifications # { $as_echo "$as_me:${as_lineno-$LINENO}: checking system config directory" >&5 $as_echo_n "checking system config directory... " >&6; } sysinidir=`eval echo $sysconfdir` case "$sysinidir" in NONE*) sysinidir=$ac_default_prefix/etc ;; /usr/etc) sysinidir=/etc ;; *) sysinidir=`eval echo $sysconfdir` ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sysinidir" >&5 $as_echo "$sysinidir" >&6; } # # Now allow to overrule this directory with a custom setting # { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iODBC ini directory" >&5 $as_echo_n "checking for iODBC ini directory... " >&6; } # Check whether --with-iodbc-inidir was given. if test "${with_iodbc_inidir+set}" = set; then : withval=$with_iodbc_inidir; case "$withval" in yes|no) inidir=$sysinidir ;; *) inidir=$withval ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $inidir" >&5 $as_echo "$inidir" >&6; } cat >>confdefs.h <<_ACEOF #define SYS_ODBC_INI "$inidir/odbc.ini" _ACEOF cat >>confdefs.h <<_ACEOF #define SYS_ODBCINST_INI "$inidir/odbcinst.ini" _ACEOF # # Now allow to override default FileDSN directory with a custom setting # filedsnpath=$inidir/ODBCDataSources { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILEDSN default directory" >&5 $as_echo_n "checking for FILEDSN default directory... " >&6; } # Check whether --with-iodbc-filedsnpath was given. if test "${with_iodbc_filedsnpath+set}" = set; then : withval=$with_iodbc_filedsnpath; case "$withval" in yes|no) filedsnpath=$inidir/ODBCDataSources ;; *) filedsnpath=$withval ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $filedsnpath" >&5 $as_echo "$filedsnpath" >&6; } cat >>confdefs.h <<_ACEOF #define DEFAULT_FILEDSNPATH "$filedsnpath" _ACEOF ########################################################################## ## ## ## Create libodbc.so if requested ## ## ## ########################################################################## { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libodbc.so link" >&5 $as_echo_n "checking for libodbc.so link... " >&6; } # Check whether --enable-libodbc was given. if test "${enable_libodbc+set}" = set; then : enableval=$enable_libodbc; case "${enableval}" in yes) install_libodbc=true ;; no) install_libodbc=false ;; *) as_fn_error $? "bad value ${enableval} for --enable-libodbc" "$LINENO" 5 ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $install_libodbc" >&5 $as_echo "$install_libodbc" >&6; } if test x$install_libodbc = xtrue; then INSTALL_LIBODBC_TRUE= INSTALL_LIBODBC_FALSE='#' else INSTALL_LIBODBC_TRUE='#' INSTALL_LIBODBC_FALSE= fi ########################################################################## ## ## ## Checkout pthread situation ## ## ## ########################################################################## # for backward compatibility # Check whether --with-pthreads was given. if test "${with_pthreads+set}" = set; then : withval=$with_pthreads; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-pthreads flag is deprecated, use --enable-pthreads" >&5 $as_echo "$as_me: WARNING: --with-pthreads flag is deprecated, use --enable-pthreads" >&2;} fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread model" >&5 $as_echo_n "checking for thread model... " >&6; } # Check whether --enable-pthreads was given. if test "${enable_pthreads+set}" = set; then : enableval=$enable_pthreads; case "${enableval}" in yes) USE_PTHREADS=true ;; no) USE_PTHREADS=false ;; *) as_fn_error $? "bad value ${enableval} for --enable-pthreads" "$LINENO" 5 ;; esac else USE_PTHREADS=true fi if test x$USE_PTHREADS = xtrue then { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled pthread support" >&5 $as_echo "enabled pthread support" >&6; } CPPFLAGS="$CPPFLAGS -DWITH_PTHREADS -D_REENTRANT" found_lib=false { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OS dependent thread flags" >&5 $as_echo_n "checking for OS dependent thread flags... " >&6; } case $host in *-aix*) # Unless overruled by the user, we prefer this compiler if test "x$CC" = "xcc" then CC=cc_r7 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $CC for AIX" >&5 $as_echo "using $CC for AIX" >&6; } ;; *UnixWare*) CFLAGS="$CFLAGS -Kthread" { $as_echo "$as_me:${as_lineno-$LINENO}: result: use -Kthread for UnixWare" >&5 $as_echo "use -Kthread for UnixWare" >&6; } ;; i345686-dg-dgux*) CFLAGS="$CFLAGS -D_POSIX4A_DRAFT6_SOURCE" LIBS="$LIBS -lthread" { $as_echo "$as_me:${as_lineno-$LINENO}: result: use -lthread for DG/UX" >&5 $as_echo "use -lthread for DG/UX" >&6; } ;; *-freebsd*) CFLAGS="$CFLAGS -pthread" { $as_echo "$as_me:${as_lineno-$LINENO}: result: use -pthread for FreeBSD" >&5 $as_echo "use -pthread for FreeBSD" >&6; } ;; *-hpux*) LIBS="$LIBS -lpthread -lcl" { $as_echo "$as_me:${as_lineno-$LINENO}: result: use -lpthread for HP/UX" >&5 $as_echo "use -lpthread for HP/UX" >&6; } ;; *-osf3.*) CPPFLAGS="$CPPFLAGS -DOLD_PTHREADS" LIBS="$LIBS -lpthreads -lmach -lc_r" { $as_echo "$as_me:${as_lineno-$LINENO}: result: use -lpthreads for OSF 3.2" >&5 $as_echo "use -lpthreads for OSF 3.2" >&6; } ;; *-osf4.*) LIBS="$LIBS -lpthread" { $as_echo "$as_me:${as_lineno-$LINENO}: result: use -lpthread for OSF 4.x" >&5 $as_echo "use -lpthread for OSF 4.x" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } ;; esac # # Check headers # ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" if test "x$ac_cv_header_pthread_h" = xyes; then : else as_fn_error $? "pthreads header not found" "$LINENO" 5 fi # # If mutex functions are in C library, we should not need to link # with -lpthread # ac_fn_c_check_func "$LINENO" "pthread_mutex_lock" "ac_cv_func_pthread_mutex_lock" if test "x$ac_cv_func_pthread_mutex_lock" = xyes; then : found_lib=true fi # # Check out the various libraries # if test x$found_lib = xfalse then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_lock in -lpthreads " >&5 $as_echo_n "checking for pthread_mutex_lock in -lpthreads ... " >&6; } ac_save_LIBS="$LIBS" LIBS="-lpthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __cplusplus extern "C" #endif #if defined (HAVE_PTHREAD_H) #include #endif int main () { pthread_mutex_lock(0) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "ac_cv_lib_$ac_lib_var=yes" else eval "ac_cv_lib_$ac_lib_var=no" fi rm -f core 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } LIBS="$LIBS -lpthreads" found_lib=true else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test x$found_lib = xfalse then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_lock in -lpthread " >&5 $as_echo_n "checking for pthread_mutex_lock in -lpthread ... " >&6; } ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __cplusplus extern "C" #endif #if defined (HAVE_PTHREAD_H) #include #endif int main () { pthread_mutex_lock(0) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "ac_cv_lib_$ac_lib_var=yes" else eval "ac_cv_lib_$ac_lib_var=no" fi rm -f core 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } LIBS="$LIBS -lpthread" found_lib=true else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no thread support" >&5 $as_echo "no thread support" >&6; } fi ########################################################################## ## ## ## OS dependent libraries ## ## ## ########################################################################## LIBADD_OS="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OS dependent libraries and link flags" >&5 $as_echo_n "checking for OS dependent libraries and link flags... " >&6; } if false; then DARWIN_TRUE= DARWIN_FALSE='#' else DARWIN_TRUE='#' DARWIN_FALSE= fi case $host in *-hpux*) LDFLAGS="$LDFLAGS -Wl,+s" { $as_echo "$as_me:${as_lineno-$LINENO}: result: use -Wl,+s for HP/UX" >&5 $as_echo "use -Wl,+s for HP/UX" >&6; } ;; *-darwin*) if true; then DARWIN_TRUE= DARWIN_FALSE='#' else DARWIN_TRUE='#' DARWIN_FALSE= fi CFLAGS="$CFLAGS -DNO_FRAMEWORKS" LIBADD_OS="-Wl,-framework,Carbon" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBADD_OS" >&5 $as_echo "$LIBADD_OS" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } ;; esac ########################################################################## ## ## ## Generate Makefiles etc. ## ## ## ########################################################################## ac_config_files="$ac_config_files Makefile admin/Makefile admin/libiodbc.spec admin/libiodbc.pc bin/Makefile bin/iodbc-config etc/Makefile man/Makefile man/iodbc-config.1 man/iodbctest.1 man/iodbctestw.1 man/iodbcadm-gtk.1 include/Makefile iodbc/Makefile iodbc/trace/Makefile iodbcinst/Makefile iodbcadm/Makefile iodbcadm/gtk/Makefile drvproxy/Makefile drvproxy/gtk/Makefile samples/Makefile" ac_config_commands="$ac_config_commands default" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; 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 if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GUI_TRUE}" && test -z "${GUI_FALSE}"; then as_fn_error $? "conditional \"GUI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GTK_TRUE}" && test -z "${GTK_FALSE}"; then as_fn_error $? "conditional \"GTK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${INSTALL_LIBODBC_TRUE}" && test -z "${INSTALL_LIBODBC_FALSE}"; then as_fn_error $? "conditional \"INSTALL_LIBODBC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DARWIN_TRUE}" && test -z "${DARWIN_FALSE}"; then as_fn_error $? "conditional \"DARWIN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DARWIN_TRUE}" && test -z "${DARWIN_FALSE}"; then as_fn_error $? "conditional \"DARWIN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith 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 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # 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 ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # 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 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=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 iODBC Driver Manager $as_me 3.52.16, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ iODBC Driver Manager config.status 3.52.16 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_import \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ lt_cv_nm_interface \ nm_file_list_spec \ lt_cv_truncate_bin \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ configure_time_dlsearch_path \ configure_time_lt_sys_library_path; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "include/config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "admin/Makefile") CONFIG_FILES="$CONFIG_FILES admin/Makefile" ;; "admin/libiodbc.spec") CONFIG_FILES="$CONFIG_FILES admin/libiodbc.spec" ;; "admin/libiodbc.pc") CONFIG_FILES="$CONFIG_FILES admin/libiodbc.pc" ;; "bin/Makefile") CONFIG_FILES="$CONFIG_FILES bin/Makefile" ;; "bin/iodbc-config") CONFIG_FILES="$CONFIG_FILES bin/iodbc-config" ;; "etc/Makefile") CONFIG_FILES="$CONFIG_FILES etc/Makefile" ;; "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; "man/iodbc-config.1") CONFIG_FILES="$CONFIG_FILES man/iodbc-config.1" ;; "man/iodbctest.1") CONFIG_FILES="$CONFIG_FILES man/iodbctest.1" ;; "man/iodbctestw.1") CONFIG_FILES="$CONFIG_FILES man/iodbctestw.1" ;; "man/iodbcadm-gtk.1") CONFIG_FILES="$CONFIG_FILES man/iodbcadm-gtk.1" ;; "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; "iodbc/Makefile") CONFIG_FILES="$CONFIG_FILES iodbc/Makefile" ;; "iodbc/trace/Makefile") CONFIG_FILES="$CONFIG_FILES iodbc/trace/Makefile" ;; "iodbcinst/Makefile") CONFIG_FILES="$CONFIG_FILES iodbcinst/Makefile" ;; "iodbcadm/Makefile") CONFIG_FILES="$CONFIG_FILES iodbcadm/Makefile" ;; "iodbcadm/gtk/Makefile") CONFIG_FILES="$CONFIG_FILES iodbcadm/gtk/Makefile" ;; "drvproxy/Makefile") CONFIG_FILES="$CONFIG_FILES drvproxy/Makefile" ;; "drvproxy/gtk/Makefile") CONFIG_FILES="$CONFIG_FILES drvproxy/gtk/Makefile" ;; "samples/Makefile") CONFIG_FILES="$CONFIG_FILES samples/Makefile" ;; "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; 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= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries 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[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[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="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # 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'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 # Copyright (C) 2014 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program or library that is built # using GNU Libtool, you may include this file under the same # distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # The names of the tagged configurations supported by this script. available_tags='' # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shared archive member basename,for filename based shared library versioning on AIX. shared_archive_member_spec=$shared_archive_member_spec # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # 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 # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # DLL creation program. DLLTOOL=$lt_DLLTOOL # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm into a list of symbols to manually relocate. global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # The name lister interface. nm_interface=$lt_lt_cv_nm_interface # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and where our libraries should be installed. lt_sysroot=$lt_sysroot # Command to truncate a binary pipe. lt_truncate_bin=$lt_lt_cv_truncate_bin # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Detected run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path # Explicit LT_SYS_LIBRARY_PATH set during ./configure time. configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain=$ac_aux_dir/ltmain.sh # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ;; "default":C) chmod 755 bin/iodbc-config ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # 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 || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi ########################################################################## ## ## ## Display configuration information ## ## ## ########################################################################## # ---------------------------------------------------------------------- # Color settings # ---------------------------------------------------------------------- B=`tput bold 2>/dev/null` N=`tput sgr0 2>/dev/null` cat <. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub # 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 or ALIAS Canonicalize a configuration name. Options: -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 1992-2018 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-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ kopensolaris*-gnu* | cloudabi*-eabi* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo "$1" | sed 's/-[^-]*$//'` if [ "$basic_machine" != "$1" ] then os=`echo "$1" | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'` ;; -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 \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | ba \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | e2k | epiphany \ | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia16 | ia64 \ | ip2k | iq2000 \ | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 | or1k | or1knd | or32 \ | pdp10 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pru \ | pyramid \ | riscv32 | riscv64 \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | visium \ | wasm32 \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; leon|leon[3-9]) basic_machine=sparc-$basic_machine ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | ba-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | e2k-* | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ | ip2k-* | iq2000-* \ | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pru-* \ | pyramid-* \ | riscv32-* | riscv64-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | visium-* \ | wasm32-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-pc os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; asmjs) basic_machine=asmjs-unknown ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2*) basic_machine=m68k-bull os=-sysv3 ;; e500v[12]) basic_machine=powerpc-unknown os=$os"spe" ;; e500v[12]-*) basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=$os"spe" ;; 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 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; 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 ;; 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 ;; leon-*|leon[3-9]-*) basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=-linux ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze*) basic_machine=microblaze-xilinx ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i686-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; moxiebox) basic_machine=moxie-unknown os=-moxiebox ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i686-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; 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 ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; nsv-tandem) basic_machine=nsv-tandem ;; nsx-tandem) basic_machine=nsx-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle) 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) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh5el) basic_machine=sh5le-unknown ;; 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 ;; strongarm-* | thumb-*) basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; 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 ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; x64) basic_machine=x86_64-pc ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; 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 ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases that might get confused # with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # es1800 is here to avoid being matched by es* (a different OS) -es1800*) os=-ose ;; # Now accept the basic system types. # The portable systems comes first. # Each alternative MUST end in a * to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* | -cloudabi* | -sortix* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \ | -midnightbsd*) # 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 | -xray | -os68k* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* \ | -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 ;; -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 ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -pikeos*) # Until real need of OS specific support for # particular features comes up, bare metal # configurations are quite functional. case $basic_machine in arm*) os=-eabi ;; *) os=-elf ;; esac ;; -nacl*) ;; -ios) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; c8051-*) os=-elf ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) 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 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; pru-*) os=-elf ;; *-be) os=-beos ;; *-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 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` ;; esac echo "$basic_machine$os" exit # Local variables: # eval: (add-hook 'write-file-functions 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: libiodbc-3.52.16/admin/ltoptions.m40000644000175000017500000003426214424171014013752 00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 8 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option '$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl 'shared' nor 'disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], [_LT_WITH_AIX_SONAME([aix])]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the 'shared' and # 'disable-shared' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the 'static' and # 'disable-static' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the 'fast-install' # and 'disable-fast-install' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS=$lt_save_ifs ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_AIX_SONAME([DEFAULT]) # ---------------------------------- # implement the --with-aix-soname flag, and support the `aix-soname=aix' # and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT # is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. m4_define([_LT_WITH_AIX_SONAME], [m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[[5-9]]*,yes) AC_MSG_CHECKING([which variant of shared library versioning to provide]) AC_ARG_WITH([aix-soname], [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], [case $withval in aix|svr4|both) ;; *) AC_MSG_ERROR([Unknown argument to --with-aix-soname]) ;; esac lt_cv_with_aix_soname=$with_aix_soname], [AC_CACHE_VAL([lt_cv_with_aix_soname], [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) with_aix_soname=$lt_cv_with_aix_soname]) AC_MSG_RESULT([$with_aix_soname]) if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac _LT_DECL([], [shared_archive_member_spec], [0], [Shared archive member basename, for filename based shared library versioning on AIX])dnl ])# _LT_WITH_AIX_SONAME LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the 'pic-only' and 'no-pic' # LT_INIT options. # MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac], [pic_mode=m4_default([$1], [default])]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) libiodbc-3.52.16/admin/libtool.m40000644000175000017500000112617114424171014013365 00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 2014 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program or library that is built # using GNU Libtool, you may include this file under the same # distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . ]) # serial 58 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_PREPARE_CC_BASENAME # ----------------------- m4_defun([_LT_PREPARE_CC_BASENAME], [ # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in @S|@*""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } ])# _LT_PREPARE_CC_BASENAME # _LT_CC_BASENAME(CC) # ------------------- # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, # but that macro is also expanded into generated libtool script, which # arranges for $SED and $ECHO to be set by different means. m4_defun([_LT_CC_BASENAME], [m4_require([_LT_PREPARE_CC_BASENAME])dnl AC_REQUIRE([_LT_DECL_SED])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl func_cc_basename $1 cc_basename=$func_cc_basename_result ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl m4_require([_LT_CMD_TRUNCATE])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl 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 set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from 'configure', and 'config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # 'config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain=$ac_aux_dir/ltmain.sh ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the 'libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to 'config.status' so that its # declaration there will have the same value as in 'configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags='_LT_TAGS'dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into 'config.status', and then the shell code to quote escape them in # for loops in 'config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # '#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test 0 = "$lt_write_fail" && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ '$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test 0 != $[#] do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try '$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try '$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test yes = "$silent" && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 _LT_COPYING _LT_LIBTOOL_TAGS # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE _LT_PREPARE_MUNGE_PATH_LIST _LT_PREPARE_CC_BASENAME # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS=$save_LDFLAGS ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[[012]][[,.]]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test yes = "$lt_cv_ld_force_load"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" m4_if([$1], [CXX], [ if test yes != "$lt_cv_apple_cc_single_mod"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # 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. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script that will find a shell with a builtin # printf (that we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case $ECHO in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], [Search for dependent libraries within DIR (or the compiler's sysroot if not specified).])], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([$with_sysroot]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and where our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test no = "$enable_libtool_lock" || 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 what ABI is being produced by ac_compile, and set mode # options accordingly. 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 what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test yes = "$lt_cv_prog_gnu_ld"; 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* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then emul=elf case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment # 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:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $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 "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test yes = "[$]$2"; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS ]) if test yes = "[$]$2"; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. 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; ;; bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n "$lt_cv_sys_max_cmd_len"; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test yes = "$cross_compiling"; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 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; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen=shl_load], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen=dlopen], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) ]) ]) ]) ]) ]) ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $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:$LINENO: \$? = $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 "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links=nottested if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; 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 no = "$hard_links"; then AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", [Define to the sub-directory where libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then # We can hardcode non-existent directories. if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && # 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 no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_PREPARE_MUNGE_PATH_LIST # --------------------------- # Make sure func_munge_path_list() is defined correctly. m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], [[# func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x@S|@2 in x) ;; *:) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" ;; x:*) eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; *::*) eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" ;; *) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; esac } ]])# _LT_PREPARE_PATH_LIST # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown AC_ARG_VAR([LT_SYS_LIBRARY_PATH], [User-defined run-time library search path.]) case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[[4-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; 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 # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # 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' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a[(]lib.so.V[)]' # 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' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; 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 dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. 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 # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor 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 ;; 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[[23]].*) 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$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" 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=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 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 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; 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' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor 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 ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # 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 dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # 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 # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;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' ;; netbsdelf*-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='NetBSD ld.elf_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 # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi 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 shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor 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 yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor 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 no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], [Detected run-time system search path for libraries]) _LT_DECL([], [configure_time_lt_sys_library_path], [2], [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program that can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$1"; then lt_cv_path_MAGIC_CMD=$ac_dir/"$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac]) MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program that can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test no = "$withval" || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test yes = "$GCC"; 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 yes = "$with_gnu_ld"; 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 conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], [if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi]) rm -f conftest.i conftest2.i conftest.out]) ])# _LT_PATH_DD # _LT_CMD_TRUNCATE # ---------------- # find command to truncate a binary pipe m4_defun([_LT_CMD_TRUNCATE], [m4_require([_LT_PATH_DD]) AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], [printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], [Command to truncate a binary pipe]) ])# _LT_CMD_TRUNCATE # _LT_CHECK_MAGIC_METHOD # ---------------------- # how to check for library dependencies # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_MAGIC_METHOD], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) AC_CACHE_CHECK([how to recognize dependent libraries], lt_cv_deplibs_check_method, [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 # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[[4-9]]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[[45]]*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) 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])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi]) if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # _LT_DLL_DEF_P([FILE]) # --------------------- # True iff FILE is a Windows DLL '.def' file. # Keep in sync with func_dll_def_p in the libtool script AC_DEFUN([_LT_DLL_DEF_P], [dnl test DEF = "`$SED -n dnl -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl -e q dnl Only consider the first "real" line $1`" dnl ])# _LT_DLL_DEF_P # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM=-lm) ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test yes = "$GCC"; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test ia64 = "$host_cpu"; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; 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 # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], [Transform the output of nm into a list of symbols to manually relocate]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([nm_interface], [lt_cv_nm_interface], [1], [The name lister interface]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' if test ia64 != "$host_cpu"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64, which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test yes = "$GCC"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, 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 install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test ia64 = "$host_cpu"; 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 GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | 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 # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; 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 yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; hpux10*) if test yes,no = "$GCC,$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS=$save_LDFLAGS]) if test yes = "$lt_cv_irix_exported_symbol"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi _LT_TAGVAR(link_all_deplibs, $1)=no else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(ld_shlibs, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; osf3*) if test yes = "$GCC"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test yes = "$GCC"; then wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test yes,yes = "$GCC,$enable_shared"; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting $shlibpath_var if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to 'libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC=$CC AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report what library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && 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 yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac 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 yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC=$lt_save_CC ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to 'libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test no != "$CXX" && ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || (test g++ != "$CXX"))); then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_caught_CXX_error"; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test yes = "$GXX"; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test yes = "$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='$wl' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test ia64 = "$host_cpu"; 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 # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GXX"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag=$shared_flag' $wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; 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 yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. # The "-G" linker flag allows undefined symbols. _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ func_to_tool_file "$lt_outputfile"~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-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_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$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; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$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; func_echo_all "$list"' ;; *) if test yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -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 -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -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 -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(GCC, $1)=$GXX _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test yes != "$_lt_caught_CXX_error" AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case @S|@2 in .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $prev$p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test x-L = "$p" || test x-R = "$p"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test no = "$pre_test_object_deps_done"; then case $prev in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)=$prev$p else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$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 no = "$pre_test_object_deps_done"; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)=$p else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)=$p else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test no = "$F77"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_disable_F77"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && 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 yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac 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 yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)=$G77 _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test yes != "$_lt_disable_F77" AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test no = "$FC"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_disable_FC"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && 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 yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac 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 yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test yes != "$_lt_disable_FC" AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code=$lt_simple_compile_test_code # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f "$lt_ac_sed" && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test 10 -lt "$lt_ac_count" && break lt_ac_count=`expr $lt_ac_count + 1` if test "$lt_ac_count" -gt "$lt_ac_max"; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine what file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS libiodbc-3.52.16/admin/ltmain.sh0000644000175000017500000117147414424171014013305 00000000000000#! /bin/sh ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in ## by inline-source v2014-01-03.01 # libtool (GNU libtool) 2.4.6 # Provide generalized library-building support services. # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996-2015 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . PROGRAM=libtool PACKAGE=libtool VERSION="2.4.6 Debian-2.4.6-2" package_revision=2.4.6 ## ------ ## ## Usage. ## ## ------ ## # Run './libtool --help' for help with using this script from the # command line. ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # After configure completes, it has a better idea of some of the # shell tools we need than the defaults used by the functions shared # with bootstrap, so set those here where they can still be over- # ridden by the user, but otherwise take precedence. : ${AUTOCONF="autoconf"} : ${AUTOMAKE="automake"} ## -------------------------- ## ## Source external libraries. ## ## -------------------------- ## # Much of our low-level functionality needs to be sourced from external # libraries, which are installed to $pkgauxdir. # Set a version string for this script. scriptversion=2015-01-20.17; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 # Copyright (C) 2004-2015 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. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # As a special exception to the GNU General Public License, if you distribute # this file as part of a program or library that is built using GNU Libtool, # you may include this file under the same distribution terms that you use # for the rest of that program. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # Please report bugs or propose patches to gary@gnu.org. ## ------ ## ## Usage. ## ## ------ ## # Evaluate this file near the top of your script to gain access to # the functions and variables defined here: # # . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh # # If you need to override any of the default environment variable # settings, do that before evaluating this file. ## -------------------- ## ## Shell normalisation. ## ## -------------------- ## # Some shells need a little help to be as Bourne compatible as possible. # Before doing anything else, make sure all that help has been provided! DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # NLS nuisances: We save the old values in case they are required later. _G_user_locale= _G_safe_locale= for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test set = \"\${$_G_var+set}\"; then save_$_G_var=\$$_G_var $_G_var=C export $_G_var _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Make sure IFS has a sensible default sp=' ' nl=' ' IFS="$sp $nl" # There are apparently some retarded systems that use ';' as a PATH separator! if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi ## ------------------------- ## ## Locate command utilities. ## ## ------------------------- ## # func_executable_p FILE # ---------------------- # Check that FILE is an executable regular file. func_executable_p () { test -f "$1" && test -x "$1" } # func_path_progs PROGS_LIST CHECK_FUNC [PATH] # -------------------------------------------- # Search for either a program that responds to --version with output # containing "GNU", or else returned by CHECK_FUNC otherwise, by # trying all the directories in PATH with each of the elements of # PROGS_LIST. # # CHECK_FUNC should accept the path to a candidate program, and # set $func_check_prog_result if it truncates its output less than # $_G_path_prog_max characters. func_path_progs () { _G_progs_list=$1 _G_check_func=$2 _G_PATH=${3-"$PATH"} _G_path_prog_max=0 _G_path_prog_found=false _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} for _G_dir in $_G_PATH; do IFS=$_G_save_IFS test -z "$_G_dir" && _G_dir=. for _G_prog_name in $_G_progs_list; do for _exeext in '' .EXE; do _G_path_prog=$_G_dir/$_G_prog_name$_exeext func_executable_p "$_G_path_prog" || continue case `"$_G_path_prog" --version 2>&1` in *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; *) $_G_check_func $_G_path_prog func_path_progs_result=$func_check_prog_result ;; esac $_G_path_prog_found && break 3 done done done IFS=$_G_save_IFS test -z "$func_path_progs_result" && { echo "no acceptable sed could be found in \$PATH" >&2 exit 1 } } # We want to be able to use the functions in this file before configure # has figured out where the best binaries are kept, which means we have # to search for them ourselves - except when the results are already set # where we skip the searches. # Unless the user overrides by setting SED, search the path for either GNU # sed, or the sed that truncates its output the least. test -z "$SED" && { _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for _G_i in 1 2 3 4 5 6 7; do _G_sed_script=$_G_sed_script$nl$_G_sed_script done echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed _G_sed_script= func_check_prog_sed () { _G_path_prog=$1 _G_count=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo '' >> conftest.nl "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin rm -f conftest.sed SED=$func_path_progs_result } # Unless the user overrides by setting GREP, search the path for either GNU # grep, or the grep that truncates its output the least. test -z "$GREP" && { func_check_prog_grep () { _G_path_prog=$1 _G_count=0 _G_path_prog_max=0 printf 0123456789 >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 "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin GREP=$func_path_progs_result } ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # All uppercase variable names are used for environment variables. These # variables can be overridden by the user before calling a script that # uses them if a suitable command of that name is not already available # in the command search PATH. : ${CP="cp -f"} : ${ECHO="printf %s\n"} : ${EGREP="$GREP -E"} : ${FGREP="$GREP -F"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} ## -------------------- ## ## Useful sed snippets. ## ## -------------------- ## sed_dirname='s|/[^/]*$||' sed_basename='s|^.*/||' # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s|\([`"$\\]\)|\\\1|g' # Same as above, but do not quote variable references. sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' # Sed substitution that converts a w32 file name or path # that contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-'\' parameter expansions in output of sed_double_quote_subst that # were '\'-ed in input to the same. If an odd number of '\' preceded a # '$' in input to sed_double_quote_subst, that '$' was protected from # expansion. Since each input '\' is now two '\'s, look for any number # of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. _G_bs='\\' _G_bs2='\\\\' _G_bs4='\\\\\\\\' _G_dollar='\$' sed_double_backslash="\ s/$_G_bs4/&\\ /g s/^$_G_bs2$_G_dollar/$_G_bs&/ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g s/\n//g" ## ----------------- ## ## Global variables. ## ## ----------------- ## # Except for the global variables explicitly listed below, the following # functions in the '^func_' namespace, and the '^require_' namespace # variables initialised in the 'Resource management' section, sourcing # this file will not pollute your global namespace with anything # else. There's no portable way to scope variables in Bourne shell # though, so actually running these functions will sometimes place # results into a variable named after the function, and often use # temporary variables in the '^_G_' namespace. If you are careful to # avoid using those namespaces casually in your sourcing script, things # should continue to work as you expect. And, of course, you can freely # overwrite any of the functions or variables defined here before # calling anything to customize them. EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. # Allow overriding, eg assuming that you follow the convention of # putting '$debug_cmd' at the start of all your functions, you can get # bash to show function call trace with: # # debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name debug_cmd=${debug_cmd-":"} exit_cmd=: # By convention, finish your script with: # # exit $exit_status # # so that you can set exit_status to non-zero if you want to indicate # something went wrong during execution without actually bailing out at # the point of failure. exit_status=$EXIT_SUCCESS # 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 "$sed_basename"` # Make sure we have an absolute progpath for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` progdir=`cd "$progdir" && pwd` progpath=$progdir/$progname ;; *) _G_IFS=$IFS IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS=$_G_IFS test -x "$progdir/$progname" && break done IFS=$_G_IFS test -n "$progdir" || progdir=`pwd` progpath=$progdir/$progname ;; esac ## ----------------- ## ## Standard options. ## ## ----------------- ## # The following options affect the operation of the functions defined # below, and should be set appropriately depending on run-time para- # meters passed on the command line. opt_dry_run=false opt_quiet=false opt_verbose=false # Categories 'all' and 'none' are always available. Append any others # you will pass as the first argument to func_warning from your own # code. warning_categories= # By default, display warnings according to 'opt_warning_types'. Set # 'warning_func' to ':' to elide all warnings, or func_fatal_error to # treat the next displayed warning as a fatal error. warning_func=func_warn_and_continue # Set to 'all' to display all warnings, 'none' to suppress all # warnings, or a space delimited list of some subset of # 'warning_categories' to display only the listed warnings. opt_warning_types=all ## -------------------- ## ## Resource management. ## ## -------------------- ## # This section contains definitions for functions that each ensure a # particular resource (a file, or a non-empty configuration variable for # example) is available, and if appropriate to extract default values # from pertinent package files. Call them using their associated # 'require_*' variable to ensure that they are executed, at most, once. # # It's entirely deliberate that calling these functions can set # variables that don't obey the namespace limitations obeyed by the rest # of this file, in order that that they be as useful as possible to # callers. # require_term_colors # ------------------- # Allow display of bold text on terminals that support it. require_term_colors=func_require_term_colors func_require_term_colors () { $debug_cmd test -t 1 && { # COLORTERM and USE_ANSI_COLORS environment variables take # precedence, because most terminfo databases neglect to describe # whether color sequences are supported. test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} if test 1 = "$USE_ANSI_COLORS"; then # Standard ANSI escape sequences tc_reset='' tc_bold=''; tc_standout='' tc_red=''; tc_green='' tc_blue=''; tc_cyan='' else # Otherwise trust the terminfo database after all. test -n "`tput sgr0 2>/dev/null`" && { tc_reset=`tput sgr0` test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` tc_standout=$tc_bold test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` } fi } require_term_colors=: } ## ----------------- ## ## Function library. ## ## ----------------- ## # This section contains a variety of useful functions to call in your # scripts. Take note of the portable wrappers for features provided by # some modern shells, which will fall back to slower equivalents on # less featureful shells. # func_append VAR VALUE # --------------------- # Append VALUE onto the existing contents of VAR. # We should try to minimise forks, especially on Windows where they are # unreasonably slow, so skip the feature probes when bash or zsh are # being used: if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then : ${_G_HAVE_ARITH_OP="yes"} : ${_G_HAVE_XSI_OPS="yes"} # The += operator was introduced in bash 3.1 case $BASH_VERSION in [12].* | 3.0 | 3.0*) ;; *) : ${_G_HAVE_PLUSEQ_OP="yes"} ;; esac fi # _G_HAVE_PLUSEQ_OP # Can be empty, in which case the shell is probed, "yes" if += is # useable or anything else if it does not work. test -z "$_G_HAVE_PLUSEQ_OP" \ && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ && _G_HAVE_PLUSEQ_OP=yes if test yes = "$_G_HAVE_PLUSEQ_OP" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_append () { $debug_cmd eval "$1+=\$2" }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_append () { $debug_cmd eval "$1=\$$1\$2" } fi # func_append_quoted VAR VALUE # ---------------------------- # Quote VALUE and append to the end of shell variable VAR, separated # by a space. if test yes = "$_G_HAVE_PLUSEQ_OP"; then eval 'func_append_quoted () { $debug_cmd func_quote_for_eval "$2" eval "$1+=\\ \$func_quote_for_eval_result" }' else func_append_quoted () { $debug_cmd func_quote_for_eval "$2" eval "$1=\$$1\\ \$func_quote_for_eval_result" } fi # func_append_uniq VAR VALUE # -------------------------- # Append unique VALUE onto the existing contents of VAR, assuming # entries are delimited by the first character of VALUE. For example: # # func_append_uniq options " --another-option option-argument" # # will only append to $options if " --another-option option-argument " # is not already present somewhere in $options already (note spaces at # each end implied by leading space in second argument). func_append_uniq () { $debug_cmd eval _G_current_value='`$ECHO $'$1'`' _G_delim=`expr "$2" : '\(.\)'` case $_G_delim$_G_current_value$_G_delim in *"$2$_G_delim"*) ;; *) func_append "$@" ;; esac } # func_arith TERM... # ------------------ # Set func_arith_result to the result of evaluating TERMs. test -z "$_G_HAVE_ARITH_OP" \ && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ && _G_HAVE_ARITH_OP=yes if test yes = "$_G_HAVE_ARITH_OP"; then eval 'func_arith () { $debug_cmd func_arith_result=$(( $* )) }' else func_arith () { $debug_cmd func_arith_result=`expr "$@"` } fi # func_basename FILE # ------------------ # Set func_basename_result to FILE with everything up to and including # the last / stripped. if test yes = "$_G_HAVE_XSI_OPS"; then # If this shell supports suffix pattern removal, then use it to avoid # forking. Hide the definitions single quotes in case the shell chokes # on unsupported syntax... _b='func_basename_result=${1##*/}' _d='case $1 in */*) func_dirname_result=${1%/*}$2 ;; * ) func_dirname_result=$3 ;; esac' else # ...otherwise fall back to using sed. _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` if test "X$func_dirname_result" = "X$1"; then func_dirname_result=$3 else func_append func_dirname_result "$2" fi' fi eval 'func_basename () { $debug_cmd '"$_b"' }' # func_dirname FILE APPEND NONDIR_REPLACEMENT # ------------------------------------------- # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. eval 'func_dirname () { $debug_cmd '"$_d"' }' # func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT # -------------------------------------------------------- # Perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # For efficiency, we do not delegate to the functions above but instead # duplicate the functionality here. eval 'func_dirname_and_basename () { $debug_cmd '"$_b"' '"$_d"' }' # func_echo ARG... # ---------------- # Echo program name prefixed message. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname: $_G_line" done IFS=$func_echo_IFS } # func_echo_all ARG... # -------------------- # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_echo_infix_1 INFIX ARG... # ------------------------------ # Echo program name, followed by INFIX on the first line, with any # additional lines not showing INFIX. func_echo_infix_1 () { $debug_cmd $require_term_colors _G_infix=$1; shift _G_indent=$_G_infix _G_prefix="$progname: $_G_infix: " _G_message=$* # Strip color escape sequences before counting printable length for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" do test -n "$_G_tc" && { _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` } done _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes func_echo_infix_1_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_infix_1_IFS $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 _G_prefix=$_G_indent done IFS=$func_echo_infix_1_IFS } # func_error ARG... # ----------------- # Echo program name prefixed message to standard error. func_error () { $debug_cmd $require_term_colors func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 } # func_fatal_error ARG... # ----------------------- # Echo program name prefixed message to standard error, and exit. func_fatal_error () { $debug_cmd func_error "$*" exit $EXIT_FAILURE } # func_grep EXPRESSION FILENAME # ----------------------------- # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $debug_cmd $GREP "$1" "$2" >/dev/null 2>&1 } # func_len STRING # --------------- # Set func_len_result to the length of STRING. STRING may not # start with a hyphen. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_len () { $debug_cmd func_len_result=${#1} }' else func_len () { $debug_cmd func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } fi # func_mkdir_p DIRECTORY-PATH # --------------------------- # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { $debug_cmd _G_directory_path=$1 _G_dir_list= if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then # Protect directory names starting with '-' case $_G_directory_path in -*) _G_directory_path=./$_G_directory_path ;; esac # While some portion of DIR does not yet exist... while test ! -d "$_G_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. _G_dir_list=$_G_directory_path:$_G_dir_list # If the last portion added has no slash in it, the list is done case $_G_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` done _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` func_mkdir_p_IFS=$IFS; IFS=: for _G_dir in $_G_dir_list; do IFS=$func_mkdir_p_IFS # mkdir can fail with a 'File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$_G_dir" 2>/dev/null || : done IFS=$func_mkdir_p_IFS # Bail out if we (or some other process) failed to create a directory. test -d "$_G_directory_path" || \ func_fatal_error "Failed to create '$1'" fi } # func_mktempdir [BASENAME] # ------------------------- # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, BASENAME is the basename for that directory. func_mktempdir () { $debug_cmd _G_template=${TMPDIR-/tmp}/${1-$progname} if test : = "$opt_dry_run"; then # Return a directory name, but don't create it in dry-run mode _G_tmpdir=$_G_template-$$ else # If mktemp works, use that first and foremost _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` if test ! -d "$_G_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race _G_tmpdir=$_G_template-${RANDOM-0}$$ func_mktempdir_umask=`umask` umask 0077 $MKDIR "$_G_tmpdir" umask $func_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$_G_tmpdir" || \ func_fatal_error "cannot create temporary directory '$_G_tmpdir'" fi $ECHO "$_G_tmpdir" } # func_normal_abspath PATH # ------------------------ # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. func_normal_abspath () { $debug_cmd # These SED scripts presuppose an absolute path with a trailing slash. _G_pathcar='s|^/\([^/]*\).*$|\1|' _G_pathcdr='s|^/[^/]*||' _G_removedotparts=':dotsl s|/\./|/|g t dotsl s|/\.$|/|' _G_collapseslashes='s|/\{1,\}|/|g' _G_finalslash='s|/*$|/|' # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` while :; do # Processed it all yet? if test / = "$func_normal_abspath_tpath"; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result"; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_notquiet ARG... # -------------------- # Echo program name prefixed message only when not in quiet mode. func_notquiet () { $debug_cmd $opt_quiet || func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_relative_path SRCDIR DSTDIR # -------------------------------- # Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. func_relative_path () { $debug_cmd func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=$func_dirname_result if test -z "$func_relative_path_tlibdir"; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test -n "$func_stripname_result"; then func_append func_relative_path_result "/$func_stripname_result" fi # Normalisation. If bindir is libdir, return '.' else relative path. if test -n "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result" func_relative_path_result=$func_stripname_result fi test -n "$func_relative_path_result" || func_relative_path_result=. : } # func_quote_for_eval ARG... # -------------------------- # Aesthetically quote ARGs to be evaled later. # This function returns two values: # i) func_quote_for_eval_result # double-quoted, suitable for a subsequent eval # ii) func_quote_for_eval_unquoted_result # has all characters that are still active within double # quotes backslashified. func_quote_for_eval () { $debug_cmd func_quote_for_eval_unquoted_result= func_quote_for_eval_result= while test 0 -lt $#; do case $1 in *[\\\`\"\$]*) _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; *) _G_unquoted_arg=$1 ;; esac if test -n "$func_quote_for_eval_unquoted_result"; then func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" else func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" fi case $_G_unquoted_arg in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and variable expansion # for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") _G_quoted_arg=\"$_G_unquoted_arg\" ;; *) _G_quoted_arg=$_G_unquoted_arg ;; esac if test -n "$func_quote_for_eval_result"; then func_append func_quote_for_eval_result " $_G_quoted_arg" else func_append func_quote_for_eval_result "$_G_quoted_arg" fi shift done } # func_quote_for_expand ARG # ------------------------- # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { $debug_cmd case $1 in *[\\\`\"]*) _G_arg=`$ECHO "$1" | $SED \ -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; *) _G_arg=$1 ;; esac case $_G_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") _G_arg=\"$_G_arg\" ;; esac func_quote_for_expand_result=$_G_arg } # func_stripname PREFIX SUFFIX NAME # --------------------------------- # strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_stripname () { $debug_cmd # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary variable first. func_stripname_result=$3 func_stripname_result=${func_stripname_result#"$1"} func_stripname_result=${func_stripname_result%"$2"} }' else func_stripname () { $debug_cmd case $2 in .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; esac } fi # func_show_eval CMD [FAIL_EXP] # ----------------------------- # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} func_quote_for_expand "$_G_cmd" eval "func_notquiet $func_quote_for_expand_result" $opt_dry_run || { eval "$_G_cmd" _G_status=$? if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_show_eval_locale CMD [FAIL_EXP] # ------------------------------------ # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} $opt_quiet || { func_quote_for_expand "$_G_cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || { eval "$_G_user_locale $_G_cmd" _G_status=$? eval "$_G_safe_locale" if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_tr_sh # ---------- # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { $debug_cmd case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_verbose ARG... # ------------------- # Echo program name prefixed message in verbose mode only. func_verbose () { $debug_cmd $opt_verbose && func_echo "$*" : } # func_warn_and_continue ARG... # ----------------------------- # Echo program name prefixed warning message to standard error. func_warn_and_continue () { $debug_cmd $require_term_colors func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 } # func_warning CATEGORY ARG... # ---------------------------- # Echo program name prefixed warning message to standard error. Warning # messages can be filtered according to CATEGORY, where this function # elides messages where CATEGORY is not listed in the global variable # 'opt_warning_types'. func_warning () { $debug_cmd # CATEGORY must be in the warning_categories list! case " $warning_categories " in *" $1 "*) ;; *) func_internal_error "invalid warning category '$1'" ;; esac _G_category=$1 shift case " $opt_warning_types " in *" $_G_category "*) $warning_func ${1+"$@"} ;; esac } # func_sort_ver VER1 VER2 # ----------------------- # 'sort -V' is not generally available. # Note this deviates from the version comparison in automake # in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a # but this should suffice as we won't be specifying old # version formats or redundant trailing .0 in bootstrap.conf. # If we did want full compatibility then we should probably # use m4_version_compare from autoconf. func_sort_ver () { $debug_cmd printf '%s\n%s\n' "$1" "$2" \ | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n } # func_lt_ver PREV CURR # --------------------- # Return true if PREV and CURR are in the correct order according to # func_sort_ver, otherwise false. Use it like this: # # func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." func_lt_ver () { $debug_cmd test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: #! /bin/sh # Set a version string for this script. scriptversion=2014-01-07.03; # UTC # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 # Copyright (C) 2010-2015 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. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # Please report bugs or propose patches to gary@gnu.org. ## ------ ## ## Usage. ## ## ------ ## # This file is a library for parsing options in your shell scripts along # with assorted other useful supporting features that you can make use # of too. # # For the simplest scripts you might need only: # # #!/bin/sh # . relative/path/to/funclib.sh # . relative/path/to/options-parser # scriptversion=1.0 # func_options ${1+"$@"} # eval set dummy "$func_options_result"; shift # ...rest of your script... # # In order for the '--version' option to work, you will need to have a # suitably formatted comment like the one at the top of this file # starting with '# Written by ' and ending with '# warranty; '. # # For '-h' and '--help' to work, you will also need a one line # description of your script's purpose in a comment directly above the # '# Written by ' line, like the one at the top of this file. # # The default options also support '--debug', which will turn on shell # execution tracing (see the comment above debug_cmd below for another # use), and '--verbose' and the func_verbose function to allow your script # to display verbose messages only when your user has specified # '--verbose'. # # After sourcing this file, you can plug processing for additional # options by amending the variables from the 'Configuration' section # below, and following the instructions in the 'Option parsing' # section further down. ## -------------- ## ## Configuration. ## ## -------------- ## # You should override these variables in your script after sourcing this # file so that they reflect the customisations you have added to the # option parser. # The usage line for option parsing errors and the start of '-h' and # '--help' output messages. You can embed shell variables for delayed # expansion at the time the message is displayed, but you will need to # quote other shell meta-characters carefully to prevent them being # expanded when the contents are evaled. usage='$progpath [OPTION]...' # Short help message in response to '-h' and '--help'. Add to this or # override it after sourcing this library to reflect the full set of # options your script accepts. usage_message="\ --debug enable verbose shell tracing -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -v, --verbose verbosely report processing --version print version information and exit -h, --help print short or long help message and exit " # Additional text appended to 'usage_message' in response to '--help'. long_help_message=" Warning categories include: 'all' show all warnings 'none' turn off all the warnings 'error' warnings are treated as fatal errors" # Help message printed before fatal option parsing errors. fatal_help="Try '\$progname --help' for more information." ## ------------------------- ## ## Hook function management. ## ## ------------------------- ## # This section contains functions for adding, removing, and running hooks # to the main code. A hook is just a named list of of function, that can # be run in order later on. # func_hookable FUNC_NAME # ----------------------- # Declare that FUNC_NAME will run hooks added with # 'func_add_hook FUNC_NAME ...'. func_hookable () { $debug_cmd func_append hookable_fns " $1" } # func_add_hook FUNC_NAME HOOK_FUNC # --------------------------------- # Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must # first have been declared "hookable" by a call to 'func_hookable'. func_add_hook () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not accept hook functions." ;; esac eval func_append ${1}_hooks '" $2"' } # func_remove_hook FUNC_NAME HOOK_FUNC # ------------------------------------ # Remove HOOK_FUNC from the list of functions called by FUNC_NAME. func_remove_hook () { $debug_cmd eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' } # func_run_hooks FUNC_NAME [ARG]... # --------------------------------- # Run all hook functions registered to FUNC_NAME. # It is assumed that the list of hook functions contains nothing more # than a whitespace-delimited list of legal shell function names, and # no effort is wasted trying to catch shell meta-characters or preserve # whitespace. func_run_hooks () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not support hook funcions.n" ;; esac eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do eval $_G_hook '"$@"' # store returned options list back into positional # parameters for next 'cmd' execution. eval _G_hook_result=\$${_G_hook}_result eval set dummy "$_G_hook_result"; shift done func_quote_for_eval ${1+"$@"} func_run_hooks_result=$func_quote_for_eval_result } ## --------------- ## ## Option parsing. ## ## --------------- ## # In order to add your own option parsing hooks, you must accept the # full positional parameter list in your hook function, remove any # options that you action, and then pass back the remaining unprocessed # options in '_result', escaped suitably for # 'eval'. Like this: # # my_options_prep () # { # $debug_cmd # # # Extend the existing usage message. # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' # # func_quote_for_eval ${1+"$@"} # my_options_prep_result=$func_quote_for_eval_result # } # func_add_hook func_options_prep my_options_prep # # # my_silent_option () # { # $debug_cmd # # # Note that for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do # opt=$1; shift # case $opt in # --silent|-s) opt_silent=: ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift # ;; # *) set dummy "$_G_opt" "$*"; shift; break ;; # esac # done # # func_quote_for_eval ${1+"$@"} # my_silent_option_result=$func_quote_for_eval_result # } # func_add_hook func_parse_options my_silent_option # # # my_option_validation () # { # $debug_cmd # # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." # # func_quote_for_eval ${1+"$@"} # my_option_validation_result=$func_quote_for_eval_result # } # func_add_hook func_validate_options my_option_validation # # You'll alse need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. # func_options [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the # individual implementations for details. func_hookable func_options func_options () { $debug_cmd func_options_prep ${1+"$@"} eval func_parse_options \ ${func_options_prep_result+"$func_options_prep_result"} eval func_validate_options \ ${func_parse_options_result+"$func_parse_options_result"} eval func_run_hooks func_options \ ${func_validate_options_result+"$func_validate_options_result"} # save modified positional parameters for caller func_options_result=$func_run_hooks_result } # func_options_prep [ARG]... # -------------------------- # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and # needs to propogate that back to rest of this script, then the complete # modified list must be put in 'func_run_hooks_result' before # returning. func_hookable func_options_prep func_options_prep () { $debug_cmd # Option defaults: opt_verbose=false opt_warning_types= func_run_hooks func_options_prep ${1+"$@"} # save modified positional parameters for caller func_options_prep_result=$func_run_hooks_result } # func_parse_options [ARG]... # --------------------------- # The main option parsing loop. func_hookable func_parse_options func_parse_options () { $debug_cmd func_parse_options_result= # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. func_run_hooks func_parse_options ${1+"$@"} # Adjust func_parse_options positional parameters to match eval set dummy "$func_run_hooks_result"; shift # Break out of the loop if we already parsed every option. test $# -gt 0 || break _G_opt=$1 shift case $_G_opt in --debug|-x) debug_cmd='set -x' func_echo "enabling shell trace mode" $debug_cmd ;; --no-warnings|--no-warning|--no-warn) set dummy --warnings none ${1+"$@"} shift ;; --warnings|--warning|-W) test $# = 0 && func_missing_arg $_G_opt && break case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above func_append_uniq opt_warning_types " $1" ;; *all) opt_warning_types=$warning_categories ;; *none) opt_warning_types=none warning_func=: ;; *error) opt_warning_types=$warning_categories warning_func=func_fatal_error ;; *) func_fatal_error \ "unsupported warning category: '$1'" ;; esac shift ;; --verbose|-v) opt_verbose=: ;; --version) func_version ;; -\?|-h) func_usage ;; --help) func_help ;; # Separate optargs to long options (plugins may need this): --*=*) func_split_equals "$_G_opt" set dummy "$func_split_equals_lhs" \ "$func_split_equals_rhs" ${1+"$@"} shift ;; # Separate optargs to short options: -W*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "$func_split_short_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-v*|-x*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac done # save modified positional parameters for caller func_quote_for_eval ${1+"$@"} func_parse_options_result=$func_quote_for_eval_result } # func_validate_options [ARG]... # ------------------------------ # Perform any sanity checks on option settings and/or unconsumed # arguments. func_hookable func_validate_options func_validate_options () { $debug_cmd # Display all warnings if -W was not given. test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" func_run_hooks func_validate_options ${1+"$@"} # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE # save modified positional parameters for caller func_validate_options_result=$func_run_hooks_result } ## ----------------- ## ## Helper functions. ## ## ----------------- ## # This section contains the helper functions used by the rest of the # hookable option parser framework in ascii-betical order. # func_fatal_help ARG... # ---------------------- # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { $debug_cmd eval \$ECHO \""Usage: $usage"\" eval \$ECHO \""$fatal_help"\" func_error ${1+"$@"} exit $EXIT_FAILURE } # func_help # --------- # Echo long help message to standard output and exit. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message" exit 0 } # func_missing_arg ARGNAME # ------------------------ # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $debug_cmd func_error "Missing argument for '$1'." exit_cmd=exit } # func_split_equals STRING # ------------------------ # Set func_split_equals_lhs and func_split_equals_rhs shell variables after # splitting STRING at the '=' sign. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_equals () { $debug_cmd func_split_equals_lhs=${1%%=*} func_split_equals_rhs=${1#*=} test "x$func_split_equals_lhs" = "x$1" \ && func_split_equals_rhs= }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_equals () { $debug_cmd func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` func_split_equals_rhs= test "x$func_split_equals_lhs" = "x$1" \ || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` } fi #func_split_equals # func_split_short_opt SHORTOPT # ----------------------------- # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_short_opt () { $debug_cmd func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"} }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_short_opt () { $debug_cmd func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` } fi #func_split_short_opt # func_usage # ---------- # Echo short help message to standard output and exit. func_usage () { $debug_cmd func_usage_message $ECHO "Run '$progname --help |${PAGER-more}' for full usage" exit 0 } # func_usage_message # ------------------ # Echo short help message to standard output. func_usage_message () { $debug_cmd eval \$ECHO \""Usage: $usage"\" echo $SED -n 's|^# || /^Written by/{ x;p;x } h /^Written by/q' < "$progpath" echo eval \$ECHO \""$usage_message"\" } # func_version # ------------ # Echo version message to standard output and exit. func_version () { $debug_cmd printf '%s\n' "$progname $scriptversion" $SED -n ' /(C)/!b go :more /\./!{ N s|\n# | | b more } :go /^# Written by /,/# warranty; / { s|^# || s|^# *$|| s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| p } /^# Written by / { s|^# || p } /^warranty; /q' < "$progpath" exit $? } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: # Set a version string. scriptversion='(GNU libtool) 2.4.6' # func_echo ARG... # ---------------- # Libtool also displays the current mode in messages, so override # funclib.sh func_echo with this custom definition. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" done IFS=$func_echo_IFS } # func_warning ARG... # ------------------- # Libtool warnings are not categorized, so override funclib.sh # func_warning with this simpler definition. func_warning () { $debug_cmd $warning_func ${1+"$@"} } ## ---------------- ## ## Options parsing. ## ## ---------------- ## # Hook in the functions to make sure our own options are parsed during # the option parsing loop. usage='$progpath [OPTION]... [MODE-ARG]...' # Short help message in response to '-h'. usage_message="Options: --config show all configuration variables --debug enable verbose shell tracing -n, --dry-run display commands without modifying any files --features display basic configuration information and exit --mode=MODE use operation mode MODE --no-warnings equivalent to '-Wnone' --preserve-dup-deps don't remove duplicate dependency libraries --quiet, --silent don't print informational messages --tag=TAG use configuration variables from tag TAG -v, --verbose print more informational messages than default --version print version information -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -h, --help, --help-all print short, long, or detailed help message " # Additional text appended to 'usage_message' in response to '--help'. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message MODE must be one of the following: clean remove files from the build directory compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. When passed as first option, '--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. Try '$progname --help --mode=MODE' for a more detailed description of MODE. When reporting a bug, please describe a test case to reproduce it and include the following information: host-triplet: $host shell: $SHELL compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) version: $progname $scriptversion Debian-2.4.6-2 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` Report bugs to . GNU libtool home page: . General help using GNU software: ." exit 0 } # func_lo2o OBJECT-NAME # --------------------- # Transform OBJECT-NAME from a '.lo' suffix to the platform specific # object suffix. lo2o=s/\\.lo\$/.$objext/ o2lo=s/\\.$objext\$/.lo/ if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_lo2o () { case $1 in *.lo) func_lo2o_result=${1%.lo}.$objext ;; * ) func_lo2o_result=$1 ;; esac }' # func_xform LIBOBJ-OR-SOURCE # --------------------------- # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) # suffix to a '.lo' libtool-object suffix. eval 'func_xform () { func_xform_result=${1%.*}.lo }' else # ...otherwise fall back to using sed. func_lo2o () { func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` } func_xform () { func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` } fi # func_fatal_configuration ARG... # ------------------------------- # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func__fatal_error ${1+"$@"} \ "See the $PACKAGE documentation for more information." \ "Fatal configuration error." } # func_config # ----------- # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # ------------- # Display the features supported by this script. func_features () { echo "host: $host" if test yes = "$build_libtool_libs"; then echo "enable shared libraries" else echo "disable shared libraries" fi if test yes = "$build_old_libs"; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag TAGNAME # ----------------------- # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname=$1 re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf=/$re_begincf/,/$re_endcf/p # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # ------------------------ # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # libtool_options_prep [ARG]... # ----------------------------- # Preparation for options parsed by libtool. libtool_options_prep () { $debug_mode # Option defaults: opt_config=false opt_dlopen= opt_dry_run=false opt_help=false opt_mode= opt_preserve_dup_deps=false opt_quiet=false nonopt= preserve_args= # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Pass back the list of options. func_quote_for_eval ${1+"$@"} libtool_options_prep_result=$func_quote_for_eval_result } func_add_hook func_options_prep libtool_options_prep # libtool_parse_options [ARG]... # --------------------------------- # Provide handling for libtool specific options. libtool_parse_options () { $debug_cmd # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do _G_opt=$1 shift case $_G_opt in --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) func_config ;; --dlopen|-dlopen) opt_dlopen="${opt_dlopen+$opt_dlopen }$1" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) func_features ;; --finish) set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $_G_opt && break opt_mode=$1 case $1 in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $_G_opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_quiet=false func_append preserve_args " $_G_opt" ;; --no-warnings|--no-warning|--no-warn) opt_warning=false func_append preserve_args " $_G_opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $_G_opt" ;; --silent|--quiet) opt_quiet=: opt_verbose=false func_append preserve_args " $_G_opt" ;; --tag) test $# = 0 && func_missing_arg $_G_opt && break opt_tag=$1 func_append preserve_args " $_G_opt $1" func_enable_tag "$1" shift ;; --verbose|-v) opt_quiet=false opt_verbose=: func_append preserve_args " $_G_opt" ;; # An option not handled by this hook function: *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac done # save modified positional parameters for caller func_quote_for_eval ${1+"$@"} libtool_parse_options_result=$func_quote_for_eval_result } func_add_hook func_parse_options libtool_parse_options # libtool_validate_options [ARG]... # --------------------------------- # Perform any sanity checks on option settings and/or unconsumed # arguments. libtool_validate_options () { # save first non-option argument if test 0 -lt $#; then nonopt=$1 shift fi # preserve --debug test : = "$debug_cmd" || func_append preserve_args " --debug" case $host in # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match test yes != "$build_libtool_libs" \ && test yes != "$build_old_libs" \ && func_fatal_configuration "not configured to build any kind of library" # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test execute != "$opt_mode"; then func_error "unrecognized option '-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help=$help help="Try '$progname --help --mode=$opt_mode' for more information." } # Pass back the unparsed argument list func_quote_for_eval ${1+"$@"} libtool_validate_options_result=$func_quote_for_eval_result } func_add_hook func_validate_options libtool_validate_options # Process options as early as possible so that --help and --version # can return quickly. func_options ${1+"$@"} eval set dummy "$func_options_result"; shift ## ----------- ## ## Main. ## ## ----------- ## magic='%%%MAGIC variable%%%' magic_exe='%%%MAGIC EXE variable%%%' # Global variables. extracted_archives= extracted_serial=0 # 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= # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # func_generated_by_libtool # True iff stdin has been generated by Libtool. This function is only # a basic sanity check; it will hardly flush out determined imposters. func_generated_by_libtool_p () { $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_p file # True iff FILE is a libtool '.la' library or '.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p } # func_lalib_unsafe_p file # True iff FILE is a libtool '.la' library or '.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if 'file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case $lalib_p_line in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test yes = "$lalib_p" } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { test -f "$1" && $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $debug_cmd save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # 'FILE.' does not work on cygwin managed mounts. func_source () { $debug_cmd case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case $lt_sysroot:$1 in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result='='$func_stripname_result ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $debug_cmd if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` 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 "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with '--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=$1 if test yes = "$build_libtool_libs"; then write_lobj=\'$2\' else write_lobj=none fi if test yes = "$build_old_libs"; then write_oldobj=\'$3\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $debug_cmd # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result= if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result"; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $debug_cmd if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $debug_cmd # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $debug_cmd if test -z "$2" && test -n "$1"; then func_error "Could not determine host file name corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result=$1 fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $debug_cmd if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " '$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result=$3 fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $debug_cmd case $4 in $1 ) func_to_host_path_result=$3$func_to_host_path_result ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via '$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $debug_cmd $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $debug_cmd case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result=$1 } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result=$func_convert_core_msys_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result=$func_convert_core_file_wine_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via '$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $debug_cmd if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd=func_convert_path_$func_stripname_result fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $debug_cmd func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result=$1 } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_msys_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_path_wine_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_dll_def_p FILE # True iff FILE is a Windows DLL '.def' file. # Keep in sync with _LT_DLL_DEF_P in libtool.m4 func_dll_def_p () { $debug_cmd func_dll_def_p_tmp=`$SED -n \ -e 's/^[ ]*//' \ -e '/^\(;.*\)*$/d' \ -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ -e q \ "$1"` test DEF = "$func_dll_def_p_tmp" } # func_mode_compile arg... func_mode_compile () { $debug_cmd # 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= pie_flag= 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) test -n "$libobj" && \ func_fatal_error "you cannot specify '-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append 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,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs=$IFS; IFS=, for arg in $args; do IFS=$save_ifs func_append_quoted lastarg "$arg" done IFS=$save_ifs func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append 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. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with '-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj=$func_basename_result } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from '$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test yes = "$build_libtool_libs" \ || func_fatal_configuration "cannot build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name '$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname=$func_basename_result xdir=$func_dirname_result lobj=$xdir$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test yes = "$build_old_libs"; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; 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 no = "$compiler_c_o"; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext lockfile=$output_obj.lock else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test yes = "$need_locks"; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test warn = "$need_locks"; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test yes = "$build_libtool_libs"; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test no != "$pic_mode"; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test yes = "$suppress_opt"; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test yes = "$build_old_libs"; then if test yes != "$pic_mode"; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test yes = "$compiler_c_o"; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test no != "$need_locks"; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test compile = "$opt_mode" && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a '.o' file suitable for static linking -static only build a '.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a 'standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix '.c' with the library object suffix, '.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to '-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the '--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the 'install' or 'cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -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 -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with '-') are ignored. Every other argument is treated as a filename. Files ending in '.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in '.la', then a libtool library is created, only library objects ('.lo' files) may be specified, and '-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created using 'ar' and 'ranlib', or on Windows using 'lib'. If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode '$opt_mode'" ;; esac echo $ECHO "Try '$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test : = "$opt_help"; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | $SED -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | $SED '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $debug_cmd # The first argument is the command name. cmd=$nonopt test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "'$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "'$file' was not linked with '-export-dynamic'" continue fi func_dirname "$file" "" "." dir=$func_dirname_result if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir=$func_dirname_result ;; *) func_warning "'-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir=$absdir # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic=$magic # Check if any of the arguments is a wrapper script. args= for file do case $file in -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file=$progdir/$program elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file=$progdir/$program fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if $opt_dry_run; then # 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 else if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd=\$cmd$args fi } test execute = "$opt_mode" && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $debug_cmd libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "'$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument '$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and '=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_quiet && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then 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" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test finish = "$opt_mode" && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $debug_cmd # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=false stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=: ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test X-m = "X$prev" && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the '$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=: if $isdir; then destdir=$dest destname= else func_dirname_and_basename "$dest" "" "." destdir=$func_dirname_result destname=$func_basename_result # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "'$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "'$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic=$magic staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir=$func_dirname_result func_append 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 -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$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 func_warning "relinking '$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname=$1 shift srcname=$realname test -n "$relink_command" && srcname=${realname}T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme=$stripme case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme= ;; esac ;; os2*) case $realname in *_dll.a) tstripme= ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try 'ln -sf' first, because the 'ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib=$destdir/$realname func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name=$func_basename_result instname=$dir/${name}i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile=$destdir/$destname else func_basename "$file" destfile=$func_basename_result destfile=$destdir/$destfile fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest=$destfile destfile= ;; *) func_fatal_help "cannot copy a libtool object to '$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test yes = "$build_old_libs"; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile=$destdir/$destname else func_basename "$file" destfile=$func_basename_result destfile=$destdir/$destfile fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext= case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=.exe fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script '$wrapper'" finalize=: for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` if test -n "$libdir" && test ! -f "$libfile"; then func_warning "'$lib' has not been installed in '$libdir'" finalize=false fi done relink_command= func_source "$wrapper" outputname= if test no = "$fast_install" && test -n "$relink_command"; then $opt_dry_run || { if $finalize; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file=$func_basename_result outputname=$tmpdir/$file # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_quiet || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink '$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file=$outputname else func_warning "cannot relink '$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name=$func_basename_result # Set up the ranlib parameters. oldlib=$destdir/$name func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run '$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test install = "$opt_mode" && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $debug_cmd my_outputname=$1 my_originator=$2 my_pic_p=${3-false} my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms=${my_outputname}S.c else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist=$output_objdir/$my_outputname.nm func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* External symbol declarations for the compiler. */\ " if test yes = "$dlself"; then func_verbose "generating symbol list for '$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from '$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols=$output_objdir/$outputname.exp $opt_dry_run || { $RM $export_symbols eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from '$dlprefile'" func_basename "$dlprefile" name=$func_basename_result case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename= if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname"; then func_basename "$dlprefile_dlname" dlprefile_dlbasename=$func_basename_result else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename"; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi func_show_eval '$RM "${nlist}I"' if test -n "$global_symbol_to_import"; then eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[];\ " if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ static void lt_syminit(void) { LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; for (; symbol->name; ++symbol) {" $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" echo >> "$output_objdir/$my_dlsyms" "\ } }" fi echo >> "$output_objdir/$my_dlsyms" "\ LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = { {\"$my_originator\", (void *) 0}," if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ {\"@INIT@\", (void *) <_syminit}," fi case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) $my_pic_p && pic_flag_for_symtable=" $pic_flag" ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' # Transform the symbol file into the correct name. symfileobj=$output_objdir/${my_outputname}S.$objext case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for '$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # 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. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $debug_cmd 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 # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then case $nm_interface in "MS dumpbin") if func_cygming_ms_implib_p "$1" || func_cygming_gnu_implib_p "$1" then win32_nmres=import else win32_nmres= fi ;; *) func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s|.*|import| p q } }'` ;; esac case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $debug_cmd sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $debug_cmd match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive that possess that section. Heuristic: eliminate # all those that have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $debug_cmd if func_cygming_gnu_implib_p "$1"; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1"; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result= fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $debug_cmd f_ex_an_ar_dir=$1; shift f_ex_an_ar_oldlib=$1 if test yes = "$lock_old_archive_extraction"; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test yes = "$lock_old_archive_extraction"; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $debug_cmd my_gentop=$1; shift my_oldlibs=${1+"$@"} my_oldobjs= my_xlib= my_xabs= my_xdir= for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib=$func_basename_result my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir=$my_gentop/$my_xlib_u func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` func_basename "$darwin_archive" darwin_base_archive=$func_basename_result darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches; do func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch" $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive" cd "unfat-$$/$darwin_base_archive-$darwin_arch" func_extract_an_archive "`pwd`" "$darwin_base_archive" cd "$darwin_curdir" $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result=$my_oldobjs } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory where it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ that is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options that match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { case \" \$* \" in *\\ --lt-*) for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done ;; esac func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED '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 \"\$file\" | $SED '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 \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test yes = "$fast_install"; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else \$ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${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\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* declarations of non-ANSI functions */ #if defined __MINGW32__ # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined __CYGWIN__ # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined other_platform || defined ... */ #endif /* portability defines, excluding path handling macros */ #if defined _MSC_VER # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC #elif defined __MINGW32__ # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined __CYGWIN__ # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined other platforms ... */ #endif #if defined PATH_MAX # define LT_PATHMAX PATH_MAX #elif defined MAXPATHLEN # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \ defined __OS2__ # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free (stale); stale = 0; } \ } while (0) #if defined LT_DEBUGWRAPPER static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; size_t tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined HAVE_DOS_BASED_FILE_SYSTEM if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined HAVE_DOS_BASED_FILE_SYSTEM } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = (size_t) (q - p); p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (STREQ (str, pat)) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else size_t len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { size_t orig_value_len = strlen (orig_value); size_t add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ size_t len = strlen (new_value); while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[--len] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -n -e ' s/^\(.\{79\}\)\(..*\)/\1\ \2/ h s/\([\\"]\)/\\\1/g s/$/\\n/ s/\([^\n]*\).*/ fputs ("\1", f);/p g D' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $debug_cmd case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_suncc_cstd_abi # !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! # Several compiler flags select an ABI that is incompatible with the # Cstd library. Avoid specifying it if any are in CXXFLAGS. func_suncc_cstd_abi () { $debug_cmd case " $compile_command " in *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) suncc_use_cstd_abi=no ;; *) suncc_use_cstd_abi=yes ;; esac } # func_mode_link arg... func_mode_link () { $debug_cmd case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # what system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll that has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= os2dllname= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=false prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module=$wl-single_module func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test yes != "$build_libtool_libs" \ && func_fatal_configuration "cannot build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg=$1 shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir=$arg prev= continue ;; dlfiles|dlprefiles) $preload || { # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=: } case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test no = "$dlself"; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test dlprefiles = "$prev"; then dlself=yes elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test dlfiles = "$prev"; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols=$arg test -f "$arg" \ || func_fatal_error "symbol file '$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex=$arg prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir=$arg prev= continue ;; mllvm) # Clang does not use LLVM to link, so we can simply discard any # '-mllvm $arg' options when doing the link step. prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result if test none != "$pic_object"; then # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append 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 dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object fi # Non-PIC object. if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test none = "$pic_object"; then arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "'$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file '$arg' does not exist" fi arg=$save_arg prev= continue ;; os2dllname) os2dllname=$arg prev= continue ;; precious_regex) precious_files_regex=$arg prev= continue ;; release) release=-$arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test rpath = "$prev"; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds=$arg prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg=$arg case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "'-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test X-export-symbols = "X$arg"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between '-L' and '$1'" else func_fatal_error "need path for '-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of '$dir'" dir=$absdir ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test X-lc = "X$arg" || test X-lm = "X$arg"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test X-lc = "X$arg" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc due to us having libc/libc_r. test X-lc = "X$arg" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test X-lc = "X$arg" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test X-lc = "X$arg" && continue ;; esac elif test X-lc_r = "X$arg"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -mllvm) prev=mllvm continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module=$wl-multi_module continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "'-no-install' is ignored for $host" func_warning "assuming '-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -os2dllname) prev=os2dllname continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # -fstack-protector* stack protector flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization # -specs=* GCC specs files # -stdlib=* select c++ std lib with clang # -fsanitize=* Clang/GCC memory and address sanitizer -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ -specs=*|-fsanitize=*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; -Z*) if test os2 = "`expr $host : '.*\(os2\)'`"; then # OS/2 uses -Zxxx to specify OS/2-specific options compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case $arg in -Zlinker | -Zstack) prev=xcompiler ;; esac continue else # Otherwise treat like 'Some other compiler flag' below func_quote_for_eval "$arg" arg=$func_quote_for_eval_result fi ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result test none = "$pic_object" || { # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append 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 dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object } # Non-PIC object. if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test none = "$pic_object"; then arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "'$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test dlfiles = "$prev"; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test dlprefiles = "$prev"; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the '$prevarg' option requires an argument" if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname=$func_basename_result libobjs_save=$libobjs if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'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\" # Definition is injected by LT_CONFIG during libtool generation. func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" func_dirname "$output" "/" "" output_objdir=$func_dirname_result$objdir func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_preserve_dup_deps; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test lib = "$linkmode"; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=false newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test lib,link = "$linkmode,$pass"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs=$tmp_deplibs fi if test lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass"; then libs=$deplibs deplibs= fi if test prog = "$linkmode"; then case $pass in dlopen) libs=$dlfiles ;; dlpreopen) libs=$dlprefiles ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test lib,dlpreopen = "$linkmode,$pass"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs=$dlprefiles fi if test dlopen = "$pass"; then # Collect dlpreopened libraries save_deplibs=$deplibs deplibs= fi for deplib in $libs; do lib= found=false case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test lib != "$linkmode" && test prog != "$linkmode"; then func_warning "'-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test lib = "$linkmode"; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib=$searchdir/lib$name$search_ext if test -f "$lib"; then if test .la = "$search_ext"; then found=: else found=false fi break 2 fi done done if $found; then # 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 yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll=$l done if test "X$ll" = "X$old_library"; then # only static version available found=false func_dirname "$lib" "" "." ladir=$func_dirname_result lib=$ladir/$old_library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi else # deplib doesn't seem to be a libtool library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi ;; # -l *.ltframework) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test conv = "$pass" && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi if test scan = "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "'-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test link = "$pass"; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=false case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=: fi ;; pass_all) valid_a_lib=: ;; esac if $valid_a_lib; then echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" else echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." fi ;; esac continue ;; prog) if test link != "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test conv = "$pass"; then deplibs="$deplib $deplibs" elif test prog = "$linkmode"; then if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=: continue ;; esac # case $deplib $found || test -f "$lib" \ || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "'$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir=$func_dirname_result dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass" || { test prog != "$linkmode" && test lib != "$linkmode"; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test conv = "$pass"; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for '$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done elif test prog != "$linkmode" && test lib != "$linkmode"; then func_fatal_error "'$lib' is not a convenience library" fi continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test yes = "$prefer_static_libs" || test built,no = "$prefer_static_libs,$installed"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib=$l done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for '$lib'" fi # This library was specified with -dlopen. if test dlopen = "$pass"; then test -z "$libdir" \ && func_fatal_error "cannot -dlopen a convenience library: '$lib'" if test -z "$dlname" || test yes != "$dlopen_support" || test no = "$build_libtool_libs" 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. func_append dlprefiles " $lib $dependency_libs" else func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of '$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir=$ladir fi ;; esac func_basename "$lib" laname=$func_basename_result # Find the relevant object directory and library name. if test yes = "$installed"; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library '$lib' was moved." dir=$ladir absdir=$abs_ladir libdir=$abs_ladir else dir=$lt_sysroot$libdir absdir=$lt_sysroot$libdir fi test yes = "$hardcode_automatic" && 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 func_append notinst_path " $abs_ladir" else dir=$ladir/$objdir absdir=$abs_ladir/$objdir # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test dlpreopen = "$pass"; then if test -z "$libdir" && test prog = "$linkmode"; then func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" fi case $host in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test lib = "$linkmode"; then deplibs="$dir/$old_library $deplibs" elif test prog,link = "$linkmode,$pass"; 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 prog = "$linkmode" && test link != "$pass"; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=false if test no != "$link_all_deplibs" || test -z "$library_names" || test no = "$build_libtool_libs"; then linkalldeplibs=: fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if $linkalldeplibs; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test prog,link = "$linkmode,$pass"; then if test -n "$library_names" && { { test no = "$prefer_static_libs" || test built,yes = "$prefer_static_libs,$installed"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then # Make sure the rpath contains only unique directories. case $temp_rpath: in *"$absdir:"*) ;; *) func_append 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 "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if $alldeplibs && { test pass_all = "$deplibs_check_method" || { test yes = "$build_libtool_libs" && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test built = "$use_static_libs" && test yes = "$installed"; then use_static_libs=no fi if test -n "$library_names" && { test no = "$use_static_libs" || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc* | *os2*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test no = "$installed"; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule= for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule=$dlpremoduletest break fi done if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then echo if test prog = "$linkmode"; 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 lib = "$linkmode" && test yes = "$hardcode_into_libs"; 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 "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname=$1 shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname=$dlname elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc* | *os2*) func_arith $current - $age major=$func_arith_result versuffix=-$major ;; esac eval soname=\"$soname_spec\" else soname=$realname fi # Make a new name for the extract_expsyms_cmds to use soroot=$soname func_basename "$soroot" soname=$func_basename_result func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from '$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for '$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test prog = "$linkmode" || test relink != "$opt_mode"; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test no = "$hardcode_direct"; then add=$dir/$linklib case $host in *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;; *-*-sysv4*uw2*) add_dir=-L$dir ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir=-L$dir ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we cannot # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library"; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else add=$dir/$old_library fi elif test -n "$old_library"; then add=$dir/$old_library fi fi esac elif test no = "$hardcode_minus_L"; then case $host in *-*-sunos*) add_shlibpath=$dir ;; esac add_dir=-L$dir add=-l$name elif test no = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; relink) if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$dir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$absdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add=-l$name elif test yes = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; *) lib_linked=no ;; esac if test yes != "$lib_linked"; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test prog = "$linkmode"; 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 yes != "$hardcode_direct" && test yes != "$hardcode_minus_L" && test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test prog = "$linkmode" || test relink = "$opt_mode"; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$libdir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$libdir add=-l$name elif test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add=-l$name elif test yes = "$hardcode_automatic"; 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 [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add=-l$name fi if test prog = "$linkmode"; 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 prog = "$linkmode"; 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 unsupported != "$hardcode_direct"; 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 yes = "$build_libtool_libs"; then # Not a shared library if test pass_all != "$deplibs_check_method"; 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 cannot 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 yes = "$module"; 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 no = "$build_old_libs"; 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 lib = "$linkmode"; then if test -n "$dependency_libs" && { test yes != "$hardcode_into_libs" || test yes = "$build_old_libs" || test yes = "$link_static"; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs=$temp_deplibs fi func_append newlib_search_path " $absdir" # Link against this library test no = "$link_static" && 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 $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test no != "$link_all_deplibs"; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path=$deplib ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of '$dir'" absdir=$dir fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names"; then for tmp in $deplibrary_names; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl"; then depdepl=$absdir/$objdir/$depdepl darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" path= fi fi ;; *) path=-L$absdir/$objdir ;; esac else eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "'$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "'$deplib' seems to be moved" path=-L$absdir fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test link = "$pass"; then if test prog = "$linkmode"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs=$newdependency_libs if test dlpreopen = "$pass"; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test dlopen != "$pass"; then test conv = "$pass" || { # 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 "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= } if test prog,link = "$linkmode,$pass"; then vars="compile_deplibs finalize_deplibs" else vars=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 "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Add Sun CC postdeps if required: test CXX = "$tagname" && { case $host_os in linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; solaris*) func_cc_basename "$CC" case $func_cc_basename_result in CC* | sunCC*) func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; esac } # 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 func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test prog = "$linkmode"; then dlfiles=$newdlfiles fi if test prog = "$linkmode" || test lib = "$linkmode"; then dlprefiles=$newdlprefiles fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then func_warning "'-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "'-l' and '-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "'-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "'-R' is ignored for archives" test -n "$vinfo" && \ func_warning "'-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "'-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "'-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs=$output func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form 'libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test no = "$module" \ && func_fatal_help "libtool library '$output' must begin with 'lib'" if test no != "$need_lib_prefix"; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test pass_all != "$deplibs_check_method"; then func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test no = "$dlself" \ || func_warning "'-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test 1 -lt "$#" \ && func_warning "ignoring multiple '-rpath's for a libtool library" install_libdir=$1 oldlibs= if test -z "$rpath"; then if test yes = "$build_libtool_libs"; then # Building a libtool convenience library. # Some compilers have problems with a '.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "'-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "'-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs=$IFS; IFS=: set dummy $vinfo 0 0 0 shift IFS=$save_ifs test -n "$7" && \ func_fatal_help "too many parameters to '-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major=$1 number_minor=$2 number_revision=$3 # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # that has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|freebsd-elf|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_revision ;; freebsd-aout|qnx|sunos) current=$number_major revision=$number_minor age=0 ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_minor lt_irix_increment=no ;; *) func_fatal_configuration "$modename: unknown library version type '$version_type'" ;; esac ;; no) current=$1 revision=$2 age=$3 ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT '$current' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION '$revision' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE '$age' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE '$age' is greater than the current interface number '$current'" func_fatal_error "'$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" # On Darwin other compilers case $CC in nagfor*) verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" ;; *) verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; esac ;; freebsd-aout) major=.$current versuffix=.$current.$revision ;; freebsd-elf) func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; irix | nonstopux) if test no = "$lt_irix_increment"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring=$verstring_prefix$major.$revision # Add in all the interfaces that we are compatible with. loop=$revision while test 0 -ne "$loop"; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring=$verstring_prefix$major.$iface:$verstring done # Before this point, $major must not contain '.'. major=.$major versuffix=$major.$revision ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=.$current.$age.$revision verstring=$current.$age.$revision # Add in all the interfaces that we are compatible with. loop=$age while test 0 -ne "$loop"; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring=$verstring:$iface.0 done # Make executables depend on our current version. func_append verstring ":$current.0" ;; qnx) major=.$current versuffix=.$current ;; sco) major=.$current versuffix=.$current ;; sunos) major=.$current versuffix=.$current.$revision ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 file systems. func_arith $current - $age major=$func_arith_result versuffix=-$major ;; *) func_fatal_configuration "unknown library version type '$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring=0.0 ;; esac if test no = "$need_version"; then versuffix= else versuffix=.0.0 fi fi # Remove version info from name if versioning should be avoided if test yes,no = "$avoid_version,$need_version"; then major= versuffix= verstring= fi # Check to see if the archive will have undefined symbols. if test yes = "$allow_undefined"; then if test unsupported = "$allow_undefined_flag"; then if test yes = "$build_old_libs"; then func_warning "undefined symbols not allowed in $host shared libraries; building static only" build_libtool_libs=no else func_fatal_error "can't build $host shared library unless -no-undefined is specified" fi fi else # Don't allow undefined symbols. allow_undefined_flag=$no_undefined_flag fi fi func_generate_dlsyms "$libname" "$libname" : func_append libobjs " $symfileobj" test " " = "$libobjs" && libobjs= if test relink != "$opt_mode"; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*) if test -n "$precious_files_regex"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "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 func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; 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 "*) ;; *) func_append 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 "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test yes = "$build_libtool_libs"; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test yes = "$build_libtool_need_lc"; then func_append deplibs " -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release= versuffix= major= newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi 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 "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib= break 2 fi done done fi if test -n "$a_deplib"; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $a_deplib "*) func_append 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 func_append newdeplibs " $a_deplib" a_deplib= break 2 fi done done fi if test -n "$a_deplib"; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs= tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test yes = "$allow_libtool_libs_with_static_runtimes"; then for i in $predeps $postdeps; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test none = "$deplibs_check_method"; 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 ;; esac ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test yes = "$droppeddeps"; then if test yes = "$module"; 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 no = "$build_old_libs"; 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 no = "$allow_undefined"; 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 no = "$build_old_libs"; then oldlibs=$output_objdir/$libname.$libext build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done deplibs=$new_libs # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test yes = "$build_libtool_libs"; then # Remove $wl instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test yes = "$hardcode_into_libs"; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath=$finalize_rpath test relink = "$opt_mode" || rpath=$compile_rpath$rpath for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result 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"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append 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 func_append 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 relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname=$1 shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname=$realname fi if test -z "$dlname"; then dlname=$soname fi lib=$output_objdir/$realname linknames= for link do func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols=$output_objdir/$libname.uexp func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile func_dll_def_p "$export_symbols" || { # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols=$export_symbols export_symbols= always_export_symbols=yes } fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for '$libname.la'" export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs=$IFS; IFS='~' for cmd1 in $cmds; do IFS=$save_ifs # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test yes = "$try_normal_branch" \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=$output_objdir/$output_la.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS=$save_ifs if test -n "$export_symbols_regex" && test : != "$skipped_export"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols=$export_symbols test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test : != "$skipped_export" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs=$tmp_deplibs if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test yes = "$compiler_needs_object" && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test yes = "$module" && 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 : != "$skipped_export" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then output=$output_objdir/$output_la.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then output=$output_objdir/$output_la.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test yes = "$compiler_needs_object"; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-$k.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test -z "$objlist" || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test 1 -eq "$k"; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-$k.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-$k.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi ${skipped_export-false} && { func_verbose "generating symbol list for '$libname.la'" export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi } test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs=$IFS; IFS='~' for cmd in $concat_cmds; do IFS=$save_ifs $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS=$save_ifs if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi ${skipped_export-false} && { if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols=$export_symbols test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi } libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test yes = "$module" && test -n "$module_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs=$IFS; IFS='~' for cmd in $cmds; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS=$save_ifs # Restore the uninstalled library and exit if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test yes = "$module" || test yes = "$export_dynamic"; then # On all known operating systems, these are identical. dlname=$soname fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then func_warning "'-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "'-l' and '-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "'-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "'-R' is ignored for objects" test -n "$vinfo" && \ func_warning "'-version-info' is ignored for objects" test -n "$release" && \ func_warning "'-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object '$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj=$output ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # if reload_cmds runs $LD directly, get rid of -Wl from # whole_archive_flag_spec and hope we can get by with turning comma # into space. case $reload_cmds in *\$LD[\ \$]*) wl= ;; esac if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags else gentop=$output_objdir/${obj}x func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test yes = "$build_libtool_libs" || libobjs=$non_pic_objects # Create the old-style object. reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs output=$obj func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi test yes = "$build_libtool_libs" || { if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS } if test -n "$pic_flag" || test default != "$pic_mode"; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output=$libobj func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "'-version-info' is ignored for programs" test -n "$release" && \ func_warning "'-release' is ignored for programs" $preload \ && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test CXX = "$tagname"; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " $wl-bind_at_load" func_append finalize_command " $wl-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs=$new_libs func_append compile_command " $compile_deplibs" func_append 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 "*) ;; *) func_append 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"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath=$rpath rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append 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 yes = "$build_old_libs"; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" false # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=: case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=false ;; *cygwin* | *mingw* ) test yes = "$build_libtool_libs" || wrappers_required=false ;; *) if test no = "$need_relink" || test yes != "$build_libtool_libs"; then wrappers_required=false fi ;; esac $wrappers_required || { # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command=$compile_command$compile_rpath # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.$objext"; then func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' fi exit $exit_status } 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 func_append 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 func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test yes = "$no_install"; 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 "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi case $hardcode_action,$fast_install in relink,*) # Fast installation is not supported link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath func_warning "this platform does not like uninstalled shared libraries" func_warning "'$output' will be relinked during installation" ;; *,yes) link_command=$finalize_var$compile_command$finalize_rpath relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` ;; *,no) link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath ;; *,needless) link_command=$finalize_var$compile_command$finalize_rpath relink_command= ;; esac # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource=$output_path/$objdir/lt-$output_name.c cwrapper=$output_path/$output_name.exe $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host"; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do case $build_libtool_libs in convenience) oldobjs="$libobjs_save $symfileobj" addlibs=$convenience build_libtool_libs=no ;; module) oldobjs=$libobjs_save addlibs=$old_convenience build_libtool_libs=no ;; *) oldobjs="$old_deplibs $non_pic_objects" $preload && test -f "$symfileobj" \ && func_append oldobjs " $symfileobj" addlibs=$old_convenience ;; esac if test -n "$addlibs"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase=$func_basename_result case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj"; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test -z "$oldobjs"; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test yes = "$build_old_libs" && old_library=$libname.$libext func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test yes = "$hardcode_automatic"; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test yes = "$installed"; then if test -z "$install_libdir"; then break fi output=$output_objdir/${outputname}i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name=$func_basename_result func_resolve_sysroot "$deplib" eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "'$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs=$newdependency_libs newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name=$func_basename_result eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name=$func_basename_result eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles=$newdlprefiles else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles=$newdlprefiles fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test -n "$bindir"; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result/$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that cannot go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test no,yes = "$installed,$need_relink"; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } if test link = "$opt_mode" || test relink = "$opt_mode"; then func_mode_link ${1+"$@"} fi # func_mode_uninstall arg... func_mode_uninstall () { $debug_cmd RM=$nonopt files= rmforce=false 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) func_append RM " $arg"; rmforce=: ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir=$func_dirname_result if test . = "$dir"; then odir=$objdir else odir=$dir/$objdir fi func_basename "$file" name=$func_basename_result test uninstall = "$opt_mode" && odir=$dir # Remember odir for removal later, being careful to avoid duplicates if test clean = "$opt_mode"; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; 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 $rmforce; then continue fi rmfiles=$file case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case $opt_mode in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test none != "$pic_object"; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test none != "$non_pic_object"; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test clean = "$opt_mode"; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.$objext" if test yes = "$fast_install" && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name"; then func_append rmfiles " $odir/lt-$noexename.c" fi fi fi ;; esac func_show_eval "$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 func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then func_mode_uninstall ${1+"$@"} fi test -z "$opt_mode" && { help=$generic_help func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode '$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # where 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: libiodbc-3.52.16/admin/gtk.m40000664000175000017500000002013714013216212012474 00000000000000# Configure paths for GTK+ # Owen Taylor 97-11-3 dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS dnl AC_DEFUN([AM_PATH_GTK], [dnl dnl Get the cflags and libraries from the gtk-config script dnl AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)], gtk_config_prefix="$withval", gtk_config_prefix="") AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)], gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="") AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program], , enable_gtktest=yes) for module in . $4 do case "$module" in gthread) gtk_config_args="$gtk_config_args gthread" ;; esac done if test x$gtk_config_exec_prefix != x ; then gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix" if test x${GTK_CONFIG+set} != xset ; then GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config fi fi if test x$gtk_config_prefix != x ; then gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix" if test x${GTK_CONFIG+set} != xset ; then GTK_CONFIG=$gtk_config_prefix/bin/gtk-config fi fi AC_PATH_PROG(GTK_CONFIG, gtk-config, no) min_gtk_version=ifelse([$1], ,0.99.7,$1) AC_MSG_CHECKING(for GTK - version >= $min_gtk_version) no_gtk="" if test "$GTK_CONFIG" = "no" ; then no_gtk=yes else GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags` GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs` gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` if test "x$enable_gtktest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$GTK_LIBS $LIBS" dnl dnl Now check if the installed GTK is sufficiently new. (Also sanity dnl checks the results of gtk-config to some extent dnl rm -f conf.gtktest AC_TRY_RUN([ #include #include #include int main () { int major, minor, micro; char *tmp_version; system ("touch conf.gtktest"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = g_strdup("$min_gtk_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_gtk_version"); exit(1); } if ((gtk_major_version != $gtk_config_major_version) || (gtk_minor_version != $gtk_config_minor_version) || (gtk_micro_version != $gtk_config_micro_version)) { printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, gtk_major_version, gtk_minor_version, gtk_micro_version); printf ("*** was found! If gtk-config was correct, then it is best\n"); printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n"); printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n"); printf("*** before re-running configure\n"); } #if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION) else if ((gtk_major_version != GTK_MAJOR_VERSION) || (gtk_minor_version != GTK_MINOR_VERSION) || (gtk_micro_version != GTK_MICRO_VERSION)) { printf("*** GTK+ header files (version %d.%d.%d) do not match\n", GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); printf("*** library (version %d.%d.%d)\n", gtk_major_version, gtk_minor_version, gtk_micro_version); } #endif /* defined (GTK_MAJOR_VERSION) ... */ else { if ((gtk_major_version > major) || ((gtk_major_version == major) && (gtk_minor_version > minor)) || ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", gtk_major_version, gtk_minor_version, gtk_micro_version); printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", major, minor, micro); printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the gtk-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n"); printf("*** correct copy of gtk-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_gtk" = x ; then AC_MSG_RESULT(yes) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) if test "$GTK_CONFIG" = "no" ; then echo "*** The gtk-config script installed by GTK could not be found" echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the GTK_CONFIG environment variable to the" echo "*** full path to gtk-config." else if test -f conf.gtktest ; then : else echo "*** Could not run GTK test program, checking why..." CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" AC_TRY_LINK([ #include #include ], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GTK or finding the wrong" echo "*** version of GTK. If it is not finding GTK, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" echo "***" echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" echo "*** came with the system with the command" echo "***" echo "*** rpm --erase --nodeps gtk gtk-devel" ], [ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means GTK was incorrectly installed" echo "*** or that you have moved GTK since it was installed. In the latter case, you" echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi GTK_CFLAGS="" GTK_LIBS="" ifelse([$3], , :, [$3]) fi AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_LIBS) rm -f conf.gtktest ]) libiodbc-3.52.16/admin/install-sh0000755000175000017500000003546314013216233013462 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2014-09-12.12; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. tab=' ' nl=' ' IFS=" $tab$nl" # Set DOITPROG to "echo" to test this script. doit=${DOITPROG-} doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) is_target_a_directory=always dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done # We allow the use of options -d and -T together, by making -d # take the precedence; this is for compatibility with GNU install. if test -n "$dir_arg"; then if test -n "$dst_arg"; then echo "$0: target directory not allowed when installing a directory." >&2 exit 1 fi fi if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then if test $# -gt 1 || test "$is_target_a_directory" = always; then if test ! -d "$dst_arg"; then echo "$0: $dst_arg: Is not a directory." >&2 exit 1 fi fi fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # 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 "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) # $RANDOM is not portable (e.g. dash); use it when possible to # lower collision chance tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 # As "mkdir -p" follows symlinks and we work in /tmp possibly; so # create the $tmpdir first (and fail if unsuccessful) to make sure # that nobody tries to guess the $tmpdir name. if (umask $mkdir_umask && $mkdirprog $mkdir_mode "$tmpdir" && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. test_tmpdir="$tmpdir/a" ls_ld_tmpdir=`ls -ld "$test_tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac oIFS=$IFS IFS=/ set -f set fnord $dstdir shift set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: libiodbc-3.52.16/admin/Makefile.am0000664000175000017500000000652414424170750013521 00000000000000# # Makefile.am # # The iODBC driver manager. # # Copyright (C) 1996-2023 OpenLink Software # All Rights Reserved. # # This software is released under the terms of either of the following # licenses: # # - GNU Library General Public License (see LICENSE.LGPL) # - The BSD License (see LICENSE.BSD). # # Note that the only valid version of the LGPL license as far as this # project is concerned is the original GNU Library General Public License # Version 2, dated June 1991. # # While not mandated by the BSD license, any patches you make to the # iODBC source code may be contributed back into the iODBC project # at your discretion. Contributions will benefit the Open Source and # Data Access community as a whole. Submissions may be made at: # # http://www.iodbc.org # # # GNU Library Generic Public License Version 2 # ============================================ # 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; only # Version 2 of the License dated June 1991. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # The BSD License # =============== # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. Neither the name of OpenLink Software Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # EXTRA_DIST = \ $(srcdir)/gtk-2.0.m4 \ $(srcdir)/gtk.m4 \ $(srcdir)/libiodbc.pc.in \ $(srcdir)/libiodbc.spec.in \ $(srcdir)/openlink.m4 pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libiodbc.pc noinst_SCRIPTS = libiodbc.spec libiodbc-3.52.16/admin/lt~obsolete.m40000644000175000017500000001377414424171014014276 00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software # Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) libiodbc-3.52.16/admin/compile0000755000175000017500000001624514424171017013037 00000000000000#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2012-10-14.11; # UTC # Copyright (C) 1999-2014 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: libiodbc-3.52.16/admin/libiodbc.spec.in0000664000175000017500000002215414424170750014512 00000000000000# # libiodbc.spec # # $Id$ # # RPM specification file to build binary distribution set # # The iODBC driver manager. # # Copyright (C) 1996-2023 OpenLink Software # All Rights Reserved. # # This software is released under the terms of either of the following # licenses: # # - GNU Library General Public License (see LICENSE.LGPL) # - The BSD License (see LICENSE.BSD). # # Note that the only valid version of the LGPL license as far as this # project is concerned is the original GNU Library General Public License # Version 2, dated June 1991. # # While not mandated by the BSD license, any patches you make to the # iODBC source code may be contributed back into the iODBC project # at your discretion. Contributions will benefit the Open Source and # Data Access community as a whole. Submissions may be made at: # # http://www.iodbc.org # # # GNU Library Generic Public License Version 2 # ============================================ # 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; only # Version 2 of the License dated June 1991. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # The BSD License # =============== # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. Neither the name of OpenLink Software Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # ---------------------------------------------------------------------- # MACROS AND DEFINES # ---------------------------------------------------------------------- # Disable generation of debug package %define debug_package %{nil} # Do we want to build the GTK based administrator? %define with_admin 1 # on commandline: --define 'noadmin 1' %{?noadmin:%define with_admin 0} # ---------------------------------------------------------------------- # BASE PACKAGE # ---------------------------------------------------------------------- Name: libiodbc Version: @VERSION@ Release: 1 Summary: iODBC Driver Manager Group: Libraries License: LGPL or BSD license (see "LICENSE" file included in distribution) URL: http://www.iodbc.org/ Source: http://www.iodbc.org/downloads/iODBC/libiodbc-%{PACKAGE_VERSION}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %description The iODBC Driver Manager is a free implementation of the SAG CLI and ODBC compliant driver manager which allows developers to write ODBC compliant applications that can connect to various databases using appropriate backend drivers. The iODBC Driver Manager was originally created Ke Jin and is currently maintained by OpenLink Software under a LGPL or BSD license (see "LICENSE" file included in the distribution). %package devel Summary: header files and libraries for iODBC development Group: Development/Libraries Requires: libiodbc %description devel The iODBC Driver Manager is a free implementation of the SAG CLI and ODBC compliant driver manager which allows developers to write ODBC compliant applications that can connect to various databases using appropriate backend drivers. This package contains the header files and libraries needed to develop program that use the driver manager. The iODBC Driver Manager was originally created Ke Jin and is currently maintained by OpenLink Software under a LGPL or BSD license (see "LICENSE" file included in the distribution). %if %{with_admin} %package admin Summary: GTK based administrator for iODBC development Group: Development/Libraries Requires: libiodbc %description admin The iODBC Driver Manager is a free implementation of the SAG CLI and ODBC compliant driver manager which allows developers to write ODBC compliant applications that can connect to various databases using appropriate backend drivers. This package contains a GTK based administrator program for maintaining DSN information in odbc.ini and odbcinst.ini files. The iODBC Driver Manager was originally created Ke Jin and is currently maintained by OpenLink Software under a LGPL or BSD license (see "LICENSE" file included in the distribution). %endif %prep %setup %build # # Configure the package # %if %{with_admin} %configure --enable-odbc3 --with-iodbc-inidir=/etc --enable-pthreads --disable-libodbc %else %configure --enable-odbc3 --with-iodbc-inidir=/etc --enable-pthreads --disable-libodbc --disable-gui %endif # # Build the packages # make %install # # Carefully clean the build tree before use # [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT # # Make sure we can find the necessary libraries # LIBRARY_PATH=$RPM_BUILD_ROOT/%{_libdir} export LIBRARY_PATH # # Install binaries, include files and libraries # %makeinstall # # Install the sample odbc.ini and odbcinst.ini files # mkdir -p $RPM_BUILD_ROOT/etc #install -m644 etc/odbc.ini.sample $RPM_BUILD_ROOT/etc/odbc.ini #install -m644 etc/odbcinst.ini.sample $RPM_BUILD_ROOT/etc/odbcinst.ini %clean # # Carefully clean the build tree # [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %attr(0755, root, root) %{_bindir}/iodbctest %attr(0755, root, root) %{_bindir}/iodbctestw %attr(0755, root, root) %{_libdir}/libiodbc.so.* %attr(0755, root, root) %{_libdir}/libiodbcinst.so.* %attr(0644, root, root) %{_mandir}/man1/iodbctest.1* %attr(0644, root, root) %{_mandir}/man1/iodbctestw.1* #%attr(0644, root, root) %config /etc/odbc.ini #%attr(0644, root, root) %config /etc/odbcinst.ini %files devel %defattr(-,root,root) %attr(0644, root, root) %doc AUTHORS %attr(0644, root, root) %doc LICENSE %attr(0644, root, root) %doc LICENSE.LGPL %attr(0644, root, root) %doc LICENSE.BSD %attr(0644, root, root) %doc ChangeLog %attr(0644, root, root) %doc NEWS %attr(0644, root, root) %doc README %attr(0644, root, root) %doc README.CVS %attr(0644, root, root) %doc etc/odbc.ini.sample %attr(0644, root, root) %doc etc/odbcinst.ini.sample %attr(0644, root, root) %{_includedir}/iodbcext.h %attr(0644, root, root) %{_includedir}/iodbcinst.h %attr(0644, root, root) %{_includedir}/iodbcunix.h %attr(0644, root, root) %{_includedir}/isqlext.h %attr(0644, root, root) %{_includedir}/isql.h %attr(0644, root, root) %{_includedir}/isqltypes.h %attr(0644, root, root) %{_includedir}/sql.h %attr(0644, root, root) %{_includedir}/sqltypes.h %attr(0644, root, root) %{_includedir}/sqlucode.h %attr(0644, root, root) %{_includedir}/sqlext.h %attr(0644, root, root) %{_includedir}/odbcinst.h %attr(0755, root, root) %{_bindir}/iodbc-config %attr(0644, root, root) %{_libdir}/libiodbc.a %attr(0644, root, root) %{_libdir}/libiodbc.la %attr(0755, root, root) %{_libdir}/libiodbc.so %attr(0644, root, root) %{_libdir}/libiodbcinst.a %attr(0644, root, root) %{_libdir}/libiodbcinst.la %attr(0755, root, root) %{_libdir}/libiodbcinst.so %attr(0644, root, root) %{_mandir}/man1/iodbc-config.1* %attr(0644, root, root) %{_datadir}/libiodbc/samples/Makefile %attr(0644, root, root) %{_datadir}/libiodbc/samples/iodbctest.c %attr(0644, root, root) %{_libdir}/pkgconfig/libiodbc.pc %if %{with_admin} %files admin %attr(0755, root, root) %{_bindir}/iodbcadm-gtk %ghost %{_libdir}/libdrvproxy.a %ghost %{_libdir}/libdrvproxy.la %ghost %{_libdir}/libdrvproxy.so %attr(0755, root, root) %{_libdir}/libdrvproxy.so.* %ghost %{_libdir}/libiodbcadm.a %ghost %{_libdir}/libiodbcadm.la %ghost %{_libdir}/libiodbcadm.so %attr(0755, root, root) %{_libdir}/libiodbcadm.so.* %attr(0644, root, root) %{_mandir}/man1/iodbcadm-gtk.1* %endif libiodbc-3.52.16/admin/gtk-2.0.m40000664000175000017500000001655214013216212012777 00000000000000# Configure paths for GTK+ # Owen Taylor 1997-2001 dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES, dnl pass to pkg-config dnl AC_DEFUN([AM_PATH_GTK_2_0], [dnl dnl Get the cflags and libraries from pkg-config dnl AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run a test GTK+ program], , enable_gtktest=yes) pkg_config_args=gtk+-2.0 for module in . $4 do case "$module" in gthread) pkg_config_args="$pkg_config_args gthread-2.0" ;; esac done no_gtk="" AC_PATH_PROG(PKG_CONFIG, pkg-config, no) if test x$PKG_CONFIG != xno ; then if pkg-config --atleast-pkgconfig-version 0.7 ; then : else echo *** pkg-config too old; version 0.7 or better required. no_gtk=yes PKG_CONFIG=no fi else no_gtk=yes fi min_gtk_version=ifelse([$1], ,2.0.0,$1) AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version) if test x$PKG_CONFIG != xno ; then ## don't try to run the test against uninstalled libtool libs if $PKG_CONFIG --uninstalled $pkg_config_args; then echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH" enable_gtktest=no fi if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then : else no_gtk=yes fi fi if test x"$no_gtk" = x ; then GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags` GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs` gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` if test "x$enable_gtktest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$GTK_LIBS $LIBS" dnl dnl Now check if the installed GTK+ is sufficiently new. (Also sanity dnl checks the results of pkg-config to some extent) dnl rm -f conf.gtktest AC_TRY_RUN([ #include #include #include int main () { int major, minor, micro; char *tmp_version; system ("touch conf.gtktest"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = g_strdup("$min_gtk_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_gtk_version"); exit(1); } if ((gtk_major_version != $gtk_config_major_version) || (gtk_minor_version != $gtk_config_minor_version) || (gtk_micro_version != $gtk_config_micro_version)) { printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, gtk_major_version, gtk_minor_version, gtk_micro_version); printf ("*** was found! If pkg-config was correct, then it is best\n"); printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); printf("*** to point to the correct configuration files\n"); } else if ((gtk_major_version != GTK_MAJOR_VERSION) || (gtk_minor_version != GTK_MINOR_VERSION) || (gtk_micro_version != GTK_MICRO_VERSION)) { printf("*** GTK+ header files (version %d.%d.%d) do not match\n", GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); printf("*** library (version %d.%d.%d)\n", gtk_major_version, gtk_minor_version, gtk_micro_version); } else { if ((gtk_major_version > major) || ((gtk_major_version == major) && (gtk_minor_version > minor)) || ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", gtk_major_version, gtk_minor_version, gtk_micro_version); printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", major, minor, micro); printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n"); printf("*** correct copy of pkg-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_gtk" = x ; then AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version)) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) if test "$PKG_CONFIG" = "no" ; then echo "*** A new enough version of pkg-config was not found." echo "*** See http://pkgconfig.sourceforge.net" else if test -f conf.gtktest ; then : else echo "*** Could not run GTK+ test program, checking why..." ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" AC_TRY_LINK([ #include #include ], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GTK+ or finding the wrong" echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], [ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi GTK_CFLAGS="" GTK_LIBS="" ifelse([$3], , :, [$3]) fi AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_LIBS) rm -f conf.gtktest ]) libiodbc-3.52.16/admin/config.guess0000755000175000017500000012637314013216233013777 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2018 Free Software Foundation, Inc. timestamp='2018-02-24' # 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 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess # # Please send patches to . me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Options: -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 1992-2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > "$dummy.c" ; for c in cc gcc c89 c99 ; do if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "$UNAME_SYSTEM" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu eval "$set_cc_for_build" cat <<-EOF > "$dummy.c" #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #endif EOF eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" # If ldd exists, use it to detect musl libc. if command -v ldd >/dev/null && \ ldd --version 2>&1 | grep -q ^musl then LIBC=musl fi ;; esac # 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 tuples: *-*-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=`(uname -p 2>/dev/null || \ "/sbin/$sysctl" 2>/dev/null || \ "/usr/sbin/$sysctl" 2>/dev/null || \ echo unknown)` case "$UNAME_MACHINE_ARCH" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; earmv*) arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` machine="${arch}${endian}"-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) and ABI. case "$UNAME_MACHINE_ARCH" in earm*) os=netbsdelf ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval "$set_cc_for_build" if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # Determine ABI tags. case "$UNAME_MACHINE_ARCH" in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` ;; 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/[-_].*//' | cut -d. -f1,2` ;; 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}${abi}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" exit ;; *:LibertyBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" exit ;; *:MidnightBSD:*:*) echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" exit ;; *:ekkoBSD:*:*) echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" exit ;; *:SolidBSD:*:*) echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd"$UNAME_RELEASE" exit ;; *:MirBSD:*:*) echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" exit ;; *:Sortix:*:*) echo "$UNAME_MACHINE"-unknown-sortix exit ;; *:Redox:*:*) echo "$UNAME_MACHINE"-unknown-redox exit ;; mips:OSF1:*.*) echo mips-dec-osf1 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`" # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo "$UNAME_MACHINE"-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo "$UNAME_MACHINE"-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix"$UNAME_RELEASE" exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux"$UNAME_RELEASE" exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval "$set_cc_for_build" SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH=x86_64 fi fi echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos"$UNAME_RELEASE" exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos"$UNAME_RELEASE" ;; sun4) echo sparc-sun-sunos"$UNAME_RELEASE" ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos"$UNAME_RELEASE" exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint"$UNAME_RELEASE" exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint"$UNAME_RELEASE" exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint"$UNAME_RELEASE" exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint"$UNAME_RELEASE" exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint"$UNAME_RELEASE" exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint"$UNAME_RELEASE" exit ;; m68k:machten:*:*) echo m68k-apple-machten"$UNAME_RELEASE" exit ;; powerpc:machten:*:*) echo powerpc-apple-machten"$UNAME_RELEASE" exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix"$UNAME_RELEASE" exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix"$UNAME_RELEASE" exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix"$UNAME_RELEASE" exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval "$set_cc_for_build" sed 's/^ //' << EOF > "$dummy.c" #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`"$dummy" "$dummyarg"` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos"$UNAME_RELEASE" exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] then if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ [ "$TARGET_BINARY_INTERFACE"x = x ] then echo m88k-dg-dgux"$UNAME_RELEASE" else echo m88k-dg-dguxbcs"$UNAME_RELEASE" fi else echo i586-dg-dgux"$UNAME_RELEASE" fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval "$set_cc_for_build" sed 's/^ //' << EOF > "$dummy.c" #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) 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/lslpp ] ; then IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` 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:4.4BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` case "$UNAME_MACHINE" in 9000/31?) HP_ARCH=m68000 ;; 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "$sc_cpu_version" in 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "$sc_kernel_bits" in 32) HP_ARCH=hppa2.0n ;; 64) HP_ARCH=hppa2.0w ;; '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi if [ "$HP_ARCH" = "" ]; then eval "$set_cc_for_build" sed 's/^ //' << EOF > "$dummy.c" #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ "$HP_ARCH" = hppa2.0w ] then eval "$set_cc_for_build" # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH=hppa2.0w else HP_ARCH=hppa64 fi fi echo "$HP_ARCH"-hp-hpux"$HPUX_REV" exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux"$HPUX_REV" exit ;; 3050*:HI-UX:*:*) eval "$set_cc_for_build" sed 's/^ //' << EOF > "$dummy.c" #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo "$UNAME_MACHINE"-unknown-osf1mk else echo "$UNAME_MACHINE"-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi"$UNAME_RELEASE" exit ;; *:BSD/OS:*:*) echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case "$UNAME_PROCESSOR" in amd64) UNAME_PROCESSOR=x86_64 ;; i386) UNAME_PROCESSOR=i586 ;; esac echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" exit ;; i*:CYGWIN*:*) echo "$UNAME_MACHINE"-pc-cygwin exit ;; *:MINGW64*:*) echo "$UNAME_MACHINE"-pc-mingw64 exit ;; *:MINGW*:*) echo "$UNAME_MACHINE"-pc-mingw32 exit ;; *:MSYS*:*) echo "$UNAME_MACHINE"-pc-msys exit ;; i*:PW*:*) echo "$UNAME_MACHINE"-pc-pw32 exit ;; *:Interix*:*) case "$UNAME_MACHINE" in x86) echo i586-pc-interix"$UNAME_RELEASE" exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix"$UNAME_RELEASE" exit ;; IA64) echo ia64-unknown-interix"$UNAME_RELEASE" exit ;; esac ;; i*:UWIN*:*) echo "$UNAME_MACHINE"-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-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-$LIBC`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 "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" exit ;; i*86:Minix:*:*) echo "$UNAME_MACHINE"-pc-minix exit ;; aarch64:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arc:Linux:*:* | arceb:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arm*:Linux:*:*) eval "$set_cc_for_build" if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi else echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf fi fi exit ;; avr32*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; cris:Linux:*:*) echo "$UNAME_MACHINE"-axis-linux-"$LIBC" exit ;; crisv32:Linux:*:*) echo "$UNAME_MACHINE"-axis-linux-"$LIBC" exit ;; e2k:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; frv:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; hexagon:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; i*86:Linux:*:*) echo "$UNAME_MACHINE"-pc-linux-"$LIBC" exit ;; ia64:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; k1om:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; m32r*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; m68*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval "$set_cc_for_build" sed 's/^ //' << EOF > "$dummy.c" #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } ;; mips64el:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; openrisc*:Linux:*:*) echo or1k-unknown-linux-"$LIBC" exit ;; or32:Linux:*:* | or1k*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; padre:Linux:*:*) echo sparc-unknown-linux-"$LIBC" exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-"$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-"$LIBC" ;; PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; *) echo hppa-unknown-linux-"$LIBC" ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-"$LIBC" exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-"$LIBC" exit ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-"$LIBC" exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-"$LIBC" exit ;; riscv32:Linux:*:* | riscv64:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" exit ;; sh64*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; sh*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; tile*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; vax:Linux:*:*) echo "$UNAME_MACHINE"-dec-linux-"$LIBC" exit ;; x86_64:Linux:*:*) if objdump -f /bin/sh | grep -q elf32-x86-64; then echo "$UNAME_MACHINE"-pc-linux-"$LIBC"x32 else echo "$UNAME_MACHINE"-pc-linux-"$LIBC" fi exit ;; xtensa*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo "$UNAME_MACHINE"-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo "$UNAME_MACHINE"-unknown-stop exit ;; i*86:atheos:*:*) echo "$UNAME_MACHINE"-unknown-atheos exit ;; i*86:syllable:*:*) echo "$UNAME_MACHINE"-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos"$UNAME_RELEASE" exit ;; i*86:*DOS:*:*) echo "$UNAME_MACHINE"-pc-msdosdjgpp exit ;; i*86:*:4.*:*) UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" else echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" else echo "$UNAME_MACHINE"-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos"$UNAME_RELEASE" exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos"$UNAME_RELEASE" exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos"$UNAME_RELEASE" exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos"$UNAME_RELEASE" exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv"$UNAME_RELEASE" exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo "$UNAME_MACHINE"-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo "$UNAME_MACHINE"-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux"$UNAME_RELEASE" exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv"$UNAME_RELEASE" else echo mips-unknown-sysv"$UNAME_RELEASE" fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux"$UNAME_RELEASE" exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux"$UNAME_RELEASE" exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux"$UNAME_RELEASE" exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux"$UNAME_RELEASE" exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux"$UNAME_RELEASE" exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux"$UNAME_RELEASE" exit ;; SX-ACE:SUPER-UX:*:*) echo sxace-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 eval "$set_cc_for_build" if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_PPC >/dev/null then UNAME_PROCESSOR=powerpc fi fi elif test "$UNAME_PROCESSOR" = i386 ; then # Avoid executing cc on OS X 10.9, as it ships with a stub # that puts up a graphical alert prompting to install # developer tools. Any system running Mac OS X 10.7 or # later (Darwin 11 and later) is required to have a 64-bit # processor. This is not true of the ARM version of Darwin # that Apple uses in portable devices. UNAME_PROCESSOR=x86_64 fi 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 ;; NEO-*:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk"$UNAME_RELEASE" exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk"$UNAME_RELEASE" exit ;; NSR-*:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk"$UNAME_RELEASE" exit ;; NSV-*:NONSTOP_KERNEL:*:*) echo nsv-tandem-nsk"$UNAME_RELEASE" exit ;; NSX-*:NONSTOP_KERNEL:*:*) echo nsx-tandem-nsk"$UNAME_RELEASE" exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = 386; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo "$UNAME_MACHINE"-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux"$UNAME_RELEASE" exit ;; *:DragonFly:*:*) echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "$UNAME_MACHINE" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" exit ;; i*86:rdos:*:*) echo "$UNAME_MACHINE"-pc-rdos exit ;; i*86:AROS:*:*) echo "$UNAME_MACHINE"-pc-aros exit ;; x86_64:VMkernel:*:*) echo "$UNAME_MACHINE"-unknown-esx exit ;; amd64:Isilon\ OneFS:*:*) echo x86_64-unknown-onefs exit ;; esac echo "$0: unable to guess system type" >&2 case "$UNAME_MACHINE:$UNAME_SYSTEM" in mips:Linux | mips64:Linux) # If we got here on MIPS GNU/Linux, output extra information. cat >&2 <&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-functions 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: libiodbc-3.52.16/admin/ltsugar.m40000644000175000017500000001044014424171014013370 00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59, which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) libiodbc-3.52.16/admin/libiodbc.pc.in0000664000175000017500000000675214424170750014170 00000000000000# # libiodbc.pc # # $Id$ # # pkg-config specification file # # The iODBC driver manager. # # Copyright (C) 1996-2023 OpenLink Software # All Rights Reserved. # # This software is released under the terms of either of the following # licenses: # # - GNU Library General Public License (see LICENSE.LGPL) # - The BSD License (see LICENSE.BSD). # # Note that the only valid version of the LGPL license as far as this # project is concerned is the original GNU Library General Public License # Version 2, dated June 1991. # # While not mandated by the BSD license, any patches you make to the # iODBC source code may be contributed back into the iODBC project # at your discretion. Contributions will benefit the Open Source and # Data Access community as a whole. Submissions may be made at: # # http://www.iodbc.org # # # GNU Library Generic Public License Version 2 # ============================================ # 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; only # Version 2 of the License dated June 1991. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # The BSD License # =============== # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. Neither the name of OpenLink Software Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ ODBCINI=@inidir@/odbc.ini ODBCINSTINI=@inidir@/odbcinst.ini odbcversion=@odbcmode@ Name: iODBC Description: @PACKAGE_NAME@ Version: @PACKAGE_VERSION@ Requires: Libs: -L${libdir} -liodbc -liodbcinst @LIBADD_DL@ Libs.private: -lpthread Cflags: -I${includedir} libiodbc-3.52.16/admin/depcomp0000755000175000017500000005601714424171020013031 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2016-01-11.22; # UTC # Copyright (C) 1999-2017 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## 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). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - 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 -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # 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. ## 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. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -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 -ne 0; then 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 ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # 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 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # 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 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: libiodbc-3.52.16/admin/mkinstalldirs0000775000175000017500000000653714013216212014263 00000000000000#! /bin/sh # mkinstalldirs --- make directory hierarchy scriptversion=2005-02-02.21 # Original author: Noah Friedman # Created: 1993-05-16 # Public domain. # # This file is maintained in Automake, please report # bugs to or send patches to # . errstatus=0 dirmode="" usage="\ Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... Create each directory DIR (with mode MODE, if specified), including all leading file name components. Report bugs to ." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" exit $? ;; -m) # -m PERM arg shift test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } dirmode=$1 shift ;; --version) echo "$0 $scriptversion" exit $? ;; --) # stop option processing shift break ;; -*) # unknown option echo "$usage" 1>&2 exit 1 ;; *) # first non-opt arg break ;; esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac # Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and # mkdir -p a/c at the same time, both will detect that a is missing, # one will create a, then the other will try to create a and die with # a "File exists" error. This is a problem when calling mkinstalldirs # from a parallel make. We use --version in the probe to restrict # ourselves to GNU mkdir, which is thread-safe. case $dirmode in '') if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -p -- $*" exec 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. test -d ./-p && rmdir ./-p test -d ./--version && rmdir ./--version fi ;; *) if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" else # Clean up after NextStep and OpenStep mkdir. for d in ./-m ./-p ./--version "./$dirmode"; do test -d $d && rmdir $d done fi ;; esac 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 else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr="" chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp="$pathcomp/" done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: libiodbc-3.52.16/admin/missing0000755000175000017500000001533014424171017013052 00000000000000#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2013-10-28.13; # UTC # Copyright (C) 1996-2014 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=http://www.perl.org/ flex_URL=http://flex.sourceforge.net/ gnu_software_URL=http://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: libiodbc-3.52.16/admin/openlink.m40000664000175000017500000000122514013216212013523 00000000000000# # Autoconf macros used by OpenLink # AC_DEFUN([OPL_CONFIG_NICE], [ rm -f $1 cat >$1 <<-CONFIG_NICE_EOF #!$SHELL # # Created by configure for $PACKAGE_STRING # CONFIG_NICE_EOF export_names="export" for var in SHELL CFLAGS CXXFLAGS CPPFLAGS LDFLAGS INCLUDES LIBS CC CXX do eval val=\$$var if test -n "$val"; then echo "$var='$val'" >> $1 export_names="$export_names $var" fi done echo "$export_names" >> $1 echo "" >> $1 echo "# configure" >> $1 eval "set -- $ac_configure_args" echo "[$]SHELL \"[$]0\" \\" >> $1 for arg do echo "'$arg' \\" >> $1 done echo '"[$]@"' >> $1 chmod +x $1 ])dnl libiodbc-3.52.16/admin/Makefile.in0000664000175000017500000004420514424171017013525 00000000000000# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 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@ # # Makefile.am # # The iODBC driver manager. # # Copyright (C) 1996-2023 OpenLink Software # All Rights Reserved. # # This software is released under the terms of either of the following # licenses: # # - GNU Library General Public License (see LICENSE.LGPL) # - The BSD License (see LICENSE.BSD). # # Note that the only valid version of the LGPL license as far as this # project is concerned is the original GNU Library General Public License # Version 2, dated June 1991. # # While not mandated by the BSD license, any patches you make to the # iODBC source code may be contributed back into the iODBC project # at your discretion. Contributions will benefit the Open Source and # Data Access community as a whole. Submissions may be made at: # # http://www.iodbc.org # # # GNU Library Generic Public License Version 2 # ============================================ # 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; only # Version 2 of the License dated June 1991. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # The BSD License # =============== # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. Neither the name of OpenLink Software Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = admin ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/admin/gtk-2.0.m4 \ $(top_srcdir)/admin/gtk.m4 $(top_srcdir)/admin/libtool.m4 \ $(top_srcdir)/admin/ltoptions.m4 \ $(top_srcdir)/admin/ltsugar.m4 \ $(top_srcdir)/admin/ltversion.m4 \ $(top_srcdir)/admin/lt~obsolete.m4 \ $(top_srcdir)/admin/openlink.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = libiodbc.spec libiodbc.pc CONFIG_CLEAN_VPATH_FILES = SCRIPTS = $(noinst_SCRIPTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(pkgconfigdir)" DATA = $(pkgconfig_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/libiodbc.pc.in \ $(srcdir)/libiodbc.spec.in compile config.guess config.sub \ install-sh ltmain.sh missing mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_CONFIG = @GTK_CONFIG@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBADD_DL = @LIBADD_DL@ LIBADD_OS = @LIBADD_OS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ filedsnpath = @filedsnpath@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ inidir = @inidir@ install_sh = @install_sh@ lib_version = @lib_version@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ odbcmode = @odbcmode@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ $(srcdir)/gtk-2.0.m4 \ $(srcdir)/gtk.m4 \ $(srcdir)/libiodbc.pc.in \ $(srcdir)/libiodbc.spec.in \ $(srcdir)/openlink.m4 pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libiodbc.pc noinst_SCRIPTS = libiodbc.spec all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu admin/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu admin/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): libiodbc.spec: $(top_builddir)/config.status $(srcdir)/libiodbc.spec.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ libiodbc.pc: $(top_builddir)/config.status $(srcdir)/libiodbc.pc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(SCRIPTS) $(DATA) installdirs: for dir in "$(DESTDIR)$(pkgconfigdir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-pkgconfigDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-pkgconfigDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-pkgconfigDATA install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags-am uninstall uninstall-am \ uninstall-pkgconfigDATA .PRECIOUS: Makefile # 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: libiodbc-3.52.16/LICENSE.LGPL0000664000175000017500000006127514013216212012127 00000000000000 GNU LIBRARY GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1991 Free Software Foundation, Inc. 51 Franklin St, 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 library GPL. It is numbered 2 because it goes with version 2 of the ordinary GPL.] 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 Library General Public License, applies to some specially designated Free Software Foundation software, and to any other libraries whose authors decide to use it. You can use it for your libraries, 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 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 a program 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. Our method of protecting your rights has two steps: (1) copyright the library, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the library. Also, for each distributor's protection, we want to make certain that everyone understands that there is no warranty for this free library. If the library is modified by someone else and passed on, we want its recipients to know that what they have is not the original version, 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 companies distributing free software will individually obtain patent licenses, thus in effect transforming the program into proprietary software. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License, which was designed for utility programs. This license, the GNU Library General Public License, applies to certain designated libraries. This license is quite different from the ordinary one; be sure to read it in full, and don't assume that anything in it is the same as in the ordinary license. The reason we have a separate public license for some libraries is that they blur the distinction we usually make between modifying or adding to a program and simply using it. Linking a program with a library, without changing the library, is in some sense simply using the library, and is analogous to running a utility program or application program. However, in a textual and legal sense, the linked executable is a combined work, a derivative of the original library, and the ordinary General Public License treats it as such. Because of this blurred distinction, using the ordinary General Public License for libraries did not effectively promote software sharing, because most developers did not use the libraries. We concluded that weaker conditions might promote sharing better. However, unrestricted linking of non-free programs would deprive the users of those programs of all benefit from the free status of the libraries themselves. This Library General Public License is intended to permit developers of non-free programs to use free libraries, while preserving your freedom as a user of such programs to change the free libraries that are incorporated in them. (We have not seen how to achieve this as regards changes in header files, but we have achieved it as regards changes in the actual functions of the Library.) The hope is that this will lead to faster development of free libraries. 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, while the latter only works together with the library. Note that it is possible for a library to be covered by the ordinary General Public License rather than by this special one. GNU LIBRARY GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Library 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 compile 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) 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. c) 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. d) 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 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. 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 to 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 Library 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 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 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 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 51 Franklin St, 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! libiodbc-3.52.16/COPYING0000664000175000017500000000133114424170750011417 00000000000000iODBC Driver Manager Copyright (C) 1995 Ke Jin Copyright (C) 1996-2023 OpenLink Software All Rights Reserved. This software is released under either the GNU Library General Public License (see LICENSE.LGPL) or the BSD License (see LICENSE.BSD). Note that the only valid version of the LGPL license as far as this project is concerned is the original GNU Library General Public License Version 2, dated June 1991. While not mandated by the BSD license, any patches you make to the iODBC may be contributed back into the iODBC project at your discretion. Contributions will benefit the Open Source and Data Access community as a whole. Submissions may be made at http://www.iodbc.org. libiodbc-3.52.16/bin/0000775000175000017500000000000014424171427011220 500000000000000libiodbc-3.52.16/bin/Makefile.in0000664000175000017500000004440114424171017013203 00000000000000# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 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@ # # Makefile.am # # The iODBC driver manager. # # Copyright (C) 1996-2023 OpenLink Software # All Rights Reserved. # # This software is released under the terms of either of the following # licenses: # # - GNU Library General Public License (see LICENSE.LGPL) # - The BSD License (see LICENSE.BSD). # # Note that the only valid version of the LGPL license as far as this # project is concerned is the original GNU Library General Public License # Version 2, dated June 1991. # # While not mandated by the BSD license, any patches you make to the # iODBC source code may be contributed back into the iODBC project # at your discretion. Contributions will benefit the Open Source and # Data Access community as a whole. Submissions may be made at: # # http://www.iodbc.org # # # GNU Library Generic Public License Version 2 # ============================================ # 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; only # Version 2 of the License dated June 1991. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # The BSD License # =============== # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. Neither the name of OpenLink Software Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = bin ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/admin/gtk-2.0.m4 \ $(top_srcdir)/admin/gtk.m4 $(top_srcdir)/admin/libtool.m4 \ $(top_srcdir)/admin/ltoptions.m4 \ $(top_srcdir)/admin/ltsugar.m4 \ $(top_srcdir)/admin/ltversion.m4 \ $(top_srcdir)/admin/lt~obsolete.m4 \ $(top_srcdir)/admin/openlink.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = iodbc-config CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(bindir)" SCRIPTS = $(bin_SCRIPTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/iodbc-config.in \ $(top_srcdir)/admin/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_CONFIG = @GTK_CONFIG@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBADD_DL = @LIBADD_DL@ LIBADD_OS = @LIBADD_OS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ filedsnpath = @filedsnpath@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ inidir = @inidir@ install_sh = @install_sh@ lib_version = @lib_version@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ odbcmode = @odbcmode@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ bin_SCRIPTS = iodbc-config all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): iodbc-config: $(top_builddir)/config.status $(srcdir)/iodbc-config.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(SCRIPTS) 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binSCRIPTS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -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-binSCRIPTS .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-binSCRIPTS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-binSCRIPTS .PRECIOUS: Makefile # 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: libiodbc-3.52.16/bin/iodbc-config.in0000664000175000017500000001305414424170750014014 00000000000000#!/bin/sh # # The iODBC driver manager. # # Copyright (C) 1996-2023 OpenLink Software # All Rights Reserved. # # This software is released under the terms of either of the following # licenses: # # - GNU Library General Public License (see LICENSE.LGPL) # - The BSD License (see LICENSE.BSD). # # Note that the only valid version of the LGPL license as far as this # project is concerned is the original GNU Library General Public License # Version 2, dated June 1991. # # While not mandated by the BSD license, any patches you make to the # iODBC source code may be contributed back into the iODBC project # at your discretion. Contributions will benefit the Open Source and # Data Access community as a whole. Submissions may be made at: # # http://www.iodbc.org # # # GNU Library Generic Public License Version 2 # ============================================ # 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; only # Version 2 of the License dated June 1991. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # The BSD License # =============== # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. Neither the name of OpenLink Software Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # prefix=@prefix@ exec_prefix=@exec_prefix@ exec_prefix_set=no data_dir=@datadir@ usage() { cat < Usage: iodbc-config [OPTIONS] [LIBRARIES] Options: [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--static-libs] [--libtool-libs] [--cflags] [--odbcversion] [--odbcini] [--odbcinstini] Libraries: iodbc EOF exit $1 } if test $# -eq 0; then usage 1 1>&2 fi lib_iodbc=yes while test $# -gt 0; do case "$1" in -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac case $1 in --prefix=*) prefix=$optarg if test $exec_prefix_set = no ; then exec_prefix=$optarg fi ;; --prefix) echo_prefix=yes ;; --exec-prefix=*) exec_prefix=$optarg exec_prefix_set=yes ;; --exec-prefix) echo_exec_prefix=yes ;; --version) echo @VERSION@ exit 0 ;; --cflags) if test "@includedir@" != /usr/include ; then includes="-I@includedir@" fi echo_cflags=yes ;; --libs) echo_libs=yes ;; --static-libs) echo_staticlibs=yes ;; --libtool-libs) echo_libtoollibs=yes ;; --data-dir) echo_data_dir=yes ;; --odbcversion) echo @odbcmode@ exit 0 ;; --odbcini) echo_odbcini=yes ;; --odbcinstini) echo_odbcinstini=yes ;; iodbc) lib_iodbc=yes ;; *) usage 1 1>&2 ;; esac shift done if test "$echo_prefix" = "yes"; then echo $prefix fi if test "$echo_exec_prefix" = "yes"; then echo $exec_prefix fi if test "$echo_data_dir" = "yes"; then echo $data_dir fi if test "$echo_odbcini" = "yes"; then echo "@inidir@/odbc.ini" fi if test "$echo_odbcinstini" = "yes"; then echo "@inidir@/odbcinst.ini" fi if test "$echo_cflags" = "yes"; then echo "$includes" fi if test "$echo_libs" = "yes"; then libs="" if test "$lib_iodbc" = "yes"; then libs="$libs -liodbc -liodbcinst" fi echo "-L@libdir@ $libs" fi if test "$echo_staticlibs" = "yes"; then libs="" if test "$lib_iodbc" = "yes"; then libs="@libdir@/libiodbc.a @libdir@/libiodbcinst.a -lpthread @LIBADD_DL@" fi echo "$libs" fi if test "$echo_libtoollibs" = "yes"; then libs="" if test "$lib_iodbc" = "yes"; then libs="@libdir@/libiodbc.la @libdir@/libiodbcinst.la" fi echo "$libs" fi libiodbc-3.52.16/bin/Makefile.am0000664000175000017500000000620214424170750013172 00000000000000# # Makefile.am # # The iODBC driver manager. # # Copyright (C) 1996-2023 OpenLink Software # All Rights Reserved. # # This software is released under the terms of either of the following # licenses: # # - GNU Library General Public License (see LICENSE.LGPL) # - The BSD License (see LICENSE.BSD). # # Note that the only valid version of the LGPL license as far as this # project is concerned is the original GNU Library General Public License # Version 2, dated June 1991. # # While not mandated by the BSD license, any patches you make to the # iODBC source code may be contributed back into the iODBC project # at your discretion. Contributions will benefit the Open Source and # Data Access community as a whole. Submissions may be made at: # # http://www.iodbc.org # # # GNU Library Generic Public License Version 2 # ============================================ # 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; only # Version 2 of the License dated June 1991. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # The BSD License # =============== # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. Neither the name of OpenLink Software Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # bin_SCRIPTS = iodbc-config libiodbc-3.52.16/include/0000775000175000017500000000000014424171427012073 500000000000000libiodbc-3.52.16/include/isqlext.h0000664000175000017500000000674314424170750013665 00000000000000/* * isqlext.h * * $Id$ * * iODBC defines (ext) * * The iODBC driver manager. * * Copyright (C) 1995 Ke Jin * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * This file is deprecated in favor of sqlext.h and will be removed * sometime in the future. Please recode your applications to use * the standard names sql.h, sqlext.h and sqltypes.h. */ #include libiodbc-3.52.16/include/iodbcinst.h0000664000175000017500000000670714424170750014152 00000000000000/* * iodbcinst.h * * $Id$ * * iODBC Installer defines * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * This file is deprecated in favor of odbcinst.h and will be removed * sometime in the future. Please recode your applications to use * the standard names sql.h, sqlext.h, sqltypes.h and odbcinst.h. */ #include libiodbc-3.52.16/include/isqltypes.h0000664000175000017500000000674414424170750014232 00000000000000/* * isqltypes.h * * $Id$ * * iODBC typedefs * * The iODBC driver manager. * * Copyright (C) 1995 Ke Jin * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * This file is deprecated in favor of sqltypes.h and will be removed * sometime in the future. Please recode your applications to use * the standard names sql.h, sqlext.h and sqltypes.h. */ #include libiodbc-3.52.16/include/Makefile.am0000664000175000017500000000650114424170750014047 00000000000000# # Makefile.am # # The iODBC driver manager. # # Copyright (C) 1996-2023 OpenLink Software # All Rights Reserved. # # This software is released under the terms of either of the following # licenses: # # - GNU Library General Public License (see LICENSE.LGPL) # - The BSD License (see LICENSE.BSD). # # Note that the only valid version of the LGPL license as far as this # project is concerned is the original GNU Library General Public License # Version 2, dated June 1991. # # While not mandated by the BSD license, any patches you make to the # iODBC source code may be contributed back into the iODBC project # at your discretion. Contributions will benefit the Open Source and # Data Access community as a whole. Submissions may be made at: # # http://www.iodbc.org # # # GNU Library Generic Public License Version 2 # ============================================ # 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; only # Version 2 of the License dated June 1991. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # The BSD License # =============== # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. Neither the name of OpenLink Software Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # include_HEADERS = \ isql.h \ isqlext.h \ isqltypes.h \ sql.h \ sqlext.h \ sqlucode.h \ sqltypes.h \ odbcinst.h \ iodbcunix.h \ iodbcinst.h \ iodbcext.h noinst_HEADERS = \ iodbc.h \ macos_config.h libiodbc-3.52.16/include/sql.h0000664000175000017500000007507214424170750012774 00000000000000/* * sql.h * * $Id$ * * ODBC defines * * The iODBC driver manager. * * Copyright (C) 1995 Ke Jin * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef _SQL_H #define _SQL_H /* * Set default specification to ODBC 3.51 */ #ifndef ODBCVER #define ODBCVER 0x0351 #endif #ifndef _SQLTYPES_H #include #endif #ifdef __cplusplus extern "C" { #endif /* * Useful Constants */ #define SQL_MAX_MESSAGE_LENGTH 512 /* * Handle types */ #if (ODBCVER >= 0x0300) #define SQL_HANDLE_ENV 1 #define SQL_HANDLE_DBC 2 #define SQL_HANDLE_STMT 3 #define SQL_HANDLE_DESC 4 #endif /* ODBCVER >= 0x0300 */ /* * Function return codes */ #define SQL_SUCCESS 0 #define SQL_SUCCESS_WITH_INFO 1 #define SQL_STILL_EXECUTING 2 #define SQL_ERROR (-1) #define SQL_INVALID_HANDLE (-2) #define SQL_NEED_DATA 99 #if (ODBCVER >= 0x0300) #define SQL_NO_DATA 100 #endif /* ODBCVER >= 0x0300 */ /* * Test for SQL_SUCCESS or SQL_SUCCESS_WITH_INFO */ #define SQL_SUCCEEDED(rc) (((rc) & (~1)) == 0) /* * Special length values */ #define SQL_NULL_DATA (-1) #define SQL_DATA_AT_EXEC (-2) /* * Flags for null-terminated strings */ #define SQL_NTS (-3) #define SQL_NTSL (-3L) /* * Standard SQL datatypes, using ANSI type numbering */ #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 /* ODBCVER >= 0x0300 */ #define SQL_VARCHAR 12 /* * SQLGetTypeInfo request for all data types */ #define SQL_ALL_TYPES 0 /* * Statement attribute values for date/time data types */ #if (ODBCVER >= 0x0300) #define SQL_TYPE_DATE 91 #define SQL_TYPE_TIME 92 #define SQL_TYPE_TIMESTAMP 93 #endif /* ODBCVER >= 0x0300 */ /* * Date/Time length constants */ #if (ODBCVER >= 0x0300) #define SQL_DATE_LEN 10 #define SQL_TIME_LEN 8 /* add P+1 if prec >0 */ #define SQL_TIMESTAMP_LEN 19 /* add P+1 if prec >0 */ #endif /* ODBCVER >= 0x0300 */ /* * NULL status constants */ #define SQL_NO_NULLS 0 #define SQL_NULLABLE 1 #define SQL_NULLABLE_UNKNOWN 2 /* * NULL Handles */ #define SQL_NULL_HENV 0 #define SQL_NULL_HDBC 0 #define SQL_NULL_HSTMT 0 #if (ODBCVER >= 0x0300) #define SQL_NULL_HDESC 0 #endif /* ODBCVER >= 0x0300 */ /* * NULL handle for parent argument to SQLAllocHandle when allocating * a SQLHENV */ #if (ODBCVER >= 0x0300) #define SQL_NULL_HANDLE 0L #endif /* ODBCVER >= 0x0300 */ /* * CLI option values */ #if (ODBCVER >= 0x0300) #define SQL_FALSE 0 #define SQL_TRUE 1 #endif /* ODBCVER >= 0x0300 */ /* * Default conversion code for SQLBindCol(), SQLBindParam() and SQLGetData() */ #if (ODBCVER >= 0x0300) #define SQL_DEFAULT 99 #endif /* ODBCVER >= 0x0300 */ /* * SQLDataSources/SQLFetchScroll - FetchOrientation */ #define SQL_FETCH_NEXT 1 #define SQL_FETCH_FIRST 2 /* * SQLFetchScroll - FetchOrientation */ #define SQL_FETCH_LAST 3 #define SQL_FETCH_PRIOR 4 #define SQL_FETCH_ABSOLUTE 5 #define SQL_FETCH_RELATIVE 6 /* * SQLFreeStmt */ #define SQL_CLOSE 0 #define SQL_DROP 1 #define SQL_UNBIND 2 #define SQL_RESET_PARAMS 3 /* * SQLGetConnectAttr - connection attributes */ #if (ODBCVER >= 0x0300) #define SQL_ATTR_AUTO_IPD 10001 #define SQL_ATTR_METADATA_ID 10014 #endif /* ODBCVER >= 0x0300 */ /* * SQLGetData() code indicating that the application row descriptor * specifies the data type */ #if (ODBCVER >= 0x0300) #define SQL_ARD_TYPE (-99) #endif /* ODBCVER >= 0x0300 */ /* * SQLGetDescField - 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 /* ODBCVER >= 0x0300 */ /* * SQLGetDescField - SQL_DESC_ALLOC_TYPE */ #if (ODBCVER >= 0x0300) #define SQL_DESC_ALLOC_AUTO 1 #define SQL_DESC_ALLOC_USER 2 #endif /* ODBCVER >= 0x0300 */ /* * SQLGetDescField - SQL_DESC_DATETIME_INTERVAL_CODE */ #if (ODBCVER >= 0x0300) #define SQL_CODE_DATE 1 #define SQL_CODE_TIME 2 #define SQL_CODE_TIMESTAMP 3 #endif /* ODBCVER >= 0x0300 */ /* * SQLGetDescField - SQL_DESC_UNNAMED */ #if (ODBCVER >= 0x0300) #define SQL_NAMED 0 #define SQL_UNNAMED 1 #endif /* ODBCVER >= 0x0300 */ /* * SQLGetDiagField - 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 /* ODBCVER >= 0x0300 */ /* * SQLGetDiagField - SQL_DIAG_DYNAMIC_FUNCTION_CODE */ #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 */ /* * SQLGetEnvAttr - environment attribute */ #if (ODBCVER >= 0x0300) #define SQL_ATTR_OUTPUT_NTS 10001 #endif /* ODBCVER >= 0x0300 */ /* * SQLGetFunctions */ #define SQL_API_SQLALLOCCONNECT 1 #define SQL_API_SQLALLOCENV 2 #if (ODBCVER >= 0x0300) #define SQL_API_SQLALLOCHANDLE 1001 #endif /* ODBCVER >= 0x0300 */ #define SQL_API_SQLALLOCSTMT 3 #define SQL_API_SQLBINDCOL 4 #if (ODBCVER >= 0x0300) #define SQL_API_SQLBINDPARAM 1002 #endif /* ODBCVER >= 0x0300 */ #define SQL_API_SQLCANCEL 5 #if (ODBCVER >= 0x0300) #define SQL_API_SQLCLOSECURSOR 1003 #define SQL_API_SQLCOLATTRIBUTE 6 #endif /* ODBCVER >= 0x0300 */ #define SQL_API_SQLCOLUMNS 40 #define SQL_API_SQLCONNECT 7 #if (ODBCVER >= 0x0300) #define SQL_API_SQLCOPYDESC 1004 #endif /* ODBCVER >= 0x0300 */ #define SQL_API_SQLDATASOURCES 57 #define SQL_API_SQLDESCRIBECOL 8 #define SQL_API_SQLDISCONNECT 9 #if (ODBCVER >= 0x0300) #define SQL_API_SQLENDTRAN 1005 #endif /* ODBCVER >= 0x0300 */ #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 /* ODBCVER >= 0x0300 */ #define SQL_API_SQLFREECONNECT 14 #define SQL_API_SQLFREEENV 15 #if (ODBCVER >= 0x0300) #define SQL_API_SQLFREEHANDLE 1006 #endif /* ODBCVER >= 0x0300 */ #define SQL_API_SQLFREESTMT 16 #if (ODBCVER >= 0x0300) #define SQL_API_SQLGETCONNECTATTR 1007 #endif /* ODBCVER >= 0x0300 */ #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 /* ODBCVER >= 0x0300 */ #define SQL_API_SQLGETFUNCTIONS 44 #define SQL_API_SQLGETINFO 45 #if (ODBCVER >= 0x0300) #define SQL_API_SQLGETSTMTATTR 1014 #endif /* ODBCVER >= 0x0300 */ #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 /* ODBCVER >= 0x0300 */ #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 /* ODBCVER >= 0x0300 */ #define SQL_API_SQLSETPARAM 22 #if (ODBCVER >= 0x0300) #define SQL_API_SQLSETSTMTATTR 1020 #endif /* ODBCVER >= 0x0300 */ #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 /* * 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 /* ODBCVER >= 0x0300 */ #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 */ /* * SQLGetInfo - SQL_ALTER_TABLE */ #if (ODBCVER >= 0x0200) #define SQL_AT_ADD_COLUMN 0x00000001L #define SQL_AT_DROP_COLUMN 0x00000002L #endif /* ODBCVER >= 0x0300 */ #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 */ /* * SQLGetInfo - SQL_ASYNC_MODE */ #if (ODBCVER >= 0x0300) #define SQL_AM_NONE 0 #define SQL_AM_CONNECTION 1 #define SQL_AM_STATEMENT 2 #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - SQL_CURSOR_COMMIT_BEHAVIOR */ #define SQL_CB_DELETE 0 #define SQL_CB_CLOSE 1 #define SQL_CB_PRESERVE 2 /* * SQLGetInfo - SQL_FETCH_DIRECTION */ #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 /* * SQLGetInfo - SQL_GETDATA_EXTENSIONS */ #define SQL_GD_ANY_COLUMN 0x00000001L #define SQL_GD_ANY_ORDER 0x00000002L /* * SQLGetInfo - SQL_IDENTIFIER_CASE */ #define SQL_IC_UPPER 1 #define SQL_IC_LOWER 2 #define SQL_IC_SENSITIVE 3 #define SQL_IC_MIXED 4 /* * SQLGetInfo - SQL_NULL_COLLATION */ #define SQL_NC_HIGH 0 #define SQL_NC_LOW 1 /* * SQLGetInfo - SQL_OJ_CAPABILITIES */ #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 /* * SQLGetInfo - SQL_SCROLL_CONCURRENCY */ #define SQL_SCCO_READ_ONLY 0x00000001L #define SQL_SCCO_LOCK 0x00000002L #define SQL_SCCO_OPT_ROWVER 0x00000004L #define SQL_SCCO_OPT_VALUES 0x00000008L /* * SQLGetInfo - SQL_TXN_CAPABLE */ #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 /* * SQLGetInfo - SQL_TXN_ISOLATION_OPTION */ #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 /* * SQLGetStmtAttr - 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 /* ODBCVER >= 0x0300 */ /* * SQLGetStmtAttr - SQL_ATTR_CURSOR_SCROLLABLE */ #if (ODBCVER >= 0x0300) #define SQL_NONSCROLLABLE 0 #define SQL_SCROLLABLE 1 #endif /* ODBCVER >= 0x0300 */ /* * SQLGetStmtAttr - SQL_ATTR_CURSOR_SENSITIVITY */ #if (ODBCVER >= 0x0300) #define SQL_UNSPECIFIED 0 #define SQL_INSENSITIVE 1 #define SQL_SENSITIVE 2 #endif /* ODBCVER >= 0x0300 */ /* * SQLGetTypeInfo - SEARCHABLE */ #if (ODBCVER >= 0x0300) #define SQL_PRED_NONE 0 #define SQL_PRED_CHAR 1 #define SQL_PRED_BASIC 2 #endif /* ODBCVER >= 0x0300 */ /* * SQLSpecialColumns - Column scopes */ #define SQL_SCOPE_CURROW 0 #define SQL_SCOPE_TRANSACTION 1 #define SQL_SCOPE_SESSION 2 /* * SQLSpecialColumns - PSEUDO_COLUMN */ #define SQL_PC_UNKNOWN 0 #if (ODBCVER >= 0x0300) #define SQL_PC_NON_PSEUDO 1 #endif /* ODBCVER >= 0x0300 */ #define SQL_PC_PSEUDO 2 /* * SQLSpecialColumns - IdentifierType */ #if (ODBCVER >= 0x0300) #define SQL_ROW_IDENTIFIER 1 #endif /* ODBCVER >= 0x0300 */ /* * SQLStatistics - fUnique */ #define SQL_INDEX_UNIQUE 0 #define SQL_INDEX_ALL 1 /* * SQLStatistics - TYPE */ #define SQL_INDEX_CLUSTERED 1 #define SQL_INDEX_HASHED 2 #define SQL_INDEX_OTHER 3 /* * SQLTransact/SQLEndTran */ #define SQL_COMMIT 0 #define SQL_ROLLBACK 1 /* * Function Prototypes */ 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 /* ODBCVER >= 0x0300 */ 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); /* * Using SQLLEN * instead of SQLPOINTER for NumericAttribute, * makes the prototype the same as SQLColAttributes (deprecated) * and clearer for 64bit ports */ SQLRETURN SQL_API SQLColAttribute ( SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLUSMALLINT FieldIdentifier, SQLPOINTER CharacterAttribute, SQLSMALLINT BufferLength, SQLSMALLINT * StringLength, SQLLEN * NumericAttribute); #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 SQL_API 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 */ #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); /* * Depreciated ODBC 1.0 function - Use SQLBindParameter */ SQLRETURN SQL_API SQLSetParam ( SQLHSTMT StatementHandle, SQLUSMALLINT ParameterNumber, SQLSMALLINT ValueType, SQLSMALLINT ParameterType, SQLULEN LengthPrecision, SQLSMALLINT ParameterScale, SQLPOINTER ParameterValue, SQLLEN * StrLen_or_Ind); #ifdef __cplusplus } #endif #endif /* _SQL_H */ libiodbc-3.52.16/include/Makefile.in0000664000175000017500000005041414424171020014051 00000000000000# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 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@ # # Makefile.am # # The iODBC driver manager. # # Copyright (C) 1996-2023 OpenLink Software # All Rights Reserved. # # This software is released under the terms of either of the following # licenses: # # - GNU Library General Public License (see LICENSE.LGPL) # - The BSD License (see LICENSE.BSD). # # Note that the only valid version of the LGPL license as far as this # project is concerned is the original GNU Library General Public License # Version 2, dated June 1991. # # While not mandated by the BSD license, any patches you make to the # iODBC source code may be contributed back into the iODBC project # at your discretion. Contributions will benefit the Open Source and # Data Access community as a whole. Submissions may be made at: # # http://www.iodbc.org # # # GNU Library Generic Public License Version 2 # ============================================ # 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; only # Version 2 of the License dated June 1991. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # The BSD License # =============== # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. Neither the name of OpenLink Software Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = include ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/admin/gtk-2.0.m4 \ $(top_srcdir)/admin/gtk.m4 $(top_srcdir)/admin/libtool.m4 \ $(top_srcdir)/admin/ltoptions.m4 \ $(top_srcdir)/admin/ltsugar.m4 \ $(top_srcdir)/admin/ltversion.m4 \ $(top_srcdir)/admin/lt~obsolete.m4 \ $(top_srcdir)/admin/openlink.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(include_HEADERS) \ $(noinst_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(includedir)" HEADERS = $(include_HEADERS) $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/admin/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_CONFIG = @GTK_CONFIG@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBADD_DL = @LIBADD_DL@ LIBADD_OS = @LIBADD_OS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ filedsnpath = @filedsnpath@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ inidir = @inidir@ install_sh = @install_sh@ lib_version = @lib_version@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ odbcmode = @odbcmode@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ include_HEADERS = \ isql.h \ isqlext.h \ isqltypes.h \ sql.h \ sqlext.h \ sqlucode.h \ sqltypes.h \ odbcinst.h \ iodbcunix.h \ iodbcinst.h \ iodbcext.h noinst_HEADERS = \ iodbc.h \ macos_config.h all: config.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu include/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): config.h: stamp-h1 @test -f $@ || rm -f stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status include/config.h $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(HEADERS) config.h 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-includeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-includeHEADERS .MAKE: all install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool cscopelist-am ctags ctags-am distclean \ distclean-generic distclean-hdr distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-includeHEADERS install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-includeHEADERS .PRECIOUS: Makefile # 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: libiodbc-3.52.16/include/iodbcunix.h0000664000175000017500000001110314424170750014142 00000000000000/* * iodbcunix.h * * $Id$ * * ODBC defines for Unix * * The iODBC driver manager. * * Copyright (C) 1995 Ke Jin * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef _IODBCUNIX_H #define _IODBCUNIX_H /* * Standard header files */ #include #include #if defined(__WCHAR_TYPE__) #include #endif /* * Windows-style declarations */ #define NEAR #define FAR #define EXPORT #define PASCAL #define VOID void #define CALLBACK #define _cdecl #define __stdcall /* * Boolean support */ #ifndef TRUE #define TRUE 1 #endif #ifndef FALSE #define FALSE 0 #endif #ifdef __cplusplus extern "C" { #endif /* * Windows-style typedefs */ #if defined (OBSOLETE_WINDOWS_TYPES) typedef unsigned char BYTE; #endif typedef unsigned short WORD; typedef unsigned int DWORD; typedef char * LPSTR; typedef const char * LPCSTR; typedef wchar_t * LPWSTR; typedef const wchar_t * LPCWSTR; typedef DWORD * LPDWORD; #if !defined(BOOL) && !defined(_OBJC_OBJC_H_) typedef int BOOL; #endif /* * Determine sizeof(long) in case it is not determined by configure/config.h */ #ifndef SIZEOF_LONG #if defined (_LP64) || \ defined (__LP64__) || \ defined (__64BIT__) || \ defined (__alpha) || \ defined (__sparcv9) || \ defined (__arch64__) #define SIZEOF_LONG 8 /* 64 bit operating systems */ #else #define SIZEOF_LONG 4 /* 32 bit operating systems */ #endif #endif /* SIZEOF_LONG */ #ifdef __cplusplus } #endif #endif /* _IODBCUNIX_H */ libiodbc-3.52.16/include/isql.h0000664000175000017500000000672414424170750013143 00000000000000/* * isql.h * * $Id$ * * iODBC defines * * The iODBC driver manager. * * Copyright (C) 1995 Ke Jin * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * This file is deprecated in favor of sql.h and will be removed * sometime in the future. Please recode your applications to use * the standard names sql.h, sqlext.h and sqltypes.h. */ #include libiodbc-3.52.16/include/macos_config.h0000664000175000017500000001015614424170750014614 00000000000000/* * macos_config.h * * Extract from config.h for macOS xcodebuild * * The iODBC driver manager. * * Copyright (C) 1995 Ke Jin * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef _MACOS_CONFIG_H #define _MACOS_CONFIG_H #define HAVE_ASPRINTF 1 #define HAVE_DLADDR 1 #define HAVE_DLFCN_H 1 #define HAVE_DL_INFO 1 #define HAVE_DLOPEN 1 #define HAVE_DLSYM 1 #define HAVE_GETTIMEOFDAY 1 #define HAVE_INTTYPES_H 1 #define HAVE_LIBDL 1 #define HAVE_LOCALTIME_R 1 #define HAVE_MEMORY_H 1 #define HAVE_SETENV 1 #define HAVE_SNPRINTF 1 #define HAVE_STDINT_H 1 #define HAVE_STDLIB_H 1 #define HAVE_STRERROR 1 #define HAVE_STRING_H 1 #define HAVE_STRINGS_H 1 #define HAVE_SYS_STAT_H 1 #define HAVE_SYS_TYPES_H 1 #define HAVE_TOWLOWER 1 #define HAVE_UNISTD_H 1 #define HAVE_WCHAR_H 1 #define HAVE_WCSCAT 1 #define HAVE_WCSCHR 1 #define HAVE_WCSCMP 1 #define HAVE_WCSCPY 1 #define HAVE_WCSLEN 1 #define HAVE_WCSNCASECMP 1 #define HAVE_WCSNCPY 1 #define STDC_HEADERS 1 #define TIME_WITH_SYS_TIME 1 #undef HAVE_DYLD #undef DLDAPI_MACX #endif libiodbc-3.52.16/include/sqlext.h0000664000175000017500000021203614424170750013506 00000000000000/* * sqlext.h * * $Id$ * * ODBC defines (ext) * * The iODBC driver manager. * * Copyright (C) 1995 Ke Jin * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef _SQLEXT_H #define _SQLEXT_H #ifndef _SQL_H #include #endif #ifdef __cplusplus extern "C" { #endif /* * Useful Constants */ #define SQL_SPEC_MAJOR 3 #define SQL_SPEC_MINOR 52 #define SQL_SPEC_STRING "03.52" #define SQL_SQLSTATE_SIZE 5 #define SQL_MAX_DSN_LENGTH 32 #define SQL_MAX_OPTION_STRING_LENGTH 256 /* * Handle types */ #if (ODBCVER >= 0x0300) #define SQL_HANDLE_SENV 5 #endif /* ODBCVER >= 0x0300 */ /* * Function return codes */ #if (ODBCVER < 0x0300) #define SQL_NO_DATA_FOUND 100 #else #define SQL_NO_DATA_FOUND SQL_NO_DATA #endif /* ODBCVER < 0x0300 */ /* * Special length values for attributes */ #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 */ /* * 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 */ /* * SQL Interval datatypes */ #if (ODBCVER >= 0x0300) #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 */ /* * SQL unicode data types */ #if (ODBCVER <= 0x0300) /* These definitions are historical and obsolete */ #define SQL_UNICODE (-95) #define SQL_UNICODE_VARCHAR (-96) #define SQL_UNICODE_LONGVARCHAR (-97) #define SQL_UNICODE_CHAR SQL_UNICODE #else #define SQL_UNICODE SQL_WCHAR #define SQL_UNICODE_VARCHAR SQL_WVARCHAR #define SQL_UNICODE_LONGVARCHAR SQL_WLONGVARCHAR #define SQL_UNICODE_CHAR SQL_WCHAR #endif /* ODBCVER >= 0x0300 */ #if (ODBCVER < 0x0300) #define SQL_TYPE_DRIVER_START SQL_INTERVAL_YEAR #define SQL_TYPE_DRIVER_END SQL_UNICODE_LONGVARCHAR #endif /* ODBCVER < 0x0300 */ #define SQL_SIGNED_OFFSET (-20) #define SQL_UNSIGNED_OFFSET (-22) /* * C datatype 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 #if (ODBCVER >= 0x0300) #define SQL_C_NUMERIC SQL_NUMERIC #endif /* ODBCVER >= 0x0300 */ #define SQL_C_DEFAULT 99 #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_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) #if defined(_WIN64) #define SQL_C_BOOKMARK SQL_C_UBIGINT #else #define SQL_C_BOOKMARK SQL_C_ULONG #endif #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 #define SQL_C_SBIGINT (SQL_BIGINT+SQL_SIGNED_OFFSET) #define SQL_C_UBIGINT (SQL_BIGINT+SQL_UNSIGNED_OFFSET) #define SQL_C_VARBOOKMARK SQL_C_BINARY #endif /* ODBCVER >= 0x0300 */ #if (ODBCVER >= 0x0350) #define SQL_C_GUID SQL_GUID #endif #define SQL_TYPE_NULL 0 #if (ODBCVER < 0x0300) #define SQL_TYPE_MIN SQL_BIT #define SQL_TYPE_MAX SQL_VARCHAR #endif /* ODBCVER < 0x0300 */ /* * ---------------------------------------------------------------------- * Level 1 Functions * ---------------------------------------------------------------------- */ /* * SQLBindParameter */ #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) /* * SQLColAttributes - ODBC 2.x 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 - SQL_COLUMN_UPDATABLE */ #define SQL_ATTR_READONLY 0 #define SQL_ATTR_WRITE 1 #define SQL_ATTR_READWRITE_UNKNOWN 2 /* * SQLColAttributes - SQL_COLUMN_SEARCHABLE */ #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 /* * SQLDataSources - additional fetch directions */ #if (ODBCVER >= 0x0300) #define SQL_FETCH_FIRST_USER 31 #define SQL_FETCH_FIRST_SYSTEM 32 #endif /* ODBCVER >= 0x0300 */ /* * SQLDriverConnect */ #define SQL_DRIVER_NOPROMPT 0 #define SQL_DRIVER_COMPLETE 1 #define SQL_DRIVER_PROMPT 2 #define SQL_DRIVER_COMPLETE_REQUIRED 3 /* * SQLGetConnectAttr - ODBC 2.x 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 /* * SQLGetConnectAttr - ODBC 3.0 attributes */ #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 */ /* * These options have no meaning for a 3.0 driver */ #if (ODBCVER < 0x0300) #define SQL_CONN_OPT_MIN SQL_ACCESS_MODE #define SQL_CONN_OPT_MAX SQL_PACKET_SIZE #define SQL_CONNECT_OPT_DRVR_START 1000 #endif /* ODBCVER < 0x0300 */ /* * SQLGetConnectAttr - SQL_ACCESS_MODE */ #define SQL_MODE_READ_WRITE 0UL #define SQL_MODE_READ_ONLY 1UL #define SQL_MODE_DEFAULT SQL_MODE_READ_WRITE /* * SQLGetConnectAttr - SQL_AUTOCOMMIT */ #define SQL_AUTOCOMMIT_OFF 0UL #define SQL_AUTOCOMMIT_ON 1UL #define SQL_AUTOCOMMIT_DEFAULT SQL_AUTOCOMMIT_ON /* * SQLGetConnectAttr - SQL_LOGIN_TIMEOUT */ #define SQL_LOGIN_TIMEOUT_DEFAULT 15UL /* * SQLGetConnectAttr - SQL_ODBC_CURSORS */ #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 /* * SQLGetConnectAttr - SQL_OPT_TRACE */ #define SQL_OPT_TRACE_OFF 0UL #define SQL_OPT_TRACE_ON 1UL #define SQL_OPT_TRACE_DEFAULT SQL_OPT_TRACE_OFF #if defined (WIN32) #define SQL_OPT_TRACE_FILE_DEFAULT "\\SQL.LOG" #define SQL_OPT_TRACE_FILE_DEFAULTW L"\\SQL.LOG" #else #define SQL_OPT_TRACE_FILE_DEFAULT "/tmp/odbc.log" #define SQL_OPT_TRACE_FILE_DEFAULTW L"/tmp/odbc.log" #endif /* * SQLGetConnectAttr - SQL_ATTR_ANSI_APP */ #if (ODBCVER >= 0x0351) #define SQL_AA_TRUE 1L /* ANSI app */ #define SQL_AA_FALSE 0L /* Unicode app */ #endif /* * SQLGetConnectAttr - SQL_ATTR_CONNECTION_DEAD */ #define SQL_CD_TRUE 1L /* closed/dead */ #define SQL_CD_FALSE 0L /* open/available */ /* * SQLGetConnectAttr - SQL_ATTR_DISCONNECT_BEHAVIOR */ #if (ODBCVER >= 0x0300) #define SQL_DB_RETURN_TO_POOL 0UL #define SQL_DB_DISCONNECT 1UL #define SQL_DB_DEFAULT SQL_DB_RETURN_TO_POOL #endif /* ODBCVER >= 0x0300 */ /* * SQLGetConnectAttr - SQL_ATTR_ENLIST_IN_DTC */ #if (ODBCVER >= 0x0300) #define SQL_DTC_DONE 0L #endif /* ODBCVER >= 0x0300 */ /* * SQLGetConnectAttr - Unicode drivers */ #if (ODBCVER >= 0x0351) #define SQL_ATTR_ANSI_APP 115 #endif /* * SQLGetData */ #define SQL_NO_TOTAL (-4) /* * SQLGetDescField - 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 */ /* * SQLGetDiagField - 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 */ /* * SQLGetDiagField - 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 #if (ODBCVER >= 0x0300) /* * SQLGetEnvAttr - Attributes */ #define SQL_ATTR_ODBC_VERSION 200 #define SQL_ATTR_CONNECTION_POOLING 201 #define SQL_ATTR_CP_MATCH 202 /* * SQLGetEnvAttr - SQL_ATTR_ODBC_VERSION */ #define SQL_OV_ODBC2 2UL #define SQL_OV_ODBC3 3UL /* * SQLGetEnvAttr - 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 /* * SQLGetEnvAttr - 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 #endif /* ODBCVER >= 0x0300 */ /* * SQLGetFunctions - extensions to the X/Open specification */ #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 /* * These are not useful anymore as the X/Open specification defines * functions 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 /* ODBCVER < 0x0300 */ /* * SQLGetFunctions - ODBC version 2.x and earlier */ #define SQL_API_ALL_FUNCTIONS 0 /* * Loading by ordinal is not supported for 3.0 and above drivers */ #define SQL_API_LOADBYORDINAL 199 /* * SQLGetFunctions - SQL_API_ODBC3_ALL_FUNCTIONS */ #if (ODBCVER >= 0x0300) #define SQL_API_ODBC3_ALL_FUNCTIONS 999 #define SQL_API_ODBC3_ALL_FUNCTIONS_SIZE 250 #define SQL_FUNC_EXISTS(pfExists, uwAPI) \ ((*(((UWORD*) (pfExists)) + ((uwAPI) >> 4)) & (1 << ((uwAPI) & 0x000F))) \ ? SQL_TRUE : SQL_FALSE) #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - ODBC 2.x extensions to the X/Open standard */ #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_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) #define SQL_OJ_CAPABILITIES 65003 /* Temp value until ODBC 3.0 */ #endif /* ODBCVER >= 0x0201 && ODBCVER < 0x0300 */ /* * These values are not useful anymore as X/Open defines values in the * 10000 range */ #if (ODBCVER < 0x0300) #define SQL_INFO_LAST SQL_QUALIFIER_LOCATION #define SQL_INFO_DRIVER_START 1000 #endif /* ODBCVER < 0x0300 */ /* * SQLGetInfo - ODBC 3.x extensions to the X/Open standard */ #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_CONVERT_GUID 173 #define SQL_UNION_STATEMENT SQL_UNION #endif /* ODBCVER >= 0x0300 */ #define SQL_DTC_TRANSITION_COST 1750 /* * SQLGetInfo - SQL_AGGREGATE_FUNCTIONS */ #if (ODBCVER >= 0x0300) #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 #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - SQL_ALTER_DOMAIN */ #if (ODBCVER >= 0x0300) #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 #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - SQL_ALTER_TABLE */ #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 */ /* * SQLGetInfo - SQL_ASYNC_MODE */ #if (ODBCVER >= 0x0300) #define SQL_AM_NONE 0 #define SQL_AM_CONNECTION 1 #define SQL_AM_STATEMENT 2 #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - SQL_BATCH_ROW_COUNT */ #if (ODBCVER >= 0x0300) #define SQL_BRC_PROCEDURES 0x0000001 #define SQL_BRC_EXPLICIT 0x0000002 #define SQL_BRC_ROLLED_UP 0x0000004 #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - SQL_BATCH_SUPPORT */ #if (ODBCVER >= 0x0300) #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 #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - SQL_BOOKMARK_PERSISTENCE */ #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 /* * SQLGetInfo - SQL_CATALOG_LOCATION */ #if (ODBCVER >= 0x0300) #define SQL_CL_START SQL_QL_START #define SQL_CL_END SQL_QL_END #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - SQL_CATALOG_USAGE */ #if (ODBCVER >= 0x0300) #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 */ /* * SQLGetInfo - SQL_CONCAT_NULL_BEHAVIOR */ #define SQL_CB_NULL 0x0000 #define SQL_CB_NON_NULL 0x0001 /* * SQLGetInfo - SQL_CONVERT_* bitmask values */ #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 #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - SQL_CONVERT_FUNCTIONS */ #define SQL_FN_CVT_CONVERT 0x00000001L #if (ODBCVER >= 0x0300) #define SQL_FN_CVT_CAST 0x00000002L #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - SQL_CORRELATION_NAME */ #define SQL_CN_NONE 0x0000 #define SQL_CN_DIFFERENT 0x0001 #define SQL_CN_ANY 0x0002 /* * SQLGetInfo - SQL_CREATE_ASSERTION */ #if (ODBCVER >= 0x0300) #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 #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - SQL_CREATE_CHARACTER_SET */ #if (ODBCVER >= 0x0300) #define SQL_CCS_CREATE_CHARACTER_SET 0x00000001L #define SQL_CCS_COLLATE_CLAUSE 0x00000002L #define SQL_CCS_LIMITED_COLLATION 0x00000004L #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - SQL_CREATE_COLLATION */ #if (ODBCVER >= 0x0300) #define SQL_CCOL_CREATE_COLLATION 0x00000001L #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - SQL_CREATE_DOMAIN */ #if (ODBCVER >= 0x0300) #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 #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - SQL_CREATE_SCHEMA */ #if (ODBCVER >= 0x0300) #define SQL_CS_CREATE_SCHEMA 0x00000001L #define SQL_CS_AUTHORIZATION 0x00000002L #define SQL_CS_DEFAULT_CHARACTER_SET 0x00000004L #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - SQL_CREATE_TABLE */ #if (ODBCVER >= 0x0300) #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 #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - SQL_CREATE_TRANSLATION */ #if (ODBCVER >= 0x0300) #define SQL_CTR_CREATE_TRANSLATION 0x00000001L #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - SQL_CREATE_VIEW */ #define SQL_CV_CREATE_VIEW 0x00000001L #define SQL_CV_CHECK_OPTION 0x00000002L #define SQL_CV_CASCADED 0x00000004L #define SQL_CV_LOCAL 0x00000008L /* * SQLGetInfo - SQL_DATETIME_LITERALS */ #if (ODBCVER >= 0x0300) #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 #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - SQL_DDL_INDEX */ #if (ODBCVER >= 0x0300) #define SQL_DI_CREATE_INDEX 0x00000001L #define SQL_DI_DROP_INDEX 0x00000002L #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - SQL_DROP_ASSERTION */ #if (ODBCVER >= 0x0300) #define SQL_DA_DROP_ASSERTION 0x00000001L #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - SQL_DROP_CHARACTER_SET */ #if (ODBCVER >= 0x0300) #define SQL_DCS_DROP_CHARACTER_SET 0x00000001L #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - SQL_DROP_COLLATION */ #if (ODBCVER >= 0x0300) #define SQL_DC_DROP_COLLATION 0x00000001L #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - SQL_DROP_DOMAIN */ #if (ODBCVER >= 0x0300) #define SQL_DD_DROP_DOMAIN 0x00000001L #define SQL_DD_RESTRICT 0x00000002L #define SQL_DD_CASCADE 0x00000004L #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - SQL_DROP_SCHEMA */ #if (ODBCVER >= 0x0300) #define SQL_DS_DROP_SCHEMA 0x00000001L #define SQL_DS_RESTRICT 0x00000002L #define SQL_DS_CASCADE 0x00000004L #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - SQL_DROP_TABLE */ #if (ODBCVER >= 0x0300) #define SQL_DT_DROP_TABLE 0x00000001L #define SQL_DT_RESTRICT 0x00000002L #define SQL_DT_CASCADE 0x00000004L #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - SQL_DROP_TRANSLATION */ #if (ODBCVER >= 0x0300) #define SQL_DTR_DROP_TRANSLATION 0x00000001L #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - SQL_DROP_VIEW */ #if (ODBCVER >= 0x0300) #define SQL_DV_DROP_VIEW 0x00000001L #define SQL_DV_RESTRICT 0x00000002L #define SQL_DV_CASCADE 0x00000004L #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - SQL_DTC_TRANSITION_COST */ #define SQL_DTC_ENLIST_EXPENSIVE 0x00000001L #define SQL_DTC_UNENLIST_EXPENSIVE 0x00000002L /* * SQLGetInfo - SQL_DYNAMIC_CURSOR_ATTRIBUTES1 * SQLGetInfo - SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1 * SQLGetInfo - SQL_KEYSET_CURSOR_ATTRIBUTES1 * SQLGetInfo - SQL_STATIC_CURSOR_ATTRIBUTES1 */ /* * SQLFetchScroll - FetchOrientation */ #if (ODBCVER >= 0x0300) #define SQL_CA1_NEXT 0x00000001L #define SQL_CA1_ABSOLUTE 0x00000002L #define SQL_CA1_RELATIVE 0x00000004L #define SQL_CA1_BOOKMARK 0x00000008L #endif /* ODBCVER >= 0x0300 */ /* * SQLSetPos - LockType */ #if (ODBCVER >= 0x0300) #define SQL_CA1_LOCK_NO_CHANGE 0x00000040L #define SQL_CA1_LOCK_EXCLUSIVE 0x00000080L #define SQL_CA1_LOCK_UNLOCK 0x00000100L #endif /* ODBCVER >= 0x0300 */ /* * SQLSetPos Operations */ #if (ODBCVER >= 0x0300) #define SQL_CA1_POS_POSITION 0x00000200L #define SQL_CA1_POS_UPDATE 0x00000400L #define SQL_CA1_POS_DELETE 0x00000800L #define SQL_CA1_POS_REFRESH 0x00001000L #endif /* ODBCVER >= 0x0300 */ /* * positioned updates and deletes */ #if (ODBCVER >= 0x0300) #define SQL_CA1_POSITIONED_UPDATE 0x00002000L #define SQL_CA1_POSITIONED_DELETE 0x00004000L #define SQL_CA1_SELECT_FOR_UPDATE 0x00008000L #endif /* ODBCVER >= 0x0300 */ /* * SQLBulkOperations operations */ #if (ODBCVER >= 0x0300) #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 */ /* * SQLGetInfo - SQL_DYNAMIC_CURSOR_ATTRIBUTES2 * SQLGetInfo - SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2 * SQLGetInfo - SQL_KEYSET_CURSOR_ATTRIBUTES2 * SQLGetInfo - SQL_STATIC_CURSOR_ATTRIBUTES2 */ /* * SQL_ATTR_SCROLL_CONCURRENCY */ #if (ODBCVER >= 0x0300) #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 #endif /* ODBCVER >= 0x0300 */ /* * sensitivity of the cursor to its own inserts, deletes, and updates */ #if (ODBCVER >= 0x0300) #define SQL_CA2_SENSITIVITY_ADDITIONS 0x00000010L #define SQL_CA2_SENSITIVITY_DELETIONS 0x00000020L #define SQL_CA2_SENSITIVITY_UPDATES 0x00000040L #endif /* ODBCVER >= 0x0300 */ /* * SQL_ATTR_MAX_ROWS */ #if (ODBCVER >= 0x0300) #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) #endif /* ODBCVER >= 0x0300 */ /* * SQL_DIAG_CURSOR_ROW_COUNT */ #if (ODBCVER >= 0x0300) #define SQL_CA2_CRC_EXACT 0x00001000L #define SQL_CA2_CRC_APPROXIMATE 0x00002000L #endif /* ODBCVER >= 0x0300 */ /* * the kinds of positioned statements that can be simulated */ #if (ODBCVER >= 0x0300) #define SQL_CA2_SIMULATE_NON_UNIQUE 0x00004000L #define SQL_CA2_SIMULATE_TRY_UNIQUE 0x00008000L #define SQL_CA2_SIMULATE_UNIQUE 0x00010000L #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - SQL_FETCH_DIRECTION */ #if (ODBCVER < 0x0300) #define SQL_FD_FETCH_RESUME 0x00000040L #endif /* ODBCVER < 0x0300 */ #define SQL_FD_FETCH_BOOKMARK 0x00000080L /* * SQLGetInfo - SQL_FILE_USAGE */ #define SQL_FILE_NOT_SUPPORTED 0x0000 #define SQL_FILE_TABLE 0x0001 #define SQL_FILE_QUALIFIER 0x0002 #define SQL_FILE_CATALOG SQL_FILE_QUALIFIER /* * SQLGetInfo - SQL_GETDATA_EXTENSIONS */ #define SQL_GD_BLOCK 0x00000004L #define SQL_GD_BOUND 0x00000008L /* * SQLGetInfo - SQL_GROUP_BY */ #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 */ /* * SQLGetInfo - SQL_INDEX_KEYWORDS */ #if (ODBCVER >= 0x0300) #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) #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - SQL_INFO_SCHEMA_VIEWS */ #if (ODBCVER >= 0x0300) #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 #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - SQL_INSERT_STATEMENT */ #if (ODBCVER >= 0x0300) #define SQL_IS_INSERT_LITERALS 0x00000001L #define SQL_IS_INSERT_SEARCHED 0x00000002L #define SQL_IS_SELECT_INTO 0x00000004L #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - SQL_LOCK_TYPES */ #define SQL_LCK_NO_CHANGE 0x00000001L #define SQL_LCK_EXCLUSIVE 0x00000002L #define SQL_LCK_UNLOCK 0x00000004L /* * SQLGetInfo - SQL_POS_OPERATIONS */ #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 /* * SQLGetInfo - SQL_NON_NULLABLE_COLUMNS */ #define SQL_NNC_NULL 0x0000 #define SQL_NNC_NON_NULL 0x0001 /* * SQLGetInfo - SQL_NULL_COLLATION */ #define SQL_NC_START 0x0002 #define SQL_NC_END 0x0004 /* * SQLGetInfo - SQL_NUMERIC_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 /* * SQLGetInfo - SQL_ODBC_API_CONFORMANCE */ #define SQL_OAC_NONE 0x0000 #define SQL_OAC_LEVEL1 0x0001 #define SQL_OAC_LEVEL2 0x0002 /* * SQLGetInfo - SQL_ODBC_INTERFACE_CONFORMANCE */ #if (ODBCVER >= 0x0300) #define SQL_OIC_CORE 1UL #define SQL_OIC_LEVEL1 2UL #define SQL_OIC_LEVEL2 3UL #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - SQL_ODBC_SAG_CLI_CONFORMANCE */ #define SQL_OSCC_NOT_COMPLIANT 0x0000 #define SQL_OSCC_COMPLIANT 0x0001 /* * SQLGetInfo - SQL_ODBC_SQL_CONFORMANCE */ #define SQL_OSC_MINIMUM 0x0000 #define SQL_OSC_CORE 0x0001 #define SQL_OSC_EXTENDED 0x0002 /* * SQLGetInfo - SQL_OWNER_USAGE */ #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 /* * SQLGetInfo - SQL_PARAM_ARRAY_ROW_COUNTS */ #if (ODBCVER >= 0x0300) #define SQL_PARC_BATCH 1 #define SQL_PARC_NO_BATCH 2 #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - SQL_PARAM_ARRAY_SELECTS */ #if (ODBCVER >= 0x0300) #define SQL_PAS_BATCH 1 #define SQL_PAS_NO_BATCH 2 #define SQL_PAS_NO_SELECT 3 #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - SQL_POSITIONED_STATEMENTS */ #define SQL_PS_POSITIONED_DELETE 0x00000001L #define SQL_PS_POSITIONED_UPDATE 0x00000002L #define SQL_PS_SELECT_FOR_UPDATE 0x00000004L /* * SQLGetInfo - SQL_QUALIFIER_LOCATION */ #define SQL_QL_START 0x0001 #define SQL_QL_END 0x0002 /* * SQLGetInfo - SQL_QUALIFIER_USAGE */ #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 /* * SQLGetInfo - SQL_SCHEMA_USAGE */ #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 */ /* * SQLGetInfo - SQL_SCROLL_OPTIONS */ #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 /* * SQLGetInfo - SQL_SQL_CONFORMANCE */ #if (ODBCVER >= 0x0300) #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 #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - 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 */ /* * SQLGetInfo - SQL_SQL92_FOREIGN_KEY_DELETE_RULE */ #if (ODBCVER >= 0x0300) #define SQL_SFKD_CASCADE 0x00000001L #define SQL_SFKD_NO_ACTION 0x00000002L #define SQL_SFKD_SET_DEFAULT 0x00000004L #define SQL_SFKD_SET_NULL 0x00000008L #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - SQL_SQL92_FOREIGN_KEY_UPDATE_RULE */ #if (ODBCVER >= 0x0300) #define SQL_SFKU_CASCADE 0x00000001L #define SQL_SFKU_NO_ACTION 0x00000002L #define SQL_SFKU_SET_DEFAULT 0x00000004L #define SQL_SFKU_SET_NULL 0x00000008L #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - SQL_SQL92_GRANT */ #if (ODBCVER >= 0x0300) #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 #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - 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 */ /* * SQLGetInfo - SQL_SQL92_PREDICATES */ #if (ODBCVER >= 0x0300) #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 #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - SQL_SQL92_RELATIONAL_JOIN_OPERATORS */ #if (ODBCVER >= 0x0300) #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 #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - SQL_SQL92_REVOKE */ #if (ODBCVER >= 0x0300) #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 #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - SQL_SQL92_ROW_VALUE_CONSTRUCTOR */ #if (ODBCVER >= 0x0300) #define SQL_SRVC_VALUE_EXPRESSION 0x00000001L #define SQL_SRVC_NULL 0x00000002L #define SQL_SRVC_DEFAULT 0x00000004L #define SQL_SRVC_ROW_SUBQUERY 0x00000008L #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - 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 */ /* * SQLGetInfo - SQL_SQL92_VALUE_EXPRESSIONS */ #if (ODBCVER >= 0x0300) #define SQL_SVE_CASE 0x00000001L #define SQL_SVE_CAST 0x00000002L #define SQL_SVE_COALESCE 0x00000004L #define SQL_SVE_NULLIF 0x00000008L #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - SQL_STANDARD_CLI_CONFORMANCE */ #if (ODBCVER >= 0x0300) #define SQL_SCC_XOPEN_CLI_VERSION1 0x00000001L #define SQL_SCC_ISO92_CLI 0x00000002L #endif /* ODBCVER >= 0x0300 */ /* * SQLGetInfo - SQL_STATIC_SENSITIVITY */ #define SQL_SS_ADDITIONS 0x00000001L #define SQL_SS_DELETIONS 0x00000002L #define SQL_SS_UPDATES 0x00000004L /* * SQLGetInfo - SQL_SUBQUERIES */ #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 /* * SQLGetInfo - SQL_SYSTEM_FUNCTIONS */ #define SQL_FN_SYS_USERNAME 0x00000001L #define SQL_FN_SYS_DBNAME 0x00000002L #define SQL_FN_SYS_IFNULL 0x00000004L /* * SQLGetInfo - SQL_STRING_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 */ /* * SQLGetInfo - SQL_TIMEDATE_ADD_INTERVALS * SQLGetInfo - SQL_TIMEDATE_DIFF_INTERVALS */ #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 /* * SQLGetInfo - SQL_TIMEDATE_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 */ /* * SQLGetInfo - SQL_TXN_ISOLATION_OPTION */ #if (ODBCVER < 0x0300) #define SQL_TXN_VERSIONING 0x00000010L #endif /* ODBCVER < 0x0300 */ /* * SQLGetInfo - SQL_UNION */ #define SQL_U_UNION 0x00000001L #define SQL_U_UNION_ALL 0x00000002L /* * SQLGetInfo - SQL_UNION_STATEMENT */ #if (ODBCVER >= 0x0300) #define SQL_US_UNION SQL_U_UNION #define SQL_US_UNION_ALL SQL_U_UNION_ALL #endif /* ODBCVER >= 0x0300 */ /* * SQLGetStmtAttr - ODBC 2.x 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 #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 #define SQL_ROW_NUMBER 14 /* * SQLGetStmtAttr - ODBC 3.x attributes */ #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 */ /* * SQLGetStmtAttr - 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 /* * SQLGetStmtAttr - 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 */ /* * SQLGetStmtAttr - SQL_BIND_TYPE */ #define SQL_BIND_BY_COLUMN 0UL #define SQL_BIND_TYPE_DEFAULT SQL_BIND_BY_COLUMN /* * SQLGetStmtAttr - SQL_CONCURRENCY */ #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 /* * SQLGetStmtAttr - SQL_CURSOR_TYPE */ #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 /* * SQLGetStmtAttr - SQL_KEYSET_SIZE */ #define SQL_KEYSET_SIZE_DEFAULT 0UL /* * SQLGetStmtAttr - SQL_MAX_LENGTH */ #define SQL_MAX_LENGTH_DEFAULT 0UL /* * SQLGetStmtAttr - SQL_MAX_ROWS */ #define SQL_MAX_ROWS_DEFAULT 0UL /* * SQLGetStmtAttr - SQL_NOSCAN */ #define SQL_NOSCAN_OFF 0UL /* 1.0 FALSE */ #define SQL_NOSCAN_ON 1UL /* 1.0 TRUE */ #define SQL_NOSCAN_DEFAULT SQL_NOSCAN_OFF /* * SQLGetStmtAttr - SQL_QUERY_TIMEOUT */ #define SQL_QUERY_TIMEOUT_DEFAULT 0UL /* * SQLGetStmtAttr - SQL_RETRIEVE_DATA */ #define SQL_RD_OFF 0UL #define SQL_RD_ON 1UL #define SQL_RD_DEFAULT SQL_RD_ON /* * SQLGetStmtAttr - SQL_ROWSET_SIZE */ #define SQL_ROWSET_SIZE_DEFAULT 1UL /* * SQLGetStmtAttr - SQL_SIMULATE_CURSOR */ #define SQL_SC_NON_UNIQUE 0UL #define SQL_SC_TRY_UNIQUE 1UL #define SQL_SC_UNIQUE 2UL /* * SQLGetStmtAttr - SQL_USE_BOOKMARKS */ #define SQL_UB_OFF 0UL #define SQL_UB_ON 1UL #define SQL_UB_DEFAULT SQL_UB_OFF #if (ODBCVER >= 0x0300) #define SQL_UB_FIXED SQL_UB_ON #define SQL_UB_VARIABLE 2UL #endif /* ODBCVER >= 0x0300 */ /* * SQLGetTypeInfo - SEARCHABLE */ #if (ODBCVER >= 0x0300) #define SQL_COL_PRED_CHAR SQL_LIKE_ONLY #define SQL_COL_PRED_BASIC SQL_ALL_EXCEPT_LIKE #endif /* ODBCVER >= 0x0300 */ /* * SQLSetPos */ #define SQL_ENTIRE_ROWSET 0 /* * SQLSetPos - Operation */ #define SQL_POSITION 0 #define SQL_REFRESH 1 #define SQL_UPDATE 2 #define SQL_DELETE 3 /* * SQLBulkOperations - Operation */ #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 */ /* * SQLSetPos - LockType */ #define SQL_LOCK_NO_CHANGE 0 #define SQL_LOCK_EXCLUSIVE 1 #define SQL_LOCK_UNLOCK 2 #define SQL_SETPOS_MAX_LOCK_VALUE SQL_LOCK_UNLOCK /* * SQLSetPos macros */ #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) /* * SQLSpecialColumns - Column types and scopes */ #define SQL_BEST_ROWID 1 #define SQL_ROWVER 2 /* * All the ODBC keywords */ #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" /* * ---------------------------------------------------------------------- * Level 2 Functions * ---------------------------------------------------------------------- */ /* * SQLExtendedFetch - fFetchType */ #define SQL_FETCH_BOOKMARK 8 /* * SQLExtendedFetch - rgfRowStatus */ #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 /* * 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 */ /* * SQLForeignKeys - UPDATE_RULE/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 */ /* * SQLForeignKeys - DEFERABILITY */ #if (ODBCVER >= 0x0300) #define SQL_INITIALLY_DEFERRED 5 #define SQL_INITIALLY_IMMEDIATE 6 #define SQL_NOT_DEFERRABLE 7 #endif /* ODBCVER >= 0x0300 */ /* * SQLBindParameter - fParamType * SQLProcedureColumns - COLUMN_TYPE */ #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 /* * SQLProcedures - PROCEDURE_TYPE */ #define SQL_PT_UNKNOWN 0 #define SQL_PT_PROCEDURE 1 #define SQL_PT_FUNCTION 2 /* * SQLSetParam to SQLBindParameter conversion */ #define SQL_PARAM_TYPE_DEFAULT SQL_PARAM_INPUT_OUTPUT #define SQL_SETPARAM_VALUE_MAX (-1L) /* * SQLStatistics - fAccuracy */ #define SQL_QUICK 0 #define SQL_ENSURE 1 /* * SQLStatistics - TYPE */ #define SQL_TABLE_STAT 0 /* * SQLTables */ #if (ODBCVER >= 0x0300) #define SQL_ALL_CATALOGS "%" #define SQL_ALL_SCHEMAS "%" #define SQL_ALL_TABLE_TYPES "%" #endif /* ODBCVER >= 0x0300 */ /* * SQLSpecialColumns - PSEUDO_COLUMN */ #define SQL_PC_NOT_PSEUDO 1 /* * Deprecated defines from prior versions of ODBC */ #define SQL_DATABASE_NAME 16 #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 #if (ODBCVER < 0x0200) #define SQL_FETCH_RESUME 7 #endif #define SQL_SCROLL_FORWARD_ONLY 0L #define SQL_SCROLL_KEYSET_DRIVEN (-1L) #define SQL_SCROLL_DYNAMIC (-2L) #define SQL_SCROLL_STATIC (-3L) /* * Level 1 function prototypes */ SQLRETURN SQL_API SQLDriverConnect ( SQLHDBC hdbc, SQLHWND hwnd, SQLCHAR * szConnStrIn, SQLSMALLINT cbConnStrIn, SQLCHAR * szConnStrOut, SQLSMALLINT cbConnStrOutMax, SQLSMALLINT * pcbConnStrOut, SQLUSMALLINT fDriverCompletion); /* * Level 2 function prototypes */ 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); /* * Depreciated - use SQLSetStmtOptions */ SQLRETURN SQL_API SQLSetScrollOptions ( /* Use SQLSetStmtOptions */ SQLHSTMT hstmt, SQLUSMALLINT fConcurrency, SQLLEN crowKeyset, SQLUSMALLINT crowRowset); /* * SQLAllocHandleStd - make SQLAllocHandle compatible with X/Open standard * * NOTE: An application should not call SQLAllocHandleStd directly */ #ifdef ODBC_STD #define SQLAllocHandle SQLAllocHandleStd #define SQLAllocEnv(phenv) \ SQLAllocHandleStd(SQL_HANDLE_ENV, SQL_NULL_HANDLE, phenv) #if (ODBCVER >= 0x0300) SQLRETURN SQL_API SQLAllocHandleStd ( SQLSMALLINT fHandleType, SQLHANDLE hInput, SQLHANDLE * phOutput); #endif /* 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 */ #ifdef __cplusplus } #endif #include #endif /* _SQLEXT_H */ libiodbc-3.52.16/include/iodbc.h0000664000175000017500000002117014424170750013243 00000000000000/* * * iodbc.h * * $Id$ * * Configuration * * The iODBC driver manager. * * Copyright (C) 1995 Ke Jin * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef _IODBC_H #define _IODBC_H #ifdef HAVE_CONFIG_H #include #elif defined (__APPLE__) #include "macos_config.h" #endif #ifndef VERSION #define VERSION "3.52.16" #define MAJ_VERSION "3" #define MIN_VERSION "52" #endif #ifndef IODBC_BUILD #define IODBC_BUILD 16230502 /* 0001.0928 */ #endif #if !defined(WINDOWS) && !defined(WIN32_SYSTEM) #define _UNIX_ #include #include #include #include #define MEM_ALLOC(size) (malloc((size_t)(size))) #define MEM_FREE(ptr) {if(ptr) free(ptr);} #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 STREQ(a, b) (strcmp((char*)(a), (char*)(b)) == 0) #define STRNEQ(a, b, n) (strncmp((char*)(a), (char*)(b), (size_t)(n)) == 0) #define STRLEN(str) ((str)? strlen((char*)(str)):0) #define STRDUP(t) (strdup((char*)(t))) #define STRCASEEQ(a, b) (strcasecmp((char*)(a), (char*)(b)) == 0) #define STRNCASEEQ(a, b, n) (strncasecmp((char*)(a), (char*)(b), (size_t)(n)) == 0) #define WCSCPY(t, s) (wcscpy((wchar_t*)(t), (wchar_t*)(s))) #define WCSNCPY(t,s,n) (wcsncpy((wchar_t*)(t), (wchar_t*)(s), (size_t)(n))) #define WCSCAT(t, s) (wcscat((wchar_t*)(t), (wchar_t*)(s))) #define WCSNCAT(t,s,n) (wcsncat((wchar_t*)(t), (wchar_t*)(s), (size_t)(n))) #define WCSEQ(a, b) (wcscmp((wchar_t*)(a), (wchar_t*)(b)) == 0) #define WCSNEQ(a, b, n) (wcsncmp((wchar_t*)(a), (wchar_t*)(b), (size_t)(n)) == 0) #define WCSLEN(str) ((str)? wcslen((wchar_t*)(str)):0) #define WCSDUP(t) (wcsdup((wchar_t*)(t))) #define WCSCASEEQ(a, b) (wcscasecmp((wchar_t*)(a), (wchar_t*)(b)) == 0) #define WCSNCASEEQ(a, b, n) (wcsncasecmp((wchar_t*)(a), (wchar_t*)(b), (size_t)(n)) == 0) #define EXPORT #define CALLBACK #define FAR #ifndef WIN32 #define UNALIGNED #endif /* * If not defined, use this as the system default odbc.ini file */ #if !defined(SYS_ODBC_INI) || (defined(__APPLE__) && !defined(ODBC_INI_APP)) # if defined(__BEOS__) # define SYS_ODBC_INI "/boot/beos/etc/odbc.ini" # elif defined(_MAC) # ifdef __POWERPC__ # define SYS_ODBC_INI "Boot:System Folder:Preferences:ODBC Preferences PPC" # else # define SYS_ODBC_INI "Boot:System Folder:Preferences:ODBC Preferences" # endif # elif defined(__APPLE__) # define SYS_ODBC_INI "/etc/odbc.ini" # define ODBC_INI_APP "/Library/ODBC/odbc.ini" # else # define SYS_ODBC_INI "/etc/odbc.ini" # endif #endif #if !defined(SYS_ODBCINST_INI) || (defined(__APPLE__) && !defined(ODBCINST_INI_APP)) # if defined(__BEOS__) # define SYS_ODBCINST_INI "/boot/beos/etc/odbcinst.ini" # elif defined(macintosh) # elif defined(__APPLE__) # define SYS_ODBCINST_INI "/etc/odbcinst.ini" # define ODBCINST_INI_APP "/Library/ODBC/odbcinst.ini" # else # define SYS_ODBCINST_INI "/etc/odbcinst.ini" # endif #endif #endif /* _UNIX_ */ #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)) #define STRCAT(t, s) (strcat((char*)(t), (char*)(s))) #define STRNCAT(t,s,n) (strncat((char*)(t), (char*)(s), (size_t)(n))) #define STRNCMP(t,s,n) (strncmp((char*)(t), (char*)(s), (size_t)(n))) #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)) #define STRCAT(t, s) (strcat((char*)(t), (char*)(s))) #define STRNCAT(t,s,n) (strncat((char*)(t), (char*)(s), (size_t)(n))) #define STRNCMP(t,s,n) (strncmp((char*)(t), (char*)(s), (size_t)(n))) #endif #endif /* WINDOWS */ #ifdef VMS /* * VMS also defines _UNIX_ above. This is OK for iODBC since all used UNIX * interfaces are supported. * The DEC C RTL actually supports dlopen(), etc, but I have made my own * implementation that supports: * - Proper error messages from dlopen() * - The ability to place the driver in other directories than SYS$SHARE: * - Neither implementation can do dlopen(NULL,), but my implementation * will not crash in this case. * To use old DEC C dlopen() implementation, remove the following define. */ #define DLDAPI_VMS_IODBC /* Use enhanced dlopen() */ #endif #define SYSERR (-1) #ifndef NULL #define NULL ((void *)0UL) #endif /* * Map generic pointer to internal pointer */ #define STMT(stmt, var) \ STMT_t *stmt = (STMT_t *)var #define CONN(con, var) \ DBC_t *con = (DBC_t *)var #define GENV(genv, var) \ GENV_t *genv = (GENV_t *)var #define ENVR(env, var) \ ENV_t *env = (ENV_t *)var #define DESC(desc, var) \ DESC_t *desc = (DESC_t *)var #define NEW_VAR(type, var) \ type *var = (type *)MEM_ALLOC(sizeof(type)) /* these are deprecated defines from the odbc headers */ #define SQL_CONNECT_OPT_DRVR_START 1000 #endif /* _IODBC_H */ libiodbc-3.52.16/include/sqltypes.h0000664000175000017500000002341114424170750014047 00000000000000/* * sqltypes.h * * $Id$ * * ODBC typedefs * * The iODBC driver manager. * * Copyright (C) 1995 Ke Jin * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef _SQLTYPES_H #define _SQLTYPES_H /* * Set default specification to ODBC 3.51 */ #ifndef ODBCVER #define ODBCVER 0x0351 #endif /* * Include Windows style defines and typedefs on Unix */ #ifndef _IODBCUNIX_H #include #endif #ifdef __cplusplus extern "C" { #endif /* * Environment specific definitions */ #ifndef EXPORT #define EXPORT #endif #ifdef WIN32 #define SQL_API __stdcall #else #define SQL_API #endif /* * API declaration data types */ typedef unsigned char SQLCHAR; typedef signed short SQLSMALLINT; typedef unsigned short SQLUSMALLINT; #if (SIZEOF_LONG == 8) typedef signed int SQLINTEGER; typedef unsigned int SQLUINTEGER; #else typedef signed long SQLINTEGER; typedef unsigned long SQLUINTEGER; #endif typedef void * SQLPOINTER; #if (ODBCVER >= 0x0300) typedef signed char SQLSCHAR; typedef unsigned char SQLDATE; typedef unsigned char SQLDECIMAL; typedef unsigned char SQLNUMERIC; typedef double SQLDOUBLE; typedef double SQLFLOAT; typedef float SQLREAL; typedef unsigned char SQLTIME; typedef unsigned char SQLTIMESTAMP; typedef unsigned char SQLVARCHAR; #endif /* ODBCVER >= 0x0300 */ /* * New Win64 datatypes */ #ifdef _WIN64 typedef INT64 SQLLEN; typedef UINT64 SQLULEN; typedef UINT64 SQLSETPOSIROW; #elif defined(STRICT_ODBC_TYPES) typedef long SQLLEN; typedef unsigned long SQLULEN; typedef unsigned short SQLSETPOSIROW; #else #define SQLLEN long #define SQLULEN unsigned long #define SQLSETPOSIROW unsigned short #endif /* * Backward compatibility with older platform sdks */ typedef SQLULEN SQLROWCOUNT; typedef SQLULEN SQLROWSETSIZE; typedef SQLULEN SQLTRANSID; typedef SQLLEN SQLROWOFFSET; /* * Generic pointer types */ typedef void * PTR; typedef void * SQLHANDLE; /* * Handles */ typedef void * HENV; typedef void * HDBC; typedef void * HSTMT; typedef SQLHANDLE SQLHENV; typedef SQLHANDLE SQLHDBC; typedef SQLHANDLE SQLHSTMT; #if (ODBCVER >= 0x0300) typedef SQLHANDLE SQLHDESC; #endif /* ODBCVER >= 0x0300 */ /* * Window Handle */ #if defined(WIN32) || defined (_WIN64) || defined(OS2) typedef HWND SQLHWND; #elif defined(macintosh) #include typedef WindowPtr HWND; typedef HWND SQLHWND; #else typedef SQLPOINTER HWND; typedef SQLPOINTER SQLHWND; #endif /* * SQL portable types for C */ typedef unsigned char UCHAR; typedef signed char SCHAR; typedef short int SWORD; typedef unsigned short int UWORD; typedef long int SDWORD; typedef unsigned long int UDWORD; typedef signed short SSHORT; typedef unsigned short USHORT; typedef signed long SLONG; typedef unsigned long ULONG; typedef float SFLOAT; typedef double SDOUBLE; typedef double LDOUBLE; /* * Return type for functions */ typedef signed short RETCODE; typedef SQLSMALLINT SQLRETURN; /* * SQL portable types for C - DATA, TIME, TIMESTAMP, and BOOKMARK */ typedef SQLULEN BOOKMARK; typedef struct tagDATE_STRUCT { SQLSMALLINT year; SQLUSMALLINT month; SQLUSMALLINT day; } DATE_STRUCT; #if (ODBCVER >= 0x0300) typedef DATE_STRUCT SQL_DATE_STRUCT; #endif /* ODBCVER >= 0x0300 */ typedef struct tagTIME_STRUCT { SQLUSMALLINT hour; SQLUSMALLINT minute; SQLUSMALLINT second; } TIME_STRUCT; #if (ODBCVER >= 0x0300) typedef TIME_STRUCT SQL_TIME_STRUCT; #endif /* ODBCVER >= 0x0300 */ 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 /* ODBCVER >= 0x0300 */ /* * Enumeration for DATETIME_INTERVAL_SUBCODE values for interval data types * * These values are from SQL-92 */ #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; 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 /* ODBCVER >= 0x0300 */ /* * The ODBC C types for SQL_C_SBIGINT and SQL_C_UBIGINT */ #if (ODBCVER >= 0x0300) #if defined(_MSC_VER) && (_MSC_VER >= 900) # define ODBCINT64 __int64 #endif #ifndef ODBCINT64 # if (SIZEOF_LONG == 8) # define ODBCINT64 long # else # define ODBCINT64 long long # endif #endif /* ODBCINT64 */ #if defined (ODBCINT64) typedef signed ODBCINT64 SQLBIGINT; typedef unsigned ODBCINT64 SQLUBIGINT; #endif /* ODBCINT64 */ #endif /* ODBCVER >= 0x0300 */ /* * The internal representation of the numeric data type */ #if (ODBCVER >= 0x0300) #define SQL_MAX_NUMERIC_LEN 16 typedef struct tagSQL_NUMERIC_STRUCT { SQLCHAR precision; SQLSCHAR scale; SQLCHAR sign; /* 0 for negative, 1 for positive */ SQLCHAR val[SQL_MAX_NUMERIC_LEN]; } SQL_NUMERIC_STRUCT; #endif /* ODBCVER >= 0x0300 */ #if (ODBCVER >= 0x0350) #ifdef GUID_DEFINED typedef GUID SQLGUID; #else typedef struct tagSQLGUID { unsigned int Data1; unsigned short Data2; unsigned short Data3; unsigned char Data4[8]; /* BYTE */ } SQLGUID; #endif /* GUID_DEFINED */ #endif /* ODBCVER >= 0x0350 */ #if defined(WIN32) typedef unsigned short SQLWCHAR; #else # include # if defined(__cplusplus) || \ defined(_WCHAR_T) || \ defined(_WCHAR_T_DEFINED) || \ defined(_WCHAR_T_DEFINED_) || \ defined(_WCHAR_T_DECLARED) || \ defined(_BSD_WCHAR_T_DEFINED_) || \ defined(_BSD_WCHAR_T_) || \ defined(_BSD_CT_RUNE_T_) || \ defined(__DEFINED_wchar_t) typedef wchar_t SQLWCHAR; # else # error Please make sure your system supports the wchar_t type # endif #endif /* WIN32 */ #ifdef UNICODE typedef SQLWCHAR SQLTCHAR; #else typedef SQLCHAR SQLTCHAR; #endif /* UNICODE */ #ifdef __cplusplus } #endif #endif /* _SQLTYPES_H */ libiodbc-3.52.16/include/odbcinst.h0000664000175000017500000004044314424170750013774 00000000000000/* * odbcinst.h * * $Id$ * * iODBC Installer defines * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef _ODBCINST_H #define _ODBCINST_H /* * Set default specification to ODBC 3.51 */ #ifndef ODBCVER #define ODBCVER 0x0351 #endif #ifndef _SQL_H #include #endif #ifndef _SQLEXT_H #include #endif #ifdef __cplusplus extern "C" { #endif #ifndef EXPORT #define EXPORT #endif #ifndef SYS_ODBCINST_INI # if defined(__BEOS__) # define SYS_ODBCINST_INI "/boot/beos/etc/odbcinst.ini" # endif # if defined(macintosh) # ifdef __POWERPC__ # define SYS_ODBCINST_INI "Boot:System Folder:Preferences:ODBC Installer Preferences PPC" # else # define SYS_ODBCINST_INI "Boot:System Folder:Preferences:ODBC Installer Preferences" # endif # else # define SYS_ODBCINST_INI "/etc/odbcinst.ini" # endif #endif #ifndef SYS_ODBC_INI # if defined(__BEOS__) # define SYS_ODBC_INI "/boot/beos/etc/odbc.ini" # endif # if defined(macintosh) # ifdef __POWERPC__ # define SYS_ODBC_INI "Boot:System Folder:Preferences:ODBC Preferences PPC" # else # define SYS_ODBC_INI "Boot:System Folder:Preferences:ODBC Preferences" # endif # else # define SYS_ODBC_INI "/etc/odbc.ini" # endif #endif #ifndef DEFAULT_FILEDSNPATH # if defined(__BEOS__) # define DEFAULT_FILEDSNPATH "/boot/beos/etc/ODBCDataSources" # elif defined(macintosh) # ifdef __POWERPC__ # define DEFAULT_FILEDSNPATH "Boot:System Folder:Preferences:ODBC Preferences PPC:ODBCDataSources" # else # define DEFAULT_FILEDSNPATH "Boot:System Folder:Preferences:ODBC Preferences:ODBCDataSources" # endif # elif defined (__APPLE__) # define DEFAULT_FILEDSNPATH "/Library/ODBC/ODBCDataSources" # else # define DEFAULT_FILEDSNPATH "/etc/ODBCDataSources" # endif #endif #define USERDSN_ONLY 0 #define SYSTEMDSN_ONLY 1 #ifdef WIN32 #define INSTAPI __stdcall #else #define INSTAPI #endif /* * SQLConfigDataSource */ #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 #define ODBC_ERROR_DRIVER_SPECIFIC 23 #endif /* ODBCVER >= 0x0300 */ /* * Function Prototypes */ BOOL INSTAPI SQLGetConfigMode ( UWORD* pwConfigMode); BOOL INSTAPI SQLInstallDriverEx ( LPCSTR lpszDriver, LPCSTR lpszPathIn, LPSTR lpszPathOut, WORD cbPathOutMax, WORD* pcbPathOut, WORD fRequest, LPDWORD lpdwUsageCount); BOOL INSTAPI SQLInstallDriverExW ( LPCWSTR lpszDriver, LPCWSTR lpszPathIn, LPWSTR lpszPathOut, WORD cbPathOutMax, WORD* pcbPathOut, WORD fRequest, LPDWORD lpdwUsageCount); RETCODE INSTAPI SQLInstallerError ( WORD iError, DWORD* pfErrorCode, LPSTR lpszErrorMsg, WORD cbErrorMsgMax, WORD* pcbErrorMsg); RETCODE INSTAPI SQLInstallerErrorW ( WORD iError, DWORD* pfErrorCode, LPWSTR lpszErrorMsg, WORD cbErrorMsgMax, WORD* pcbErrorMsg); RETCODE INSTAPI SQLPostInstallerError ( DWORD fErrorCode, LPSTR szErrorMsg); RETCODE INSTAPI SQLPostInstallerErrorW ( DWORD fErrorCode, LPWSTR szErrorMsg); BOOL INSTAPI SQLInstallTranslatorEx ( LPCSTR lpszTranslator, LPCSTR lpszPathIn, LPSTR 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); BOOL INSTAPI SQLReadFileDSN ( LPCSTR lpszFileName, LPCSTR lpszAppName, LPCSTR lpszKeyName, LPSTR lpszString, WORD cbString, WORD* pcbString); BOOL INSTAPI SQLReadFileDSNW ( LPCWSTR lpszFileName, LPCWSTR lpszAppName, LPCWSTR lpszKeyName, LPWSTR lpszString, WORD cbString, WORD* pcbString); BOOL INSTAPI SQLWriteFileDSN ( LPCSTR lpszFileName, LPCSTR lpszAppName, LPCSTR lpszKeyName, LPSTR lpszString); BOOL INSTAPI SQLWriteFileDSNW ( LPCWSTR lpszFileName, LPCWSTR lpszAppName, LPCWSTR lpszKeyName, LPWSTR lpszString); BOOL INSTAPI SQLSetConfigMode ( UWORD wConfigMode); BOOL INSTAPI SQLInstallODBC ( HWND hwndParent, LPCSTR lpszInfFile, LPCSTR lpszSrcPath, LPCSTR lpszDrivers); BOOL INSTAPI SQLInstallODBCW ( HWND hwndParent, LPCWSTR lpszInfFile, LPCWSTR lpszSrcPath, LPCWSTR lpszDrivers); BOOL INSTAPI SQLManageDataSources (HWND hwndParent); BOOL INSTAPI SQLCreateDataSource ( HWND hwndParent, LPCSTR lpszDSN); BOOL INSTAPI SQLCreateDataSourceW ( HWND hwndParent, LPCWSTR lpszDSN); BOOL INSTAPI SQLGetTranslator ( HWND hwnd, LPSTR lpszName, WORD cbNameMax, WORD * pcbNameOut, LPSTR lpszPath, WORD cbPathMax, WORD * pcbPathOut, DWORD * pvOption); BOOL INSTAPI SQLGetTranslatorW ( HWND hwnd, LPWSTR lpszName, WORD cbNameMax, WORD * pcbNameOut, LPWSTR lpszPath, WORD cbPathMax, WORD * pcbPathOut, DWORD * pvOption); /* Low level APIs * NOTE: The high-level APIs should always be used. These APIs * have been left for compatibility. */ BOOL INSTAPI SQLInstallDriver ( LPCSTR lpszInfFile, LPCSTR lpszDriver, LPSTR lpszPath, WORD cbPathMax, WORD * pcbPathOut); BOOL INSTAPI SQLInstallDriverW ( LPCWSTR lpszInfFile, LPCWSTR lpszDriver, LPWSTR lpszPath, WORD cbPathMax, WORD * pcbPathOut); BOOL INSTAPI SQLInstallDriverManager ( LPSTR lpszPath, WORD cbPathMax, WORD * pcbPathOut); BOOL INSTAPI SQLInstallDriverManagerW ( LPWSTR lpszPath, WORD cbPathMax, WORD * pcbPathOut); BOOL INSTAPI SQLGetInstalledDrivers ( LPSTR lpszBuf, WORD cbBufMax, WORD * pcbBufOut); BOOL INSTAPI SQLGetInstalledDriversW ( LPWSTR lpszBuf, WORD cbBufMax, WORD * pcbBufOut); BOOL INSTAPI SQLGetAvailableDrivers ( LPCSTR lpszInfFile, LPSTR lpszBuf, WORD cbBufMax, WORD * pcbBufOut); BOOL INSTAPI SQLGetAvailableDriversW ( LPCWSTR lpszInfFile, LPWSTR lpszBuf, WORD cbBufMax, WORD * pcbBufOut); BOOL INSTAPI SQLConfigDataSource ( HWND hwndParent, WORD fRequest, LPCSTR lpszDriver, LPCSTR lpszAttributes); BOOL INSTAPI SQLConfigDataSourceW ( HWND hwndParent, WORD fRequest, LPCWSTR lpszDriver, LPCWSTR lpszAttributes); BOOL INSTAPI SQLRemoveDefaultDataSource (void); BOOL INSTAPI SQLWriteDSNToIni ( LPCSTR lpszDSN, LPCSTR lpszDriver); BOOL INSTAPI SQLWriteDSNToIniW ( LPCWSTR lpszDSN, LPCWSTR lpszDriver); BOOL INSTAPI SQLRemoveDSNFromIni (LPCSTR lpszDSN); BOOL INSTAPI SQLRemoveDSNFromIniW (LPCWSTR lpszDSN); BOOL INSTAPI SQLValidDSN (LPCSTR lpszDSN); BOOL INSTAPI SQLValidDSNW (LPCWSTR lpszDSN); BOOL INSTAPI SQLWritePrivateProfileString ( LPCSTR lpszSection, LPCSTR lpszEntry, LPCSTR lpszString, LPCSTR lpszFilename); BOOL INSTAPI SQLWritePrivateProfileStringW ( LPCWSTR lpszSection, LPCWSTR lpszEntry, LPCWSTR lpszString, LPCWSTR lpszFilename); int INSTAPI SQLGetPrivateProfileString ( LPCSTR lpszSection, LPCSTR lpszEntry, LPCSTR lpszDefault, LPSTR lpszRetBuffer, int cbRetBuffer, LPCSTR lpszFilename); int INSTAPI SQLGetPrivateProfileStringW ( LPCWSTR lpszSection, LPCWSTR lpszEntry, LPCWSTR lpszDefault, LPWSTR lpszRetBuffer, int cbRetBuffer, LPCWSTR lpszFilename); 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 SQLInstallTranslatorW ( LPCWSTR lpszInfFile, LPCWSTR lpszTranslator, LPCWSTR lpszPathIn, LPWSTR lpszPathOut, WORD cbPathOutMax, WORD * pcbPathOut, WORD fRequest, LPDWORD lpdwUsageCount); BOOL INSTAPI SQLRemoveTranslator ( LPCSTR lpszTranslator, LPDWORD lpdwUsageCount); BOOL INSTAPI SQLRemoveTranslatorW ( LPCWSTR lpszTranslator, LPDWORD lpdwUsageCount); BOOL INSTAPI SQLRemoveDriver ( LPCSTR lpszDriver, BOOL fRemoveDSN, LPDWORD lpdwUsageCount); BOOL INSTAPI SQLRemoveDriverW ( LPCWSTR lpszDriver, BOOL fRemoveDSN, LPDWORD lpdwUsageCount); BOOL INSTAPI SQLConfigDriver ( HWND hwndParent, WORD fRequest, LPCSTR lpszDriver, LPCSTR lpszArgs, LPSTR lpszMsg, WORD cbMsgMax, WORD * pcbMsgOut); BOOL INSTAPI SQLConfigDriverW ( HWND hwndParent, WORD fRequest, LPCWSTR lpszDriver, LPCWSTR lpszArgs, LPWSTR lpszMsg, WORD cbMsgMax, WORD * pcbMsgOut); /* Driver specific Setup APIs called by installer */ typedef BOOL INSTAPI (*pConfigDSNFunc) ( HWND hwndParent, WORD fRequest, LPCSTR lpszDriver, LPCSTR lpszAttributes); typedef BOOL INSTAPI (*pConfigDSNWFunc) ( HWND hwndParent, WORD fRequest, LPCWSTR lpszDriver, LPCWSTR lpszAttributes); typedef BOOL INSTAPI (*pConfigDriverFunc) ( HWND hwndParent, WORD fRequest, LPCSTR lpszDriver, LPCSTR lpszArgs, LPSTR lpszMsg, WORD cbMsgMax, WORD * pcbMsgOut); typedef BOOL INSTAPI (*pConfigDriverWFunc) ( HWND hwndParent, WORD fRequest, LPCWSTR lpszDriver, LPCWSTR lpszArgs, LPWSTR lpszMsg, WORD cbMsgMax, WORD * pcbMsgOut); typedef BOOL INSTAPI (*pConfigTranslatorFunc) ( HWND hwndParent, DWORD *pvOption); BOOL INSTAPI ConfigDSN ( HWND hwndParent, WORD fRequest, LPCSTR lpszDriver, LPCSTR lpszAttributes); BOOL INSTAPI ConfigDSNW ( HWND hwndParent, WORD fRequest, LPCWSTR lpszDriver, LPCWSTR lpszAttributes); BOOL INSTAPI ConfigTranslator (HWND hwndParent, DWORD * pvOption); BOOL INSTAPI ConfigDriver ( HWND hwndParent, WORD fRequest, LPCSTR lpszDriver, LPCSTR lpszArgs, LPSTR lpszMsg, WORD cbMsgMax, WORD * pcbMsgOut); BOOL INSTAPI ConfigDriverW ( HWND hwndParent, WORD fRequest, LPCWSTR lpszDriver, LPCWSTR lpszArgs, LPWSTR lpszMsg, WORD cbMsgMax, WORD * pcbMsgOut); #ifndef SQL_NOUNICODEMAP #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 /* UNICODE */ #endif /* SQL_NOUNICODEMAP */ #ifdef __cplusplus } #endif #endif /* _ODBCINST_H */ libiodbc-3.52.16/include/iodbcext.h0000664000175000017500000003741314424170750013773 00000000000000/* * iodbcext.h * * $Id$ * * iODBC extensions and changes to the SAG specifications * for third party drivers * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ #ifndef _IODBCEXT_H #define _IODBCEXT_H /* * OpenLink API Extensions */ #define SQL_GETLASTROWID 1048L #define SQL_GETLASTSERIAL 1049L #define SQL_CONCUR_VAL_EXTENT 1050L #define SQL_APPLICATION_NAME 1051L /* connect option */ #define SQL_PARSE_FWD_ONLY_REQ 1052L #define SQL_DESC_KEY 1053L #define SQL_APPEND_KEYS 1054L #define SQL_DESC_EXPR 1055L #define SQL_ATTR_WCHAR_SIZE 1056L #define SQL_COLUMN_ROWVER SQL_DESC_ROWVER #define SQL_COLUMN_KEY SQL_DESC_KEY #define SQL_COLUMN_EXPR SQL_DESC_EXPR #define SQL_ATTR_PARSE_FWD_ONLY_REQ SQL_PARSE_FWD_ONLY_REQ #define SQL_ATTR_APPEND_KEYS SQL_APPEND_KEYS /* * Microsoft extensions for SQLServer */ /* * SQLSetConnectOption/SQLSetStmtOption driver specific defines. * Microsoft has 1200 thru 1249 reserved for Microsoft SQL Server * driver usage. */ #define SQL_ATTR_ENLIST_IN_DTC 1207 #define SQL_ATTR_ENLIST_IN_XA 1208 #define SQL_ATTR_CONNECTION_DEAD 1209 /* GetConnectAttr only */ #define SQL_COPT_SS_BASE 1200 #define SQL_COPT_SS_REMOTE_PWD (SQL_COPT_SS_BASE+1) /* dbrpwset SQLSetConnectOption only */ #define SQL_COPT_SS_USE_PROC_FOR_PREP (SQL_COPT_SS_BASE+2) /* Use create proc for SQLPrepare */ #define SQL_COPT_SS_INTEGRATED_SECURITY (SQL_COPT_SS_BASE+3) /* Force integrated security on login */ #define SQL_COPT_SS_PRESERVE_CURSORS (SQL_COPT_SS_BASE+4) /* Preserve server cursors after SQLTransact */ #define SQL_COPT_SS_USER_DATA (SQL_COPT_SS_BASE+5) /* dbgetuserdata/dbsetuserdata */ #define SQL_COPT_SS_ANSI_OEM (SQL_COPT_SS_BASE+6) /* dbsetopt/DBANSItoOEM/DBOEMtoANSI */ #define SQL_COPT_SS_ENLIST_IN_DTC SQL_ATTR_ENLIST_IN_DTC /* Enlist in a DTC transaction */ #define SQL_COPT_SS_ENLIST_IN_XA SQL_ATTR_ENLIST_IN_XA /* Enlist in a XA transaction */ #define SQL_COPT_SS_CONNECTION_DEAD SQL_ATTR_CONNECTION_DEAD /* dbdead SQLGetConnectOption only */ #define SQL_COPT_SS_FALLBACK_CONNECT (SQL_COPT_SS_BASE+10) /* Enables FallBack connections */ #define SQL_COPT_SS_PERF_DATA (SQL_COPT_SS_BASE+11) /* Used to access SQL Server ODBC driver performance data */ #define SQL_COPT_SS_PERF_DATA_LOG (SQL_COPT_SS_BASE+12) /* Used to set the logfile name for the Performance data */ #define SQL_COPT_SS_PERF_QUERY_INTERVAL (SQL_COPT_SS_BASE+13) /* Used to set the query logging threshold in milliseconds. */ #define SQL_COPT_SS_PERF_QUERY_LOG (SQL_COPT_SS_BASE+14) /* Used to set the logfile name for saving queries. */ #define SQL_COPT_SS_PERF_QUERY (SQL_COPT_SS_BASE+15) /* Used to start and stop query logging. */ #define SQL_COPT_SS_PERF_DATA_LOG_NOW (SQL_COPT_SS_BASE+16) /* Used to make a statistics log entry to disk. */ #define SQL_COPT_SS_QUOTED_IDENT (SQL_COPT_SS_BASE+17) /* Enable/Disable Quoted Identifiers */ #define SQL_COPT_SS_ANSI_NPW (SQL_COPT_SS_BASE+18) /* Enable/Disable ANSI NULL, Padding and Warnings */ #define SQL_COPT_SS_BCP (SQL_COPT_SS_BASE+19) /* Allow BCP usage on connection */ #define SQL_COPT_SS_MAX_USED SQL_COPT_SS_BCP #define SQL_SOPT_SS_BASE 1225 #define SQL_SOPT_SS_TEXTPTR_LOGGING (SQL_SOPT_SS_BASE+0) /* Text pointer logging */ #define SQL_SOPT_SS_CURRENT_COMMAND (SQL_SOPT_SS_BASE+1) /* dbcurcmd SQLGetStmtOption only */ #define SQL_SOPT_SS_HIDDEN_COLUMNS (SQL_SOPT_SS_BASE+2) /* Expose FOR BROWSE hidden columns */ #define SQL_SOPT_SS_NOBROWSETABLE (SQL_SOPT_SS_BASE+3) /* Set NOBROWSETABLE option */ #define SQL_SOPT_SS_REGIONALIZE (SQL_SOPT_SS_BASE+4) /* Regionalize output character conversions */ #define SQL_SOPT_SS_MAX_USED SQL_SOPT_SS_REGIONALIZE /* Defines for use with SQL_COPT_SS_USE_PROC_FOR_PREP */ #define SQL_UP_OFF 0L /*Procedures won't be used for prepare*/ #define SQL_UP_ON 1L /*Procedures will be used for prepare*/ #define SQL_UP_ON_DROP 2L /*Temp procedures will be explicitly dropped*/ #define SQL_UP_DEFAULT SQL_UP_ON /* Defines for use with SQL_COPT_SS_INTEGRATED_SECURITY - Pre-Connect Option only */ #define SQL_IS_OFF 0L /* Integrated security isn't used */ #define SQL_IS_ON 1L /* Integrated security is used */ #define SQL_IS_DEFAULT SQL_IS_OFF /* Defines for use with SQL_COPT_SS_PRESERVE_CURSORS */ #define SQL_PC_OFF 0L /* Cursors are closed on SQLTransact */ #define SQL_PC_ON 1L /* Cursors remain open on SQLTransact */ #define SQL_PC_DEFAULT SQL_PC_OFF /* Defines for use with SQL_COPT_SS_USER_DATA */ #define SQL_UD_NOTSET NULL /* No user data pointer set */ /* Defines for use with SQL_COPT_SS_ANSI_OEM */ #define SQL_AO_OFF 0L /* ANSI/OEM translation is not performed */ #define SQL_AO_ON 1L /* ANSI/OEM translation is performed */ #define SQL_AO_DEFAULT SQL_AO_OFF /* Default unless DSN OEM/ANSI checkbox is checked */ /* Defines for use with SQL_COPT_SS_FALLBACK_CONNECT */ #define SQL_FB_OFF 0L /* FallBack connections are disabled */ #define SQL_FB_ON 1L /* FallBack connections are enabled */ #define SQL_FB_DEFAULT SQL_FB_OFF /* Defines for use with SQL_COPT_SS_BCP */ #define SQL_BCP_OFF 0L /* BCP is not allowed on connection */ #define SQL_BCP_ON 1L /* BCP is allowed on connection */ #define SQL_BCP_DEFAULT SQL_BCP_OFF /* Defines for use with SQL_COPT_SS_QUOTED_IDENT - Pre-Connect Option only */ #define SQL_QI_OFF 0L /* Quoted identifiers are not supported */ #define SQL_QI_ON 1L /* Quoted identifiers are supported */ #define SQL_QI_DEFAULT SQL_QI_ON /* Defines for use with SQL_COPT_SS_ANSI_NPW - Pre-Connect Option only */ #define SQL_AD_OFF 0L /* ANSI NULLs, Padding and Warnings are not supported */ #define SQL_AD_ON 1L /* ANSI NULLs, Padding and Warnings are supported */ #define SQL_AD_DEFAULT SQL_AD_ON /* Defines for use with SQL_SOPT_SS_TEXTPTR_LOGGING */ #define SQL_TL_OFF 0L /* No logging on text pointer ops */ #define SQL_TL_ON 1L /* Logging occurs on text pointer ops */ #define SQL_TL_DEFAULT SQL_TL_ON /* Defines for use with SQL_SOPT_SS_HIDDEN_COLUMNS */ #define SQL_HC_OFF 0L /* FOR BROWSE columns are hidden */ #define SQL_HC_ON 1L /* FOR BROWSE columns are exposed */ #define SQL_HC_DEFAULT SQL_HC_OFF /* Defines for use with SQL_SOPT_SS_NOBROWSETABLE */ #define SQL_NB_OFF 0L /* NO_BROWSETABLE is off */ #define SQL_NB_ON 1L /* NO_BROWSETABLE is on */ #define SQL_NB_DEFAULT SQL_NB_OFF /* Defines for use with SQL_SOPT_SS_REGIONALIZE */ #define SQL_RE_OFF 0L /* No regionalization occurs on output character conversions */ #define SQL_RE_ON 1L /* Regionalization occurs on output character conversions */ #define SQL_RE_DEFAULT SQL_RE_OFF #define SQL_ATTR_APP_WCHAR_TYPE 1061 #define SQL_ATTR_APP_UNICODE_TYPE 1064 #define SQL_ATTR_DRIVER_UNICODE_TYPE 1065 #define SQL_DM_CP_UTF16 1 #define SQL_DM_CP_UTF8 2 #define SQL_DM_CP_UCS4 3 #if defined(SIZEOF_WCHAR) # if (SIZEOF_WCHAR == 2) # define SQL_DM_CP_DEF SQL_DM_CP_UTF16 # else # define SQL_DM_CP_DEF SQL_DM_CP_UCS4 # endif #else # define SQL_DM_CP_DEF SQL_DM_CP_UCS4 #endif /* DataDirect options for Connection/Env Attributes. */ #define SQL_DD_CP_ANSI 0 #define SQL_DD_CP_UCS2 SQL_DM_CP_UTF16 #define SQL_DD_CP_UTF8 SQL_DM_CP_UTF8 #define SQL_DD_CP_UTF16 SQL_DD_CP_UCS2 /* * IBM extensions for DB2 */ /* Options for SQLGetStmtOption/SQLSetStmtOption extensions */ #define SQL_CURSOR_HOLD 1250 #define SQL_ATTR_CURSOR_HOLD 1250 #define SQL_NODESCRIBE_OUTPUT 1251 #define SQL_ATTR_NODESCRIBE_OUTPUT 1251 #define SQL_NODESCRIBE_INPUT 1264 #define SQL_ATTR_NODESCRIBE_INPUT 1264 #define SQL_NODESCRIBE SQL_NODESCRIBE_OUTPUT #define SQL_ATTR_NODESCRIBE SQL_NODESCRIBE_OUTPUT #define SQL_CLOSE_BEHAVIOR 1257 #define SQL_ATTR_CLOSE_BEHAVIOR 1257 #define SQL_ATTR_CLOSEOPEN 1265 #define SQL_ATTR_CURRENT_PACKAGE_SET 1276 #define SQL_ATTR_DEFERRED_PREPARE 1277 #define SQL_ATTR_EARLYCLOSE 1268 #define SQL_ATTR_PROCESSCTL 1278 /* SQL_CLOSE_BEHAVIOR values. */ #define SQL_CC_NO_RELEASE 0 #define SQL_CC_RELEASE 1 #define SQL_CC_DEFAULT SQL_CC_NO_RELEASE /* SQL_ATTR_DEFERRED_PREPARE values */ #define SQL_DEFERRED_PREPARE_ON 1 #define SQL_DEFERRED_PREPARE_OFF 0 #define SQL_DEFERRED_PREPARE_DEFAULT SQL_DEFERRED_PREPARE_ON /* SQL_ATTR_EARLYCLOSE values */ #define SQL_EARLYCLOSE_ON 1 #define SQL_EARLYCLOSE_OFF 0 #define SQL_EARLYCLOSE_DEFAULT SQL_EARLYCLOSE_ON /* SQL_ATTR_PROCESSCTL masks */ #define SQL_PROCESSCTL_NOTHREAD 0x00000001L #define SQL_PROCESSCTL_NOFORK 0x00000002L /* Options for SQL_CURSOR_HOLD */ #define SQL_CURSOR_HOLD_ON 1 #define SQL_CURSOR_HOLD_OFF 0 #define SQL_CURSOR_HOLD_DEFAULT SQL_CURSOR_HOLD_ON /* Options for SQL_NODESCRIBE_INPUT/SQL_NODESCRIBE_OUTPUT */ #define SQL_NODESCRIBE_ON 1 #define SQL_NODESCRIBE_OFF 0 #define SQL_NODESCRIBE_DEFAULT SQL_NODESCRIBE_OFF /* Options for SQLGetConnectOption/SQLSetConnectOption extensions */ #define SQL_WCHARTYPE 1252 #define SQL_LONGDATA_COMPAT 1253 #define SQL_CURRENT_SCHEMA 1254 #define SQL_DB2EXPLAIN 1258 #define SQL_DB2ESTIMATE 1259 #define SQL_PARAMOPT_ATOMIC 1260 #define SQL_STMTTXN_ISOLATION 1261 #define SQL_MAXCONN 1262 #define SQL_ATTR_WCHARTYPE SQL_WCHARTYPE #define SQL_ATTR_LONGDATA_COMPAT SQL_LONGDATA_COMPAT #define SQL_ATTR_CURRENT_SCHEMA SQL_CURRENT_SCHEMA #define SQL_ATTR_DB2EXPLAIN SQL_DB2EXPLAIN #define SQL_ATTR_DB2ESTIMATE SQL_DB2ESTIMATE #define SQL_ATTR_PARAMOPT_ATOMIC SQL_PARAMOPT_ATOMIC #define SQL_ATTR_STMTTXN_ISOLATION SQL_STMTTXN_ISOLATION #define SQL_ATTR_MAXCONN SQL_MAXCONN /* Options for SQLSetConnectOption, SQLSetEnvAttr */ #define SQL_CONNECTTYPE 1255 #define SQL_SYNC_POINT 1256 #define SQL_MINMEMORY_USAGE 1263 #define SQL_CONN_CONTEXT 1269 #define SQL_ATTR_INHERIT_NULL_CONNECT 1270 #define SQL_ATTR_FORCE_CONVERSION_ON_CLIENT 1275 #define SQL_ATTR_CONNECTTYPE SQL_CONNECTTYPE #define SQL_ATTR_SYNC_POINT SQL_SYNC_POINT #define SQL_ATTR_MINMEMORY_USAGE SQL_MINMEMORY_USAGE #define SQL_ATTR_CONN_CONTEXT SQL_CONN_CONTEXT /* Options for SQL_LONGDATA_COMPAT */ #define SQL_LD_COMPAT_YES 1 #define SQL_LD_COMPAT_NO 0 #define SQL_LD_COMPAT_DEFAULT SQL_LD_COMPAT_NO /* Options for SQL_PARAMOPT_ATOMIC */ #define SQL_ATOMIC_YES 1 #define SQL_ATOMIC_NO 0 #define SQL_ATOMIC_DEFAULT SQL_ATOMIC_YES /* Options for SQL_CONNECT_TYPE */ #define SQL_CONCURRENT_TRANS 1 #define SQL_COORDINATED_TRANS 2 #define SQL_CONNECTTYPE_DEFAULT SQL_CONCURRENT_TRANS /* Options for SQL_SYNCPOINT */ #define SQL_ONEPHASE 1 #define SQL_TWOPHASE 2 #define SQL_SYNCPOINT_DEFAULT SQL_ONEPHASE /* Options for SQL_DB2ESTIMATE */ #define SQL_DB2ESTIMATE_ON 1 #define SQL_DB2ESTIMATE_OFF 0 #define SQL_DB2ESTIMATE_DEFAULT SQL_DB2ESTIMATE_OFF /* Options for SQL_DB2EXPLAIN */ #define SQL_DB2EXPLAIN_OFF 0x00000000L #define SQL_DB2EXPLAIN_SNAPSHOT_ON 0x00000001L #define SQL_DB2EXPLAIN_MODE_ON 0x00000002L #define SQL_DB2EXPLAIN_SNAPSHOT_MODE_ON SQL_DB2EXPLAIN_SNAPSHOT_ON+SQL_DB2EXPLAIN_MODE_ON #define SQL_DB2EXPLAIN_ON SQL_DB2EXPLAIN_SNAPSHOT_ON #define SQL_DB2EXPLAIN_DEFAULT SQL_DB2EXPLAIN_OFF /* Options for SQL_WCHARTYPE * Note that you can only specify SQL_WCHARTYPE_CONVERT if you have an * external compile flag SQL_WCHART_CONVERT defined */ #ifdef SQL_WCHART_CONVERT #define SQL_WCHARTYPE_CONVERT 1 #endif #define SQL_WCHARTYPE_NOCONVERT 0 #define SQL_WCHARTYPE_DEFAULT SQL_WCHARTYPE_NOCONVERT /******************* Virtuoso ODBC Extensions *******************/ /* * ODBC extensions for SQLGetDescField */ #define SQL_DESC_COL_DV_TYPE 1057L #define SQL_DESC_COL_DT_DT_TYPE 1058L #define SQL_DESC_COL_LITERAL_ATTR 1059L #define SQL_DESC_COL_BOX_FLAGS 1060L #define SQL_DESC_COL_LITERAL_LANG 1061L #define SQL_DESC_COL_LITERAL_TYPE 1062L /* * Virtuoso - ODBC SQL_DESC_COL_DV_TYPE */ #define VIRTUOSO_DV_DATE 129 #define VIRTUOSO_DV_DATETIME 211 #define VIRTUOSO_DV_DOUBLE_FLOAT 191 #define VIRTUOSO_DV_IRI_ID 243 #define VIRTUOSO_DV_LONG_INT 189 #define VIRTUOSO_DV_NUMERIC 219 #define VIRTUOSO_DV_RDF 246 #define VIRTUOSO_DV_SINGLE_FLOAT 190 #define VIRTUOSO_DV_STRING 182 #define VIRTUOSO_DV_TIME 210 #define VIRTUOSO_DV_TIMESTAMP 128 #define VIRTUOSO_DV_TIMESTAMP_OBJ 208 /* * Virtuoso - ODBC SQL_DESC_COL_DT_DT_TYPE */ #define VIRTUOSO_DT_TYPE_DATETIME 1 #define VIRTUOSO_DT_TYPE_DATE 2 #define VIRTUOSO_DT_TYPE_TIME 3 #endif /* _IODBCEXT_H */ libiodbc-3.52.16/include/sqlucode.h0000664000175000017500000005433214424170750014010 00000000000000/* * sqlucode.h * * $Id$ * * ODBC Unicode defines * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef _SQLUCODE_H #define _SQLUCODE_H #ifndef _SQLEXT_H #include #endif #ifdef __cplusplus extern "C" { #endif /* * SQL datatypes - Unicode */ #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 /* SQLTablesW */ #if (ODBCVER >= 0x0300) #define SQL_ALL_CATALOGSW L"%" #define SQL_ALL_SCHEMASW L"%" #define SQL_ALL_TABLE_TYPESW L"%" #endif /* ODBCVER >= 0x0300 */ /* * Size of SQLSTATE - Unicode */ #define SQL_SQLSTATE_SIZEW 10 /* * Function Prototypes - Unicode */ 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); /* * Function prototypes - ANSI */ SQLRETURN SQL_API SQLColAttributeA ( SQLHSTMT hstmt, SQLUSMALLINT iCol, SQLUSMALLINT 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 SQLSetDescFieldA ( SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER Value, SQLINTEGER BufferLength); 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); #endif 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 SQLGetTypeInfoA ( SQLHSTMT StatementHandle, SQLSMALLINT DataType); SQLRETURN SQL_API SQLSetConnectOptionA ( SQLHDBC hdbc, 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 SQLGetStmtAttrA ( SQLHSTMT hstmt, SQLINTEGER fAttribute, SQLPOINTER rgbValue, SQLINTEGER cbValueMax, SQLINTEGER * pcbValue); SQLRETURN SQL_API SQLSetStmtAttrA ( SQLHSTMT hstmt, SQLINTEGER fAttribute, SQLPOINTER rgbValue, SQLINTEGER cbValueMax); 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 #endif /* _SQLUCODE_H */ libiodbc-3.52.16/include/config.h.in0000664000175000017500000000776214424171040014041 00000000000000/* include/config.h.in. Generated from configure.ac by autoheader. */ /* Default location for FILEDSN data sources */ #undef DEFAULT_FILEDSNPATH /* Define if we detected a GUI library we can use */ #undef GUI /* Define to 1 if you have the `asprintf' function. */ #undef HAVE_ASPRINTF /* Define to 1 if you have the `dladdr' function. */ #undef HAVE_DLADDR /* Define if you have the -ldld library */ #undef HAVE_DLD /* Define to 1 if you have the header file. */ #undef HAVE_DLD_H /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the `dlopen' function. */ #undef HAVE_DLOPEN /* Define to 1 if you have the `dlsym' function. */ #undef HAVE_DLSYM /* Define to 1 if you have the header file. */ #undef HAVE_DL_H /* Define to 1 if you have the Dl_info structure */ #undef HAVE_DL_INFO /* Define if you have the DYLD library */ #undef HAVE_DYLD /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define if you have the -ldl library */ #undef HAVE_LIBDL /* Define to 1 if you have the `localtime_r' function. */ #undef HAVE_LOCALTIME_R /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `setenv' function. */ #undef HAVE_SETENV /* Define if you have the shl_load function */ #undef HAVE_SHL_LOAD /* Define to 1 if you have the `snprintf' function. */ #undef HAVE_SNPRINTF /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strerror' function. */ #undef HAVE_STRERROR /* 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 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 `towlower' function. */ #undef HAVE_TOWLOWER /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the header file. */ #undef HAVE_WCHAR_H /* Define to 1 if you have the `wcscat' function. */ #undef HAVE_WCSCAT /* Define to 1 if you have the `wcschr' function. */ #undef HAVE_WCSCHR /* Define to 1 if you have the `wcscmp' function. */ #undef HAVE_WCSCMP /* Define to 1 if you have the `wcscpy' function. */ #undef HAVE_WCSCPY /* Define to 1 if you have the `wcslen' function. */ #undef HAVE_WCSLEN /* Define to 1 if you have the `wcsncasecmp' function. */ #undef HAVE_WCSNCASECMP /* Define to 1 if you have the `wcsncpy' function. */ #undef HAVE_WCSNCPY /* Define to 1 if you have the `_dlopen' function. */ #undef HAVE__DLOPEN /* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Define if dlsym() requires a leading underscore in symbol names. */ #undef NEED_USCORE /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* 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 path to systemwide odbcinst.ini file */ #undef SYS_ODBCINST_INI /* Define path to systemwide odbc.ini file */ #undef SYS_ODBC_INI /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Version number of package */ #undef VERSION /* Define to empty if `const' does not conform to ANSI C. */ #undef const libiodbc-3.52.16/aclocal.m40000664000175000017500000012606414424171016012233 00000000000000# generated automatically by aclocal 1.15.1 -*- Autoconf -*- # Copyright (C) 1996-2017 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # Copyright (C) 2002-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.15' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.15.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.15.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2017 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], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2017 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_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2017 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. # 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", "OBJC", "OBJCXX", "UPC", or "GJC". # 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 m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2017 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_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # 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'`; 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-2017 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 macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # 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.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). 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])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2017 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. # 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])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996-2017 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_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. # Default is to disable them, unless 'enable' is passed literally. # For symmetry, 'disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], am_maintainer_other[ make rules and dependencies not useful (and sometimes confusing) to the casual installer])], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ] ) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2017 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_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2017 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_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 is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2017 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_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2017 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_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2017 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_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2017 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_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file 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 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 if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done 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]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2017 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_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2017 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_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2017 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_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. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} 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([admin/gtk-2.0.m4]) m4_include([admin/gtk.m4]) m4_include([admin/libtool.m4]) m4_include([admin/ltoptions.m4]) m4_include([admin/ltsugar.m4]) m4_include([admin/ltversion.m4]) m4_include([admin/lt~obsolete.m4]) m4_include([admin/openlink.m4]) m4_include([acinclude.m4]) libiodbc-3.52.16/iodbcadm/0000775000175000017500000000000014424171427012212 500000000000000libiodbc-3.52.16/iodbcadm/iodbcadm.exp0000664000175000017500000000040414013216212014372 00000000000000iodbcdm_drvconn_dialbox iodbcdm_drvconn_dialboxw _iodbcdm_drvchoose_dialbox _iodbcdm_trschoose_dialbox _iodbcdm_nativeerrorbox _iodbcdm_errorbox _iodbcdm_errorboxw _iodbcdm_messagebox _iodbcdm_messageboxw _iodbcdm_admin_dialbox iodbcadm_version create_confirm libiodbc-3.52.16/iodbcadm/gui.h0000664000175000017500000001221314424170750013064 00000000000000/* * gui.h * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include "iodbcadm.h" #if defined(__BEOS__) # include "be/gui.h" #elif defined(_MAC) # include "mac/gui.h" #elif defined(__GTK__) # include # include "gtk/gui.h" #elif defined(_MACX) # include "mac/gui.h" #else # error GUI for this platform not supported ... #endif #ifndef _GUI_H #define _GUI_H BOOL create_confirm (HWND hwnd, LPCSTR dsn, LPCSTR text); BOOL create_confirmw (HWND hwnd, LPCWSTR dsn, LPCWSTR text); #if 0 void create_login (HWND hwnd, LPCSTR username, LPCSTR password, LPCSTR dsn, TLOGIN * log_t); #endif void create_dsnchooser (HWND hwnd, TDSNCHOOSER * choose_t); void create_driverchooser (HWND hwnd, TDRIVERCHOOSER * choose_t); void create_fdriverchooser (HWND hwnd, TFDRIVERCHOOSER * choose_t); void create_translatorchooser (HWND hwnd, TTRANSLATORCHOOSER * choose_t); void create_administrator (HWND hwnd); void create_error (HWND hwnd, LPCSTR dsn, LPCSTR text, LPCSTR errmsg); void create_errorw (HWND hwnd, LPCWSTR dsn, LPCWSTR text, LPCWSTR errmsg); void create_message (HWND hwnd, LPCSTR dsn, LPCSTR text); void create_messagew (HWND hwnd, LPCWSTR dsn, LPCWSTR text); LPSTR create_driversetup (HWND hwnd, LPCSTR driver, LPCSTR attrs, BOOL add, BOOL user); LPSTR create_filedsn (HWND hwnd); BOOL create_connectionpool (HWND hwnd, TCONNECTIONPOOLING *choose_t); typedef SQLRETURN SQL_API (*pSQLGetInfoFunc) (SQLHDBC hdbc, SQLUSMALLINT fInfoType, SQLPOINTER rgbInfoValue, SQLSMALLINT cbInfoValueMax, SQLSMALLINT * pcbInfoValue); typedef SQLRETURN SQL_API (*pSQLAllocHandle) (SQLSMALLINT hdl_type, SQLHANDLE hdl_in, SQLHANDLE * hdl_out); typedef SQLRETURN SQL_API (*pSQLAllocEnv) (SQLHENV * henv); typedef SQLRETURN SQL_API (*pSQLAllocConnect) (SQLHENV henv, SQLHDBC * hdbc); typedef SQLRETURN SQL_API (*pSQLFreeHandle) (SQLSMALLINT hdl_type, SQLHANDLE hdl_in); typedef SQLRETURN SQL_API (*pSQLFreeEnv) (SQLHENV henv); typedef SQLRETURN SQL_API (*pSQLFreeConnect) (SQLHDBC hdbc); #endif libiodbc-3.52.16/iodbcadm/error.c0000664000175000017500000001221214424170750013423 00000000000000/* * error.c * * $Id$ * * The data_sources dialog for SQLDriverConnect and a login box procedures * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "gui.h" void SQL_API _iodbcdm_nativeerrorbox ( HWND hwnd, HENV henv, HDBC hdbc, HSTMT hstmt) { SQLCHAR buf[4096]; SQLCHAR sqlstate[15]; /* * Get statement errors */ if (SQLError (henv, hdbc, hstmt, sqlstate, NULL, buf, sizeof (buf), NULL) == SQL_SUCCESS) create_error (hwnd, "Native ODBC Error", (LPCSTR) sqlstate, (LPCSTR) buf); /* * Get connection errors */ if (SQLError (henv, hdbc, SQL_NULL_HSTMT, sqlstate, NULL, buf, sizeof (buf), NULL) == SQL_SUCCESS) create_error (hwnd, "Native ODBC Error", (LPCSTR) sqlstate, (LPCSTR) buf); /* * Get environmental errors */ if (SQLError (henv, SQL_NULL_HDBC, SQL_NULL_HSTMT, sqlstate, NULL, buf, sizeof (buf), NULL) == SQL_SUCCESS) create_error (hwnd, "Native ODBC Error", (LPCSTR) sqlstate, (LPCSTR) buf); } void SQL_API _iodbcdm_errorbox ( HWND hwnd, LPCSTR szDSN, LPCSTR szText) { char msg[4096]; if (SQLInstallerError (1, NULL, msg, sizeof (msg), NULL) == SQL_SUCCESS) create_error (hwnd, szDSN, szText, msg); } void SQL_API _iodbcdm_errorboxw ( HWND hwnd, LPCWSTR szDSN, LPCWSTR szText) { wchar_t msg[4096]; if (SQLInstallerErrorW (1, NULL, msg, sizeof (msg) / sizeof(wchar_t), NULL) == SQL_SUCCESS) create_errorw (hwnd, szDSN, szText, msg); } void SQL_API _iodbcdm_messagebox ( HWND hwnd, LPCSTR szDSN, LPCSTR szText) { create_message (hwnd, szDSN, szText); } void SQL_API _iodbcdm_messageboxw ( HWND hwnd, LPCWSTR szDSN, LPCWSTR szText) { create_messagew (hwnd, szDSN, szText); } BOOL SQL_API _iodbcdm_confirmbox ( HWND hwnd, LPCSTR szDSN, LPCSTR szText) { return create_confirm (hwnd, (SQLPOINTER) szDSN, (SQLPOINTER) szText); } BOOL SQL_API _iodbcdm_confirmboxw ( HWND hwnd, LPCWSTR szDSN, LPCWSTR szText) { return create_confirmw (hwnd, (SQLPOINTER)szDSN, (SQLPOINTER)szText); } libiodbc-3.52.16/iodbcadm/Makefile.am0000664000175000017500000001061514424170750014167 00000000000000# # Makefile.am # # The iODBC driver manager. # # Copyright (C) 1996-2023 OpenLink Software # All Rights Reserved. # # This software is released under the terms of either of the following # licenses: # # - GNU Library General Public License (see LICENSE.LGPL) # - The BSD License (see LICENSE.BSD). # # Note that the only valid version of the LGPL license as far as this # project is concerned is the original GNU Library General Public License # Version 2, dated June 1991. # # While not mandated by the BSD license, any patches you make to the # iODBC source code may be contributed back into the iODBC project # at your discretion. Contributions will benefit the Open Source and # Data Access community as a whole. Submissions may be made at: # # http://www.iodbc.org # # # GNU Library Generic Public License Version 2 # ============================================ # 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; only # Version 2 of the License dated June 1991. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # The BSD License # =============== # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. Neither the name of OpenLink Software Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # if GUI SUBDIRS = gtk bin_PROGRAMS = iodbcadm-gtk lib_LTLIBRARIES = libiodbcadm.la endif if GTK AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/iodbc \ -I$(top_srcdir)/iodbcinst \ @GTK_CFLAGS@ -D__GTK__ else AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/iodbc \ -I$(top_srcdir)/iodbcinst endif libiodbcadm_la_LDFLAGS = \ -version-info @lib_version@ \ -export-symbols $(srcdir)/iodbcadm.exp if GTK libiodbcadm_la_LIBADD = \ gtk/libiodbcadm-gtk.la \ $(LIBADD_DL) \ @GTK_LIBS@ \ ../iodbcinst/libiodbc_common.la \ ../iodbcinst/libiodbcinst.la \ ../iodbc/libiodbc.la else libiodbcadm_la_LIBADD = \ $(LIBADD_DL) \ ../iodbcinst/libiodbc_common.la \ ../iodbcinst/libiodbcinst.la \ ../iodbc/libiodbc.la endif libiodbcadm_la_SOURCES = \ Info.c \ drvconn.c \ error.c iodbcadm_gtk_SOURCES = iodbcadm_gtk_LDADD = \ gtk/main.lo \ libiodbcadm.la \ ../iodbcinst/libiodbcinst.la \ ../iodbc/libiodbc.la \ @GTK_LIBS@ iodbcadm_gtk_LDFLAGS = # -static noinst_HEADERS = \ gui.h \ iodbcadm.h EXTRA_DIST = \ $(srcdir)/*.c \ $(srcdir)/*.h \ $(srcdir)/iodbcadm.exp \ $(srcdir)/Makefile.am \ $(srcdir)/gtk/*.c \ $(srcdir)/gtk/*.h \ $(srcdir)/gtk/*.xpm \ $(srcdir)/mac/*.c \ $(srcdir)/mac/*.h \ $(srcdir)/mac/*.m \ $(srcdir)/mac/*.png \ $(srcdir)/mac/Base.lproj/*.xib libiodbc-3.52.16/iodbcadm/gtk/0000775000175000017500000000000014424171430012771 500000000000000libiodbc-3.52.16/iodbcadm/gtk/confirm.c0000664000175000017500000002232514424170750014522 00000000000000/* * confirm.c * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include "gui.h" #include "question.xpm" static void confirm_yes_clicked (GtkWidget *widget, TCONFIRM *confirm_t) { if (confirm_t) { confirm_t->yes_no = TRUE; gtk_signal_disconnect_by_func (GTK_OBJECT (confirm_t->mainwnd), GTK_SIGNAL_FUNC (gtk_main_quit), NULL); gtk_main_quit (); gtk_widget_destroy (confirm_t->mainwnd); } } static void confirm_no_clicked (GtkWidget *widget, TCONFIRM *confirm_t) { if (confirm_t) { confirm_t->yes_no = FALSE; gtk_signal_disconnect_by_func (GTK_OBJECT (confirm_t->mainwnd), GTK_SIGNAL_FUNC (gtk_main_quit), NULL); gtk_main_quit (); gtk_widget_destroy (confirm_t->mainwnd); } } static gint delete_event (GtkWidget *widget, GdkEvent *event, TCONFIRM *confirm_t) { confirm_no_clicked (widget, confirm_t); return FALSE; } BOOL create_confirm (HWND hwnd, LPCSTR dsn, LPCSTR text) { GtkWidget *confirm, *dialog_vbox1, *hbox1, *pixmap1, *l_text; GtkWidget *dialog_action_area1, *hbuttonbox1, *b_yes, *b_no; guint b_yes_key, b_no_key; GdkPixmap *pixmap; GdkBitmap *mask; GtkStyle *style; GtkAccelGroup *accel_group; char msg[1024]; TCONFIRM confirm_t; if (hwnd == NULL || !GTK_IS_WIDGET (hwnd)) return FALSE; accel_group = gtk_accel_group_new (); confirm = gtk_dialog_new (); if (dsn) sprintf (msg, "Confirm action/operation on %s", dsn); else sprintf (msg, "Confirm action/operation ..."); gtk_object_set_data (GTK_OBJECT (confirm), "confirm", confirm); gtk_widget_set_size_request (confirm, 400, 150); gtk_window_set_title (GTK_WINDOW (confirm), msg); gtk_window_set_position (GTK_WINDOW (confirm), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (confirm), TRUE); gtk_window_set_default_size (GTK_WINDOW (confirm), 400, 150); gtk_window_set_type_hint (GTK_WINDOW (confirm), GDK_WINDOW_TYPE_HINT_DIALOG); #if GTK_CHECK_VERSION(2,0,0) gtk_widget_show (confirm); #endif dialog_vbox1 = GTK_DIALOG (confirm)->vbox; gtk_object_set_data (GTK_OBJECT (confirm), "dialog_vbox1", dialog_vbox1); gtk_widget_show (dialog_vbox1); hbox1 = gtk_hbox_new (FALSE, 6); gtk_widget_ref (hbox1); gtk_object_set_data_full (GTK_OBJECT (confirm), "hbox1", hbox1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hbox1); gtk_box_pack_start (GTK_BOX (dialog_vbox1), hbox1, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (hbox1), 6); #if GTK_CHECK_VERSION(2,0,0) style = gtk_widget_get_style (confirm); pixmap = gdk_pixmap_create_from_xpm_d (confirm->window, &mask, &style->bg[GTK_STATE_NORMAL], (gchar **) question_xpm); #else style = gtk_widget_get_style (GTK_WIDGET (hwnd)); pixmap = gdk_pixmap_create_from_xpm_d (GTK_WIDGET (hwnd)->window, &mask, &style->bg[GTK_STATE_NORMAL], (gchar **) question_xpm); #endif pixmap1 = gtk_pixmap_new (pixmap, mask); gtk_widget_ref (pixmap1); gtk_object_set_data_full (GTK_OBJECT (confirm), "pixmap1", pixmap1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (pixmap1); gtk_box_pack_start (GTK_BOX (hbox1), pixmap1, FALSE, FALSE, 0); l_text = gtk_label_new (""); gtk_label_parse_uline (GTK_LABEL (l_text), text); gtk_widget_ref (l_text); gtk_object_set_data_full (GTK_OBJECT (confirm), "l_text", l_text, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (l_text); gtk_box_pack_start (GTK_BOX (hbox1), l_text, TRUE, TRUE, 0); gtk_label_set_justify (GTK_LABEL (l_text), GTK_JUSTIFY_LEFT); gtk_label_set_line_wrap (GTK_LABEL (l_text), TRUE); dialog_action_area1 = GTK_DIALOG (confirm)->action_area; gtk_object_set_data (GTK_OBJECT (confirm), "dialog_action_area1", dialog_action_area1); gtk_widget_show (dialog_action_area1); gtk_container_set_border_width (GTK_CONTAINER (dialog_action_area1), 5); hbuttonbox1 = gtk_hbutton_box_new (); gtk_widget_ref (hbuttonbox1); gtk_object_set_data_full (GTK_OBJECT (confirm), "hbuttonbox1", hbuttonbox1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hbuttonbox1); gtk_box_pack_start (GTK_BOX (dialog_action_area1), hbuttonbox1, TRUE, TRUE, 0); gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox1), GTK_BUTTONBOX_END); gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbuttonbox1), 10); b_yes = gtk_button_new_from_stock ("gtk-yes"); gtk_widget_ref (b_yes); gtk_object_set_data_full (GTK_OBJECT (confirm), "b_yes", b_yes, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (b_yes); gtk_container_add (GTK_CONTAINER (hbuttonbox1), b_yes); gtk_dialog_add_action_widget (GTK_DIALOG (confirm), b_yes, GTK_RESPONSE_YES); GTK_WIDGET_SET_FLAGS (b_yes, GTK_CAN_DEFAULT); b_no = gtk_button_new_from_stock ("gtk-no"); gtk_widget_ref (b_no); gtk_object_set_data_full (GTK_OBJECT (confirm), "b_no", b_no, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (b_no); gtk_container_add (GTK_CONTAINER (hbuttonbox1), b_no); gtk_dialog_add_action_widget (GTK_DIALOG (confirm), b_no, GTK_RESPONSE_NO); GTK_WIDGET_SET_FLAGS (b_no, GTK_CAN_DEFAULT); /* Yes button events */ gtk_signal_connect (GTK_OBJECT (b_yes), "clicked", GTK_SIGNAL_FUNC (confirm_yes_clicked), &confirm_t); /* No button events */ gtk_signal_connect (GTK_OBJECT (b_no), "clicked", GTK_SIGNAL_FUNC (confirm_no_clicked), &confirm_t); /* Close window button events */ gtk_signal_connect (GTK_OBJECT (confirm), "delete_event", GTK_SIGNAL_FUNC (delete_event), &confirm_t); gtk_signal_connect (GTK_OBJECT (confirm), "destroy", GTK_SIGNAL_FUNC (gtk_main_quit), NULL); gtk_window_add_accel_group (GTK_WINDOW (confirm), accel_group); confirm_t.yes_no = FALSE; confirm_t.mainwnd = confirm; gtk_widget_show_all (confirm); gtk_main (); return confirm_t.yes_no; } BOOL create_confirmw (HWND hwnd, LPCWSTR dsn, LPCWSTR text) { LPSTR _dsn = NULL; LPSTR _text = NULL; _dsn = dm_SQL_WtoU8((SQLWCHAR*)dsn, SQL_NTS); _text = dm_SQL_WtoU8((SQLWCHAR*)text, SQL_NTS); create_message(hwnd, _dsn, _text); if (_dsn) free(_dsn); if (_text) free(_text); return TRUE; } libiodbc-3.52.16/iodbcadm/gtk/translatorchooser.c0000664000175000017500000003707214424170750016646 00000000000000/* * translator.c * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include "gui.h" #include "img.xpm" static void translator_list_select (GtkWidget *widget, gint row, gint column, GdkEvent *event, TTRANSLATORCHOOSER *choose_t) { LPSTR translator = NULL; if (choose_t) { /* Get the directory name */ gtk_clist_get_text (GTK_CLIST (choose_t->translatorlist), row, 0, &translator); if (translator && event && event->type == GDK_2BUTTON_PRESS) gtk_signal_emit_by_name (GTK_OBJECT (choose_t->b_finish), "clicked", choose_t); } } static void translatorchooser_ok_clicked (GtkWidget *widget, TTRANSLATORCHOOSER *choose_t) { char *szTranslator; if (choose_t) { if (GTK_CLIST (choose_t->translatorlist)->selection != NULL) { gtk_clist_get_text (GTK_CLIST (choose_t->translatorlist), GPOINTER_TO_INT (GTK_CLIST (choose_t->translatorlist)-> selection->data), 0, &szTranslator); choose_t->translator = dm_SQL_A2W (szTranslator, SQL_NTS); } else choose_t->translator = NULL; choose_t->translatorlist = NULL; gtk_signal_disconnect_by_func (GTK_OBJECT (choose_t->mainwnd), GTK_SIGNAL_FUNC (gtk_main_quit), NULL); gtk_main_quit (); gtk_widget_destroy (choose_t->mainwnd); } } static void translatorchooser_cancel_clicked (GtkWidget *widget, TTRANSLATORCHOOSER *choose_t) { if (choose_t) { choose_t->translatorlist = NULL; gtk_signal_disconnect_by_func (GTK_OBJECT (choose_t->mainwnd), GTK_SIGNAL_FUNC (gtk_main_quit), NULL); gtk_main_quit (); gtk_widget_destroy (choose_t->mainwnd); } } static gint delete_event (GtkWidget *widget, GdkEvent *event, TTRANSLATORCHOOSER *choose_t) { translatorchooser_cancel_clicked (widget, choose_t); return FALSE; } void addtranslators_to_list (GtkWidget *widget, GtkWidget *dlg) { char *curr, *buffer = (char *) malloc (sizeof (char) * 65536), *szDriver; char driver[1024], _date[1024], _size[1024]; char *data[4]; int len, i; BOOL careabout; UWORD confMode = ODBC_USER_DSN; struct stat _stat; if (!buffer || !GTK_IS_CLIST (widget)) return; gtk_clist_clear (GTK_CLIST (widget)); /* Get the current config mode */ while (confMode != ODBC_SYSTEM_DSN + 1) { /* Get the list of drivers in the user context */ SQLSetConfigMode (confMode); #ifdef WIN32 len = SQLGetPrivateProfileString ("ODBC 32 bit Translators", NULL, "", buffer, 65535, "odbcinst.ini"); #else len = SQLGetPrivateProfileString ("ODBC Translators", NULL, "", buffer, 65535, "odbcinst.ini"); #endif if (len) goto process; goto end; process: for (curr = buffer; *curr; curr += (STRLEN (curr) + 1)) { /* Shadowing system odbcinst.ini */ for (i = 0, careabout = TRUE; i < GTK_CLIST (widget)->rows; i++) { gtk_clist_get_text (GTK_CLIST (widget), i, 0, &szDriver); if (!strcmp (szDriver, curr)) { careabout = FALSE; break; } } if (!careabout) continue; SQLSetConfigMode (confMode); #ifdef WIN32 SQLGetPrivateProfileString ("ODBC 32 bit Translators", curr, "", driver, sizeof (driver), "odbcinst.ini"); #else SQLGetPrivateProfileString ("ODBC Translators", curr, "", driver, sizeof (driver), "odbcinst.ini"); #endif /* Check if the driver is installed */ if (strcasecmp (driver, "Installed")) goto end; /* Get the driver library name */ SQLSetConfigMode (confMode); if (!SQLGetPrivateProfileString (curr, "Translator", "", driver, sizeof (driver), "odbcinst.ini")) { SQLSetConfigMode (confMode); SQLGetPrivateProfileString ("Default", "Translator", "", driver, sizeof (driver), "odbcinst.ini"); } if (STRLEN (curr) && STRLEN (driver)) { data[0] = curr; data[1] = driver; /* Get some information about the driver */ if (!stat (driver, &_stat)) { sprintf (_size, "%lu Kb", (unsigned long) _stat.st_size / 1024L); sprintf (_date, "%s", ctime (&_stat.st_mtime)); data[2] = _date; data[3] = _size; gtk_clist_append (GTK_CLIST (widget), data); } } } end: if (confMode == ODBC_USER_DSN) confMode = ODBC_SYSTEM_DSN; else confMode = ODBC_SYSTEM_DSN + 1; } if (GTK_CLIST (widget)->rows > 0) { gtk_clist_columns_autosize (GTK_CLIST (widget)); gtk_clist_sort (GTK_CLIST (widget)); } /* Make the clean up */ free (buffer); } void create_translatorchooser (HWND hwnd, TTRANSLATORCHOOSER *choose_t) { GdkPixmap *pixmap; GdkBitmap *mask; GtkStyle *style; GtkWidget *translatorchooser; GtkWidget *vbox41; GtkWidget *hbox57; GtkWidget *frame97; GtkWidget *alignment81; GtkWidget *pixmap1; GtkWidget *frame98; GtkWidget *alignment82; GtkWidget *scrolledwindow21; GtkWidget *clist1; GtkWidget *label158; GtkWidget *label159; GtkWidget *label160; GtkWidget *label161; GtkWidget *label162; GtkWidget *hbuttonbox3; GtkWidget *b_finish; GtkWidget *b_cancel; if (hwnd == NULL || !GTK_IS_WIDGET (hwnd)) return; translatorchooser = gtk_dialog_new (); gtk_widget_set_name (translatorchooser, "translatorchooser"); gtk_widget_set_size_request (translatorchooser, 515, 335); gtk_window_set_title (GTK_WINDOW (translatorchooser), _("Choose a Translator")); gtk_window_set_position (GTK_WINDOW (translatorchooser), GTK_WIN_POS_CENTER_ON_PARENT); gtk_window_set_modal (GTK_WINDOW (translatorchooser), TRUE); gtk_window_set_default_size (GTK_WINDOW (translatorchooser), 600, 450); gtk_window_set_type_hint (GTK_WINDOW (translatorchooser), GDK_WINDOW_TYPE_HINT_DIALOG); #if GTK_CHECK_VERSION(2,0,0) gtk_widget_show (translatorchooser); #endif vbox41 = GTK_DIALOG (translatorchooser)->vbox; gtk_widget_set_name (vbox41, "vbox41"); gtk_widget_show (vbox41); hbox57 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox57, "hbox57"); gtk_widget_show (hbox57); gtk_box_pack_start (GTK_BOX (vbox41), hbox57, TRUE, TRUE, 0); frame97 = gtk_frame_new (NULL); gtk_widget_set_name (frame97, "frame97"); gtk_widget_show (frame97); gtk_box_pack_start (GTK_BOX (hbox57), frame97, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (frame97), 10); gtk_frame_set_shadow_type (GTK_FRAME (frame97), GTK_SHADOW_NONE); alignment81 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment81, "alignment81"); gtk_widget_show (alignment81); gtk_container_add (GTK_CONTAINER (frame97), alignment81); gtk_widget_set_size_request (alignment81, 140, -1); #if GTK_CHECK_VERSION(2,0,0) style = gtk_widget_get_style (translatorchooser); pixmap = gdk_pixmap_create_from_xpm_d (translatorchooser->window, &mask, &style->bg[GTK_STATE_NORMAL], (gchar **) img_xpm); #else style = gtk_widget_get_style (GTK_WIDGET (hwnd)); pixmap = gdk_pixmap_create_from_xpm_d (GTK_WIDGET (hwnd)->window, &mask, &style->bg[GTK_STATE_NORMAL], (gchar **) img_xpm); #endif pixmap1 = gtk_pixmap_new (pixmap, mask); gtk_widget_set_name (pixmap1, "pixmap1"); gtk_widget_show (pixmap1); gtk_container_add (GTK_CONTAINER (alignment81), pixmap1); frame98 = gtk_frame_new (NULL); gtk_widget_set_name (frame98, "frame98"); gtk_widget_show (frame98); gtk_box_pack_start (GTK_BOX (hbox57), frame98, TRUE, TRUE, 0); gtk_frame_set_shadow_type (GTK_FRAME (frame98), GTK_SHADOW_NONE); alignment82 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment82, "alignment82"); gtk_widget_show (alignment82); gtk_container_add (GTK_CONTAINER (frame98), alignment82); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment82), 0, 10, 0, 0); scrolledwindow21 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_set_name (scrolledwindow21, "scrolledwindow21"); gtk_widget_show (scrolledwindow21); gtk_container_add (GTK_CONTAINER (alignment82), scrolledwindow21); clist1 = gtk_clist_new (4); gtk_widget_set_name (clist1, "clist1"); gtk_widget_show (clist1); gtk_container_add (GTK_CONTAINER (scrolledwindow21), clist1); gtk_clist_set_column_width (GTK_CLIST (clist1), 0, 165); gtk_clist_set_column_width (GTK_CLIST (clist1), 1, 118); gtk_clist_set_column_width (GTK_CLIST (clist1), 2, 80); gtk_clist_set_column_width (GTK_CLIST (clist1), 3, 80); gtk_clist_column_titles_show (GTK_CLIST (clist1)); label158 = gtk_label_new (_("Name")); gtk_widget_set_name (label158, "label158"); gtk_widget_show (label158); gtk_clist_set_column_widget (GTK_CLIST (clist1), 0, label158); gtk_widget_set_size_request (label158, 165, -1); label159 = gtk_label_new (_("File")); gtk_widget_set_name (label159, "label159"); gtk_widget_show (label159); gtk_clist_set_column_widget (GTK_CLIST (clist1), 1, label159); gtk_widget_set_size_request (label159, 118, -1); label160 = gtk_label_new (_("Date")); gtk_widget_set_name (label160, "label160"); gtk_widget_show (label160); gtk_clist_set_column_widget (GTK_CLIST (clist1), 2, label160); gtk_widget_set_size_request (label160, 80, -1); label161 = gtk_label_new (_("Size")); gtk_widget_set_name (label161, "label161"); gtk_widget_show (label161); gtk_clist_set_column_widget (GTK_CLIST (clist1), 3, label161); gtk_widget_set_size_request (label161, 80, -1); label162 = gtk_label_new (_("Select which ODBC Translator you want to use")); gtk_widget_set_name (label162, "label162"); gtk_widget_show (label162); gtk_frame_set_label_widget (GTK_FRAME (frame98), label162); gtk_label_set_use_markup (GTK_LABEL (label162), TRUE); hbuttonbox3 = GTK_DIALOG (translatorchooser)->action_area; gtk_widget_set_name (hbuttonbox3, "hbuttonbox3"); gtk_widget_show (hbuttonbox3); gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox3), GTK_BUTTONBOX_END); b_finish = gtk_button_new_from_stock ("gtk-ok"); gtk_widget_set_name (b_finish, "b_finish"); gtk_widget_show (b_finish); gtk_dialog_add_action_widget (GTK_DIALOG (translatorchooser), b_finish, GTK_RESPONSE_OK); GTK_WIDGET_SET_FLAGS (b_finish, GTK_CAN_DEFAULT); b_cancel = gtk_button_new_from_stock ("gtk-cancel"); gtk_widget_set_name (b_cancel, "b_cancel"); gtk_widget_show (b_cancel); gtk_dialog_add_action_widget (GTK_DIALOG (translatorchooser), b_cancel, GTK_RESPONSE_CANCEL); GTK_WIDGET_SET_FLAGS (b_cancel, GTK_CAN_DEFAULT); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (translatorchooser, translatorchooser, "translatorchooser"); GLADE_HOOKUP_OBJECT_NO_REF (translatorchooser, vbox41, "vbox41"); GLADE_HOOKUP_OBJECT (translatorchooser, hbox57, "hbox57"); GLADE_HOOKUP_OBJECT (translatorchooser, frame97, "frame97"); GLADE_HOOKUP_OBJECT (translatorchooser, alignment81, "alignment81"); GLADE_HOOKUP_OBJECT (translatorchooser, pixmap1, "pixmap1"); GLADE_HOOKUP_OBJECT (translatorchooser, frame98, "frame98"); GLADE_HOOKUP_OBJECT (translatorchooser, alignment82, "alignment82"); GLADE_HOOKUP_OBJECT (translatorchooser, scrolledwindow21, "scrolledwindow21"); GLADE_HOOKUP_OBJECT (translatorchooser, clist1, "clist1"); GLADE_HOOKUP_OBJECT (translatorchooser, label158, "label158"); GLADE_HOOKUP_OBJECT (translatorchooser, label159, "label159"); GLADE_HOOKUP_OBJECT (translatorchooser, label160, "label160"); GLADE_HOOKUP_OBJECT (translatorchooser, label161, "label161"); GLADE_HOOKUP_OBJECT (translatorchooser, label162, "label162"); GLADE_HOOKUP_OBJECT_NO_REF (translatorchooser, hbuttonbox3, "hbuttonbox3"); GLADE_HOOKUP_OBJECT (translatorchooser, b_finish, "b_finish"); GLADE_HOOKUP_OBJECT (translatorchooser, b_cancel, "b_cancel"); /* Ok button events */ gtk_signal_connect (GTK_OBJECT (b_finish), "clicked", GTK_SIGNAL_FUNC (translatorchooser_ok_clicked), choose_t); /* Cancel button events */ gtk_signal_connect (GTK_OBJECT (b_cancel), "clicked", GTK_SIGNAL_FUNC (translatorchooser_cancel_clicked), choose_t); /* Close window button events */ gtk_signal_connect (GTK_OBJECT (translatorchooser), "delete_event", GTK_SIGNAL_FUNC (delete_event), choose_t); gtk_signal_connect (GTK_OBJECT (translatorchooser), "destroy", GTK_SIGNAL_FUNC (gtk_main_quit), NULL); /* Translator list events */ gtk_signal_connect (GTK_OBJECT (clist1), "select_row", GTK_SIGNAL_FUNC (translator_list_select), choose_t); addtranslators_to_list (clist1, translatorchooser); choose_t->translatorlist = clist1; choose_t->translator = NULL; choose_t->mainwnd = translatorchooser; choose_t->b_finish = b_finish; gtk_widget_show_all (translatorchooser); gtk_main (); } libiodbc-3.52.16/iodbcadm/gtk/gui.h0000664000175000017500000002012214424170750013647 00000000000000/* * gui.h * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #ifndef _GTKGUI_H #define _GTKGUI_H #define GLADE_HOOKUP_OBJECT(component,widget,name) \ gtk_widget_ref(widget); \ gtk_object_set_data_full (GTK_OBJECT (component), name, \ widget, (GtkDestroyNotify) gtk_widget_unref) #define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \ gtk_object_set_data (GTK_OBJECT (component), name, widget) #define _(X) X extern char* szDSNColumnNames[]; extern char* szTabNames[]; extern char* szDSNButtons[]; extern char* szDriverColumnNames[]; typedef struct TFILEDSN { GtkWidget *name_entry, *mainwnd; char *name; } TFILEDSN; typedef struct TDSNCHOOSER { GtkWidget *mainwnd, *udsnlist, *sdsnlist; GtkWidget *uadd, *uremove, *utest, *uconfigure; GtkWidget *sadd, *sremove, *stest, *sconfigure; GtkWidget *fadd, *fremove, *ftest, *fconfigure, *fsetdir; GtkWidget *dir_list, *file_list, *file_entry, *dir_combo; wchar_t *dsn; wchar_t *fdsn; char curr_dir[1024]; int type_dsn; } TDSNCHOOSER; typedef struct TDRIVERCHOOSER { GtkWidget *driverlist, *mainwnd, *b_add, *b_remove, *b_configure, *b_finish; wchar_t *driver; } TDRIVERCHOOSER; typedef struct TFDRIVERCHOOSER { GtkWidget *driverlist, *mainwnd; GtkWidget *dsn_entry, *b_back, *b_continue; GtkWidget *mess_entry, *tab_panel, *browse_sel; char *curr_dir; char *attrs; char *dsn; BOOL verify_conn; wchar_t *driver; BOOL ok; } TFDRIVERCHOOSER; typedef struct TCONNECTIONPOOLING { GtkWidget *driverlist, *mainwnd, *enperfmon_rb, *disperfmon_rb, *retwait_entry, *timeout_entry, *probe_entry; BOOL changed; char timeout[64]; char probe[512]; char driver[1024]; } TCONNECTIONPOOLING; typedef struct TTRANSLATORCHOOSER { GtkWidget *translatorlist, *mainwnd, *b_finish; wchar_t *translator; } TTRANSLATORCHOOSER; typedef struct TCOMPONENT { GtkWidget *componentlist; } TCOMPONENT; typedef struct TTRACING { GtkWidget *logfile_entry, *tracelib_entry, *b_start_stop; GtkWidget *donttrace_rb, *allthetime_rb, *onetime_rb; GtkWidget *filesel; BOOL changed; } TTRACING; typedef struct TCONFIRM { GtkWidget *mainwnd; BOOL yes_no; } TCONFIRM; typedef struct TDRIVERSETUP { GtkWidget *name_entry, *driver_entry, *setup_entry, *key_list, *bupdate; GtkWidget *key_entry, *value_entry; GtkWidget *mainwnd, *filesel; LPSTR connstr; } TDRIVERSETUP; typedef struct TGENSETUP { GtkWidget *dsn_entry, *key_list, *bupdate; GtkWidget *key_entry, *value_entry; GtkWidget *mainwnd; GtkWidget *verify_conn_cb; LPSTR connstr; BOOL verify_conn; } TGENSETUP; void adddsns_to_list(GtkWidget* widget, BOOL systemDSN); void userdsn_add_clicked(GtkWidget* widget, TDSNCHOOSER *choose_t); void userdsn_remove_clicked(GtkWidget* widget, TDSNCHOOSER *choose_t); void userdsn_configure_clicked(GtkWidget* widget, TDSNCHOOSER *choose_t); void userdsn_test_clicked(GtkWidget* widget, TDSNCHOOSER *choose_t); void systemdsn_add_clicked(GtkWidget* widget, TDSNCHOOSER *choose_t); void systemdsn_remove_clicked(GtkWidget* widget, TDSNCHOOSER *choose_t); void systemdsn_configure_clicked(GtkWidget* widget, TDSNCHOOSER *choose_t); void systemdsn_test_clicked(GtkWidget* widget, TDSNCHOOSER *choose_t); void filedsn_add_clicked(GtkWidget* widget, TDSNCHOOSER *choose_t); void filedsn_remove_clicked(GtkWidget* widget, TDSNCHOOSER *choose_t); void filedsn_configure_clicked(GtkWidget* widget, TDSNCHOOSER *choose_t); void filedsn_test_clicked(GtkWidget* widget, TDSNCHOOSER *choose_t); void filedsn_setdir_clicked(GtkWidget* widget, TDSNCHOOSER *choose_t); void userdsn_list_select(GtkWidget* widget, gint row, gint column, GdkEvent *event, TDSNCHOOSER *choose_t); void userdsn_list_unselect(GtkWidget* widget, gint row, gint column, GdkEvent *event, TDSNCHOOSER *choose_t); void systemdsn_list_select(GtkWidget* widget, gint row, gint column, GdkEvent *event, TDSNCHOOSER *choose_t); void systemdsn_list_unselect(GtkWidget* widget, gint row, gint column, GdkEvent *event, TDSNCHOOSER *choose_t); void filedsn_filelist_select(GtkWidget* widget, gint row, gint column, GdkEvent *event, TDSNCHOOSER *choose_t); void filedsn_filelist_unselect(GtkWidget* widget, gint row, gint column, GdkEvent *event, TDSNCHOOSER *choose_t); void filedsn_dirlist_select(GtkWidget* widget, gint row, gint column, GdkEvent *event, TDSNCHOOSER *choose_t); void filedsn_lookin_clicked(GtkWidget* widget, void **array); void adddrivers_to_list(GtkWidget* widget, GtkWidget* dlg); void addtranslators_to_list(GtkWidget* widget, GtkWidget* dlg); void adddirectories_to_list(HWND hwnd, GtkWidget* widget, LPCSTR path); void addfiles_to_list(HWND hwnd, GtkWidget* widget, LPCSTR path); void addlistofdir_to_optionmenu(GtkWidget* widget, LPCSTR path, TDSNCHOOSER *choose_t); LPSTR create_keyval (HWND wnd, LPCSTR attrs, BOOL *verify_conn); LPSTR create_fgensetup (HWND hwnd, LPCSTR dsn, LPCSTR attrs, BOOL add, BOOL *verify_conn); void create_message (HWND hwnd, LPCSTR dsn, LPCSTR text); #endif libiodbc-3.52.16/iodbcadm/gtk/driverchooser.c0000664000175000017500000014117114424170750015744 00000000000000/* * driverchooser.c * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include "../gui.h" #include "img.xpm" #include "dlf.h" #include "dlproc.h" char *szDriverColumnNames[] = { "Name", "File", "Date", "Size", "Version" }; void adddrivers_to_list (GtkWidget *widget, GtkWidget *dlg) { SQLCHAR drvdesc[1024], drvattrs[1024], driver[1024], size[64]; SQLCHAR *data[4]; void *handle; struct stat _stat; SQLSMALLINT len, len1; SQLRETURN ret; HENV henv, drv_henv; HDBC drv_hdbc; pSQLGetInfoFunc funcHdl; pSQLAllocHandle allocHdl; pSQLAllocEnv allocEnvHdl = NULL; pSQLAllocConnect allocConnectHdl = NULL; pSQLFreeHandle freeHdl; pSQLFreeEnv freeEnvHdl; pSQLFreeConnect freeConnectHdl; if (!GTK_IS_CLIST (widget)) return; gtk_clist_clear (GTK_CLIST (widget)); /* Create a HENV to get the list of drivers then */ ret = SQLAllocHandle (SQL_HANDLE_ENV, SQL_NULL_HANDLE, &henv); if (ret != SQL_SUCCESS && ret != SQL_SUCCESS_WITH_INFO) { _iodbcdm_nativeerrorbox (dlg, henv, SQL_NULL_HANDLE, SQL_NULL_HANDLE); goto end; } SQLSetEnvAttr (henv, SQL_ATTR_APP_UNICODE_TYPE, (SQLPOINTER) SQL_DM_CP_DEF, SQL_IS_UINTEGER); /* Set the version ODBC API to use */ SQLSetEnvAttr (henv, SQL_ATTR_ODBC_VERSION, (SQLPOINTER) SQL_OV_ODBC3, SQL_IS_INTEGER); /* Get the list of drivers */ ret = SQLDrivers (henv, SQL_FETCH_FIRST, drvdesc, sizeof (drvdesc) / sizeof (SQLTCHAR), &len, drvattrs, sizeof (drvattrs) / sizeof (SQLTCHAR), &len1); if (ret != SQL_SUCCESS && ret != SQL_SUCCESS_WITH_INFO && ret != SQL_NO_DATA) { _iodbcdm_nativeerrorbox (dlg, henv, SQL_NULL_HANDLE, SQL_NULL_HANDLE); goto error; } while (ret != SQL_NO_DATA) { data[0] = drvdesc; /* Get the driver library name */ SQLSetConfigMode (ODBC_BOTH_DSN); SQLGetPrivateProfileString (drvdesc, "Driver", "", driver, sizeof (driver) / sizeof (SQLTCHAR), "odbcinst.ini"); if (driver[0] == '\0') SQLGetPrivateProfileString ("Default", "Driver", "", driver, sizeof (driver) / sizeof (SQLTCHAR), "odbcinst.ini"); if (driver[0] == '\0') { data[0] = NULL; goto skip; } data[1] = driver; drv_hdbc = NULL; drv_henv = NULL; if ((handle = (void *) DLL_OPEN (driver)) != NULL) { if ((allocHdl = (pSQLAllocHandle) DLL_PROC (handle, "SQLAllocHandle")) != NULL) { ret = allocHdl (SQL_HANDLE_ENV, SQL_NULL_HANDLE, &drv_henv); if (ret == SQL_ERROR) goto nodriverver; ret = allocHdl (SQL_HANDLE_DBC, drv_henv, &drv_hdbc); if (ret == SQL_ERROR) goto nodriverver; } else { if ((allocEnvHdl = (pSQLAllocEnv) DLL_PROC (handle, "SQLAllocEnv")) != NULL) { ret = allocEnvHdl (&drv_henv); if (ret == SQL_ERROR) goto nodriverver; } else goto nodriverver; if ((allocConnectHdl = (pSQLAllocConnect) DLL_PROC (handle, "SQLAllocConnect")) != NULL) { ret = allocConnectHdl (drv_henv, &drv_hdbc); if (ret == SQL_ERROR) goto nodriverver; } else goto nodriverver; } if ((funcHdl = (pSQLGetInfoFunc) DLL_PROC (handle, "SQLGetInfo")) != NULL) { /* Retrieve some information */ ret = funcHdl (drv_hdbc, SQL_DRIVER_VER, drvattrs, sizeof (drvattrs), &len); if (ret == SQL_SUCCESS || ret == SQL_SUCCESS_WITH_INFO) { unsigned int z; /* Drop the description if one provided */ for (z = 0; ((char *) drvattrs)[z]; z++) if (((char *) drvattrs)[z] == ' ') ((char *) drvattrs)[z] = '\0'; data[2] = drvattrs; } else goto nodriverver; } else goto nodriverver; } else { nodriverver: data[2] = "##.##"; } if (drv_hdbc || drv_henv) { if (allocConnectHdl && (freeConnectHdl = (pSQLFreeConnect) DLL_PROC (handle, "SQLFreeConnect")) != NULL) { freeConnectHdl (drv_hdbc); drv_hdbc = NULL; } if (allocEnvHdl && (freeEnvHdl = (pSQLFreeEnv) DLL_PROC (handle, "SQLFreeEnv")) != NULL) { freeEnvHdl (drv_henv); drv_henv = NULL; } } if ((drv_hdbc || drv_henv) && (freeHdl = (pSQLFreeHandle) DLL_PROC (handle, "SQLFreeHandle")) != NULL) { if (drv_hdbc) freeHdl (SQL_HANDLE_DBC, drv_hdbc); if (drv_henv) freeHdl (SQL_HANDLE_ENV, drv_henv); } if (handle) DLL_CLOSE (handle); /* Get the size of the driver */ if (!stat (driver, &_stat)) { sprintf (size, "%d Kb", (int) (_stat.st_size / 1024)); data[3] = size; } else data[3] = "-"; gtk_clist_append (GTK_CLIST (widget), (gchar**)data); skip: ret = SQLDrivers (henv, SQL_FETCH_NEXT, drvdesc, sizeof (drvdesc) / sizeof (SQLTCHAR), &len, drvattrs, sizeof (drvattrs) / sizeof (SQLTCHAR), &len1); if (ret != SQL_SUCCESS && ret != SQL_SUCCESS_WITH_INFO && ret != SQL_NO_DATA) { _iodbcdm_nativeerrorbox (dlg, henv, SQL_NULL_HANDLE, SQL_NULL_HANDLE); goto error; } } error: /* Clean all that */ SQLFreeHandle (SQL_HANDLE_ENV, henv); end: if (GTK_CLIST (widget)->rows > 0) { gtk_clist_columns_autosize (GTK_CLIST (widget)); gtk_clist_sort (GTK_CLIST (widget)); } } static void driver_list_select (GtkWidget *widget, gint row, gint column, GdkEvent *event, TDRIVERCHOOSER *choose_t) { LPSTR driver = NULL; if (choose_t) { /* Get the directory name */ gtk_clist_get_text (GTK_CLIST (choose_t->driverlist), row, 0, &driver); if (driver && event && event->type == GDK_2BUTTON_PRESS) gtk_signal_emit_by_name (GTK_OBJECT (choose_t->b_finish), "clicked", choose_t); } } static void driverchooser_ok_clicked (GtkWidget *widget, TDRIVERCHOOSER *choose_t) { char *szDriver; if (choose_t) { if (GTK_CLIST (choose_t->driverlist)->selection != NULL) { gtk_clist_get_text (GTK_CLIST (choose_t->driverlist), GPOINTER_TO_INT (GTK_CLIST (choose_t->driverlist)->selection-> data), 0, &szDriver); choose_t->driver = dm_SQL_A2W(szDriver, SQL_NTS); } else choose_t->driver = NULL; choose_t->driverlist = NULL; gtk_signal_disconnect_by_func (GTK_OBJECT (choose_t->mainwnd), GTK_SIGNAL_FUNC (gtk_main_quit), NULL); gtk_main_quit (); gtk_widget_destroy (choose_t->mainwnd); } } static void driverchooser_cancel_clicked (GtkWidget *widget, TDRIVERCHOOSER *choose_t) { if (choose_t) { choose_t->driverlist = NULL; choose_t->driver = NULL; gtk_signal_disconnect_by_func (GTK_OBJECT (choose_t->mainwnd), GTK_SIGNAL_FUNC (gtk_main_quit), NULL); gtk_main_quit (); gtk_widget_destroy (choose_t->mainwnd); } } static gint delete_event (GtkWidget *widget, GdkEvent *event, TDRIVERCHOOSER *choose_t) { driverchooser_cancel_clicked (widget, choose_t); return FALSE; } void create_driverchooser (HWND hwnd, TDRIVERCHOOSER *choose_t) { GdkPixmap *pixmap; GdkBitmap *mask; GtkStyle *style; GtkWidget *driverchooser; GtkWidget *dialog_vbox2; GtkWidget *hbox25; GtkWidget *frame37; GtkWidget *alignment29; GtkWidget *pixmap1; GtkWidget *frame36; GtkWidget *alignment28; GtkWidget *scrolledwindow10; GtkWidget *clist1; GtkWidget *l_name; GtkWidget *l_file; GtkWidget *l_date; GtkWidget *l_size; GtkWidget *l_diz; GtkWidget *dialog_action_area2; GtkWidget *b_finish; GtkWidget *b_cancel; if (hwnd == NULL || !GTK_IS_WIDGET (hwnd)) return; driverchooser = gtk_dialog_new (); gtk_widget_set_name (driverchooser, "driverchooser"); gtk_widget_set_size_request (driverchooser, 515, 335); gtk_window_set_title (GTK_WINDOW (driverchooser), _("Choose an ODBC Driver")); gtk_window_set_position (GTK_WINDOW (driverchooser), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (driverchooser), TRUE); gtk_window_set_default_size (GTK_WINDOW (driverchooser), 600, 450); gtk_window_set_type_hint (GTK_WINDOW (driverchooser), GDK_WINDOW_TYPE_HINT_DIALOG); #if GTK_CHECK_VERSION(2,0,0) gtk_widget_show (driverchooser); #endif dialog_vbox2 = GTK_DIALOG (driverchooser)->vbox; gtk_widget_set_name (dialog_vbox2, "dialog_vbox2"); gtk_widget_show (dialog_vbox2); hbox25 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox25, "hbox25"); gtk_widget_show (hbox25); gtk_box_pack_start (GTK_BOX (dialog_vbox2), hbox25, TRUE, TRUE, 0); frame37 = gtk_frame_new (NULL); gtk_widget_set_name (frame37, "frame37"); gtk_widget_show (frame37); gtk_box_pack_start (GTK_BOX (hbox25), frame37, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (frame37), 10); gtk_frame_set_shadow_type (GTK_FRAME (frame37), GTK_SHADOW_NONE); alignment29 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment29, "alignment29"); gtk_widget_show (alignment29); gtk_container_add (GTK_CONTAINER (frame37), alignment29); gtk_widget_set_size_request (alignment29, 140, -1); #if GTK_CHECK_VERSION(2,0,0) style = gtk_widget_get_style (driverchooser); pixmap = gdk_pixmap_create_from_xpm_d (driverchooser->window, &mask, &style->bg[GTK_STATE_NORMAL], (gchar **) img_xpm); #else style = gtk_widget_get_style (GTK_WIDGET (hwnd)); pixmap = gdk_pixmap_create_from_xpm_d (GTK_WIDGET (hwnd)->window, &mask, &style->bg[GTK_STATE_NORMAL], (gchar **) img_xpm); #endif pixmap1 = gtk_pixmap_new (pixmap, mask); gtk_widget_set_name (pixmap1, "pixmap1"); gtk_widget_show (pixmap1); gtk_container_add (GTK_CONTAINER (alignment29), pixmap1); frame36 = gtk_frame_new (NULL); gtk_widget_set_name (frame36, "frame36"); gtk_widget_show (frame36); gtk_box_pack_start (GTK_BOX (hbox25), frame36, TRUE, TRUE, 0); gtk_frame_set_shadow_type (GTK_FRAME (frame36), GTK_SHADOW_NONE); alignment28 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment28, "alignment28"); gtk_widget_show (alignment28); gtk_container_add (GTK_CONTAINER (frame36), alignment28); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment28), 0, 10, 0, 0); scrolledwindow10 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_set_name (scrolledwindow10, "scrolledwindow10"); gtk_widget_show (scrolledwindow10); gtk_container_add (GTK_CONTAINER (alignment28), scrolledwindow10); clist1 = gtk_clist_new (4); gtk_widget_set_name (clist1, "clist1"); gtk_widget_show (clist1); gtk_container_add (GTK_CONTAINER (scrolledwindow10), clist1); gtk_clist_set_column_width (GTK_CLIST (clist1), 0, 165); gtk_clist_set_column_width (GTK_CLIST (clist1), 1, 118); gtk_clist_set_column_width (GTK_CLIST (clist1), 2, 80); gtk_clist_set_column_width (GTK_CLIST (clist1), 3, 80); gtk_clist_column_titles_show (GTK_CLIST (clist1)); l_name = gtk_label_new (_("Name")); gtk_widget_set_name (l_name, "l_name"); gtk_widget_show (l_name); gtk_clist_set_column_widget (GTK_CLIST (clist1), 0, l_name); gtk_widget_set_size_request (l_name, 165, -1); l_file = gtk_label_new (_("File")); gtk_widget_set_name (l_file, "l_file"); gtk_widget_show (l_file); gtk_clist_set_column_widget (GTK_CLIST (clist1), 1, l_file); gtk_widget_set_size_request (l_file, 118, -1); l_date = gtk_label_new (_("Date")); gtk_widget_set_name (l_date, "l_date"); gtk_widget_show (l_date); gtk_clist_set_column_widget (GTK_CLIST (clist1), 2, l_date); gtk_widget_set_size_request (l_date, 80, -1); l_size = gtk_label_new (_("Size")); gtk_widget_set_name (l_size, "l_size"); gtk_widget_show (l_size); gtk_clist_set_column_widget (GTK_CLIST (clist1), 3, l_size); gtk_widget_set_size_request (l_size, 80, -1); l_diz = gtk_label_new (_("Select a driver for which you want to setup a data source")); gtk_widget_set_name (l_diz, "l_diz"); gtk_widget_show (l_diz); gtk_frame_set_label_widget (GTK_FRAME (frame36), l_diz); gtk_label_set_use_markup (GTK_LABEL (l_diz), TRUE); dialog_action_area2 = GTK_DIALOG (driverchooser)->action_area; gtk_widget_set_name (dialog_action_area2, "dialog_action_area2"); gtk_widget_show (dialog_action_area2); gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area2), GTK_BUTTONBOX_END); b_finish = gtk_button_new_with_mnemonic (_("_Finish")); gtk_widget_set_name (b_finish, "b_finish"); gtk_widget_show (b_finish); gtk_dialog_add_action_widget (GTK_DIALOG (driverchooser), b_finish, 0); GTK_WIDGET_SET_FLAGS (b_finish, GTK_CAN_DEFAULT); b_cancel = gtk_button_new_from_stock ("gtk-cancel"); gtk_widget_set_name (b_cancel, "b_cancel"); gtk_widget_show (b_cancel); gtk_dialog_add_action_widget (GTK_DIALOG (driverchooser), b_cancel, GTK_RESPONSE_CANCEL); GTK_WIDGET_SET_FLAGS (b_cancel, GTK_CAN_DEFAULT); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (driverchooser, driverchooser, "driverchooser"); GLADE_HOOKUP_OBJECT_NO_REF (driverchooser, dialog_vbox2, "dialog_vbox2"); GLADE_HOOKUP_OBJECT (driverchooser, hbox25, "hbox25"); GLADE_HOOKUP_OBJECT (driverchooser, frame37, "frame37"); GLADE_HOOKUP_OBJECT (driverchooser, alignment29, "alignment29"); GLADE_HOOKUP_OBJECT (driverchooser, pixmap1, "pixmap1"); GLADE_HOOKUP_OBJECT (driverchooser, frame36, "frame36"); GLADE_HOOKUP_OBJECT (driverchooser, alignment28, "alignment28"); GLADE_HOOKUP_OBJECT (driverchooser, scrolledwindow10, "scrolledwindow10"); GLADE_HOOKUP_OBJECT (driverchooser, clist1, "clist1"); GLADE_HOOKUP_OBJECT (driverchooser, l_name, "l_name"); GLADE_HOOKUP_OBJECT (driverchooser, l_file, "l_file"); GLADE_HOOKUP_OBJECT (driverchooser, l_date, "l_date"); GLADE_HOOKUP_OBJECT (driverchooser, l_size, "l_size"); GLADE_HOOKUP_OBJECT (driverchooser, l_diz, "l_diz"); GLADE_HOOKUP_OBJECT_NO_REF (driverchooser, dialog_action_area2, "dialog_action_area2"); GLADE_HOOKUP_OBJECT (driverchooser, b_finish, "b_finish"); GLADE_HOOKUP_OBJECT (driverchooser, b_cancel, "b_cancel"); /* Ok button events */ gtk_signal_connect (GTK_OBJECT (b_finish), "clicked", GTK_SIGNAL_FUNC (driverchooser_ok_clicked), choose_t); /* Cancel button events */ gtk_signal_connect (GTK_OBJECT (b_cancel), "clicked", GTK_SIGNAL_FUNC (driverchooser_cancel_clicked), choose_t); /* Close window button events */ gtk_signal_connect (GTK_OBJECT (driverchooser), "delete_event", GTK_SIGNAL_FUNC (delete_event), choose_t); gtk_signal_connect (GTK_OBJECT (driverchooser), "destroy", GTK_SIGNAL_FUNC (gtk_main_quit), NULL); /* Driver list events */ gtk_signal_connect (GTK_OBJECT (clist1), "select_row", GTK_SIGNAL_FUNC (driver_list_select), choose_t); adddrivers_to_list (clist1, driverchooser); choose_t->driverlist = clist1; choose_t->driver = NULL; choose_t->mainwnd = driverchooser; choose_t->b_finish = b_finish; gtk_widget_show_all (driverchooser); gtk_main (); } static void fdriverchooser_switch_page (GtkNotebook * notebook, GtkNotebookPage * page, gint page_num, TFDRIVERCHOOSER * choose_t) { guint len; char buff[1024]; char *dsn = {""}; char *drv = {""}; char *curr; if (choose_t) { switch (page_num) { case 0: if (choose_t->b_back) gtk_widget_set_sensitive (choose_t->b_back, FALSE); if (choose_t->b_continue) gtk_label_parse_uline(GTK_LABEL(GTK_BIN (choose_t->b_continue)->child), "Continue"); break; case 1: if (choose_t->driverlist && choose_t->tab_panel && GTK_CLIST (choose_t->driverlist)->selection == NULL) { _iodbcdm_messagebox(choose_t->mainwnd, NULL, "Driver wasn't selected!"); gtk_notebook_set_page (GTK_NOTEBOOK (choose_t->tab_panel), 0); break; } if (choose_t->b_back) gtk_widget_set_sensitive (choose_t->b_back, TRUE); if (choose_t->b_continue) gtk_label_parse_uline(GTK_LABEL(GTK_BIN (choose_t->b_continue)->child), "Co_ntinue"); break; case 2: if (choose_t->driverlist && choose_t->tab_panel && choose_t->dsn_entry) { if (GTK_CLIST (choose_t->driverlist)->selection != NULL) { gtk_clist_get_text (GTK_CLIST (choose_t->driverlist), GPOINTER_TO_INT(GTK_CLIST(choose_t->driverlist)->selection->data), 0, &drv); } else { _iodbcdm_messagebox(choose_t->mainwnd, NULL, "Driver wasn't selected!"); gtk_notebook_set_page (GTK_NOTEBOOK (choose_t->tab_panel), 0); break; } dsn = (char*)gtk_entry_get_text(GTK_ENTRY(choose_t->dsn_entry)); if (strlen(dsn) < 1) { _iodbcdm_messagebox(choose_t->mainwnd, NULL, "Enter File DSN Name..."); gtk_notebook_set_page (GTK_NOTEBOOK (choose_t->tab_panel), 1); break; } } if (choose_t->b_back) gtk_widget_set_sensitive (choose_t->b_back, TRUE); if (choose_t->b_continue) gtk_label_parse_uline(GTK_LABEL(GTK_BIN (choose_t->b_continue)->child), "_Finish"); if (choose_t->mess_entry) { #if GTK_CHECK_VERSION(2,0,0) GtkTextBuffer *gbuf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(choose_t->mess_entry)); GtkTextIter *iter; gtk_text_buffer_set_text(gbuf, "", 0); if (strchr(dsn, '/') != NULL) snprintf(buff, sizeof(buff), "Filename: %s\n", dsn); else snprintf(buff, sizeof(buff), "Filename: %s/%s\n", choose_t->curr_dir, dsn); gtk_text_buffer_insert_at_cursor(gbuf, buff, -1); snprintf(buff, sizeof(buff), "Driver: %s\n", drv); gtk_text_buffer_insert_at_cursor(gbuf, buff, -1); gtk_text_buffer_insert_at_cursor(gbuf, "Driver-specific Keywords:\n", -1); if (choose_t->attrs) { for (curr = choose_t->attrs; *curr; curr += (STRLEN (curr) + 1)) { if (!strncasecmp (curr, "PWD=", STRLEN ("PWD="))) continue; if (curr) gtk_text_buffer_insert_at_cursor(gbuf, curr, -1); gtk_text_buffer_insert_at_cursor(gbuf, "\n", -1); } } #else gtk_text_set_point(GTK_TEXT(choose_t->mess_entry), 0); len = gtk_text_get_length(GTK_TEXT(choose_t->mess_entry)); gtk_text_forward_delete(GTK_TEXT(choose_t->mess_entry), len); gtk_text_insert(GTK_TEXT(choose_t->mess_entry), NULL, NULL, NULL, "File Data Source\n", -1); if (strchr(dsn, '/') != NULL) snprintf(buff, sizeof(buff), "Filename: %s\n", dsn); else snprintf(buff, sizeof(buff), "Filename: %s/%s\n", choose_t->curr_dir, dsn); gtk_text_insert(GTK_TEXT(choose_t->mess_entry), NULL, NULL, NULL, buff, -1); snprintf(buff, sizeof(buff), "Driver: %s\n", drv); gtk_text_insert(GTK_TEXT(choose_t->mess_entry), NULL, NULL, NULL, buff, -1); gtk_text_insert(GTK_TEXT(choose_t->mess_entry), NULL, NULL, NULL, "Driver-specific Keywords:\n", -1); if (choose_t->attrs) { for (curr = choose_t->attrs; *curr; curr += (STRLEN (curr) + 1)) { if (!strncasecmp (curr, "PWD=", STRLEN ("PWD="))) { continue; } gtk_text_insert(GTK_TEXT(choose_t->mess_entry), NULL, NULL, NULL, curr, -1); gtk_text_insert(GTK_TEXT(choose_t->mess_entry), NULL, NULL, NULL, "\n", -1); } } #endif } break; } } } static void fdriverchooser_finish_clicked (GtkWidget *widget, TFDRIVERCHOOSER *choose_t) { char *szDriver; char *dsn; char buff[1024]; if (choose_t) { if (GTK_CLIST (choose_t->driverlist)->selection != NULL) { gtk_clist_get_text (GTK_CLIST (choose_t->driverlist), GPOINTER_TO_INT (GTK_CLIST (choose_t->driverlist)->selection-> data), 0, &szDriver); choose_t->driver = dm_SQL_A2W(szDriver, SQL_NTS); } else choose_t->driver = NULL; dsn = (char*)gtk_entry_get_text((GtkEntry*)choose_t->dsn_entry); if (strchr(dsn, '/') != NULL) snprintf(buff, sizeof(buff), "%s", dsn); else snprintf(buff, sizeof(buff), "%s/%s", choose_t->curr_dir, dsn); choose_t->dsn = strdup(buff); choose_t->driverlist = NULL; choose_t->dsn_entry = NULL; choose_t->b_back = NULL; choose_t->b_continue = NULL; choose_t->mess_entry = NULL; choose_t->tab_panel = NULL; choose_t->browse_sel = NULL; choose_t->ok = (choose_t->driver ? TRUE : FALSE); gtk_signal_disconnect_by_func (GTK_OBJECT (choose_t->mainwnd), GTK_SIGNAL_FUNC (gtk_main_quit), NULL); gtk_main_quit (); gtk_widget_destroy (choose_t->mainwnd); } } static void fdriverchooser_cancel_clicked (GtkWidget *widget, TFDRIVERCHOOSER *choose_t) { if (choose_t) { choose_t->driverlist = NULL; choose_t->driver = NULL; choose_t->ok = FALSE; choose_t->driverlist = NULL; choose_t->dsn_entry = NULL; choose_t->b_back = NULL; choose_t->b_continue = NULL; choose_t->mess_entry = NULL; choose_t->tab_panel = NULL; choose_t->browse_sel = NULL; gtk_signal_disconnect_by_func (GTK_OBJECT (choose_t->mainwnd), GTK_SIGNAL_FUNC (gtk_main_quit), NULL); gtk_main_quit (); gtk_widget_destroy (choose_t->mainwnd); } } static void fdriverchooser_next_clicked (GtkWidget * widget, TFDRIVERCHOOSER * choose_t) { if (choose_t) { gint page = gtk_notebook_get_current_page(GTK_NOTEBOOK (choose_t->tab_panel)); if (page == 2) /* Last Page */ fdriverchooser_finish_clicked (widget, choose_t); else gtk_notebook_next_page (GTK_NOTEBOOK (choose_t->tab_panel)); } } static void fdriverchooser_prev_clicked (GtkWidget * widget, TFDRIVERCHOOSER * choose_t) { if (choose_t) { gtk_notebook_prev_page (GTK_NOTEBOOK (choose_t->tab_panel)); } } static gint fdelete_event (GtkWidget *widget, GdkEvent *event, TFDRIVERCHOOSER *choose_t) { fdriverchooser_cancel_clicked (widget, choose_t); return FALSE; } static void fdriver_list_select (GtkWidget *widget, gint row, gint column, GdkEvent *event, TFDRIVERCHOOSER *choose_t) { LPSTR driver = NULL; if (choose_t) { /* Get the directory name */ gtk_clist_get_text (GTK_CLIST (choose_t->driverlist), row, 0, &driver); if (driver && event && event->type == GDK_2BUTTON_PRESS) gtk_signal_emit_by_name (GTK_OBJECT (choose_t->b_continue), "clicked", choose_t); } } static void fdsn_choosen(GtkWidget *widget, TFDRIVERCHOOSER *choose_t) { if (choose_t) { gtk_entry_set_text (GTK_ENTRY (choose_t->dsn_entry), gtk_file_selection_get_filename (GTK_FILE_SELECTION (choose_t-> browse_sel))); choose_t->browse_sel = NULL; } } static void fdriverchooser_browse_clicked (GtkWidget * widget, TFDRIVERCHOOSER * choose_t) { GtkWidget *filesel; char *dsn; char buff[1024]; if (choose_t) { filesel = gtk_file_selection_new ("Save as ..."); gtk_window_set_modal (GTK_WINDOW (filesel), TRUE); dsn = (char*)gtk_entry_get_text((GtkEntry*)choose_t->dsn_entry); if (strchr(dsn, '/') != NULL) snprintf(buff, sizeof(buff), "%s", dsn); else snprintf(buff, sizeof(buff), "%s/%s", choose_t->curr_dir, dsn); gtk_file_selection_set_filename (GTK_FILE_SELECTION (filesel), buff); /* Ok button events */ gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (filesel)->ok_button), "clicked", GTK_SIGNAL_FUNC (fdsn_choosen), choose_t); gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (filesel)->ok_button), "clicked", GTK_SIGNAL_FUNC (gtk_main_quit), NULL); /* Cancel button events */ gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (filesel)->cancel_button), "clicked", GTK_SIGNAL_FUNC (gtk_main_quit), NULL); /* Close window button events */ gtk_signal_connect (GTK_OBJECT (filesel), "delete_event", GTK_SIGNAL_FUNC (gtk_main_quit), NULL); choose_t->browse_sel = filesel; gtk_widget_show_all (filesel); gtk_main (); gtk_widget_destroy (filesel); choose_t->browse_sel = NULL; } } static void fdriverchooser_advanced_clicked (GtkWidget * widget, TFDRIVERCHOOSER * choose_t) { if (choose_t) { LPSTR attr_lst = NULL; LPSTR in_attrs = choose_t->attrs ? choose_t->attrs : "\0\0"; attr_lst = create_keyval (choose_t->mainwnd, in_attrs, &choose_t->verify_conn); if (attr_lst && attr_lst != (LPSTR)-1L) { if (choose_t->attrs) free(choose_t->attrs); choose_t->attrs = attr_lst; } } } //??DONE void create_fdriverchooser (HWND hwnd, TFDRIVERCHOOSER *choose_t) { GdkPixmap *pixmap; GdkBitmap *mask; GtkStyle *style; GtkWidget *fdriverchooser; GtkWidget *dialog_vbox3; GtkWidget *notebook2; GtkWidget *hbox26; GtkWidget *frame38; GtkWidget *alignment30; GtkWidget *pixmap1; GtkWidget *vbox21; GtkWidget *frame39; GtkWidget *alignment31; GtkWidget *scrolledwindow11; GtkWidget *clist2; GtkWidget *l_name; GtkWidget *l_file; GtkWidget *l_date; GtkWidget *l_size; GtkWidget *label70; GtkWidget *hbox27; GtkWidget *frame40; GtkWidget *alignment32; GtkWidget *b_advanced; GtkWidget *label67; GtkWidget *hbox28; GtkWidget *frame41; GtkWidget *alignment33; GtkWidget *pixmap2; GtkWidget *vbox22; GtkWidget *frame42; GtkWidget *alignment34; GtkWidget *label79; GtkWidget *frame43; GtkWidget *alignment35; GtkWidget *hbox30; GtkWidget *fdsn_entry; GtkWidget *b_browse; GtkWidget *frame47; GtkWidget *alignment39; GtkWidget *label68; GtkWidget *hbox29; GtkWidget *frame44; GtkWidget *alignment36; GtkWidget *pixmap3; GtkWidget *vbox23; GtkWidget *frame45; GtkWidget *alignment37; GtkWidget *label80; GtkWidget *frame46; GtkWidget *alignment38; GtkWidget *scrolledwindow13; GtkWidget *result_text; GtkWidget *label69; GtkWidget *dialog_action_area3; GtkWidget *b_cancel; GtkWidget *b_back; GtkWidget *b_continue; if (hwnd == NULL || !GTK_IS_WIDGET (hwnd)) return; fdriverchooser = gtk_dialog_new (); gtk_widget_set_name (fdriverchooser, "fdriverchooser"); gtk_widget_set_size_request (fdriverchooser, 512, 384); gtk_window_set_title (GTK_WINDOW (fdriverchooser), _("Create New File Data Source")); gtk_window_set_modal (GTK_WINDOW (fdriverchooser), TRUE); gtk_window_set_default_size (GTK_WINDOW (fdriverchooser), 600, 450); gtk_window_set_position (GTK_WINDOW (fdriverchooser), GTK_WIN_POS_CENTER); gtk_window_set_type_hint (GTK_WINDOW (fdriverchooser), GDK_WINDOW_TYPE_HINT_DIALOG); #if GTK_CHECK_VERSION(2,0,0) gtk_widget_show (fdriverchooser); #endif dialog_vbox3 = GTK_DIALOG (fdriverchooser)->vbox; gtk_widget_set_name (dialog_vbox3, "dialog_vbox3"); gtk_widget_show (dialog_vbox3); notebook2 = gtk_notebook_new (); gtk_widget_set_name (notebook2, "notebook2"); gtk_widget_show (notebook2); gtk_box_pack_start (GTK_BOX (dialog_vbox3), notebook2, TRUE, TRUE, 0); hbox26 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox26, "hbox26"); gtk_widget_show (hbox26); gtk_container_add (GTK_CONTAINER (notebook2), hbox26); frame38 = gtk_frame_new (NULL); gtk_widget_set_name (frame38, "frame38"); gtk_widget_show (frame38); gtk_box_pack_start (GTK_BOX (hbox26), frame38, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (frame38), 10); gtk_frame_set_shadow_type (GTK_FRAME (frame38), GTK_SHADOW_NONE); alignment30 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment30, "alignment30"); gtk_widget_show (alignment30); gtk_container_add (GTK_CONTAINER (frame38), alignment30); gtk_widget_set_size_request (alignment30, 140, -1); #if GTK_CHECK_VERSION(2,0,0) style = gtk_widget_get_style (fdriverchooser); pixmap = gdk_pixmap_create_from_xpm_d (fdriverchooser->window, &mask, &style->bg[GTK_STATE_NORMAL], (gchar **) img_xpm); #else style = gtk_widget_get_style (GTK_WIDGET (hwnd)); pixmap = gdk_pixmap_create_from_xpm_d (GTK_WIDGET (hwnd)->window, &mask, &style->bg[GTK_STATE_NORMAL], (gchar **) img_xpm); #endif pixmap1 = gtk_pixmap_new (pixmap, mask); gtk_widget_set_name (pixmap1, "pixmap1"); gtk_widget_show (pixmap1); gtk_container_add (GTK_CONTAINER (alignment30), pixmap1); vbox21 = gtk_vbox_new (FALSE, 0); gtk_widget_set_name (vbox21, "vbox21"); gtk_widget_show (vbox21); gtk_box_pack_start (GTK_BOX (hbox26), vbox21, TRUE, TRUE, 0); frame39 = gtk_frame_new (NULL); gtk_widget_set_name (frame39, "frame39"); gtk_widget_show (frame39); gtk_box_pack_start (GTK_BOX (vbox21), frame39, TRUE, TRUE, 0); gtk_widget_set_size_request (frame39, -1, 270); gtk_frame_set_shadow_type (GTK_FRAME (frame39), GTK_SHADOW_NONE); alignment31 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment31, "alignment31"); gtk_widget_show (alignment31); gtk_container_add (GTK_CONTAINER (frame39), alignment31); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment31), 0, 0, 4, 0); scrolledwindow11 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_set_name (scrolledwindow11, "scrolledwindow11"); gtk_widget_show (scrolledwindow11); gtk_container_add (GTK_CONTAINER (alignment31), scrolledwindow11); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow11), GTK_SHADOW_IN); clist2 = gtk_clist_new (4); gtk_widget_set_name (clist2, "clist2"); gtk_widget_show (clist2); gtk_container_add (GTK_CONTAINER (scrolledwindow11), clist2); gtk_clist_set_column_width (GTK_CLIST (clist2), 0, 165); gtk_clist_set_column_width (GTK_CLIST (clist2), 1, 118); gtk_clist_set_column_width (GTK_CLIST (clist2), 2, 80); gtk_clist_set_column_width (GTK_CLIST (clist2), 3, 80); gtk_clist_column_titles_show (GTK_CLIST (clist2)); l_name = gtk_label_new (_("Name")); gtk_widget_set_name (l_name, "l_name"); gtk_widget_show (l_name); gtk_clist_set_column_widget (GTK_CLIST (clist2), 0, l_name); gtk_widget_set_size_request (l_name, 165, -1); l_file = gtk_label_new (_("File")); gtk_widget_set_name (l_file, "l_file"); gtk_widget_show (l_file); gtk_clist_set_column_widget (GTK_CLIST (clist2), 1, l_file); gtk_widget_set_size_request (l_file, 118, -1); l_date = gtk_label_new (_("Date")); gtk_widget_set_name (l_date, "l_date"); gtk_widget_show (l_date); gtk_clist_set_column_widget (GTK_CLIST (clist2), 2, l_date); gtk_widget_set_size_request (l_date, 80, -1); l_size = gtk_label_new (_("Size")); gtk_widget_set_name (l_size, "l_size"); gtk_widget_show (l_size); gtk_clist_set_column_widget (GTK_CLIST (clist2), 3, l_size); gtk_widget_set_size_request (l_size, 80, -1); label70 = gtk_label_new (_("Select a driver for which you want to setup a data source")); gtk_widget_set_name (label70, "label70"); gtk_widget_show (label70); gtk_frame_set_label_widget (GTK_FRAME (frame39), label70); gtk_label_set_use_markup (GTK_LABEL (label70), TRUE); hbox27 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox27, "hbox27"); gtk_widget_show (hbox27); gtk_box_pack_start (GTK_BOX (vbox21), hbox27, FALSE, TRUE, 0); frame40 = gtk_frame_new (NULL); gtk_widget_set_name (frame40, "frame40"); gtk_widget_show (frame40); gtk_box_pack_start (GTK_BOX (hbox27), frame40, TRUE, TRUE, 0); gtk_frame_set_shadow_type (GTK_FRAME (frame40), GTK_SHADOW_NONE); alignment32 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment32, "alignment32"); gtk_widget_show (alignment32); gtk_container_add (GTK_CONTAINER (frame40), alignment32); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment32), 0, 10, 0, 0); b_advanced = gtk_button_new_with_mnemonic (_("_Advanced...")); gtk_widget_set_name (b_advanced, "b_advanced"); gtk_widget_show (b_advanced); gtk_box_pack_start (GTK_BOX (hbox27), b_advanced, FALSE, TRUE, 0); gtk_widget_set_size_request (b_advanced, -1, 45); gtk_container_set_border_width (GTK_CONTAINER (b_advanced), 8); label67 = gtk_label_new (_(" Drivers ")); gtk_widget_set_name (label67, "label67"); gtk_widget_show (label67); gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 0), label67); hbox28 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox28, "hbox28"); gtk_widget_show (hbox28); gtk_container_add (GTK_CONTAINER (notebook2), hbox28); frame41 = gtk_frame_new (NULL); gtk_widget_set_name (frame41, "frame41"); gtk_widget_show (frame41); gtk_box_pack_start (GTK_BOX (hbox28), frame41, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (frame41), 10); gtk_frame_set_shadow_type (GTK_FRAME (frame41), GTK_SHADOW_NONE); alignment33 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment33, "alignment33"); gtk_widget_show (alignment33); gtk_container_add (GTK_CONTAINER (frame41), alignment33); gtk_widget_set_size_request (alignment33, 140, -1); pixmap2 = gtk_pixmap_new (pixmap, mask); gtk_widget_set_name (pixmap2, "pixmap2"); gtk_widget_show (pixmap2); gtk_container_add (GTK_CONTAINER (alignment33), pixmap2); vbox22 = gtk_vbox_new (FALSE, 0); gtk_widget_set_name (vbox22, "vbox22"); gtk_widget_show (vbox22); gtk_box_pack_start (GTK_BOX (hbox28), vbox22, TRUE, TRUE, 0); frame42 = gtk_frame_new (NULL); gtk_widget_set_name (frame42, "frame42"); gtk_widget_show (frame42); gtk_box_pack_start (GTK_BOX (vbox22), frame42, FALSE, TRUE, 0); gtk_frame_set_shadow_type (GTK_FRAME (frame42), GTK_SHADOW_NONE); alignment34 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment34, "alignment34"); gtk_widget_show (alignment34); gtk_container_add (GTK_CONTAINER (frame42), alignment34); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment34), 0, 0, 4, 0); label79 = gtk_label_new (_("Type the name of the data source you want to\nsave this connection to. Or, find the location to\nsave to by clicking Browse.")); gtk_widget_set_name (label79, "label79"); gtk_widget_show (label79); gtk_container_add (GTK_CONTAINER (alignment34), label79); frame43 = gtk_frame_new (NULL); gtk_widget_set_name (frame43, "frame43"); gtk_widget_show (frame43); gtk_box_pack_start (GTK_BOX (vbox22), frame43, FALSE, TRUE, 0); gtk_frame_set_shadow_type (GTK_FRAME (frame43), GTK_SHADOW_NONE); alignment35 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment35, "alignment35"); gtk_widget_show (alignment35); gtk_container_add (GTK_CONTAINER (frame43), alignment35); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment35), 0, 0, 12, 0); hbox30 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox30, "hbox30"); gtk_widget_show (hbox30); gtk_container_add (GTK_CONTAINER (alignment35), hbox30); fdsn_entry = gtk_entry_new (); gtk_widget_set_name (fdsn_entry, "fdsn_entry"); gtk_widget_show (fdsn_entry); gtk_box_pack_start (GTK_BOX (hbox30), fdsn_entry, TRUE, TRUE, 0); b_browse = gtk_button_new_with_mnemonic (_(" Browse ")); gtk_widget_set_name (b_browse, "b_browse"); gtk_widget_show (b_browse); gtk_box_pack_start (GTK_BOX (hbox30), b_browse, FALSE, FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (b_browse), 10); frame47 = gtk_frame_new (NULL); gtk_widget_set_name (frame47, "frame47"); gtk_widget_show (frame47); gtk_box_pack_start (GTK_BOX (vbox22), frame47, TRUE, TRUE, 0); gtk_widget_set_size_request (frame47, -1, 200); gtk_frame_set_shadow_type (GTK_FRAME (frame47), GTK_SHADOW_NONE); alignment39 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment39, "alignment39"); gtk_widget_show (alignment39); gtk_container_add (GTK_CONTAINER (frame47), alignment39); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment39), 0, 0, 12, 0); label68 = gtk_label_new (_(" FileDSN Name ")); gtk_widget_set_name (label68, "label68"); gtk_widget_show (label68); gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 1), label68); hbox29 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox29, "hbox29"); gtk_widget_show (hbox29); gtk_container_add (GTK_CONTAINER (notebook2), hbox29); frame44 = gtk_frame_new (NULL); gtk_widget_set_name (frame44, "frame44"); gtk_widget_show (frame44); gtk_box_pack_start (GTK_BOX (hbox29), frame44, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (frame44), 10); gtk_frame_set_shadow_type (GTK_FRAME (frame44), GTK_SHADOW_NONE); alignment36 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment36, "alignment36"); gtk_widget_show (alignment36); gtk_container_add (GTK_CONTAINER (frame44), alignment36); gtk_widget_set_size_request (alignment36, 140, -1); pixmap3 = gtk_pixmap_new (pixmap, mask); gtk_widget_set_name (pixmap3, "pixmap3"); gtk_widget_show (pixmap3); gtk_container_add (GTK_CONTAINER (alignment36), pixmap3); vbox23 = gtk_vbox_new (FALSE, 0); gtk_widget_set_name (vbox23, "vbox23"); gtk_widget_show (vbox23); gtk_box_pack_start (GTK_BOX (hbox29), vbox23, TRUE, TRUE, 0); frame45 = gtk_frame_new (NULL); gtk_widget_set_name (frame45, "frame45"); gtk_widget_show (frame45); gtk_box_pack_start (GTK_BOX (vbox23), frame45, FALSE, TRUE, 0); gtk_frame_set_shadow_type (GTK_FRAME (frame45), GTK_SHADOW_NONE); alignment37 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment37, "alignment37"); gtk_widget_show (alignment37); gtk_container_add (GTK_CONTAINER (frame45), alignment37); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment37), 0, 0, 4, 0); label80 = gtk_label_new (_("When you click Finish, you will create the data\nsource which you have just configured. The driver\nmay prompt you more information.")); gtk_widget_set_name (label80, "label80"); gtk_widget_show (label80); gtk_container_add (GTK_CONTAINER (alignment37), label80); frame46 = gtk_frame_new (NULL); gtk_widget_set_name (frame46, "frame46"); gtk_widget_show (frame46); gtk_box_pack_start (GTK_BOX (vbox23), frame46, TRUE, TRUE, 0); gtk_widget_set_size_request (frame46, -1, 250); gtk_frame_set_shadow_type (GTK_FRAME (frame46), GTK_SHADOW_NONE); alignment38 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment38, "alignment38"); gtk_widget_show (alignment38); gtk_container_add (GTK_CONTAINER (frame46), alignment38); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment38), 0, 10, 0, 0); scrolledwindow13 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_set_name (scrolledwindow13, "scrolledwindow13"); gtk_widget_show (scrolledwindow13); gtk_container_add (GTK_CONTAINER (alignment38), scrolledwindow13); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow13), GTK_SHADOW_IN); #if GTK_CHECK_VERSION(2,0,0) result_text = gtk_text_view_new (); #else result_text = gtk_text_new (NULL, NULL); #endif gtk_widget_set_name (result_text, "result_text"); gtk_widget_show (result_text); gtk_container_add (GTK_CONTAINER (scrolledwindow13), result_text); gtk_text_view_set_editable (GTK_TEXT_VIEW (result_text), FALSE); gtk_text_view_set_overwrite (GTK_TEXT_VIEW (result_text), TRUE); label69 = gtk_label_new (_(" Results ")); gtk_widget_set_name (label69, "label69"); gtk_widget_show (label69); gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 2), label69); dialog_action_area3 = GTK_DIALOG (fdriverchooser)->action_area; gtk_widget_set_name (dialog_action_area3, "dialog_action_area3"); gtk_widget_show (dialog_action_area3); gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area3), GTK_BUTTONBOX_END); b_cancel = gtk_button_new_from_stock ("gtk-cancel"); gtk_widget_set_name (b_cancel, "b_cancel"); gtk_widget_show (b_cancel); gtk_dialog_add_action_widget (GTK_DIALOG (fdriverchooser), b_cancel, GTK_RESPONSE_CANCEL); GTK_WIDGET_SET_FLAGS (b_cancel, GTK_CAN_DEFAULT); b_back = gtk_button_new_from_stock ("gtk-go-back"); gtk_widget_set_name (b_back, "b_back"); gtk_widget_show (b_back); gtk_dialog_add_action_widget (GTK_DIALOG (fdriverchooser), b_back, 0); gtk_widget_set_sensitive (b_back, FALSE); GTK_WIDGET_SET_FLAGS (b_back, GTK_CAN_DEFAULT); b_continue = gtk_button_new_with_mnemonic (_("Co_ntinue")); gtk_widget_set_name (b_continue, "b_continue"); gtk_widget_show (b_continue); gtk_dialog_add_action_widget (GTK_DIALOG (fdriverchooser), b_continue, 0); GTK_WIDGET_SET_FLAGS (b_continue, GTK_CAN_DEFAULT); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (fdriverchooser, fdriverchooser, "fdriverchooser"); GLADE_HOOKUP_OBJECT_NO_REF (fdriverchooser, dialog_vbox3, "dialog_vbox3"); GLADE_HOOKUP_OBJECT (fdriverchooser, notebook2, "notebook2"); GLADE_HOOKUP_OBJECT (fdriverchooser, hbox26, "hbox26"); GLADE_HOOKUP_OBJECT (fdriverchooser, frame38, "frame38"); GLADE_HOOKUP_OBJECT (fdriverchooser, alignment30, "alignment30"); GLADE_HOOKUP_OBJECT (fdriverchooser, pixmap1, "pixmap1"); GLADE_HOOKUP_OBJECT (fdriverchooser, vbox21, "vbox21"); GLADE_HOOKUP_OBJECT (fdriverchooser, frame39, "frame39"); GLADE_HOOKUP_OBJECT (fdriverchooser, alignment31, "alignment31"); GLADE_HOOKUP_OBJECT (fdriverchooser, scrolledwindow11, "scrolledwindow11"); GLADE_HOOKUP_OBJECT (fdriverchooser, clist2, "clist2"); GLADE_HOOKUP_OBJECT (fdriverchooser, l_name, "l_name"); GLADE_HOOKUP_OBJECT (fdriverchooser, l_file, "l_file"); GLADE_HOOKUP_OBJECT (fdriverchooser, l_date, "l_date"); GLADE_HOOKUP_OBJECT (fdriverchooser, l_size, "l_size"); GLADE_HOOKUP_OBJECT (fdriverchooser, label70, "label70"); GLADE_HOOKUP_OBJECT (fdriverchooser, hbox27, "hbox27"); GLADE_HOOKUP_OBJECT (fdriverchooser, frame40, "frame40"); GLADE_HOOKUP_OBJECT (fdriverchooser, alignment32, "alignment32"); GLADE_HOOKUP_OBJECT (fdriverchooser, b_advanced, "b_advanced"); GLADE_HOOKUP_OBJECT (fdriverchooser, label67, "label67"); GLADE_HOOKUP_OBJECT (fdriverchooser, hbox28, "hbox28"); GLADE_HOOKUP_OBJECT (fdriverchooser, frame41, "frame41"); GLADE_HOOKUP_OBJECT (fdriverchooser, alignment33, "alignment33"); GLADE_HOOKUP_OBJECT (fdriverchooser, pixmap2, "pixmap2"); GLADE_HOOKUP_OBJECT (fdriverchooser, vbox22, "vbox22"); GLADE_HOOKUP_OBJECT (fdriverchooser, frame42, "frame42"); GLADE_HOOKUP_OBJECT (fdriverchooser, alignment34, "alignment34"); GLADE_HOOKUP_OBJECT (fdriverchooser, label79, "label79"); GLADE_HOOKUP_OBJECT (fdriverchooser, frame43, "frame43"); GLADE_HOOKUP_OBJECT (fdriverchooser, alignment35, "alignment35"); GLADE_HOOKUP_OBJECT (fdriverchooser, hbox30, "hbox30"); GLADE_HOOKUP_OBJECT (fdriverchooser, fdsn_entry, "fdsn_entry"); GLADE_HOOKUP_OBJECT (fdriverchooser, b_browse, "b_browse"); GLADE_HOOKUP_OBJECT (fdriverchooser, frame47, "frame47"); GLADE_HOOKUP_OBJECT (fdriverchooser, alignment39, "alignment39"); GLADE_HOOKUP_OBJECT (fdriverchooser, label68, "label68"); GLADE_HOOKUP_OBJECT (fdriverchooser, hbox29, "hbox29"); GLADE_HOOKUP_OBJECT (fdriverchooser, frame44, "frame44"); GLADE_HOOKUP_OBJECT (fdriverchooser, alignment36, "alignment36"); GLADE_HOOKUP_OBJECT (fdriverchooser, pixmap3, "pixmap3"); GLADE_HOOKUP_OBJECT (fdriverchooser, vbox23, "vbox23"); GLADE_HOOKUP_OBJECT (fdriverchooser, frame45, "frame45"); GLADE_HOOKUP_OBJECT (fdriverchooser, alignment37, "alignment37"); GLADE_HOOKUP_OBJECT (fdriverchooser, label80, "label80"); GLADE_HOOKUP_OBJECT (fdriverchooser, frame46, "frame46"); GLADE_HOOKUP_OBJECT (fdriverchooser, alignment38, "alignment38"); GLADE_HOOKUP_OBJECT (fdriverchooser, scrolledwindow13, "scrolledwindow13"); GLADE_HOOKUP_OBJECT (fdriverchooser, result_text, "result_text"); GLADE_HOOKUP_OBJECT (fdriverchooser, label69, "label69"); GLADE_HOOKUP_OBJECT_NO_REF (fdriverchooser, dialog_action_area3, "dialog_action_area3"); GLADE_HOOKUP_OBJECT (fdriverchooser, b_cancel, "b_cancel"); GLADE_HOOKUP_OBJECT (fdriverchooser, b_back, "b_back"); GLADE_HOOKUP_OBJECT (fdriverchooser, b_continue, "b_continue"); /* Notebook events */ gtk_signal_connect_after (GTK_OBJECT (notebook2), "switch_page", GTK_SIGNAL_FUNC (fdriverchooser_switch_page), choose_t); /* Cancel button events */ gtk_signal_connect (GTK_OBJECT (b_cancel), "clicked", GTK_SIGNAL_FUNC (fdriverchooser_cancel_clicked), choose_t); /* Continue button events */ gtk_signal_connect (GTK_OBJECT (b_continue), "clicked", GTK_SIGNAL_FUNC (fdriverchooser_next_clicked), choose_t); /* Back button events */ gtk_signal_connect (GTK_OBJECT (b_back), "clicked", GTK_SIGNAL_FUNC (fdriverchooser_prev_clicked), choose_t); /* Browse button events */ gtk_signal_connect (GTK_OBJECT (b_browse), "clicked", GTK_SIGNAL_FUNC (fdriverchooser_browse_clicked), choose_t); /* Advanced button events */ gtk_signal_connect (GTK_OBJECT (b_advanced), "clicked", GTK_SIGNAL_FUNC (fdriverchooser_advanced_clicked), choose_t); /* Driver list events */ gtk_signal_connect (GTK_OBJECT (clist2), "select_row", GTK_SIGNAL_FUNC (fdriver_list_select), choose_t); /* Close window button events */ gtk_signal_connect (GTK_OBJECT (fdriverchooser), "delete_event", GTK_SIGNAL_FUNC (fdelete_event), choose_t); gtk_signal_connect (GTK_OBJECT (fdriverchooser), "destroy", GTK_SIGNAL_FUNC (gtk_main_quit), NULL); gtk_widget_grab_default (b_continue); adddrivers_to_list (clist2, fdriverchooser); choose_t->driverlist = clist2; choose_t->driver = NULL; choose_t->mainwnd = fdriverchooser; choose_t->b_continue = b_continue; choose_t->b_back = b_back; choose_t->tab_panel = notebook2; choose_t->dsn_entry = fdsn_entry; choose_t->mess_entry = result_text; gtk_widget_show_all (fdriverchooser); gtk_main (); } libiodbc-3.52.16/iodbcadm/gtk/error.xpm0000664000175000017500000001573314424170750014605 00000000000000/* * error.xpm * * $Id$ * * ODBC logo in XPM format * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* XPM */ static char * error_xpm[] = { "48 48 62 1", " c None", ". c #B6DAB6DAB6DA", "X c #D75CD75CD75C", "o c #C71BC71BC71B", "O c #BEFBBAEABEFB", "+ c #BEFBBEFBBEFB", "@ c #8E388E388E38", "# c #CF3CCB2BCF3C", "$ c #AEBAAEBAAEBA", "% c #DF7DDB6CDF7D", "& c #E79DE79DE79D", "* c #EFBEEBADEFBE", "= c #F7DEF7DEF7DE", "- c #DF7DDF7DDF7D", "; c #EFBEEFBEEFBE", ": c #FFFFFBEEFFFF", "> c #965896589658", ", c #CF3CCF3CCF3C", "< c #410341034103", "1 c #104014511040", "2 c #71C675D671C6", "3 c #8E388A288E38", "4 c #71C671C671C6", "5 c #9E799E799E79", "6 c #618561856185", "7 c #AEBAA699AEBA", "8 c #A699A289A699", "9 c #69A66DB669A6", "0 c #861782078617", "q c #9E799A699E79", "w c #A699A699A699", "e c #596559655965", "r c #69A669A669A6", "t c #514455555144", "y c #861786178617", "u c #492449244924", "i c #69A6659569A6", "p c #618565956185", "a c #79E779E779E7", "s c #28A228A228A2", "d c #082008200820", "f c #965892489658", "g c #410345144103", "h c #30C234D330C2", "j c #104010401040", "k c #71C679E771C6", "l c #BEFBB6DABEFB", "z c #30C230C230C2", "x c #208120812081", "c c #000000000000", "v c #38E338E338E3", "b c #208124922081", "n c #514451445144", "m c #186118611861", "M c #596555555965", "N c #A699AAAAA699", "B c #BEFBBAEAB6DA", "V c #E79DE38DE79D", "C c #CF3CCB2BC71B", "Z c #59655D755965", "A c #B6DAB2CAB6DA", "S c #000004100000", " .X..o .o O + @@ # $+ +.OXo ", ".#%$+&*=%oX--;:.O&>- #;,+,;&&%-.oOo#%*&:&+. ", "OO#%+-*& ::*-&;::,*;&*=+$O +$$ O$O$#+,- ", " -%-&=%&-== : -=;=#$. #O+OXX-O%X X%O$++ ", " o=:X+X*;&,%;##-&,;: ;+&=:-, &# &=&-%X:*&;;;<12 ", "O :;: ,34- +.X*X=-* -- X* ::;-;o#&:XoX ,X 5236 ", "*- ==:-78- -9O05**%+qO%;- %&&w0> q $werty u0 ", "+ :=+%=:+#OX-O X: :*y4i>*;yqq@524t6p>@03ya s 22", "=::##4 o3+@y+ & = **w%%- +4 5>56w5eya3p> 62rdr", "#& o%*:O$X*$e@+ : q a0=-0f5p>agg rhs 5j<0s1hd<<", "X=; kl=%,.o $ $r6s0h56bjxv<032pwqhu>+ 65u1cxuhh21mueytssh3>s ", " $&--$ o3q#,a0a1cy1sxxcchr 6> 35 ", " +,;O*+%+y5y0wo$M>#*5>d6 4<6rd2 ", " , $ %&#+O .+O+22>Oz=0td3sx ", " $o%#X-.++$O$ q>g Xs:&txxu xh5 ", " .o &# oX**+y 3rO64qxdsusr ", " $$ +...&6@r03$v1@ du><3 ", " $ $+.a 0hq&5<1t1u5r<5 ", " #X-q+o2re h<6c0>0 ", " .+,#X--%;;$y 5g05>w >us> ", " .$O+,*;++.2w2 s0qyw q>@avd3 ", " O:*;=&&XX#.,$-%*=+ $.2y4prajr@> ", " .X.+.;:=;,=-.rX> > .-fNw>+@>w6buqew ", " $.-,-X ,-ow%-*,o&%@=B,t+ ;a5htu6p> ", " $O+%+$&:& >+#%*:VXC ; #epgdcOra6mcddxccxmh6636 ", " ;.# g3v11dx , ", " *O:&u06tduu%. ", " $* :@rrpd1o:$ ", " X -d s1uusxh1t ", " $+; - ;< hsvuthust6 ", " .+#o ,,&,*=o%Xq. 2@at1tccr2 >5 30 ", " +*-,&-*:* ;;%Xw.=,55ux0-x6611ddhss2ssu1< ", " $ . .oX3w0q4rap5az2ey >t< "}; libiodbc-3.52.16/iodbcadm/gtk/img.xpm0000664000175000017500000010477314424170750014233 00000000000000/* * img.xpm * * $Id$ * * ODBC logo in XPM format * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* XPM */ static char * img_xpm[] = { "117 260 35 1", " c None", ". c #CCCC33", "+ c #999999", "@ c #333366", "# c #777777", "$ c #CCCCFF", "% c #555555", "& c #999966", "* c #6666CC", "= c #EEEEEE", "- c #333333", "; c #FFFF66", "> c #CCCCCC", ", c #111111", "' c #999933", ") c #666699", "! c #AAAAAA", "~ c #FFFF33", "{ c #888888", "] c #CCCC99", "^ c #000055", "/ c #9999FF", "( c #666666", "_ c #000044", ": c #3333CC", "< c #FFFFFF", "[ c #000033", "} c #444444", "| c #CCCC66", "1 c #000022", "2 c #9999CC", "3 c #DDDDDD", "4 c #222222", "5 c #333399", "6 c #BBBBBB", "_@)*)*)*)*)*)*)*)*)*)*)*)*)*)*)*)*)*)*)*)*)*)*)*)*)*)*)*)*)*)*)*)*)*)*)*)*)*)*)*)*)*)*)*)*)*)*)*)*)*)*)*)*)*)*)*)*223", "4^5**2**2**2**2**2**2**2**2**2**2**2**2**2**2**2**2**2**2**2**2**2**2**2**2**2**2**2**2**2**2**2**2**2**2**2**2**)2$>", "[45))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))*2>2", "[,_555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555222", ",[@555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555*22", "41_55555555555555555555555555555555555555555555555555555555555555555)*)*))5555555555555555)5)555555555555555555555222", "[,@555555555555555555555555555555555555555555555555555555555555555)**)*)***)55555555555))****)*5555555555555555555*22", "14_55555555555555555555555555555555555555555555555555555555555555)**))*)*)*)*555555555)***)))*)*)55555555555555555222", ",[@5555555555555555555555555555555555555555555555555555555555555)*))**)*)*)*))5555555*)*))***)*)*)5555555555555)5)*22", "[,^5555555555555555555555555555555555555555555555555555555555555****{*2)*{*)**555555)*)**{*{*2)***)555555555)****)262", "4[-555555555555555555555555555555555555555555555555555555555555*))))*)*)**)*)*)55555*)*))***))*+))*5555555)*)*)))*2$>", "14^555555555555555555555555555555555555555555555555555555555555)**2**)*)*)**)*)55555)*)2**))**)***)5555555*)*)*2**2>2", "1[@555555555555555555555555555555555555555555555555555555555555*)))*{*)2)*{*)*)5555)*)*)))2*)**))*))55555*)**+*)))2$2", "41_55555555555555555555555555555555555555555555)*)**))555555555)***)**)**)*{***5555)**)***)*{*)**{*55555)*))*)****66$", "[,@555555555555555555555555555555555555555555)**)*))***55555555**{*)*{*)*)**2))55555*{**{)*)**)2)**)5555*)*2)*))))2/6", "14_55555555555555555555555555555555555555555)*))*)2**))*)555555*{*)*)***{**)))*5555))**)***)*{*)*)*)5555*)*)*{**2*2>>", ",[@55555555555555555555555555555555555555555*)**)*)))**)*555555)**)2)*))*))***)5555)*))2))2)**)*)*))5555)*)***))*)2$2", "[,_5555555555555555555555555555555555555555)**)*+***2)*{*)55555*)*)**{**{*2))**55555***)**)*)*)**{*55555*)*{)**)**2>$", "41@5555555555555555555555555555555555555555*{*)*)*))*)**)*55555*{*)*)*{**)**)2)5555)*{*)*)*{*)*+)**)5555)2)**)2*{)262", "[4_555555555555555555555555555555555555555))*)2)**)**{*)**)5555)**2)*)**)**)*)*5555)*)*)*)**)2)**)*55555*)**))*)**2$>", ",[@5555555555555555555555555555555555555555**)**){*{**)*{*55555*)))*)*))*{*)*)*55555*)*2)*)**)*)**{*5555)*))2*)*)*2>/", "[,_555555555555555555555555555555555555555)*)*)*****))*)*))5555)***)*2**)*)2)*)5555)*))*)2))*)**{**55555*)**)*)**{2>6", "41@555555555555555555555555555555555555555*)*)*{))))**2)**)5555*)*{*)))2)**)*)*5555))**)*)**)*{*)*))5555)*2)*)*{**2>/", "14_555555555555555555555555555555555555555))*2)****2*))*)*55555)2)*)****)*)*2)*5555)**{*)*)*+**)*)*)5555**)*)2)**)2/>", "1[@5555555555555555555555555555555555555555*)**)*{)))**)*{*5555*)***{*))*{*))*)55555*{***{*)*)*)**)*5555))*)**)*)*6>2", "41_555555555555555555555555555555555555555)*))*{*****{*)**)5555*)*{**)*)**)**)*5555)**))**)**)*2)*))5555*)2*)*)*{*2$6", "[,@555555555555555555555555555555555555555*)2*)**{*))**+*)55555)*)*))*+**{**{**5555)))*2))2*{*))*)*55555)*))*{*)**22$", "14_5555555555555555555555555555555555555555)*)**))*+**)*)*)5555*{*)***)*)**{**)5555)***)***)*)**{**)5555*)**)**)*)2$6", ",[@555555555555555555555555555555555555555)*)*{*)**)*{*)*)*5555***{*{*)*{*)*))*55555*))*)))*)*{**))*5555*)2)*)2*)*66/", "[,_5555555555555555555555555555555555555555**)*)*{**)*)**))5555))**)*)*)*)*)*2)5555)**{**2)****)**))5555)*)*{*)*{*2>6", "41@555555555555555555555555555555555555555)*{*)***))*)*+)*55555**{*)**{***{**)*5555)))**))*{*{)*+)*55555*)***)*)**22$", "[4_5555555555555555555555555))*))555555555))*)*2))*2)*)***)5555))**+*)**{)**)*)55555*2*))***)**)***)5555*+*))**)*)2$6", ",[@5555555555555555555555)****)**)555555555***{*)*)**)*))*)5555**))*)*)***))2)*5555)*))*2))*)*)*))*)5555)*)*2))2)*66/", "[,_555555555555555555555)*)))*)*)**)555555)*{**)**))*2)*2)55555)***)*+*))*2)*)*55555**)*)**{*)2)**))5555*)*)**)*)*2$6", "41@555555555555555555555*)***)*)**)*)55555))*))*))2*))**)*)5555*{*{*)*)2*))*)*)5555){*)*)*)***)**{*55555)*)*))**)*226", "14_55555555555555555555*)*)*{*)*))*)*55555**22222222222222*)*)52*)****)*)****)*55555*)2*)2)*{*)*)**)5555*2*{**{*{*2>$", "1[@5555555555555555555)*)*+**)*+**+*2*)*)*2222222222222222*)*)*22222+2*)*{*))2)5555)**))*)*)*)*{*)*)5555))**)**)**6/6", "41_5555555555555555555)**)*)*)2*222222)**)*222*222222222222)**)22222222222*2)**55555)***)*)*)2**)*))5555*))**{**))2>/", "[,@5555555555555555555)*{*)22222222222*))*{222222*2*2*2*22**))*22222222222222{25555)*)*{**+**))*+**55555)**{*)*{**2>>", "14_5555555555555555555*2*2222222222*22)**)*2*22222222222222)**)222*22*222222222)*55)*{*)*)**)**)*)*)5555**)*)*)**)2$2", ",[@555555555555555555)222222*22*222222*)**22222*2222222+2*)*))*222222222*22*22**)***2*)*)*))*{*)*)*)5555))2**)*))226$", "[,_5555555555555555*)*2222*222222*2222)*)))*{*)+))))))**)*)5)*52)22222222222222)*))2222*+**{**)*)*))5555**))*+***)2$2", "41@5555555555555))*)*)2*222222222+22)*5555)**)********)*)*)5555)**))*)*2+*22222*)**)*22222)**)**+**55555))**)**{)*22>", "[4_55555555555*)***)*)22+222+2*2)**))*5555))*)*))*))*))*)*)5555**))**{*)**+2*22*{*)22222*222*{*)*)*)5555***{)*)***2$6", ",[@555555555)*)*))*)**222*2***))*)*)*)55555*)*)**)**)**)*))5555))**))**)*{**{22)**)2222222222*)2)*))5555){***)*{*{26/", "[,_5555555)**)*)**)*))222*{*{*)**)****5555)*2)*{*))2))*+**55555**{***{*{**)**)*5))**22*222*2222**)*)5555**))*+**)*2>>", "41@55555)2*)*)*)*)*)***)*)*)*{**{*{*{)5555))*)**{**)**)*)*)5555)*)*))*)**)*))*)5555)2222+222222222*55555*)**)*)*)*2$2", "14_55)*2222222)*)*)*)5*)*)**)**{***)**55555**)*)**{**{**)*)5555*)*)2*)**{*)**)*5555)*)22*22+2222222)5555*{*{**)*)*22>", "1[@5)2222222222*)*)555)*{*)2*))*))*)*)5555)*)*{*)**))*))*))5555)2)*)**{*)*2)*)*55555*)*)222*2222222*)555)***))2)*{2$6", "414*22222*222*22555555*)**))***)**{*)*5555)*)**)*{***)2*)*)5555*)*)*{**)*)*)*+*5555)*)**)*222*2*222**)55*))**)**)*2>/", "[4)2222*22222+*))55555{**{**))*+*)***)5555)*)2)*)*)*{**)**55555)**)**))*)*)*)*)5555))*))*)*)2222+222)**)+**{*)*{**26>", "@%{22*22222***)**55555**)**)2*)**{*){*55555*)*)*2)*)**)*{*)5555**)2*)**+*{*)*)*5555)**)2*)*)*)222*2*)*)*2*{*)*)**)2$/", "%%*222222*)))*)*)55555))*{*)*)*))**)**5555)*)*)*)*)2))*)*))5555))*))*{**)**2)*)55555*{*))*)*)*)*222{*)*)222**{*))2266", "%){22222)2**)*)*))5555**)*)*)*{**)*2)*5555)*)**{*)*)**{***)5555**{**)*)**))*)**5555)**)**{*)*)*)*+2**)**2222)**2*)2$2", "%({222*)*){*)2)**)5555)2)**{*)**{*))*)5555)*)2)*)*)*)**{)*55555))**{**)*{**)*))5555)))**)***)2)*)**2)*))222222)))*26>", "%))22*)*)**)*)*)*55555**)2)*)**)*)**)*55555)**)**+**{*)***)5555***)**{*)**{*)2*5555)***+)*){**)*)*))*)**22*2222***2$/", "%(+2)*)**)**)*)2))5555))*)***{*)**{**{5555)*))*)*)*)*)*))))5555){*)*)**)*)**)*)55555*{*)**{**)*{*)*555*)22222*22))2>6", "%))*)*+*{*)2*)***)5555**)*){**)2)**{**5555)***{*)*)**{**2*55555**)2)*)2)*)*{*)*5555)*)**)**)*{***)*)555)222*22222*2>/", "@}))*)*)*)*))2))*55555*)*)**))*)*))*))5555)*))**2)*+)**))*)5555*)*)*)*)*)2)***)5555))*))*{*)**))2)*)5555*22222222222>", "4-))**)*)**)**)**)5555{*)2*)*2)*)**)**55555*+**))*)***))**55555)*)**{*)*)*)*){*5555)*)*2)**{*)***)*55555)*+222*222>$>", "[-5)*{***{*)*)*)))5555**)*)*)**222+22*))5)*2*)2)**)*){*2)))5555*{*)**)*{**)***)55555**)*)*)**{*))*))5555*)*22+22222$2", "1}(*)*){**)*{*)2*55555)2*222222222*222***)*222222222**)***)5555**)2)**)*)*2))**5555)*)*)*{*)**)**{*)5555)*))*222*2>$3", "[-))****))2)***)*)555)2222222222*22222)))*{2222222222222+*55555))*)*))2**))*2))5555)*)2)**)*)*)2)**55555*)**)*22222>$", "[-))*{*)**)**))*2*)***22+*2222+2222222*****2222222*2222222*)555**)**{**)+)**)**5555))*)**{*)2)*)*)*)5555)**)**)222>$>", ",@(*)*)2)**)+2222)*))*222222*22*222*22))))22*2*22+2222*2222**))*{*))**)***))*))55555**)*)**)*)*)*)*)5555*{*{*{**222$>", "1-))*)*)*)22*22222**))2222222222222222****)22222*222*222*2))**)222**))*))**)*2*5555)*)*{*)*)**{**+*55555**)*)*))*2>$$", "1@(*)*)*222222222*))**2*22*222*2*)*{*)5)))*+*2+222222222222*))*222222*+*)*+*)))5555)*{***)*+*)*)*)*)5555)*)**)**)*>>>", "[-(*)*22222*222*22)**)222)2)))))*{**)*5555))*)**)*)*2+2222*)**)2*222*+***)*)***55555)**))2)*)2*)*)*)5555*{**{*)2)*2$$", ",@))2222*2222*222)*)))*)*)******)*)**{55555*)*))*)*{**)*22)*)**222222222{*)*))*5555)*)*{**)**))*{*)55555)*)**)*)*)2>>", "1-)222222+2222222*)555*)*))))))2)**{**5555)**)**)2**)*)))**)*))222*2222222*{*2)5555)**)*)**))****)*)5555**)+**)*)*2$>", "-()222*222*222{*))5555)*)******)*{*)*)5555))*{*)*)))*)***))55)*2222222*22222*)*55555*{**)*{***{))**)5555))*)*{*)2*2>2", "@){222222222*)*)*55555*)*{*{*{*)**)*)*5555)*)**+*)***)2))*)5555)*2+222222*222*)5555))**{*)**{)***{*55555*2**)**)*)22$", "%(+2*222*2)))***))5555)*2*)*)*)*)*)*+*55555**)*)**{*{*)**)*5555*)**2*22222222225555)*)**)*))**)*{**)5555)))*)*{*)*6$2", "%))2222{*)***))**)5555*))**)*)2*)2*)*)5555))*{**)**)**)*{*55555*){*)222*222*222)5555*))*2)**)*+**)*)5555***{***)*)2>>", "%({22+**)*)*{**{*55555)**)*+**))*))*)*5555)*)**{*))*))*)**)5555)**)*)))222222*2**)5*)2*))**+*)*)*)*55555))**))*+**2$2", "@(22)**)*)*)**)**)5555**))*)*)**)***)*5555)*)*)*)2*{**{**))5555)*)*)***)2)22222)*)*5)*)**))*)*)*{*)55555***{**)**)22>", "%)))*))*+*)2))*)))5555){**)*)*{**{*{*)55555**{*)*)***)**{*555555*+**{*)*)22222)*)*)*2)*)*2*)**)**)*55555)){**{*))22$2", "%})*)**)*)*)**{**)5555**)2)*2)*)**)***5555))**)**)*)*+*)*)*55555)*)**)2**)*)2*)*)*)**2)*))*)2)*{**)55555***)**)**)2>$", "[-()*)2)**)**)*)*55555*)*)*))*)*{*)*))5555)*{*)2)*{*)*)*)*)555555)*))*))*)*)*)*)*)*))22{*)*)*)**))555555)*)*))2*)*226", "[-)***)*{*{*)2)**)5555)*)*)****)*)**{*55555**)**)**)*)*)**55555555*+**)**)*)55)*)**)***2**{**)*)*5555555))*{**)*{*2>$", ",@%*))***)**)**)))5555*{**+*){*2)*{***5555)*)*))*{**{**+*))555555555))*))*55555)*))*))*22)*))2))555555555***)*)**)2$2", "1-))**{)**)*))*2*55555**)*)***)*)**))*5555)*)*2*)*)**)*)**)555555555555555555555)**)**))*)*)*555555555555))*)2))**66$", "[-))*)*)*{*)2*))*)5555*{*)*)))*)*))2*)55555)*)))**)*{*)*)*555555555555555555555555)*))**)*)555555555555555))*)**)*2>2", ",@(**{**)*)*)*)**55555)*)2)*2**)2)**)*55555*{****)2)***{*)555555555555555555555555))***))*)*5555555555555555*)*)2)2/2", "1-)))**{***{*)*){*5555*)**)*)))*)*))*)55555)**{){*)*)))**)55555555555555555555555555)))**)*))55555555555555555))5)222", "[-)**)**){**)*+**55555**)*)***2)***)2*555555)****)*)*2*))5555555555555555555555555555**)**)**)55555555555555555555*22", "[-())2))**)*)**)*)5555){*)*{))*)*+)*))5555555))*)*)**))*555555555555555555555555555555)*)*)*)*55555555555555555555222", "[-)**)*2*)*{*)*)*55555**)2)***)*)**)**55555555*{*)2*{**55555555555555555555555555555555)*)*)*)*5555555555555555555*22", ",@%*)*)))*)**{**{)5555)**)*)*{*)*)**))5555555555*))):55555555555555555555555555555555555)*)*)*)*555555555555555555222", "1-))*)***{*)**)**)5555*)**)*)**+*)+***555555555555555555555555555555555555555555555555555*)**{*)*55555555555555555)22", "1@(*)*{*)**)*{*)*55555)2))*+*)*)**)*{)555555555555555555555555555555555555555555555555555)*{**)*))555555)5)5)5)5)5262", "[-(**)**)*)2)**)*)5555*)**)**{*)*)*)**55555555555555555555555555555555555555555555555555555**)**2*)*)*)**)**)**)**2$2", ",@)))2)*+*)**))*))5555)*)2*)**)*{**)*)55555)5)*))*))*5)555555555555555555555555555555555555)2222222)*)*)):)):)):))226", "1-%**)*)*)*)**+**)5555*)*)*))**)*)2*{*))*2222*2*2*2*22*2222**)*55555555555555555555555555)*)*2+*2*2*)*):))*)*)*)*52$2", "[-)*)**)**{*))*)*55555)*)*)2)*{**2)222*)*2*2*222*222*2222*22222)5555555555555555555555))*)*))2*22+*2*5))**):)*5*)*226", "1@(*)*{**)*)2**)*)5555*2)*)**)*2222222)*22+222*+2*+*+2)2*2{2)2****)55555555555555555*)**)*5)*)2)2*22*)**)5))*)))*)2>/", ",-))*)*)+***))*{*)5555))*)*)2222222222*22*2*+*22*!222*2222*2222)))**)*555555555555)*)*5)*)**)**2222)2*))***)5**5)*22>", "[-))**)**))**)**)55555**)22222222*2*22222+*222)22*2*22*2)22*2*2)**)*)*)*55555555)*))5)*)5*)5*))*2)2222*5))5*)))*)52>2", "[-(*)*+*)**+)*{**)5555)*22222222222226*2*22*)2**)*)*)*+*2*22*+2*)*)*)*)*)*55555*)*)***)**))*5)*)22*2)2*)**)*)*:)**2/6", "%!$>2)**{*)2>2**)*526$>2222*222622222$3>62))*)))262))*)*23>6222)*6$3>2)*)*)*26*)*):26>22)5*)22$66*22222*2)*):))*)22>2", "662>$6*)*22$$2))*)6$2>$322226$3$2222>$>/$>2*):*2$$2*))*>36$$>*)*>$>>$$2*)22>3$)*5)2>$2$>2*)*>$2$$>2*2*2622)*)*)**26/>", "6()2$>2*)6$>>2*)*2$6**>$>222$3=3*222$32)2$>*))6$>>2)*)2$>*56$2*)>>**2>>*)*3$3$2)**3$2)2$>*)$>2))2$22{2>$62*5)*)2226>/", "6%%*>$2)**23$2*)*>$2)*>3$22226$32)223$)*)>$2)**)$>**5*>$2)*2$>)2/255*$32*22$33*2)2$6*)*>$2*>$***>6>*222>/2))*)*)*2$26", ">()*3$6*)*)$>2)*6$32**2$3222*2$3*22>$>):)$>2*))*>$2))*$>**)2>>*$>255)>>2{2223$222>>$):)$>22$>*))22$22*22>2:*):))*22$2", "6))2>>6**)*3$22223$2))2$32)*)23322*>$>*)*>$2)*)*>>2*)*>$2):2$$*66255)/>**2*6$32*2$$>*))$>22>>*)*2$62*222$2))*)*)*262>", "6%{*3$/{*)*>322223>2**2>$*)*26$$2*22>$)*5$>2*5*)$$*)**3>2))26>2/$255)>$2))*6$322*63$)*)$>22$>*)*26/)2226$2*)5*)*)2$22", "6({2$3>*)*)3$2222$$2))*>6)*+2/3>2))2$>:))>$2)*):>>2*){$>**)2$>*>6255:$>2*)*2$3*{2$$32**>$22$>**)2$>)2*22>6*)*)*)*26$>", "6))23$2)2)*3$>222332*526$*):)2$>*)*2$>*)*$>2*)))>$25)*>$2)*2>$)2$255*>>*5*)2>$22*63322)$>2*>>*)*2>2**222$2*)*)5)*2$22", "=>>$332***233>222$3>)*6$6*))*2>$)*)*>$62$==2*)**$>2)**>$>*)>$>*26>552$$)*))*3$2>$==$6223$2)$$2))$>$6>3>$322*)**)*226$", "=33===22)22$$$$333=$$3==*)*))*>>:)*)$==3==$3>25)>$*))*3==3$==$>$2$22>>2))**23=>$>$=<=$$3>*)26>22$$>$>$$3=$2)*5)*)2>22", "3====$2222233>=$=$$====$)*):)2$$)))2>$===3$>$$2)$>2**2>$====>$>2)2$>$2)**5)6=3$>$3$===$>2*)*2$/33$>2$>3$=3>*))*)*22$6", "6>3$$3$622222$$3$>>$>$$>*5)*)*)))**$>$>$$$6$>6$25*)5)22$>$$$$6$>5))**)*5)*2$$$6$>6$3$3=2*22:))2>$6$>$>$33$$2*)*))*2>2", "{{>$333$62>2>>333$>>$6>/)**)*5*):)>>$6$2222>/$>2*)*)**3>$6>6>$6/5**)))*)*)2>6$>2222$3$3$22)2)*6$>$6/2*>$$333*):)*)2/6", "@()3$$3=$2/6/22222*>$$>>*)5))*)*)*$6$>2*))*6>>$>2):))***)*2$2$>6*)22222**2$$6$2*)*)6$3$>222***$6$6$))**33$$32*)*):26/", "+{{23=$3$2>222222*2$>>$$+*2**+**26$$>$2)*)**$6$>2*)**)))*)*>$>$$622222266>$>$>2):)**>>3$>*222>>$>$22*+26$3333*2)*)2>6", "+2>23$3=36/222*2*2>$3$332262>2262$33$3*)):)*>$6$2)*5))*)*)*$>$33$2>/6/6/2$33$$)*)*)*>$$3>222>=$=$322622/===$3222)522/", "+!6$==$=$>2222222)>$=3=$>/6/2$2>/==$=3*)*)))/>$6$*))*:)*)*)3$3=$26/62>2>>=3=33*)*)5*6$6$$2)2$3=3=32$22263$===22255*62", "!+6$3==$=/62*2)2**>3$=$=26/6226/>33=3$*)*):)2>$>>*)*))*5)*23=$==226/6/6/2=$$=$6*)*)*2>$>>222>==$=$222222$=$3=$22)5222", "+26$====3>*222222)/=3=33$26/6$22>$=$=3)*5*)*2$>/>2):)*)*)*6$3=$=2$262622>$==33/6*)*)2/>>$222$$==$322222233==$62255*22", "+!63$==$=222*+**)*>=$3$=22>26226$=$333**))*)2$6$>**))*5)*2>$=33=26/6/6/6$=3$=$262*)*2>>$>2*23===3>222222$$=$3$22)5222", "+26$====$62*22*))*>$===$6/2>/6/6$3==$$))*)*)2>$>$2)*5)**)2$33$=$6/62>/62$33=3$6/62))2$$6$222$==$=$222222>=$==>22:5*22", "!66>$===$222)*)*)*6=$3$=2>226/62>$3$=3*)*5)*2$6$6*)**))*22>$==3=26/6222>>$=$=326/2**2>$6$*)23$==$>22*222$3=$=$22)5+22", "662$=$===2*)*)*))*2$333$22222>22$=3=33*))**)2$6$>2:))*522$2=$3$=/6***)**$=$33$$2622)2$6$62*2>=$3$>**{*22>$==$>2255*22", "666>3==$32)))*))*)*$>$$>)*)*/2$2>$=$3$*)*)5*2>>/>2)):)*262>=3===22))5*))23==$326/>2*2$6$>2))2$>$32)55522$==3=$22)5222", "666$$=$=32**)5*:)*)>$6>$*)*)6226$33==$)*5*))2$$>$*)*)*)2/6/=$=$32*)*))**2$3$=32262$22>$6$*)*2>$>$2*555226$3$=>>2:5*22", "626>$=3$=2)**)))*)*>>$2>5*5*2>/2>$=$33*)*)**2>>$62)*))262>>$=33=*)*)*5)5*33=$32$22222$6$6**)*>$>$6*)5522$3==$$22)5222", "666$3$==$>*)5)**))*$$>$>*)))/266/=3=$3*)):))2>/>>*:):)/6/2$3=$=$)*):)**)*>$3=$22>/62>6$>3*):)$6$6$)*5522>=$==2>255)22", "262>3=$3=2*)**)5)**>26$>*)**6>2/63=$==*)*))*$$>>$))*)*222623$3=3*5))*)))*>$=3=2>2262$$$2$)))52>$>$)*5522$$==$>/2)5222", "!6>$$=3=$62)*5*)*)*>$$6$5*)52/66/3$=332)*)*)>>$/6*))*)6$2$>$==$3)**)):*)*2=3$=$2/>/>$6>$2**552$>$6*)*522333$32>2:5*22", "+623=3$=$22:))*):)2>>$6$))**62/62$33$=2*5*52$2>>25*)**2262$3$=3$))*:)))*)2$3=$>6262$3$6>2))55*6$>$2*)526$===$>/6)5222", "+63=$3=$622)*)*22222$6$>*2*2$>2$26$==$>2*)2$>$>$*)*5)2$>$$>==$3$2*+22**5)*3$3=$$>/>3$6$>*5*5552$>$3!*:6$3$3$>26255*22", "333$==$32>2*)*>$6>6$6/62>266>22226$=$3$>>6$6$6$2)*))*233$33$33=$6$>$>5))*)23=3=3$3==$>$2)*55552>6$>$>3$3$3=$6/6/)5+22", ">=3=3$=2$22*)2=3$/$2>3<=$$>/$22>=$6$=3$$===$>$2*2>$$2>$=3$==<=$>$>$$==/*)**=$$===3$3=$322*)5555/$>$>$>3$=3$>/>/655*22", ">3$=$3>22>222<=$>>>$====<=>632$$<=2>$3=====<$>*6==>==$=$====<==$6$===$==*)*>=<==$==$=32222*5555)$3$>$>$3$=>2>2>2*5222", "3=33$6/>2/6$==<$>$>$==$2=<$/=2=<=<22>$=<3$$==2*=$2*2====$=<<<=$>$3<=>)$36*)$==<<3=$==$2)*22555*)2$6$>$=332/6$2$2)5*22", "26>26/622622*=32*5*=32552$3522>$=2$==222==22=3*)*==$226$==$6)*3=2**23$)*26$=$>$>>$2)*)2*)5555*)2*22$2226$2>6255222", "{!26/62$2$22)=$2))*=$255233*222$==622==$)))$=>>$=)*)$==6/62==$2*23=2))2=3**6/>==222$3$*)*2)*5555)2*)*)6222$2>/2/)5*!2", "{!226/62626**==2*)233*55*=$)2223==2$2===*:)=$$6=$)5*==$62/6==>2*2$=2*)2$=2)>2$3$>/6$36):)2*)5555**+*)*$22262>>>2)5222", "{!!/>26/6/22)$=2)*2==6*)2$3)222$<=>2>$==)2*==6$==**)===/6>$<<==22==25*2=$22/6$==2>6$3/*))2+*5555)22222>>22/>/2$255*22", "+266$6/2626*)==2*22==6*22=3*222>=<$3$===$2>=$$6=$)))$<$6$$3=<=3$3=$2*)23326=3===3$$=$>))***)5555*22222$$/>>/6>22*5222", "+!6/626$2$22*$32222==/2*>==5222$==$3$=<=6$6==22==***==3$3=3<<=$3>==2)*2=$2$$3===$3333$):)2*)555)222222>>6$2>2$2655*62", "{26>$222226*)==$222$<3*+$=$)2223=<3$3===$2$<322$=*)*==$33$==<=3$$=<3*)$3$26$$==<3$$$32*)*+*)55)*226222$$6>$>/6$2)522>", "{!62>2$2>/6**==22222==6$==6*222$==3$3$===3==$*)$=323==3$==$<=$$>6$=<22332*>3$===$333$3222**555*222222*>$2$>$>622552/2", "{!2>$2262622)$=>2*2)23$=$6*2222>=$==>$3==$3==32>$>$===$2))2$6$==33$$62222)55552*222)*)2>$>$6$2/2*5266", "#26/62$2/22*)*2222)*)5**22222222/262622/>$$2**5*)*2**>$3$3>22262$>$>/2)*)**2226$$$>32***)5555*+*+*2*)*>26$6$2>625)22/", "{!!>/62262>*)22*22)**555**2*>2262622/6*>2>6$)))*))))5$=3=$2$2/2*>/>>>*)5*))26/6$33$$22)))5555*2***)**)/>/>$6$2225*262", ")!22>222222*)*2222*5))55+*+2/22222/62226$2$2):*):*5**=3$3=22262)$>>$6*)*)**222233$>32*)*55555+*{2+*))*226>/6$2225)2/6", "#!2>/26/622)*22)2*)*):55*2*2622/2622222/6/>6*))*))*)*3$=3$22222*26$/>*)*5)*622>$$>3$2))*555552*2*)*)**2>2$6$>22**)262", "{+!26222222*)2222)*)*)55)22*>22222222226$6$2*)*5)*))233$3$2222222$>>$*))**)2222$>$$>2*)*5555)*2)**)*))6/6/>2>/2+5*22/", "{+22/222222)*2*222)5)*55*)222222222222*62$6$):)*)*5*2$33$>22222*6$6$62*5))*22223$>>$*):)5555)*2*+*)***22>>/>/6**)5266", ")+!2622222**)2+22*)**)55)2*222222222222/>2>2*))):)*)*>3$3>2222222>/>>**)**22222>$>$>2))*5555)2)2**)*{*222/>262+**)2/2", "++22222222*)**2*2**))*55**+2222*222222*>6$2$))**)*))2>$$3$22222*2>$6$2)*))*2222$>>$>*)*)5555)*2*+)**)*222>2>/2*)5*266", "+{+222*2*2))*!222{):))55)22*62*+2*2*2*+/>/>6*:)))):*2$>3$6*2*2222$>$6*)5*)*22*23$$6$)*5*5555)*{***))*)22>/>/62)*))2/2", "+{2222*+2*)*)2*22**)**55*2*222*2*+*+22*6$6/>))*:*)))*>$3$>2*+*{22>$6$2*))*2)222>6$2>:)))5555)*22{***)*2226262**)*5262", "!){22)2*2)*)*2!*22)*5))5*)222)2)22*2*)262$6$5*))):*)2$>$>$)22*2*6$2$>*)**)*2)*2$/>>$))**5555)2***+*{*)2222$22*)*5)2$2", "!)+222*2)*)*)2*22)*))*55)2*22*)2**)2)2*2$6/6*):)*)))*6>>$6*2*)2*6$>>>)*)52*2*226>>/2)*))55555**+*2)*)**222222)))5*222", "+#)22)*)*)*)*2222*)**)552*2+2***{2**2*+$2>>$)*)*)*:**>/$>6*)*2)*>$2$/*)**)2)*{*$2$62*5*55555)2+*22***{2*22622*5*5)22>", "+{{2*2)2)*)5)*+*22)*)**)22222))**)2))**>>/62*)*)*))))$6>$$*+*)2*>>$6>*))**)2**26$2>2*)*)55555222)22{2*2)6/22*)5)**2>/", "+{)22)***))*)2*+22*)*)*)*2*2*5)2)*)**)26/6$${***)5*)*2>/662*{**)$$6$6)*2*{*)2)*62$22)*)*55555**2222**)*22222*5*55)2$6", "+{)2***))):)*)2*2*+*2)*)2*+2*)*)*{**{**/6>26**)))*)*52/>2$2)**)2>2$22**))**)*)2/>222*5*)55555)2)222*{2*2222)))555)262", "{+)*+)2)**)*)**2222*)**2)2*255)***2222262/>/2222*)*)*)62$262*)2>/>6$*))**)2222222226*2)*)5555)**2222**+222**555):52/6", "+{)2*2**)2):))*+*)2222+**+*)55*))*!22226$2262626/)):)*262$26>/6/6/62)**)*222222622222222*55555)22222222222))5*55)526/", ")+{*{*)2***))*)*222*2222)*25)5)*)*222622226/62/62**)))*/626/2>2>662**)*))*26262222222222*555555)222222*2*2*5555555226", "{+{2*)2*+*)):))*{**+*2*)**5555)*)222222226/62/622))):*))26/26/>2/2*)))*)**622/2222222222)555555*222*22222)55)55555222", "{)2*)2*)*2)*)**)**+22{2*))5555*)*)222222222226222*:)*)***22622222*)***)*))2/2222222222*2)55555)*)*2+2*+*2555555)55*22", "##)2))*))):)*5)*))*)**)55555555*)*)*)***)*)*)***))*))5)))***2*2*)*))))*)**))*)*)*)*)5))55555555*)*)*)**))555555555222", ")#)2*:)*)*)*))*5)*)*))*5555555))*5*)*)))*)*)*))*)*)***)*:)))))))))**)*)*))*)*))*)*)*)**)555555*)*)**+*)*5555555555*22", "##{2*)):):)):)*)*)5*5*)5555555):)*)5):)*5*):)5*)5*5)5)*)))**:)*:**))5*)5)*)*)5*5*5):)*))555555*)*)*)*)*)5555555555222", "##)2{*))*)*)*):)*5*)*)*5555555))*)**))*)))*)**)*)*)**):)*5)))*)))5***)**):)5**)))*))*5*555555)*)2*)*)*)55555555555*22", "{{)2***))*5*)))*)*))):)5555555:))5))*):)*5)*)5)*))*))*)*)**:)*5**))5)*5)*)*)))**)**))*)*55555*)*)*)*)*)55555555555222", "##{222):)*)5*)*5)*)**))5555555))****5*)*)**5*)*5*:)5*5)):))*))*))**)*))*))*)**5):)5*:))55555*)*)*)*)*)555555555555)22", "#{{2)2*)*))*){{)*5):))*5555555):))5))*)5*))))*)*)))**)**)):)):)):)5*):)*5*5*5))*))*)))*)5555)*)*)*{**5555555555555222", "##{2222)*5*)){{{)**)*5*5555555)*)*)**)*)*5**)5*))**))*5)**)*)*)*)*))*)*)*)*)**)*)*)*):):555**)2*)**))5555555555555*22", "%#{++2*2)*)*){{+))))*))55555555*):))5*5*)*)5*)):)5):))*)5)*):)*5*)*5)*5))*)))5*5*5*5*)*)55))*)*)*)**55555555555555222", "@()22++**):)**{{{)*5*)*5555555*))*)**)))*))*)**)**)*5*)**)5*))*)):)**))**5*5**)))*)))*))55**)*)*)*))55555555555555*22", "}%)22+22+*)*)){{+))*):)55555555):)*5))**5):)*)5*))*)*):)))*))*5)*)*)5)*5)))*)))**))**5):5*))*)*)**)555555555555555+22", "@})2)2++2*)):)*{{{*)))*5555555)*)*)**5*))*)*5*)):))*))*):*)*:)*)*))***)**)*):*5*5*5*)*))))**)*)2))5555555555555555*22", "}@%*2222+!*)*)))+{{**))555&&555*)):))*):)*))*)*)**5):))*)):))*):):)))5*)5*5*))*))*))5*****)*)2*)*55555555555555555222", "@%@)2)2+2+2*)**){{{)*5*55(&)*5*))*)*))*5*)):))*)*)*:))*)*))*))*):)*))*)*))*)*)*)**))*))*)*))*)55555555555555555*22", "}@(*)22+2+22*5)*{{{{)*)55)&&&5:))*):):)):))*5*))*5*)*)))*5)*):))*)*))*):)*)):)5*5):)))*+**)*)**)555555555555555555222", "}}%*)2+2+22)2)*)){+&))*555&&&)))*))*))**)**)*)**5)):)***5*)5*)*))))*))*)*5**)*))*)*)**22)**)*))5555555555555555555*!2", "%%%)))2+2{222*)*){{+{))555&&&(5*):))*)5)*)5)):))**))*5))*)*)*))*)*))*)5*)))5*)*)*)):22***))2**55555555555555555555222", "}@))*))*2*2*22*)**{&+))555(|&#))*)**5*)*5*)**)5*))*))*5*)*)*))))*):))*))**)*)*):):*+*+22)**))555555555555555555555*22", "%%%*))*)2+2+2+!!)#{+&+)555)&&&):)*5)*)*)*)):))*)*5*5*)*)5):)))*))*))*))*5)5*)5*))*+*22*2)*)*555555555555555555555522>", "}@@)*)){{2+++!!+!++&+{55555&&|))*))*)*5))**))*)*5)*))*)**))))*)):)*)))*)**)*)*)***222*2{*)*)555555555555555555555526$", "@})))*)*){2!!+!!!!++{)*5555&'&{)5*):))**5))*5*5)*))*5):))){){)*)*))*))))))*5*)5)2+*2*+2***)555555555555555555555552/6", "}}@:*)))*))222+2+2++)*)5555#|&{**)*)){{)**5*)*)*)**)**))*{*{*))*)5*)))))*:)))**2*2222*22{55555555555555555555555)*2$6", "}@%))*)*))*)*2*22+222*55555(&&|))):)+|.{)))*))*)*5):)))*{{{)*)*5)**)*){*)))**)222*2)2222555555555555555555555555*)2>2", "@%5*))*)*))*)22++!+++++55555&.|)*))*&|;{**)*5*5))*))*:)*#{)*)*)**))*)+))*)**222*+222*2)*5555555555555555555555)*)*2>/", "%}%*5*5)*:))*)*!]&]|]]+&{)55&&|{):)*&..+)5*)*)**5)*))*))))*))5*)))))*{{{)**+*2)22*2*+2*)555555555555555555555)*)*)2>>", ")(5))*)*))*)*))2+!!!+||!|&|&&&|&*)*)&;|{)*)5)*))**):)*5***))**))){)))){+)22*2222*+22*)))55555555555555555555)*)*)*2$2", "##{**)*)5*)*5)*)*22+!!+|&|||&.|&)*)*&|.{)*)**5):))*)*)*)))):))){+{{{*{+!!2*2+*2*2*2)*):*5555555555555555555)***)**262", "#))2)*):)*5)**5)))*22+{)++&|||&{*5)*&;.+*5*))*)*):))):)*)**)*){+{{+++2!!+222*22+22)*)*))555555555555555555**)))*))2/2", "##{22*2)*)*)))***))*2***)+*)++!*2*))&|;{))):)*))*)*:))*5*5)*5)+{+++!+2+22*+*22*2*)*)5*)*5555555555555555)*)****)**222", ")#)*2222*)*):*))5**))2*{+|++))*22*2*]..{**)*))*:)))*)*)*))*))!&]+2+]|!*2)2222)2*))*)*):)555555555555555)*)*))))*)5)22", "#){22*+*22**)):)*)5*)*))||||!)22)222|.;+*)*)):)))*:)):))****!|]!+22|+]+222*+*2*))*)5*))*55555555555555**)*)****)55222", "##)2*+222*+2**)*)*)):)55{&||||++22*2||;&22*2*2****+*222*222!]]&!2*2+]|+2*22**))*:):*)*))555555555555)*))*)*))*)555*22", "#){22*2*+2*2222*))*))*555)&||.||+2+*|;.]*22*22222222*2*22)2&|]!+*22++||+2)2))*)))*))):*)55555555555*)**)**)**)5555222", ")#{*2222*222*+*222***)55555(&||;||+2].;!2)22++|++*2*+22)22!|]|+222*2+]||2)*)*)*5*))**))*)55555555)*)*)*)*{*)555555*22", "##)22)2*222)222*2*2+2*:)55555#|.|;||||;&222*+;~]*2+22*222*|]|+2*2)222!||&)5*)5*)*5*5)*5*55555555)*)*)*)*)*)5555555+22", "(){2*22+*2*22*2+22*2*+)**)*))5)+|.|;.~|]*2*+|.;&22*2*2+*2!|||222*22*){&|&+*)*))*)*)*))*))55555***)*)*)**))55555555*22", "}%)22*2*2+2*2+*2*+222**)*)****22+].;|;.!2+22|;~!2*22+*22+|||!2)22)+{*)+||&)*5*)5*))*5*):)555*)))**)*)*{*5555555555222", "@@()*+222*22*2222*2)2*)*)*)))))|]2+|~|]22*2+;.|+222*22*2!||])22*)+&||))&||))*)**)):)*)*)*5)*)***))*{**555555555555*22", "}}@*)2*2)2*2+*2*22*22)*)*)****]|||2*2+*+*22].;|2*+*+2*22+||+2*)){|||||){|+)*):))5**)):))*)**)*))2***)5555555555555222", "@}))*)*+222+*22{2*22*)*{**)))*+;.;|!2*222*+|;.]*222*2+2*2*+*))**{||||||)*))*))**)))*)*222*))*{**)))555555555555555*!2", "}@@*5)*)**222*2*22+22)**)***)*++;.||!22*222|.;+2*2*2**)))*)*5*))||.&&|||#*5)*)5)*:)*22*2*{**)*)**)5555555555555555222", "@%@))*5*)))*2+22*2*2**)*))))))*2+;~||+2+*++|;|)2)*))))**)*5)*):)|||{)|.||{*):)**)2222*+22**)*)*)555555555555555555*22", "}%@**))*)**)**2*2+2*+)*)**)*:5))){|.||)*)*&~.&*)*))*)*)):))*))){|.|*))||.|{*)2*222*2)22*2*{**)55555555555555555555222", "@}5)):)):))*))*+2*22**)*)*)*)****){||.|)*)|||+)))**):)*5)**):*)&|.&)*))||.|!2*2+*22*22*2+*))5555555555555555555555*22", "}}(*)**))*))*)*)*2*+)*)*)*)*)*22222+||||))||.)**5)5*)*)*))5*))*|~|+*)*2+|;~|!+*22*+2*2+*2)555555555555555555555555+22", "@@@5*)5**)*:)*)*)))**)*{*)*)*)+*2*22!|;||||||*))*)*)*5)*)**)**{~||+222*2!||~.!2*22*2+2**)*555555555555555555555555*22", "}}(*))*)):))))*5)**)5*)***)*)**2+22)2!||||||!222*22*222*2*+222]|;|2*2*22*!|;|;+2)22)**))*)555555555555555555555555222", "@}5)*5*):)*):*)*)))55555))**)*22*2*]|+!|;|;|!+*22+||+*22*22*2)|~.]22+22{22+||~+22)*)*))*5*555555555555555555555555*22", "}@%*)*)))*)*))5**:)55555555)*)2*22+|||2+|||]*22*2|||!2*+22*222|;.!*2*2+|||22|!{)*))*):))))555555555555555555555555222", "@%@)*)5**))5*)*)))555555555555)*{*2|||+22+2+2*22+|||+222*22+*+~~|2+22+;~|~|&))):)*:)*)5***)55555555555555555555555)22", "}%@*5)*))5**)*)5**555555555555)))*)+|||+*2*2*2{2|||!2*+*2)2*2]~||22*)+.|~|.||+)*)))*))*)5)*55555555555555555555555222", "@@%*)*):*)*)5*)*))5555555555555**)*)+||+)*)*+*2+|]|2222222*+*|.;{))*)+~||&;.|.|{):)):*)**))55555555555555555555555*22", "}}5)*)*))*5*)):)*5555555555555))*5)*)&&|{*)*)))&|&{))5))5)*)))+&**5)*{..|))||||||{*)))*)):*55555555555555555555555222", "}@%*)5*):)))**))*5555555555555):))*))+|+&)*)*)+|+&*:)****)*)**)))))*)+|;&)*){|.|||&)*:)5*)))5555555555555555555555*22", "%@%:)*))*)**)5)*)55555555555555*)**5*)+&+{)5*{+&&)))*))5)*5):))*:**)){~.&*)*)){||&||{))**)**5555555555555555555555+22", "@}@*)*5*)*5)**):55555555555555)*)5)*)*)&&+)*){&++**)*5*)*)*))*)*))5**{|||*))*)*)&||&|)*)):)))555555555555555555555*22", "}%()*)*)5)*)5)*)55555555555555))**))*))++&+){+&&)))*)*)*)5**)5*))*))5+~|&):)*5)*))&|{)):))*:)555555555555555555555222", "@@@*)5*)**)**)*)555555555555555*5)**5)*)&+{{{++))*5*5)*5)*))**)5*5**){|~&*)*)*){{)*))*)*)*))*)55555555555555555555*22", "}}@*)*):))*5)*)555555555555555)*)*5){+{)){{{{{{)*)*))*))*))*5))*)*)))+.|+)*)))||||&+{)))):)*)*55555555555555555555222", "@%@)*)))*5)*)5*555555555555555)5*)*)){{)*{+{+{)*)*)**5**5*:)**:)*):)*{.;&)5**&||&||&|++{)))*5)*5555555555555555555*22", "}@))5**)*)*)*)5555555555555555*))*)*)+{+)){{{{*)*5)5)*))*))*)))*5)*)5+|.&*)))&||&&|&&|&+|+{{)*))555555555555555555+22", "@}@**)5*5*):)*55555555555555555**)5*){{)*)*))*)))**{))):)*)):)*))*)*)+.;+)*:*{||&*)++{|&+&+{+#*)*55555555555555555*22", "}%@)))*)))*))55555555555555555))5)*)*)){))*)*5):*)){{)*)*)5*))*5*))*){;.&*))))|&|)*)*))){+&+{{:)*)5555555555555555222", "@}5*):)**5)**55555555555555555)**)*)))+))*5*)**))){{)*):)*)*):)*):*5*{.|+))*))&||))*)**)*))){*))*)*)55555555555555*22", "}@%)*)*5)*)55555555555555555555)*5):*))*))*)*))*)))+)*))):))*)))*)))))+&)*5***&||{*5)))*)))*))))))))*))55555555555266", "@%@*5*))*)*)555555555555555555)*)**))*){)*))):)))+))):)**)*5*5**5)***)*)*)*5))+&|&)**5*){++{{{{{){){)))))*)5))5)*)2$2", "}%@)*))**5*5555555555555555555:):)))*))*))):*)))*))**)*)5*)*)*)5)*5)5*)5*))*)*)||+)))*){&{&{+{+)+)2)){))*5)*****))262", "@}5))*:)))55555555555555555555)))*:):)*))*)*))*){)*))*)*))*))*)5*)*)*)**):))*5*&|&{*5*){++{{))*)))))**)*)*)))))5*:22$", "}}(*5))*5*555555555555555555555*))*)*))*))*))*))*)*)*5)5*)5*5)*55)*)*5))*)*5*))+||{*))*{{&{*)*)**)*)))*)))*)*)*)))262", "@@@)**)*)555555555555555555555*)*5)*)*))*))*)))*)*):))**)**)**)555):))*5)*)*))*{&&{)*:)){++#*)*)))*)*)))*))))):)**2/6", "}%@*)5*)5555555555555555555555)5*)*)5*5*))*)*)*)*))*)*))*5)*)5)555:))**)*5)*)*))|||))))*{&{{)))5**))){)))))*)*)*5)2>2", "@}))*)*55555555555555555555555)*)*):))*))*5))*)5):)):):))*)5***5555)*5)*)*)5*5*)+&&)***5*{+{{*:*)5*){*)*)**):)*)*)2/>", "}@@)*)5555555555555555555555555*)5*)*)*):)*)*5**)**)*))*5)*))))55555)*))*)*)*)*){||{)5)*)){+{)))*)))){*)*))*))5*)*26/", "@%@*5*555555555555555555555555))**)*)*5)*))*)))*))*5)**)**)**5*555555):*5*5*)*5*)&{*)**))*{{{{)*)**{*)))*):))**):)226", "}}5))55555555555555555555555555*5)*)5*)*)):)5**5):))*5):))*5)*)5555555))))*)5)*))*))*))5*)){{{)):))*){))))*):))*))2$2", "}@%*55555555555555555555555555)*)*5)*)*):*)**))*)*)*)*))*5)*))*55555555**))**))**)*):)**)*))+{)*))*)*)*))*)*)*5)**22>", "}@@5555555555555555555555555555)*)*)*5)*))*)):)*)):)*)*)*)*):))555555555):))):)5)*5*)*)):)*){+{)*):))*){*)))*)*)5)26/", "}-@555555555555555555555555555)*5)*)*):))*):)*)):)*)):):)*5*)**5555555555*):*)**)*))*)5*)*)*){{{)*))*)*)))*)5*)*)*2/6", "@4_5555555555555555555555555555*)*):))*)*5))*)5*)*)5*)))*)))*5)55555555555:))*)):))*5*)*)):)*{+{)5)*:))*))))*)*5*)2>6", "11@555555555555555555555555555))*)5)**)*5**))**)*)**)**)5**))*)555555555555)*5*))*:)))*5*))*)){{**)*))*)*))))))*):22/", ",1_555555555555555555555555555:)5**))5*)*)):)5)*5)5)*5)*)):*))*55555555555555))*)))**)*)):)):*)*))*5*):))*)*)*))*)2>6", "[,@555555555555555555555555555)**))*)*5*))*)***))***)):)*)))*:)555555555555555:):**)5*5)*)**))*))*)))*))*)*)))):))2/2", "[4_5555555555555555555555555555))*):)*))5*5*)))5*))5)*)*5*):)))55555555555555555))5*)*)*5*)5)*5):*5*):)*5)*))*)*)*26>", ",[@555555555555555555555555555)*5)*)*)**)*)):)**)*)**)*)*)*)***5555555555555555555*)*)*)*)**)*)*))*)*)*)**)*))*)*52/2", "[,_5555555555555555555555555555**):)):))*)*)*)5)*5*)5*)5)*5*)5)555555555555555555555):)*)5)):)*)*)):)):))5*)*)5*)*2>6", "41@555555555555555555555555555)))*))*)):):)5*)**)*))*))**)))*)*55555555555555555555555)5)**)*)):):)*)*)**)):)**5))2$2", "[4_555555555555555555555555555:):))*5)*)*))*):))5*):)):*)5**5*)5555555555555555555555555*)5*)5*)*)*)*5*)5)*)*)))**262", ",[@5555555555555555555555555555555555555555555555555555555555555555555555555555555555555555):*)))*)5)*)***)5)*:)*522$", "[,_55555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555:)5**))5))5**)))*))262", "41@5555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555:5*5*)5):):)5*2/2", "14_555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555*22", "1[@555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555222", "41,@^@@^@@^@@^@@^@@^@@^@@^@@^@@^@@^@@^@@^@@^@@^@@^@@^@@^@@^@@^@@^@@^@@^@@^@@^@@^@@^@@^@@^@@^@@^@@^@@^@@^@@^@@^@@^@5)2", ",[1141[,11411,1[,11411,1[,11411,1[,11411,1[,11411,1[,11411,1[,11411,1[,11411,1[,11411,1[,11411,1[,11411,1[,11411,1,55", ",[4,[,14[,1[4[414[,1[4[414[,1[4[414[,1[4[414[,1[4[414[,1[4[414[,1[4[414[,1[4[414[,1[4[414[,1[4[414[,1[4[414[411[4[4[@"}; libiodbc-3.52.16/iodbcadm/gtk/errorbox.c0000664000175000017500000002143414424170750014727 00000000000000/* * errorbox.c * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "gui.h" #include "error.xpm" static gint delete_event (GtkWidget *widget, GdkEvent *event) { return FALSE; } static void error_ok_clicked (GtkWidget *widget, GtkWidget *error) { gtk_signal_disconnect_by_func (GTK_OBJECT (error), GTK_SIGNAL_FUNC (gtk_main_quit), NULL); gtk_main_quit (); gtk_widget_destroy (error); } void create_error (HWND hwnd, LPCSTR dsn, LPCSTR text, LPCSTR errmsg) { GtkWidget *error, *dialog_vbox1, *hbox1, *pixmap1, *vbox1; GtkWidget *l_text, *l_error, *dialog_action_area1, *hbuttonbox1, *b_ok; GtkAccelGroup *accel_group; GdkPixmap *pixmap; GdkBitmap *mask; GtkStyle *style; guint b_ok_key; char msg[1024]; if (hwnd == NULL || !GTK_IS_WIDGET (hwnd)) return; accel_group = gtk_accel_group_new (); error = gtk_dialog_new (); if (dsn) sprintf (msg, "Error : %s", dsn); else sprintf (msg, "Error ..."); gtk_object_set_data (GTK_OBJECT (error), "error", error); gtk_window_set_title (GTK_WINDOW (error), msg); gtk_widget_set_size_request (error, 400, 150); gtk_window_set_position (GTK_WINDOW (error), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (error), TRUE); gtk_window_set_default_size (GTK_WINDOW (error), 400, 150); gtk_window_set_type_hint (GTK_WINDOW (error), GDK_WINDOW_TYPE_HINT_DIALOG); #if GTK_CHECK_VERSION(2,0,0) gtk_widget_show (error); #endif dialog_vbox1 = GTK_DIALOG (error)->vbox; gtk_object_set_data (GTK_OBJECT (error), "dialog_vbox1", dialog_vbox1); gtk_widget_show (dialog_vbox1); hbox1 = gtk_hbox_new (FALSE, 6); gtk_widget_ref (hbox1); gtk_object_set_data_full (GTK_OBJECT (error), "hbox1", hbox1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hbox1); gtk_box_pack_start (GTK_BOX (dialog_vbox1), hbox1, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (hbox1), 6); #if GTK_CHECK_VERSION(2,0,0) style = gtk_widget_get_style (error); pixmap = gdk_pixmap_create_from_xpm_d (error->window, &mask, &style->bg[GTK_STATE_NORMAL], (gchar **) error_xpm); #else style = gtk_widget_get_style (GTK_WIDGET (hwnd)); pixmap = gdk_pixmap_create_from_xpm_d (GTK_WIDGET (hwnd)->window, &mask, &style->bg[GTK_STATE_NORMAL], (gchar **) error_xpm); #endif pixmap1 = gtk_pixmap_new (pixmap, mask); gtk_widget_ref (pixmap1); gtk_object_set_data_full (GTK_OBJECT (error), "pixmap1", pixmap1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (pixmap1); gtk_box_pack_start (GTK_BOX (hbox1), pixmap1, FALSE, FALSE, 0); vbox1 = gtk_vbox_new (TRUE, 0); gtk_widget_ref (vbox1); gtk_object_set_data_full (GTK_OBJECT (error), "vbox1", vbox1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (vbox1); gtk_box_pack_start (GTK_BOX (hbox1), vbox1, TRUE, TRUE, 0); l_text = gtk_label_new (""); gtk_label_parse_uline (GTK_LABEL (l_text), (text) ? text : ""); gtk_widget_ref (l_text); gtk_object_set_data_full (GTK_OBJECT (error), "l_text", l_text, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (l_text); gtk_box_pack_start (GTK_BOX (vbox1), l_text, FALSE, TRUE, 0); gtk_label_set_justify (GTK_LABEL (l_text), GTK_JUSTIFY_LEFT); gtk_label_set_line_wrap (GTK_LABEL (l_text), TRUE); l_error = gtk_label_new (""); gtk_label_parse_uline (GTK_LABEL (l_error), (errmsg) ? errmsg : ""); gtk_widget_ref (l_error); gtk_object_set_data_full (GTK_OBJECT (error), "l_error", l_error, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (l_error); gtk_box_pack_start (GTK_BOX (vbox1), l_error, FALSE, TRUE, 0); gtk_label_set_justify (GTK_LABEL (l_error), GTK_JUSTIFY_LEFT); gtk_label_set_line_wrap (GTK_LABEL (l_error), TRUE); dialog_action_area1 = GTK_DIALOG (error)->action_area; gtk_object_set_data (GTK_OBJECT (error), "dialog_action_area1", dialog_action_area1); gtk_widget_show (dialog_action_area1); gtk_container_set_border_width (GTK_CONTAINER (dialog_action_area1), 5); hbuttonbox1 = gtk_hbutton_box_new (); gtk_widget_ref (hbuttonbox1); gtk_object_set_data_full (GTK_OBJECT (error), "hbuttonbox1", hbuttonbox1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hbuttonbox1); gtk_box_pack_start (GTK_BOX (dialog_action_area1), hbuttonbox1, TRUE, TRUE, 0); gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox1), GTK_BUTTONBOX_END); gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbuttonbox1), 10); b_ok = gtk_button_new_from_stock ("gtk-ok"); gtk_widget_ref (b_ok); gtk_object_set_data_full (GTK_OBJECT (error), "b_ok", b_ok, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (b_ok); gtk_container_add (GTK_CONTAINER (hbuttonbox1), b_ok); gtk_dialog_add_action_widget (GTK_DIALOG (error), b_ok, GTK_RESPONSE_OK); GTK_WIDGET_SET_FLAGS (b_ok, GTK_CAN_DEFAULT); /* Ok button events */ gtk_signal_connect (GTK_OBJECT (b_ok), "clicked", GTK_SIGNAL_FUNC (error_ok_clicked), error); /* Close window button events */ gtk_signal_connect (GTK_OBJECT (error), "delete_event", GTK_SIGNAL_FUNC (delete_event), NULL); gtk_signal_connect (GTK_OBJECT (error), "destroy", GTK_SIGNAL_FUNC (gtk_main_quit), NULL); gtk_window_add_accel_group (GTK_WINDOW (error), accel_group); gtk_widget_show_all (error); gtk_main (); } void create_errorw (HWND hwnd, LPCWSTR dsn, LPCWSTR text, LPCWSTR errmsg) { LPSTR _dsn = NULL; LPSTR _text = NULL; LPSTR _errmsg = NULL; _dsn = dm_SQL_WtoU8((SQLWCHAR*)dsn, SQL_NTS); _text = dm_SQL_WtoU8((SQLWCHAR*)text, SQL_NTS); _errmsg = dm_SQL_WtoU8((SQLWCHAR*)errmsg, SQL_NTS); create_error(hwnd, _dsn, _text, _errmsg); if (_dsn) free(_dsn); if (_text) free(_text); if (_errmsg) free(_errmsg); } libiodbc-3.52.16/iodbcadm/gtk/gensetup.c0000664000175000017500000010641614424170750014723 00000000000000/* * gensetup.c * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "gui.h" static char* STRCONN = "DSN=%s\0Description=%s\0\0"; static int STRCONN_NB_TOKENS = 2; static char *szKeysColumnNames[] = { "Keyword", "Value" }; static char *szKeysButtons[] = { "_Add", "_Update" }; static void addkeywords_to_list(GtkWidget* widget, LPCSTR attrs, TGENSETUP *gensetup_t) { char *curr, *cour; char *data[2]; if (!GTK_IS_CLIST (widget)) return; gtk_clist_clear (GTK_CLIST (widget)); for (curr = (LPSTR) attrs; *curr; curr += (STRLEN (curr) + 1)) { if (!strncasecmp (curr, "DSN=", STRLEN ("DSN=")) || !strncasecmp (curr, "Driver=", STRLEN ("Driver=")) || !strncasecmp (curr, "Description=", STRLEN ("Description="))) continue; if ((cour = strchr (curr, '='))) { *cour = '\0'; data[0] = curr; data[1] = cour + 1; gtk_clist_append (GTK_CLIST (widget), data); *cour = '='; } else { data[0] = ""; gtk_clist_append (GTK_CLIST (widget), data); } } if (GTK_CLIST (widget)->rows > 0) gtk_clist_sort (GTK_CLIST (widget)); } static void parse_attribute_line(TGENSETUP *gensetup_t, LPCSTR dsn, LPCSTR attrs, BOOL add) { if (dsn && gensetup_t->dsn_entry) { gtk_entry_set_text (GTK_ENTRY (gensetup_t->dsn_entry), dsn); if (add) gtk_widget_set_sensitive (gensetup_t->dsn_entry, TRUE); else gtk_widget_set_sensitive (gensetup_t->dsn_entry, FALSE); } addkeywords_to_list (gensetup_t->key_list, attrs, gensetup_t); } static void gensetup_add_clicked(GtkWidget* widget, TGENSETUP *gensetup_t) { char *szKey; char *data[2]; int i = 0; if (gensetup_t) { data[0] = (char*)gtk_entry_get_text (GTK_ENTRY (gensetup_t->key_entry)); if (STRLEN (data[0])) { data[1] = (char*)gtk_entry_get_text (GTK_ENTRY (gensetup_t->value_entry)); /* Try to see if the keyword already exists */ for (i = 0; i < GTK_CLIST (gensetup_t->key_list)->rows; i++) { gtk_clist_get_text (GTK_CLIST (gensetup_t->key_list), i, 0, &szKey); if (STREQ (data[0], szKey)) goto done; } /* An update operation */ if (i < GTK_CLIST (gensetup_t->key_list)->rows) { gtk_clist_set_text (GTK_CLIST (gensetup_t->key_list), i, 1, data[1]); } else if (STRLEN (data[1])) { gtk_clist_append (GTK_CLIST (gensetup_t->key_list), data); } } gtk_clist_sort (GTK_CLIST (gensetup_t->key_list)); done: gtk_entry_set_text (GTK_ENTRY (gensetup_t->key_entry), ""); gtk_entry_set_text (GTK_ENTRY (gensetup_t->value_entry), ""); } } static void gensetup_update_clicked(GtkWidget* widget, TGENSETUP *gensetup_t) { char *data[2]; int i; if (gensetup_t) { data[0] = (char*)gtk_entry_get_text (GTK_ENTRY (gensetup_t->key_entry)); if (STRLEN (data[0])) { data[1] = (char*)gtk_entry_get_text (GTK_ENTRY (gensetup_t->value_entry)); if (GTK_CLIST (gensetup_t->key_list)->selection != NULL) i = GPOINTER_TO_INT (GTK_CLIST (gensetup_t->key_list)->selection-> data); else i = 0; /* An update operation */ if (i < GTK_CLIST (gensetup_t->key_list)->rows) { gtk_clist_set_text (GTK_CLIST (gensetup_t->key_list), i, 0, data[0]); gtk_clist_set_text (GTK_CLIST (gensetup_t->key_list), i, 1, data[1]); } } gtk_entry_set_text (GTK_ENTRY (gensetup_t->key_entry), ""); gtk_entry_set_text (GTK_ENTRY (gensetup_t->value_entry), ""); } } static void gensetup_list_select(GtkWidget* widget, gint row, gint column, GdkEvent *event, TGENSETUP *gensetup_t) { char *szKey, *szValue; if (gensetup_t && GTK_CLIST (gensetup_t->key_list)->selection != NULL) { gtk_clist_get_text (GTK_CLIST (gensetup_t->key_list), GPOINTER_TO_INT (GTK_CLIST (gensetup_t->key_list)->selection->data), 0, &szKey); gtk_clist_get_text (GTK_CLIST (gensetup_t->key_list), GPOINTER_TO_INT (GTK_CLIST (gensetup_t->key_list)->selection->data), 1, &szValue); gtk_entry_set_text (GTK_ENTRY (gensetup_t->key_entry), szKey); gtk_entry_set_text (GTK_ENTRY (gensetup_t->value_entry), szValue); gtk_widget_set_sensitive (gensetup_t->bupdate, TRUE); } } static void gensetup_list_unselect(GtkWidget* widget, gint row, gint column, GdkEvent *event, TGENSETUP *gensetup_t) { if (gensetup_t) { gtk_widget_set_sensitive (gensetup_t->bupdate, FALSE); gtk_entry_set_text (GTK_ENTRY (gensetup_t->key_entry), ""); gtk_entry_set_text (GTK_ENTRY (gensetup_t->value_entry), ""); } } static void gensetup_ok_clicked(GtkWidget* widget, TGENSETUP *gensetup_t) { char *curr, *cour, *szKey, *szValue; int i = 0, size = 0; if (gensetup_t) { /* What is the size of the block to malloc */ if (gensetup_t->dsn_entry) { size += STRLEN (gtk_entry_get_text (GTK_ENTRY (gensetup_t->dsn_entry))) + STRLEN ("DSN=") + 1; size += STRLEN ("Description=") + 1; } else { size = 1; } /* Malloc it (+1 for list-terminating NUL) */ if ((gensetup_t->connstr = (char *) calloc (sizeof(char), ++size))) { if (gensetup_t->dsn_entry) { for (curr = STRCONN, cour = gensetup_t->connstr; i < STRCONN_NB_TOKENS; i++, curr += (STRLEN (curr) + 1)) switch (i) { case 0: sprintf (cour, curr, gtk_entry_get_text (GTK_ENTRY (gensetup_t->dsn_entry))); cour += (STRLEN (cour) + 1); break; case 1: sprintf (cour, curr, ""); cour += (STRLEN (cour) + 1); break; }; } else size = 1; for (i = 0; i < GTK_CLIST (gensetup_t->key_list)->rows; i++) { gtk_clist_get_text (GTK_CLIST (gensetup_t->key_list), i, 0, &szKey); gtk_clist_get_text (GTK_CLIST (gensetup_t->key_list), i, 1, &szValue); cour = gensetup_t->connstr; gensetup_t->connstr = (char *) malloc (size + STRLEN (szKey) + STRLEN (szValue) + 2); if (gensetup_t->connstr) { memcpy (gensetup_t->connstr, cour, size); sprintf (gensetup_t->connstr + size - 1, "%s=%s", szKey, szValue); free (cour); size += STRLEN (szKey) + STRLEN (szValue) + 2; } else gensetup_t->connstr = cour; } /* add list-terminating NUL */ gensetup_t->connstr[size - 1] = '\0'; } gensetup_t->dsn_entry = NULL; gensetup_t->key_list = NULL; gensetup_t->verify_conn = gtk_toggle_button_get_active((GtkToggleButton*)gensetup_t->verify_conn_cb); gtk_signal_disconnect_by_func (GTK_OBJECT (gensetup_t->mainwnd), GTK_SIGNAL_FUNC (gtk_main_quit), NULL); gtk_main_quit (); gtk_widget_destroy (gensetup_t->mainwnd); } } static void gensetup_cancel_clicked(GtkWidget* widget, TGENSETUP *gensetup_t) { if (gensetup_t) { gensetup_t->connstr = (LPSTR) -1L; gensetup_t->dsn_entry = NULL; gensetup_t->key_list = NULL; gtk_signal_disconnect_by_func (GTK_OBJECT (gensetup_t->mainwnd), GTK_SIGNAL_FUNC (gtk_main_quit), NULL); gtk_main_quit (); gtk_widget_destroy (gensetup_t->mainwnd); } } static gint delete_event( GtkWidget *widget, GdkEvent *event, TGENSETUP *gensetup_t) { gensetup_cancel_clicked (widget, gensetup_t); return FALSE; } LPSTR create_fgensetup (HWND hwnd, LPCSTR dsn, LPCSTR attrs, BOOL add, BOOL *verify_conn) { GdkPixmap *pixmap; GdkBitmap *mask; GtkStyle *style; GtkWidget *gensetup; GtkWidget *dialog_vbox5; GtkWidget *vbox25; GtkWidget *frame56; GtkWidget *alignment48; GtkWidget *hbox35; GtkWidget *label93; GtkWidget *t_dsn; GtkWidget *frame55; GtkWidget *alignment47; GtkWidget *label92; GtkWidget *frame54; GtkWidget *alignment46; GtkWidget *scrolledwindow15; GtkWidget *clist1; GtkWidget *l_key; GtkWidget *l_value; GtkWidget *frame53; GtkWidget *alignment45; GtkWidget *hbox34; GtkWidget *table4; GtkWidget *label88; GtkWidget *t_value; GtkWidget *b_update; GtkWidget *b_add; GtkWidget *t_keyword; GtkWidget *label89; GtkWidget *frame52; GtkWidget *alignment44; GtkWidget *hbox33; GtkWidget *cb_verify; GtkWidget *dialog_action_area5; GtkWidget *b_cancel; GtkWidget *b_ok; TGENSETUP gensetup_t; char buff[1024]; if (hwnd == NULL || !GTK_IS_WIDGET (hwnd)) return (LPSTR) attrs; gensetup = gtk_dialog_new (); gtk_widget_set_name (gensetup, "gensetup"); gtk_widget_set_size_request (gensetup, 354, 471); gtk_window_set_title (GTK_WINDOW (gensetup), _("File DSN Generic Setup")); gtk_window_set_position (GTK_WINDOW (gensetup), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (gensetup), TRUE); gtk_window_set_type_hint (GTK_WINDOW (gensetup), GDK_WINDOW_TYPE_HINT_DIALOG); #if GTK_CHECK_VERSION(2,0,0) gtk_widget_show (gensetup); #endif dialog_vbox5 = GTK_DIALOG (gensetup)->vbox; gtk_widget_set_name (dialog_vbox5, "dialog_vbox5"); gtk_widget_show (dialog_vbox5); vbox25 = gtk_vbox_new (FALSE, 0); gtk_widget_set_name (vbox25, "vbox25"); gtk_widget_show (vbox25); gtk_box_pack_start (GTK_BOX (dialog_vbox5), vbox25, TRUE, TRUE, 0); frame56 = gtk_frame_new (NULL); gtk_widget_set_name (frame56, "frame56"); gtk_widget_show (frame56); gtk_box_pack_start (GTK_BOX (vbox25), frame56, FALSE, TRUE, 0); gtk_frame_set_shadow_type (GTK_FRAME (frame56), GTK_SHADOW_NONE); alignment48 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment48, "alignment48"); gtk_widget_show (alignment48); gtk_container_add (GTK_CONTAINER (frame56), alignment48); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment48), 4, 0, 0, 0); hbox35 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox35, "hbox35"); gtk_widget_show (hbox35); gtk_container_add (GTK_CONTAINER (alignment48), hbox35); label93 = gtk_label_new (_("File Data Source Name : ")); gtk_widget_set_name (label93, "label93"); gtk_widget_show (label93); gtk_box_pack_start (GTK_BOX (hbox35), label93, FALSE, FALSE, 0); t_dsn = gtk_entry_new (); gtk_widget_set_name (t_dsn, "t_dsn"); gtk_widget_show (t_dsn); gtk_box_pack_start (GTK_BOX (hbox35), t_dsn, TRUE, TRUE, 0); frame55 = gtk_frame_new (NULL); gtk_widget_set_name (frame55, "frame55"); gtk_widget_show (frame55); gtk_box_pack_start (GTK_BOX (vbox25), frame55, FALSE, TRUE, 0); gtk_frame_set_shadow_type (GTK_FRAME (frame55), GTK_SHADOW_NONE); alignment47 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment47, "alignment47"); gtk_widget_show (alignment47); gtk_container_add (GTK_CONTAINER (frame55), alignment47); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment47), 4, 4, 0, 0); label92 = gtk_label_new (_("If you know the driver-specific keywords for this data\nsource, you can type them and their values here. For\nmore information on driver-specific keywords, please\nconsult your ODBC driver documentation.")); gtk_widget_set_name (label92, "label92"); gtk_widget_show (label92); gtk_container_add (GTK_CONTAINER (alignment47), label92); frame54 = gtk_frame_new (NULL); gtk_widget_set_name (frame54, "frame54"); gtk_widget_show (frame54); gtk_box_pack_start (GTK_BOX (vbox25), frame54, TRUE, TRUE, 0); gtk_widget_set_size_request (frame54, -1, 180); gtk_frame_set_shadow_type (GTK_FRAME (frame54), GTK_SHADOW_NONE); alignment46 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment46, "alignment46"); gtk_widget_show (alignment46); gtk_container_add (GTK_CONTAINER (frame54), alignment46); scrolledwindow15 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_set_name (scrolledwindow15, "scrolledwindow15"); gtk_widget_show (scrolledwindow15); gtk_container_add (GTK_CONTAINER (alignment46), scrolledwindow15); clist1 = gtk_clist_new (2); gtk_widget_set_name (clist1, "clist1"); gtk_widget_show (clist1); gtk_container_add (GTK_CONTAINER (scrolledwindow15), clist1); gtk_clist_set_column_width (GTK_CLIST (clist1), 0, 80); gtk_clist_set_column_width (GTK_CLIST (clist1), 1, 80); gtk_clist_column_titles_show (GTK_CLIST (clist1)); l_key = gtk_label_new (_("Keyword")); gtk_widget_set_name (l_key, "l_key"); gtk_widget_show (l_key); gtk_clist_set_column_widget (GTK_CLIST (clist1), 0, l_key); gtk_widget_set_size_request (l_key, 137, -1); l_value = gtk_label_new (_("Value")); gtk_widget_set_name (l_value, "l_value"); gtk_widget_show (l_value); gtk_clist_set_column_widget (GTK_CLIST (clist1), 1, l_value); frame53 = gtk_frame_new (NULL); gtk_widget_set_name (frame53, "frame53"); gtk_widget_show (frame53); gtk_box_pack_start (GTK_BOX (vbox25), frame53, FALSE, TRUE, 0); gtk_frame_set_shadow_type (GTK_FRAME (frame53), GTK_SHADOW_NONE); alignment45 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment45, "alignment45"); gtk_widget_show (alignment45); gtk_container_add (GTK_CONTAINER (frame53), alignment45); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment45), 3, 0, 0, 0); hbox34 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox34, "hbox34"); gtk_widget_show (hbox34); gtk_container_add (GTK_CONTAINER (alignment45), hbox34); table4 = gtk_table_new (2, 3, FALSE); gtk_widget_set_name (table4, "table4"); gtk_widget_show (table4); gtk_box_pack_start (GTK_BOX (hbox34), table4, TRUE, TRUE, 0); label88 = gtk_label_new (_("Value : ")); gtk_widget_set_name (label88, "label88"); gtk_widget_show (label88); gtk_table_attach (GTK_TABLE (table4), label88, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); t_value = gtk_entry_new (); gtk_widget_set_name (t_value, "t_value"); gtk_widget_show (t_value); gtk_table_attach (GTK_TABLE (table4), t_value, 1, 2, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); b_update = gtk_button_new_with_mnemonic (_(" _Update ")); gtk_widget_set_name (b_update, "b_update"); gtk_widget_show (b_update); gtk_table_attach (GTK_TABLE (table4), b_update, 2, 3, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (b_update), 6); gtk_widget_set_sensitive(b_update, FALSE); b_add = gtk_button_new_from_stock ("gtk-add"); gtk_widget_set_name (b_add, "b_add"); gtk_widget_show (b_add); gtk_table_attach (GTK_TABLE (table4), b_add, 2, 3, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (b_add), 6); t_keyword = gtk_entry_new (); gtk_widget_set_name (t_keyword, "t_keyword"); gtk_widget_show (t_keyword); gtk_table_attach (GTK_TABLE (table4), t_keyword, 1, 2, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); label89 = gtk_label_new (_("Keyword : ")); gtk_widget_set_name (label89, "label89"); gtk_widget_show (label89); gtk_table_attach (GTK_TABLE (table4), label89, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); frame52 = gtk_frame_new (NULL); gtk_widget_set_name (frame52, "frame52"); gtk_widget_show (frame52); gtk_box_pack_start (GTK_BOX (vbox25), frame52, FALSE, TRUE, 0); gtk_frame_set_shadow_type (GTK_FRAME (frame52), GTK_SHADOW_NONE); alignment44 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment44, "alignment44"); gtk_widget_show (alignment44); gtk_container_add (GTK_CONTAINER (frame52), alignment44); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment44), 0, 3, 12, 0); hbox33 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox33, "hbox33"); gtk_widget_show (hbox33); gtk_container_add (GTK_CONTAINER (alignment44), hbox33); cb_verify = gtk_check_button_new_with_mnemonic (_("Verify this connection (recommended)")); gtk_widget_set_name (cb_verify, "cb_verify"); gtk_widget_show (cb_verify); gtk_box_pack_start (GTK_BOX (hbox33), cb_verify, FALSE, FALSE, 0); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (cb_verify), TRUE); dialog_action_area5 = GTK_DIALOG (gensetup)->action_area; gtk_widget_set_name (dialog_action_area5, "dialog_action_area5"); gtk_widget_show (dialog_action_area5); gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area5), GTK_BUTTONBOX_END); b_cancel = gtk_button_new_from_stock ("gtk-cancel"); gtk_widget_set_name (b_cancel, "b_cancel"); gtk_widget_show (b_cancel); gtk_dialog_add_action_widget (GTK_DIALOG (gensetup), b_cancel, GTK_RESPONSE_CANCEL); GTK_WIDGET_SET_FLAGS (b_cancel, GTK_CAN_DEFAULT); b_ok = gtk_button_new_from_stock ("gtk-ok"); gtk_widget_set_name (b_ok, "b_ok"); gtk_widget_show (b_ok); gtk_dialog_add_action_widget (GTK_DIALOG (gensetup), b_ok, GTK_RESPONSE_OK); GTK_WIDGET_SET_FLAGS (b_ok, GTK_CAN_DEFAULT); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (gensetup, gensetup, "gensetup"); GLADE_HOOKUP_OBJECT_NO_REF (gensetup, dialog_vbox5, "dialog_vbox5"); GLADE_HOOKUP_OBJECT (gensetup, vbox25, "vbox25"); GLADE_HOOKUP_OBJECT (gensetup, frame56, "frame56"); GLADE_HOOKUP_OBJECT (gensetup, alignment48, "alignment48"); GLADE_HOOKUP_OBJECT (gensetup, hbox35, "hbox35"); GLADE_HOOKUP_OBJECT (gensetup, label93, "label93"); GLADE_HOOKUP_OBJECT (gensetup, t_dsn, "t_dsn"); GLADE_HOOKUP_OBJECT (gensetup, frame55, "frame55"); GLADE_HOOKUP_OBJECT (gensetup, alignment47, "alignment47"); GLADE_HOOKUP_OBJECT (gensetup, label92, "label92"); GLADE_HOOKUP_OBJECT (gensetup, frame54, "frame54"); GLADE_HOOKUP_OBJECT (gensetup, alignment46, "alignment46"); GLADE_HOOKUP_OBJECT (gensetup, scrolledwindow15, "scrolledwindow15"); GLADE_HOOKUP_OBJECT (gensetup, clist1, "clist1"); GLADE_HOOKUP_OBJECT (gensetup, l_key, "l_key"); GLADE_HOOKUP_OBJECT (gensetup, l_value, "l_value"); GLADE_HOOKUP_OBJECT (gensetup, frame53, "frame53"); GLADE_HOOKUP_OBJECT (gensetup, alignment45, "alignment45"); GLADE_HOOKUP_OBJECT (gensetup, hbox34, "hbox34"); GLADE_HOOKUP_OBJECT (gensetup, table4, "table4"); GLADE_HOOKUP_OBJECT (gensetup, label88, "label88"); GLADE_HOOKUP_OBJECT (gensetup, t_value, "t_value"); GLADE_HOOKUP_OBJECT (gensetup, b_update, "b_update"); GLADE_HOOKUP_OBJECT (gensetup, b_add, "b_add"); GLADE_HOOKUP_OBJECT (gensetup, t_keyword, "t_keyword"); GLADE_HOOKUP_OBJECT (gensetup, label89, "label89"); GLADE_HOOKUP_OBJECT (gensetup, frame52, "frame52"); GLADE_HOOKUP_OBJECT (gensetup, alignment44, "alignment44"); GLADE_HOOKUP_OBJECT (gensetup, hbox33, "hbox33"); GLADE_HOOKUP_OBJECT (gensetup, cb_verify, "cb_verify"); GLADE_HOOKUP_OBJECT_NO_REF (gensetup, dialog_action_area5, "dialog_action_area5"); GLADE_HOOKUP_OBJECT (gensetup, b_cancel, "b_cancel"); GLADE_HOOKUP_OBJECT (gensetup, b_ok, "b_ok"); /* Ok button events */ gtk_signal_connect (GTK_OBJECT (b_ok), "clicked", GTK_SIGNAL_FUNC (gensetup_ok_clicked), &gensetup_t); /* Cancel button events */ gtk_signal_connect (GTK_OBJECT (b_cancel), "clicked", GTK_SIGNAL_FUNC (gensetup_cancel_clicked), &gensetup_t); /* Add button events */ gtk_signal_connect (GTK_OBJECT (b_add), "clicked", GTK_SIGNAL_FUNC (gensetup_add_clicked), &gensetup_t); /* Update button events */ gtk_signal_connect (GTK_OBJECT (b_update), "clicked", GTK_SIGNAL_FUNC (gensetup_update_clicked), &gensetup_t); /* Close window button events */ gtk_signal_connect (GTK_OBJECT (gensetup), "delete_event", GTK_SIGNAL_FUNC (delete_event), &gensetup_t); gtk_signal_connect (GTK_OBJECT (gensetup), "destroy", GTK_SIGNAL_FUNC (gtk_main_quit), NULL); /* List events */ gtk_signal_connect (GTK_OBJECT (clist1), "select_row", GTK_SIGNAL_FUNC (gensetup_list_select), &gensetup_t); gtk_signal_connect (GTK_OBJECT (clist1), "unselect_row", GTK_SIGNAL_FUNC (gensetup_list_unselect), &gensetup_t); gensetup_t.dsn_entry = t_dsn; gensetup_t.key_list = clist1; gensetup_t.bupdate = b_update; gensetup_t.key_entry = t_keyword; gensetup_t.value_entry = t_value; gensetup_t.mainwnd = gensetup; gensetup_t.verify_conn_cb = cb_verify; gensetup_t.verify_conn = *verify_conn; gtk_toggle_button_set_active((GtkToggleButton*)cb_verify, *verify_conn); /* Parse the attributes line */ parse_attribute_line (&gensetup_t, dsn, attrs, add); gtk_widget_show_all (gensetup); gtk_main (); *verify_conn = gensetup_t.verify_conn; return gensetup_t.connstr; } LPSTR create_keyval (HWND hwnd, LPCSTR attrs, BOOL *verify_conn) { GdkPixmap *pixmap; GdkBitmap *mask; GtkStyle *style; GtkWidget *genkeyval; GtkWidget *dialog_vbox4; GtkWidget *vbox24; GtkWidget *frame48; GtkWidget *alignment40; GtkWidget *label81; GtkWidget *frame49; GtkWidget *alignment41; GtkWidget *scrolledwindow14; GtkWidget *clist1; GtkWidget *l_key; GtkWidget *l_value; GtkWidget *frame50; GtkWidget *alignment42; GtkWidget *hbox31; GtkWidget *table3; GtkWidget *label86; GtkWidget *t_value; GtkWidget *b_update; GtkWidget *b_add; GtkWidget *t_keyword; GtkWidget *label87; GtkWidget *frame51; GtkWidget *alignment43; GtkWidget *hbox32; GtkWidget *cb_verify; GtkWidget *dialog_action_area4; GtkWidget *cancelbutton2; GtkWidget *okbutton2; TGENSETUP gensetup_t; char buff[1024]; if (hwnd == NULL || !GTK_IS_WIDGET (hwnd)) return (LPSTR) attrs; genkeyval = gtk_dialog_new (); gtk_widget_set_name (genkeyval, "genkeyval"); gtk_widget_set_size_request (genkeyval, 355, 430); gtk_window_set_title (GTK_WINDOW (genkeyval), _("Advanced File DSN Creation Settings")); gtk_window_set_position (GTK_WINDOW (genkeyval), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (genkeyval), TRUE); gtk_window_set_default_size (GTK_WINDOW (genkeyval), 355, 430); gtk_window_set_type_hint (GTK_WINDOW (genkeyval), GDK_WINDOW_TYPE_HINT_DIALOG); #if GTK_CHECK_VERSION(2,0,0) gtk_widget_show (genkeyval); #endif dialog_vbox4 = GTK_DIALOG (genkeyval)->vbox; gtk_widget_set_name (dialog_vbox4, "dialog_vbox4"); gtk_widget_show (dialog_vbox4); vbox24 = gtk_vbox_new (FALSE, 0); gtk_widget_set_name (vbox24, "vbox24"); gtk_widget_show (vbox24); gtk_box_pack_start (GTK_BOX (dialog_vbox4), vbox24, TRUE, TRUE, 0); frame48 = gtk_frame_new (NULL); gtk_widget_set_name (frame48, "frame48"); gtk_widget_show (frame48); gtk_box_pack_start (GTK_BOX (vbox24), frame48, FALSE, TRUE, 0); gtk_frame_set_shadow_type (GTK_FRAME (frame48), GTK_SHADOW_NONE); alignment40 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment40, "alignment40"); gtk_widget_show (alignment40); gtk_container_add (GTK_CONTAINER (frame48), alignment40); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment40), 4, 4, 0, 0); label81 = gtk_label_new (_("If you know the driver-specific keywords for this data\nsource, you can type them and their values here. For\nmore information on driver-specific keywords, please\nconsult your ODBC driver documentation.")); gtk_widget_set_name (label81, "label81"); gtk_widget_show (label81); gtk_container_add (GTK_CONTAINER (alignment40), label81); frame49 = gtk_frame_new (NULL); gtk_widget_set_name (frame49, "frame49"); gtk_widget_show (frame49); gtk_box_pack_start (GTK_BOX (vbox24), frame49, TRUE, TRUE, 0); gtk_frame_set_shadow_type (GTK_FRAME (frame49), GTK_SHADOW_NONE); alignment41 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment41, "alignment41"); gtk_widget_show (alignment41); gtk_container_add (GTK_CONTAINER (frame49), alignment41); scrolledwindow14 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_set_name (scrolledwindow14, "scrolledwindow14"); gtk_widget_show (scrolledwindow14); gtk_container_add (GTK_CONTAINER (alignment41), scrolledwindow14); clist1 = gtk_clist_new (2); gtk_widget_set_name (clist1, "clist1"); gtk_widget_show (clist1); gtk_container_add (GTK_CONTAINER (scrolledwindow14), clist1); gtk_clist_set_column_width (GTK_CLIST (clist1), 0, 80); gtk_clist_set_column_width (GTK_CLIST (clist1), 1, 80); gtk_clist_column_titles_show (GTK_CLIST (clist1)); l_key = gtk_label_new (_("Keyword")); gtk_widget_set_name (l_key, "l_key"); gtk_widget_show (l_key); gtk_clist_set_column_widget (GTK_CLIST (clist1), 0, l_key); gtk_widget_set_size_request (l_key, 137, -1); l_value = gtk_label_new (_("Value")); gtk_widget_set_name (l_value, "l_value"); gtk_widget_show (l_value); gtk_clist_set_column_widget (GTK_CLIST (clist1), 1, l_value); frame50 = gtk_frame_new (NULL); gtk_widget_set_name (frame50, "frame50"); gtk_widget_show (frame50); gtk_box_pack_start (GTK_BOX (vbox24), frame50, FALSE, TRUE, 0); gtk_frame_set_shadow_type (GTK_FRAME (frame50), GTK_SHADOW_NONE); alignment42 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment42, "alignment42"); gtk_widget_show (alignment42); gtk_container_add (GTK_CONTAINER (frame50), alignment42); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment42), 3, 0, 0, 0); hbox31 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox31, "hbox31"); gtk_widget_show (hbox31); gtk_container_add (GTK_CONTAINER (alignment42), hbox31); table3 = gtk_table_new (2, 3, FALSE); gtk_widget_set_name (table3, "table3"); gtk_widget_show (table3); gtk_box_pack_start (GTK_BOX (hbox31), table3, TRUE, TRUE, 0); label86 = gtk_label_new (_("Value : ")); gtk_widget_set_name (label86, "label86"); gtk_widget_show (label86); gtk_table_attach (GTK_TABLE (table3), label86, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); t_value = gtk_entry_new (); gtk_widget_set_name (t_value, "t_value"); gtk_widget_show (t_value); gtk_table_attach (GTK_TABLE (table3), t_value, 1, 2, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); b_update = gtk_button_new_with_mnemonic (_(" _Update ")); gtk_widget_set_name (b_update, "b_update"); gtk_widget_show (b_update); gtk_table_attach (GTK_TABLE (table3), b_update, 2, 3, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (b_update), 6); gtk_widget_set_sensitive(b_update, FALSE); b_add = gtk_button_new_from_stock ("gtk-add"); gtk_widget_set_name (b_add, "b_add"); gtk_widget_show (b_add); gtk_table_attach (GTK_TABLE (table3), b_add, 2, 3, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (b_add), 6); t_keyword = gtk_entry_new (); gtk_widget_set_name (t_keyword, "t_keyword"); gtk_widget_show (t_keyword); gtk_table_attach (GTK_TABLE (table3), t_keyword, 1, 2, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); label87 = gtk_label_new (_("Keyword : ")); gtk_widget_set_name (label87, "label87"); gtk_widget_show (label87); gtk_table_attach (GTK_TABLE (table3), label87, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); frame51 = gtk_frame_new (NULL); gtk_widget_set_name (frame51, "frame51"); gtk_widget_show (frame51); gtk_box_pack_start (GTK_BOX (vbox24), frame51, FALSE, TRUE, 0); gtk_frame_set_shadow_type (GTK_FRAME (frame51), GTK_SHADOW_NONE); alignment43 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment43, "alignment43"); gtk_widget_show (alignment43); gtk_container_add (GTK_CONTAINER (frame51), alignment43); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment43), 0, 3, 12, 0); hbox32 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox32, "hbox32"); gtk_widget_show (hbox32); gtk_container_add (GTK_CONTAINER (alignment43), hbox32); cb_verify = gtk_check_button_new_with_mnemonic (_("Verify this connection (recommended)")); gtk_widget_set_name (cb_verify, "cb_verify"); gtk_widget_show (cb_verify); gtk_box_pack_start (GTK_BOX (hbox32), cb_verify, FALSE, FALSE, 0); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (cb_verify), TRUE); dialog_action_area4 = GTK_DIALOG (genkeyval)->action_area; gtk_widget_set_name (dialog_action_area4, "dialog_action_area4"); gtk_widget_show (dialog_action_area4); gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area4), GTK_BUTTONBOX_END); cancelbutton2 = gtk_button_new_from_stock ("gtk-cancel"); gtk_widget_set_name (cancelbutton2, "cancelbutton2"); gtk_widget_show (cancelbutton2); gtk_dialog_add_action_widget (GTK_DIALOG (genkeyval), cancelbutton2, GTK_RESPONSE_CANCEL); GTK_WIDGET_SET_FLAGS (cancelbutton2, GTK_CAN_DEFAULT); okbutton2 = gtk_button_new_from_stock ("gtk-ok"); gtk_widget_set_name (okbutton2, "okbutton2"); gtk_widget_show (okbutton2); gtk_dialog_add_action_widget (GTK_DIALOG (genkeyval), okbutton2, GTK_RESPONSE_OK); GTK_WIDGET_SET_FLAGS (okbutton2, GTK_CAN_DEFAULT); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (genkeyval, genkeyval, "genkeyval"); GLADE_HOOKUP_OBJECT_NO_REF (genkeyval, dialog_vbox4, "dialog_vbox4"); GLADE_HOOKUP_OBJECT (genkeyval, vbox24, "vbox24"); GLADE_HOOKUP_OBJECT (genkeyval, frame48, "frame48"); GLADE_HOOKUP_OBJECT (genkeyval, alignment40, "alignment40"); GLADE_HOOKUP_OBJECT (genkeyval, label81, "label81"); GLADE_HOOKUP_OBJECT (genkeyval, frame49, "frame49"); GLADE_HOOKUP_OBJECT (genkeyval, alignment41, "alignment41"); GLADE_HOOKUP_OBJECT (genkeyval, scrolledwindow14, "scrolledwindow14"); GLADE_HOOKUP_OBJECT (genkeyval, clist1, "clist1"); GLADE_HOOKUP_OBJECT (genkeyval, l_key, "l_key"); GLADE_HOOKUP_OBJECT (genkeyval, l_value, "l_value"); GLADE_HOOKUP_OBJECT (genkeyval, frame50, "frame50"); GLADE_HOOKUP_OBJECT (genkeyval, alignment42, "alignment42"); GLADE_HOOKUP_OBJECT (genkeyval, hbox31, "hbox31"); GLADE_HOOKUP_OBJECT (genkeyval, table3, "table3"); GLADE_HOOKUP_OBJECT (genkeyval, label86, "label86"); GLADE_HOOKUP_OBJECT (genkeyval, t_value, "t_value"); GLADE_HOOKUP_OBJECT (genkeyval, b_update, "b_update"); GLADE_HOOKUP_OBJECT (genkeyval, b_add, "b_add"); GLADE_HOOKUP_OBJECT (genkeyval, t_keyword, "t_keyword"); GLADE_HOOKUP_OBJECT (genkeyval, label87, "label87"); GLADE_HOOKUP_OBJECT (genkeyval, frame51, "frame51"); GLADE_HOOKUP_OBJECT (genkeyval, alignment43, "alignment43"); GLADE_HOOKUP_OBJECT (genkeyval, hbox32, "hbox32"); GLADE_HOOKUP_OBJECT (genkeyval, cb_verify, "cb_verify"); GLADE_HOOKUP_OBJECT_NO_REF (genkeyval, dialog_action_area4, "dialog_action_area4"); GLADE_HOOKUP_OBJECT (genkeyval, cancelbutton2, "cancelbutton2"); GLADE_HOOKUP_OBJECT (genkeyval, okbutton2, "okbutton2"); /* Ok button events */ gtk_signal_connect (GTK_OBJECT (okbutton2), "clicked", GTK_SIGNAL_FUNC (gensetup_ok_clicked), &gensetup_t); /* Cancel button events */ gtk_signal_connect (GTK_OBJECT (cancelbutton2), "clicked", GTK_SIGNAL_FUNC (gensetup_cancel_clicked), &gensetup_t); /* Add button events */ gtk_signal_connect (GTK_OBJECT (b_add), "clicked", GTK_SIGNAL_FUNC (gensetup_add_clicked), &gensetup_t); /* Update button events */ gtk_signal_connect (GTK_OBJECT (b_update), "clicked", GTK_SIGNAL_FUNC (gensetup_update_clicked), &gensetup_t); /* Close window button events */ gtk_signal_connect (GTK_OBJECT (genkeyval), "delete_event", GTK_SIGNAL_FUNC (delete_event), &gensetup_t); gtk_signal_connect (GTK_OBJECT (genkeyval), "destroy", GTK_SIGNAL_FUNC (gtk_main_quit), NULL); /* List events */ gtk_signal_connect (GTK_OBJECT (clist1), "select_row", GTK_SIGNAL_FUNC (gensetup_list_select), &gensetup_t); gtk_signal_connect (GTK_OBJECT (clist1), "unselect_row", GTK_SIGNAL_FUNC (gensetup_list_unselect), &gensetup_t); // gtk_window_add_accel_group (GTK_WINDOW (gensetup), accel_group); gensetup_t.dsn_entry = NULL; gensetup_t.key_list = clist1; gensetup_t.bupdate = b_update; gensetup_t.key_entry = t_keyword; gensetup_t.value_entry = t_value; gensetup_t.mainwnd = genkeyval; gensetup_t.verify_conn_cb = cb_verify; gensetup_t.verify_conn = *verify_conn; gtk_toggle_button_set_active((GtkToggleButton*)cb_verify, *verify_conn); /* Parse the attributes line */ parse_attribute_line (&gensetup_t, NULL, attrs, TRUE); gtk_widget_show_all (genkeyval); gtk_main (); *verify_conn = gensetup_t.verify_conn; return gensetup_t.connstr; } libiodbc-3.52.16/iodbcadm/gtk/dsnchooser.c0000664000175000017500000024345314424170750015243 00000000000000/* * dsnchooser.c * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include #include #include "../gui.h" #include "odbc4.xpm" #ifndef MAXPATHLEN #define MAXPATHLEN 1024 #endif /* * Linux glibc has the function, but does not have the prototype * with the default header files. */ #if defined(HAVE_ASPRINTF) && defined(__GLIBC__) extern int asprintf (char **ret, const char *format, ...); #endif char *szDSNColumnNames[] = { "Name", "Description", "Driver" }; char *szTabNames[] = { "User DSN", "System DSN", "File DSN", "ODBC Drivers", "Connection Pooling", "Tracing", "About" }; char *szDSNButtons[] = { "_Add", "_Remove", "Confi_gure", "_Test", "_Set Dir", }; void addlistofdir_to_optionmenu (GtkWidget *widget, LPCSTR path, TDSNCHOOSER *choose_t) { GtkWidget *menu, *menu_item; char *curr_dir, *prov, *dir; void **array; if (!path || !GTK_IS_OPTION_MENU (widget) || !(prov = strdup (path))) return; if (prov[STRLEN (prov) - 1] == '/' && STRLEN (prov) > 1) prov[STRLEN (prov) - 1] = 0; /* Add the root directory */ menu = gtk_menu_new (); menu_item = gtk_menu_item_new_with_label ("/"); gtk_widget_show (menu_item); gtk_menu_prepend (GTK_MENU (menu), menu_item); if (!(array = (void **) malloc (sizeof (void *) * 2))) return; array[0] = g_strdup ("/"); array[1] = choose_t; gtk_signal_connect (GTK_OBJECT (menu_item), "activate", GTK_SIGNAL_FUNC (filedsn_lookin_clicked), array); for (curr_dir = prov, dir = NULL; curr_dir; curr_dir = strchr (curr_dir + 1, '/')) { if (strchr (curr_dir + 1, '/')) { dir = strchr (curr_dir + 1, '/'); *dir = 0; } menu_item = gtk_menu_item_new_with_label (prov); gtk_widget_show (menu_item); gtk_menu_prepend (GTK_MENU (menu), menu_item); if (!(array = (void **) malloc (sizeof (void *) * 2))) return; array[0] = g_strdup (prov); array[1] = choose_t; gtk_signal_connect (GTK_OBJECT (menu_item), "activate", GTK_SIGNAL_FUNC (filedsn_lookin_clicked), array); if (dir) *dir = '/'; } gtk_option_menu_remove_menu (GTK_OPTION_MENU (widget)); gtk_option_menu_set_menu (GTK_OPTION_MENU (widget), menu); free (prov); } void adddirectories_to_list (HWND hwnd, GtkWidget *widget, LPCSTR path) { DIR *dir; #if defined (HAVE_ASPRINTF) char *path_buf; #else char path_buf[MAXPATHLEN]; #endif struct dirent *dir_entry; struct stat fstat; char *data[1]; if (!path || !GTK_IS_CLIST (widget)) return; if ((dir = opendir (path))) { /* Remove all the entries */ gtk_clist_clear (GTK_CLIST (widget)); while ((dir_entry = readdir (dir))) { #if defined (HAVE_ASPRINTF) asprintf (&path_buf, "%s/%s", path, dir_entry->d_name); #elif defined (HAVE_SNPRINTF) snprintf (path_buf, sizeof (path_buf), "%s/%s", path, dir_entry->d_name); #else STRCPY (path_buf, path); if (path[STRLEN (path) - 1] != '/') STRCAT (path_buf, "/"); STRCAT (path_buf, dir_entry->d_name); #endif if (stat ((LPCSTR) path_buf, &fstat) >= 0 && S_ISDIR (fstat.st_mode)) if (strcmp (path, "/") || strcmp (dir_entry->d_name, "..")) { data[0] = dir_entry->d_name; gtk_clist_append (GTK_CLIST (widget), data); } #if defined (HAVE_ASPRINTF) free (path_buf); #endif } /* Close the directory entry */ closedir (dir); if (GTK_CLIST (widget)->rows > 0) gtk_clist_sort (GTK_CLIST (widget)); } else create_error (hwnd, NULL, "Error during accessing directory information:", strerror (errno)); } void addfiles_to_list (HWND hwnd, GtkWidget *widget, LPCSTR path) { DIR *dir; #if defined (HAVE_ASPRINTF) char *path_buf; #else char path_buf[MAXPATHLEN]; #endif struct dirent *dir_entry; struct stat fstat; char *data[1]; if (!path || !GTK_IS_CLIST (widget)) return; if ((dir = opendir (path))) { /* Remove all the entries */ gtk_clist_clear (GTK_CLIST (widget)); while ((dir_entry = readdir (dir))) { #if defined (HAVE_ASPRINTF) asprintf (&path_buf, "%s/%s", path, dir_entry->d_name); #elif defined (HAVE_SNPRINTF) snprintf (path_buf, sizeof (path_buf), "%s/%s", path, dir_entry->d_name); #else STRCPY (path_buf, path); if (path[STRLEN (path) - 1] != '/') STRCAT (path_buf, "/"); STRCAT (path_buf, dir_entry->d_name); #endif if (stat ((LPCSTR) path_buf, &fstat) >= 0 && !S_ISDIR (fstat.st_mode) && strstr (dir_entry->d_name, ".dsn")) { data[0] = dir_entry->d_name; gtk_clist_append (GTK_CLIST (widget), data); } #if defined (HAVE_ASPRINTF) free (path_buf); #endif } /* Close the directory entry */ closedir (dir); if (GTK_CLIST (widget)->rows > 0) gtk_clist_sort (GTK_CLIST (widget)); } } void adddsns_to_list (GtkWidget *widget, BOOL systemDSN) { char *curr, *buffer = (char *) malloc (sizeof (char) * 65536); char diz[1024], driver[1024]; char *data[3]; int len, _case = 0; if (!buffer || !GTK_IS_CLIST (widget)) return; gtk_clist_clear (GTK_CLIST (widget)); /* Get the list of DSN in the user context */ SQLSetConfigMode (systemDSN ? ODBC_SYSTEM_DSN : ODBC_USER_DSN); len = SQLGetPrivateProfileString ("ODBC Data Sources", NULL, "", buffer, 65536, NULL); if (len) goto process; _case = 1; SQLSetConfigMode (systemDSN ? ODBC_SYSTEM_DSN : ODBC_USER_DSN); len = SQLGetPrivateProfileString ("ODBC 32 bit Data Sources", NULL, "", buffer, 65536, NULL); if (len) goto process; goto end; process: for (curr = buffer; *curr; curr += (STRLEN (curr) + 1)) { SQLSetConfigMode (systemDSN ? ODBC_SYSTEM_DSN : ODBC_USER_DSN); SQLGetPrivateProfileString (curr, "Description", "", diz, sizeof (diz), NULL); SQLSetConfigMode (systemDSN ? ODBC_SYSTEM_DSN : ODBC_USER_DSN); switch (_case) { case 0: SQLGetPrivateProfileString ("ODBC Data Sources", curr, "", driver, sizeof (driver), NULL); break; case 1: SQLGetPrivateProfileString ("ODBC 32 bit Data Sources", curr, "", driver, sizeof (driver), NULL); break; }; if (STRLEN (curr) && STRLEN (driver)) { data[0] = curr; data[1] = diz; data[2] = driver; gtk_clist_append (GTK_CLIST (widget), data); } } end: SQLSetConfigMode (ODBC_BOTH_DSN); if (GTK_CLIST (widget)->rows > 0) { gtk_clist_columns_autosize (GTK_CLIST (widget)); gtk_clist_sort (GTK_CLIST (widget)); } /* Make the clean up */ free (buffer); } static void dsnchooser_switch_page (GtkNotebook *notebook, GtkNotebookPage *page, gint page_num, TDSNCHOOSER *choose_t) { switch (page_num) { case 0: if (choose_t) { choose_t->type_dsn = USER_DSN; adddsns_to_list (choose_t->udsnlist, FALSE); } break; case 1: if (choose_t) { choose_t->type_dsn = SYSTEM_DSN; adddsns_to_list (choose_t->sdsnlist, TRUE); } break; case 2: if (choose_t) { choose_t->type_dsn = FILE_DSN; addlistofdir_to_optionmenu(choose_t->dir_combo, choose_t->curr_dir, choose_t); adddirectories_to_list(choose_t->mainwnd, choose_t->dir_list, choose_t->curr_dir); addfiles_to_list(choose_t->mainwnd, choose_t->file_list, choose_t->curr_dir); } break; }; if (choose_t) { if (choose_t->uremove) gtk_widget_set_sensitive (choose_t->uremove, FALSE); if (choose_t->uconfigure) gtk_widget_set_sensitive (choose_t->uconfigure, FALSE); if (choose_t->utest) gtk_widget_set_sensitive (choose_t->utest, FALSE); if (choose_t->sremove) gtk_widget_set_sensitive (choose_t->sremove, FALSE); if (choose_t->sconfigure) gtk_widget_set_sensitive (choose_t->sconfigure, FALSE); if (choose_t->stest) gtk_widget_set_sensitive (choose_t->stest, FALSE); if (choose_t->fremove) gtk_widget_set_sensitive(choose_t->fremove, FALSE); if (choose_t->fconfigure) gtk_widget_set_sensitive(choose_t->fconfigure, FALSE); if (choose_t->ftest) gtk_widget_set_sensitive(choose_t->ftest, FALSE); } } static BOOL test_driver_connect (TDSNCHOOSER *choose_t, char *connstr) { HENV henv; HDBC hdbc; #if (ODBCVER < 0x300) if (SQLAllocEnv (&henv) != SQL_SUCCESS) #else if (SQLAllocHandle (SQL_HANDLE_ENV, NULL, &henv) != SQL_SUCCESS) #endif { _iodbcdm_nativeerrorbox (choose_t->mainwnd, henv, SQL_NULL_HDBC, SQL_NULL_HSTMT); return FALSE; } SQLSetEnvAttr (henv, SQL_ATTR_APP_UNICODE_TYPE, (SQLPOINTER) SQL_DM_CP_DEF, SQL_IS_UINTEGER); #if (ODBCVER < 0x300) if (SQLAllocConnect (henv, &hdbc) != SQL_SUCCESS) #else SQLSetEnvAttr (henv, SQL_ATTR_ODBC_VERSION, (SQLPOINTER) SQL_OV_ODBC3, SQL_IS_UINTEGER); if (SQLAllocHandle (SQL_HANDLE_DBC, henv, &hdbc) != SQL_SUCCESS) #endif { _iodbcdm_nativeerrorbox (choose_t->mainwnd, henv, hdbc, SQL_NULL_HSTMT); SQLFreeEnv (henv); return FALSE; } switch (choose_t->type_dsn) { case USER_DSN: SQLSetConfigMode (ODBC_USER_DSN); break; case SYSTEM_DSN: SQLSetConfigMode (ODBC_SYSTEM_DSN); break; case FILE_DSN: SQLSetConfigMode (ODBC_BOTH_DSN); break; } if (SQLDriverConnect (hdbc, choose_t->mainwnd, connstr, SQL_NTS, NULL, 0, NULL, SQL_DRIVER_PROMPT) != SQL_SUCCESS) { _iodbcdm_nativeerrorbox (choose_t->mainwnd, henv, hdbc, SQL_NULL_HSTMT); SQLFreeEnv (henv); return FALSE; } else SQLDisconnect (hdbc); #if (ODBCVER < 0x300) SQLFreeConnect (hdbc); SQLFreeEnv (henv); #else SQLFreeHandle (SQL_HANDLE_DBC, hdbc); SQLFreeHandle (SQL_HANDLE_ENV, henv); #endif return TRUE; } void userdsn_add_clicked (GtkWidget *widget, TDSNCHOOSER *choose_t) { char connstr[4096] = { "" }; char drv[1024] = { ""}; int sqlstat; DWORD error; if (choose_t) { /* Try first to get the driver name */ SQLSetConfigMode (ODBC_USER_DSN); if (_iodbcdm_drvchoose_dialbox (choose_t->mainwnd, drv, sizeof (drv), &sqlstat) == SQL_SUCCESS) { SQLSetConfigMode (ODBC_USER_DSN); if (!SQLConfigDataSource (choose_t->mainwnd, ODBC_ADD_DSN, drv + STRLEN ("DRIVER="), connstr)) { if (SQLInstallerError (1, &error, connstr, sizeof (connstr), NULL) != SQL_NO_DATA) _iodbcdm_errorbox (choose_t->mainwnd, NULL, "An error occurred when trying to add the DSN : "); goto done; } adddsns_to_list (choose_t->udsnlist, FALSE); } done: if (GTK_CLIST (choose_t->udsnlist)->selection == NULL) { if (choose_t->uremove) gtk_widget_set_sensitive (choose_t->uremove, FALSE); if (choose_t->uconfigure) gtk_widget_set_sensitive (choose_t->uconfigure, FALSE); if (choose_t->utest) gtk_widget_set_sensitive (choose_t->utest, FALSE); } } return; } void userdsn_remove_clicked (GtkWidget *widget, TDSNCHOOSER *choose_t) { char dsn[1024] = { "\0" }; char *szDSN = NULL, *szDriver = NULL; if (choose_t) { /* Retrieve the DSN name */ if (GTK_CLIST (choose_t->udsnlist)->selection != NULL) { gtk_clist_get_text (GTK_CLIST (choose_t->udsnlist), GPOINTER_TO_INT (GTK_CLIST (choose_t->udsnlist)->selection-> data), 0, &szDSN); gtk_clist_get_text (GTK_CLIST (choose_t->udsnlist), GPOINTER_TO_INT (GTK_CLIST (choose_t->udsnlist)->selection-> data), 2, &szDriver); } /* Call the right function */ if (szDSN && create_confirm (choose_t->mainwnd, szDSN, "Are you sure you want to remove this DSN ?")) { sprintf (dsn, "DSN=%s", szDSN); if (!SQLConfigDataSource (choose_t->mainwnd, ODBC_REMOVE_DSN, szDriver, dsn)) _iodbcdm_errorbox (choose_t->mainwnd, szDSN, "An error occurred when trying to remove the DSN : "); adddsns_to_list (choose_t->udsnlist, FALSE); } if (GTK_CLIST (choose_t->udsnlist)->selection == NULL) { if (choose_t->uremove) gtk_widget_set_sensitive (choose_t->uremove, FALSE); if (choose_t->uconfigure) gtk_widget_set_sensitive (choose_t->uconfigure, FALSE); if (choose_t->utest) gtk_widget_set_sensitive (choose_t->utest, FALSE); } } } void userdsn_configure_clicked (GtkWidget *widget, TDSNCHOOSER *choose_t) { char connstr[4096] = { 0 }; char tokenstr[4096] = { 0 }; char *szDSN = NULL, *szDriver = NULL, *curr, *cour; int size = sizeof (connstr); DWORD error; if (choose_t) { /* Retrieve the DSN name */ if (GTK_CLIST (choose_t->udsnlist)->selection != NULL) { gtk_clist_get_text (GTK_CLIST (choose_t->udsnlist), GPOINTER_TO_INT (GTK_CLIST (choose_t->udsnlist)->selection-> data), 0, &szDSN); gtk_clist_get_text (GTK_CLIST (choose_t->udsnlist), GPOINTER_TO_INT (GTK_CLIST (choose_t->udsnlist)->selection-> data), 2, &szDriver); } /* Call the right function */ if (szDSN) { sprintf (connstr, "DSN=%s", szDSN); size -= (STRLEN (connstr) + 1); SQLSetConfigMode (ODBC_USER_DSN); if (!SQLGetPrivateProfileString (szDSN, NULL, "", tokenstr, sizeof (tokenstr), NULL)) { _iodbcdm_errorbox (choose_t->mainwnd, szDSN, "An error occurred when trying to configure the DSN : "); goto done; } for (curr = tokenstr, cour = connstr + STRLEN (connstr) + 1; *curr; curr += (STRLEN (curr) + 1), cour += (STRLEN (cour) + 1)) { STRCPY (cour, curr); cour[STRLEN (curr)] = '='; SQLSetConfigMode (ODBC_USER_DSN); SQLGetPrivateProfileString (szDSN, curr, "", cour + STRLEN (curr) + 1, size - STRLEN (curr) - 1, NULL); size -= (STRLEN (cour) + 1); } *cour = 0; SQLSetConfigMode (ODBC_USER_DSN); if (!SQLConfigDataSource (choose_t->mainwnd, ODBC_CONFIG_DSN, szDriver, connstr)) { if (SQLInstallerError (1, &error, connstr, sizeof (connstr), NULL) != SQL_NO_DATA && error != ODBC_ERROR_REQUEST_FAILED) _iodbcdm_errorbox (choose_t->mainwnd, szDSN, "An error occurred when trying to configure the DSN : "); goto done; } adddsns_to_list (choose_t->udsnlist, FALSE); } done: if (GTK_CLIST (choose_t->udsnlist)->selection == NULL) { if (choose_t->uremove) gtk_widget_set_sensitive (choose_t->uremove, FALSE); if (choose_t->uconfigure) gtk_widget_set_sensitive (choose_t->uconfigure, FALSE); if (choose_t->utest) gtk_widget_set_sensitive (choose_t->utest, FALSE); } } return; } void userdsn_test_clicked (GtkWidget *widget, TDSNCHOOSER *choose_t) { HENV henv; HDBC hdbc; SWORD buflen; char connstr[4096] = { 0 }; char outconnstr[4096] = { 0 }; char *szDSN; if (choose_t) { /* Retrieve the DSN name */ if (GTK_CLIST (choose_t->udsnlist)->selection != NULL) gtk_clist_get_text (GTK_CLIST (choose_t->udsnlist), GPOINTER_TO_INT (GTK_CLIST (choose_t->udsnlist)->selection->data), 0, &szDSN); if (szDSN && STRLEN (szDSN)) { snprintf (connstr, sizeof (connstr), "DSN=%s", szDSN); if (test_driver_connect (choose_t, connstr)) { _iodbcdm_messagebox (choose_t->mainwnd, szDSN, "The connection DSN was tested successfully, and can be used at this time."); } } if (GTK_CLIST (choose_t->udsnlist)->selection == NULL) { if (choose_t->uremove) gtk_widget_set_sensitive (choose_t->uremove, FALSE); if (choose_t->uconfigure) gtk_widget_set_sensitive (choose_t->uconfigure, FALSE); if (choose_t->utest) gtk_widget_set_sensitive (choose_t->utest, FALSE); } } } void systemdsn_add_clicked (GtkWidget *widget, TDSNCHOOSER *choose_t) { char connstr[4096] = { 0 }; char drv[1024] = { 0 }; int sqlstat; DWORD error; if (choose_t) { /* Try first to get the driver name */ SQLSetConfigMode (ODBC_SYSTEM_DSN); if (_iodbcdm_drvchoose_dialbox (choose_t->mainwnd, drv, sizeof (drv), &sqlstat) == SQL_SUCCESS) { if (!SQLConfigDataSource (choose_t->mainwnd, ODBC_ADD_SYS_DSN, drv + STRLEN ("DRIVER="), connstr)) { if (SQLInstallerError (1, &error, connstr, sizeof (connstr), NULL) != SQL_NO_DATA) _iodbcdm_errorbox (choose_t->mainwnd, NULL, "An error occurred when trying to add the DSN : "); goto done; } adddsns_to_list (choose_t->sdsnlist, TRUE); } done: if (GTK_CLIST (choose_t->sdsnlist)->selection == NULL) { if (choose_t->sremove) gtk_widget_set_sensitive (choose_t->sremove, FALSE); if (choose_t->sconfigure) gtk_widget_set_sensitive (choose_t->sconfigure, FALSE); if (choose_t->stest) gtk_widget_set_sensitive (choose_t->stest, FALSE); } } return; } void systemdsn_remove_clicked (GtkWidget *widget, TDSNCHOOSER *choose_t) { char dsn[1024] = { 0 }; char *szDSN = NULL, *szDriver = NULL; if (choose_t) { /* Retrieve the DSN name */ if (GTK_CLIST (choose_t->sdsnlist)->selection != NULL) { gtk_clist_get_text (GTK_CLIST (choose_t->sdsnlist), GPOINTER_TO_INT (GTK_CLIST (choose_t->sdsnlist)->selection-> data), 0, &szDSN); gtk_clist_get_text (GTK_CLIST (choose_t->sdsnlist), GPOINTER_TO_INT (GTK_CLIST (choose_t->sdsnlist)->selection-> data), 2, &szDriver); } /* Call the right function */ if (szDSN && create_confirm (choose_t->mainwnd, szDSN, "Are you sure you want to remove this DSN ?")) { sprintf (dsn, "DSN=%s", szDSN); if (!SQLConfigDataSource (choose_t->mainwnd, ODBC_REMOVE_SYS_DSN, szDriver, dsn)) _iodbcdm_errorbox (choose_t->mainwnd, szDSN, "An error occurred when trying to remove the DSN : "); adddsns_to_list (choose_t->sdsnlist, TRUE); } if (GTK_CLIST (choose_t->sdsnlist)->selection == NULL) { if (choose_t->sremove) gtk_widget_set_sensitive (choose_t->sremove, FALSE); if (choose_t->sconfigure) gtk_widget_set_sensitive (choose_t->sconfigure, FALSE); if (choose_t->stest) gtk_widget_set_sensitive (choose_t->stest, FALSE); } } } void systemdsn_configure_clicked (GtkWidget *widget, TDSNCHOOSER *choose_t) { char connstr[4096] = { 0 }; char tokenstr[4096] = { 0 }; char *szDSN = NULL, *szDriver = NULL, *curr, *cour; int size = sizeof (connstr); DWORD error; if (choose_t) { /* Retrieve the DSN name */ if (GTK_CLIST (choose_t->sdsnlist)->selection != NULL) { gtk_clist_get_text (GTK_CLIST (choose_t->sdsnlist), GPOINTER_TO_INT (GTK_CLIST (choose_t->sdsnlist)->selection-> data), 0, &szDSN); gtk_clist_get_text (GTK_CLIST (choose_t->sdsnlist), GPOINTER_TO_INT (GTK_CLIST (choose_t->sdsnlist)->selection-> data), 2, &szDriver); } /* Call the right function */ if (szDSN) { sprintf (connstr, "DSN=%s", szDSN); size -= (STRLEN (connstr) + 1); SQLSetConfigMode (ODBC_SYSTEM_DSN); if (!SQLGetPrivateProfileString (szDSN, NULL, "", tokenstr, sizeof (tokenstr), NULL)) { _iodbcdm_errorbox (choose_t->mainwnd, szDSN, "An error occurred when trying to configure the DSN : "); goto done; } for (curr = tokenstr, cour = connstr + STRLEN (connstr) + 1; *curr; curr += (STRLEN (curr) + 1), cour += (STRLEN (cour) + 1)) { STRCPY (cour, curr); cour[STRLEN (curr)] = '='; SQLSetConfigMode (ODBC_SYSTEM_DSN); SQLGetPrivateProfileString (szDSN, curr, "", cour + STRLEN (curr) + 1, size - STRLEN (curr) - 1, NULL); size -= (STRLEN (cour) + 1); } *cour = 0; if (!SQLConfigDataSource (choose_t->mainwnd, ODBC_CONFIG_SYS_DSN, szDriver, connstr)) { if (SQLInstallerError (1, &error, connstr, sizeof (connstr), NULL) != SQL_NO_DATA && error != ODBC_ERROR_REQUEST_FAILED) _iodbcdm_errorbox (choose_t->mainwnd, szDSN, "An error occurred when trying to configure the DSN : "); goto done; } adddsns_to_list (choose_t->sdsnlist, TRUE); } done: if (GTK_CLIST (choose_t->sdsnlist)->selection == NULL) { if (choose_t->sremove) gtk_widget_set_sensitive (choose_t->sremove, FALSE); if (choose_t->sconfigure) gtk_widget_set_sensitive (choose_t->sconfigure, FALSE); if (choose_t->stest) gtk_widget_set_sensitive (choose_t->stest, FALSE); } } return; } void systemdsn_test_clicked (GtkWidget * widget, TDSNCHOOSER * choose_t) { HENV henv; HDBC hdbc; SWORD buflen; SQLCHAR connstr[4096] = { 0 }; SQLCHAR outconnstr[4096] = { 0 }; char *szDSN = NULL; if (choose_t) { /* Retrieve the DSN name */ if (GTK_CLIST (choose_t->sdsnlist)->selection != NULL) gtk_clist_get_text (GTK_CLIST (choose_t->sdsnlist), GPOINTER_TO_INT (GTK_CLIST (choose_t->sdsnlist)->selection->data), 0, &szDSN); if (szDSN && STRLEN (szDSN)) { snprintf (connstr, sizeof (connstr), "DSN=%s", szDSN); if (test_driver_connect (choose_t, connstr)) { _iodbcdm_messagebox (choose_t->mainwnd, szDSN, "The connection DSN was tested successfully, and can be used at this time."); } } if (GTK_CLIST (choose_t->sdsnlist)->selection == NULL) { if (choose_t->sremove) gtk_widget_set_sensitive (choose_t->sremove, FALSE); if (choose_t->sconfigure) gtk_widget_set_sensitive (choose_t->sconfigure, FALSE); if (choose_t->stest) gtk_widget_set_sensitive (choose_t->stest, FALSE); } } } static void filedsn_get_dsn (char *filename, char *dsn, size_t dsn_sz) { char *p; /* Cut everything up to the last slash */ p = strrchr (filename, '/'); if (p != NULL) p++; else p = filename; snprintf (dsn, dsn_sz, "%s", p); /* Cut .dsn extension */ p = strrchr (dsn, '.'); if (p != NULL && !strcasecmp (p, ".dsn")) *p = '\0'; } static BOOL _CheckDriverLoginDlg (char *drv); static void filedsn_configure (TDSNCHOOSER *choose_t, char *drv, char *dsn, char *in_attrs, BOOL b_add, BOOL verify_conn) { char *connstr = NULL; size_t len; /* current connstr len */ size_t add_len; /* len of appended string */ LPSTR attrs = NULL, curr, tmp, attr_lst = NULL; BOOL b_Save = TRUE; attrs = in_attrs; if (!b_add && !_CheckDriverLoginDlg(drv + STRLEN("DRIVER="))) { /* Get DSN name and additional attributes */ attr_lst = create_fgensetup (choose_t->mainwnd, dsn, in_attrs, b_add, &verify_conn); attrs = attr_lst; } if (!attrs) { create_error (choose_t->mainwnd, NULL, "Error adding File DSN:", strerror (ENOMEM)); return; } if (attrs == (LPSTR) - 1L) return; /* Build the connection string */ connstr = strdup (drv); len = strlen (connstr); for (curr = attrs; *curr; curr += (STRLEN (curr) + 1)) { if (!strncasecmp (curr, "DSN=", STRLEN ("DSN="))) { if (dsn == NULL) { /* got dsn name */ dsn = curr + STRLEN ("DSN="); } continue; } /* append attr */ add_len = 1 + strlen (curr); /* +1 for ';' */ tmp = realloc (connstr, len + add_len + 1); /* +1 for NUL */ if (tmp == NULL) { create_error (choose_t->mainwnd, NULL, "Error adding File DSN:", strerror (errno)); goto done; } connstr = tmp; snprintf (connstr + len, add_len + 1, ";%s", curr); len += add_len; } /* Nothing to do if no DSN */ if (!dsn || STRLEN (dsn) == 0) goto done; if (verify_conn) { BOOL ret; /* Append SAVEFILE */ add_len = strlen (";SAVEFILE=") + strlen (dsn); tmp = realloc (connstr, len + add_len + 1); /* +1 for NUL */ if (tmp == NULL) { create_error (choose_t->mainwnd, NULL, "Error adding file DSN:", strerror (errno)); goto done; } connstr = tmp; snprintf (connstr + len, add_len + 1, ";SAVEFILE=%s", dsn); len += add_len; /* Connect to data source */ ret = test_driver_connect (choose_t, connstr); if (!ret && b_add) { if (create_confirm (choose_t->mainwnd, dsn, "Can't check the connection. Do you want to store the FileDSN without verification ?")) b_Save = TRUE; else b_Save = FALSE; } else b_Save = FALSE; } if (b_Save) { char key[512]; char *p; size_t sz; if (drv) { p = strchr(drv, '='); if (!SQLWriteFileDSN (dsn, "ODBC", "DRIVER", p + 1)) { create_error (choose_t->mainwnd, NULL, "Error writing File DSN:", strerror (errno)); goto done; } } for (curr = attrs; *curr; curr += (STRLEN (curr) + 1)) { if (!strncasecmp (curr, "DSN=", STRLEN ("DSN="))) continue; else if (!strncasecmp (curr, "PWD=", STRLEN ("PWD="))) continue; else if (!strncasecmp (curr, "SAVEFILE=", STRLEN ("SAVEFILE="))) continue; else if (!strncasecmp (curr, "FILEDSN=", STRLEN ("FILEDSN="))) continue; p = strchr(curr, '='); sz = p - curr < sizeof(key) ? p - curr : sizeof(key); memset(key, 0, sizeof(key)); strncpy(key, curr, sz); if (!SQLWriteFileDSN (dsn, "ODBC", key, p + 1)) { create_error (choose_t->mainwnd, NULL, "Error writing File DSN:", strerror (errno)); goto done; } } } done: if (attr_lst != NULL) free (attr_lst); if (connstr != NULL) free (connstr); } static void filedsn_update_file_list (TDSNCHOOSER *choose_t) { /* Reset current file */ gtk_entry_set_text (GTK_ENTRY (choose_t->file_entry), ""); if (choose_t->fremove) gtk_widget_set_sensitive(choose_t->fremove, FALSE); if (choose_t->fconfigure) gtk_widget_set_sensitive(choose_t->fconfigure, FALSE); if (choose_t->ftest) gtk_widget_set_sensitive(choose_t->ftest, FALSE); /* Update file list */ addfiles_to_list (choose_t->mainwnd, choose_t->file_list, choose_t->curr_dir); } void filedsn_add_clicked (GtkWidget *widget, TDSNCHOOSER *choose_t) { SQLCHAR drv[1024] = { 0 }; int sqlstat; LPSTR s, attrs; TFDRIVERCHOOSER drvchoose_t; if (!choose_t) return; /* Try first to get the driver name */ SQLSetConfigMode (ODBC_USER_DSN); drvchoose_t.attrs = NULL; drvchoose_t.dsn = NULL; drvchoose_t.driver = NULL; drvchoose_t.curr_dir = choose_t->curr_dir; create_fdriverchooser (choose_t->mainwnd, &drvchoose_t); /* Check output parameters */ if (drvchoose_t.ok) { if (sizeof(drv) > WCSLEN(drvchoose_t.driver) + strlen("DRIVER=")) { s = strcpy(drv, "DRIVER="); s += strlen("DRIVER="); dm_strcpy_W2A(s, drvchoose_t.driver); attrs = drvchoose_t.attrs; filedsn_configure(choose_t, drv, drvchoose_t.dsn, attrs ? attrs :"\0\0", TRUE, drvchoose_t.verify_conn); filedsn_update_file_list(choose_t); } } if (drvchoose_t.driver) free (drvchoose_t.driver); if (drvchoose_t.attrs) free (drvchoose_t.attrs); if (drvchoose_t.dsn) free (drvchoose_t.dsn); } void filedsn_remove_clicked (GtkWidget *widget, TDSNCHOOSER *choose_t) { char msg[4096]; char *filedsn; if (!choose_t) return; /* Retrieve filedsn file name */ filedsn = (char*)gtk_entry_get_text (GTK_ENTRY (choose_t->file_entry)); /* Confirm removing a file dsn */ snprintf (msg, sizeof (msg), "Are you sure you want to remove the '%s' data source?", filedsn); if (!create_confirm (choose_t->mainwnd, NULL, msg)) return; /* Remove file */ if (unlink (filedsn) < 0) { create_error (choose_t->mainwnd, NULL, "Error removing file DSN:", strerror (errno)); return; } /* Update file list */ filedsn_update_file_list(choose_t); } void filedsn_configure_clicked (GtkWidget *widget, TDSNCHOOSER *choose_t) { char dsn[1024]; char *filedsn; char *drv = NULL; char *attrs = NULL; char *_attrs = NULL; /* attr list */ size_t len = 0; /* current attr list length (w/o list-terminating NUL) */ char *p, *p_next; WORD read_len; char entries[1024]; if (!choose_t) return; /* Retrieve filedsn file name */ filedsn = (char*)gtk_entry_get_text (GTK_ENTRY (choose_t->file_entry)); filedsn_get_dsn (filedsn, dsn, sizeof (dsn)); /* Get list of entries in .dsn file */ if (!SQLReadFileDSN (filedsn, "ODBC", NULL, entries, sizeof (entries), &read_len)) { create_error (choose_t->mainwnd, NULL, "SQLReadFileDSN failed", NULL); goto done; } /* add params from the .dsn file */ for (p = entries; *p != '\0'; p = p_next) { char *tmp; size_t add_len; /* length of added attribute */ char value[1024]; /* get next entry */ p_next = strchr (p, ';'); if (p_next) *p_next++ = '\0'; if (!SQLReadFileDSN (filedsn, "ODBC", p, value, sizeof(value), &read_len)) { create_error (choose_t->mainwnd, NULL, "SQLReadFileDSN failed", NULL); goto done; } if (!strcasecmp (p, "DRIVER")) { /* got driver keyword */ add_len = strlen ("DRIVER=") + strlen (value) + 1; drv = malloc (add_len); snprintf (drv, add_len, "DRIVER=%s", value); continue; } /* +1 for '=', +1 for NUL */ add_len = strlen (p) + 1 + strlen (value) + 1; /* +1 for list-terminating NUL */; tmp = realloc (attrs, len + add_len + 1); if (tmp == NULL) { create_error (choose_t->mainwnd, NULL, "Error adding file DSN:", strerror (errno)); goto done; } attrs = tmp; snprintf (attrs + len, add_len, "%s=%s", p, value); len += add_len; } if (drv == NULL) { /* no driver found, probably unshareable file data source */ create_error (choose_t->mainwnd, NULL, "Can't configure file DSN without DRIVER keyword (probably unshareable data source?)", NULL); goto done; } if (attrs == NULL) attrs = "\0\0"; else { /* NUL-terminate the list */ attrs[len] = '\0'; _attrs = attrs; } /* Configure file DSN */ filedsn_configure (choose_t, drv, dsn, attrs, FALSE, TRUE); done: if (drv != NULL) free (drv); if (_attrs != NULL) free (_attrs); } void filedsn_test_clicked (GtkWidget *widget, TDSNCHOOSER *choose_t) { char dsn[1024]; char connstr[4096] = { 0 }; char *filedsn; if (!choose_t) return; /* Retrieve filedsn file name */ filedsn = (char*)gtk_entry_get_text (GTK_ENTRY (choose_t->file_entry)); filedsn_get_dsn (filedsn, dsn, sizeof (dsn)); /* Create connection string and connect to data source */ snprintf (connstr, sizeof (connstr), "FILEDSN=%s", filedsn); if (test_driver_connect(choose_t, connstr)) { _iodbcdm_messagebox (choose_t->mainwnd, filedsn, "The connection DSN was tested successfully, and can be used at this time."); } } void filedsn_setdir_clicked (GtkWidget *widget, TDSNCHOOSER *choose_t) { char msg[4096]; if (!choose_t) return; /* confirm setting a directory */ snprintf (msg, sizeof (msg), "Are you sure that you want to make '%s' the default file DSN directory?", choose_t->curr_dir); if (!create_confirm (choose_t->mainwnd, NULL, msg)) return; /* write FileDSNPath value */ if (!SQLWritePrivateProfileString ("ODBC", "FileDSNPath", choose_t->curr_dir, "odbcinst.ini")) { create_error (choose_t->mainwnd, NULL, "Error setting default file DSN directory", NULL); return; } } void filedsn_filelist_select (GtkWidget *widget, gint row, gint column, GdkEvent *event, TDSNCHOOSER *choose_t) { LPSTR filename = NULL, temp = NULL; if (choose_t) { /* Get the file name */ gtk_clist_get_text (GTK_CLIST (choose_t->file_list), row, 0, &filename); /* Update the directory and file list */ temp = (LPSTR) malloc (STRLEN (filename) + STRLEN (choose_t->curr_dir) + 2); if (temp) { STRCPY (temp, choose_t->curr_dir); if (temp[STRLEN (temp) - 1] != '/') STRCAT (temp, "/"); STRCAT (temp, filename); /* Check if it's a valid file */ gtk_entry_set_text (GTK_ENTRY (choose_t->file_entry), temp); /* And activate buttons */ if (choose_t->fremove) gtk_widget_set_sensitive (choose_t->fremove, TRUE); if (choose_t->fconfigure) gtk_widget_set_sensitive (choose_t->fconfigure, TRUE); if (choose_t->ftest) gtk_widget_set_sensitive (choose_t->ftest, TRUE); free (temp); } } } void filedsn_filelist_unselect (GtkWidget *widget, gint row, gint column, GdkEvent *event, TDSNCHOOSER *choose_t) { if (choose_t) { /* Check if it's a valid file */ gtk_entry_set_text (GTK_ENTRY (choose_t->file_entry), ""); /* And des-activate buttons */ if (choose_t->fremove) gtk_widget_set_sensitive (choose_t->fremove, FALSE); if (choose_t->fconfigure) gtk_widget_set_sensitive (choose_t->fconfigure, FALSE); if (choose_t->ftest) gtk_widget_set_sensitive (choose_t->ftest, FALSE); } } void filedsn_dirlist_select (GtkWidget *widget, gint row, gint column, GdkEvent *event, TDSNCHOOSER *choose_t) { LPSTR filename = NULL, temp = NULL; int i; if (choose_t) { /* Get the directory name */ gtk_clist_get_text (GTK_CLIST (choose_t->dir_list), row, 0, &filename); if (filename && event && event->type == GDK_2BUTTON_PRESS) { /* Update the directory and file list */ temp = (LPSTR) malloc (STRLEN (filename) + STRLEN (choose_t->curr_dir) + 2); if (temp) { if (!strcmp (filename, ".")) STRCPY (temp, choose_t->curr_dir); else if (!strcmp (filename, "..")) { STRCPY (temp, choose_t->curr_dir); for (i = STRLEN (temp) - 1; i - 1 && temp[i] != '/'; i--); temp[i] = 0; } else { STRCPY (temp, choose_t->curr_dir); if (temp[STRLEN (temp) - 1] != '/') STRCAT (temp, "/"); STRCAT (temp, filename); } strncpy(choose_t->curr_dir, temp, sizeof(choose_t->curr_dir)); addlistofdir_to_optionmenu (choose_t->dir_combo, choose_t->curr_dir, choose_t); adddirectories_to_list (choose_t->mainwnd, choose_t->dir_list, choose_t->curr_dir); addfiles_to_list (choose_t->mainwnd, choose_t->file_list, choose_t->curr_dir); } } } } void filedsn_lookin_clicked (GtkWidget *widget, void **array) { if (array && array[0] && array[1] && ((TDSNCHOOSER *) array[1])->curr_dir && strcmp (((TDSNCHOOSER *) array[1])->curr_dir, array[0])) { TDSNCHOOSER *choose_t = (TDSNCHOOSER *) array[1]; /* Update the directory and file list */ strncpy(choose_t->curr_dir, array[0], sizeof(choose_t->curr_dir)); addlistofdir_to_optionmenu (choose_t->dir_combo, (LPCSTR) array[0], choose_t); adddirectories_to_list (choose_t->mainwnd, choose_t->dir_list, (LPCSTR) array[0]); addfiles_to_list (choose_t->mainwnd, choose_t->file_list, (LPCSTR) array[0]); } } void userdsn_list_select (GtkWidget *widget, gint row, gint column, GdkEvent *event, TDSNCHOOSER *choose_t) { char *szDSN = NULL; if (choose_t) { if (GTK_CLIST (choose_t->udsnlist)->selection != NULL) gtk_clist_get_text (GTK_CLIST (choose_t->udsnlist), GPOINTER_TO_INT (GTK_CLIST (choose_t->udsnlist)->selection->data), 0, &szDSN); if (szDSN && event && event->type == GDK_2BUTTON_PRESS) gtk_signal_emit_by_name (GTK_OBJECT (choose_t->uconfigure), "clicked", choose_t); gtk_widget_set_sensitive (choose_t->uremove, TRUE); gtk_widget_set_sensitive (choose_t->uconfigure, TRUE); gtk_widget_set_sensitive (choose_t->utest, TRUE); } } void userdsn_list_unselect (GtkWidget *widget, gint row, gint column, GdkEvent *event, TDSNCHOOSER *choose_t) { if (choose_t) { gtk_widget_set_sensitive (choose_t->uremove, FALSE); gtk_widget_set_sensitive (choose_t->uconfigure, FALSE); gtk_widget_set_sensitive (choose_t->utest, FALSE); } } void systemdsn_list_select (GtkWidget *widget, gint row, gint column, GdkEvent *event, TDSNCHOOSER *choose_t) { char *szDSN = NULL; if (choose_t) { if (GTK_CLIST (choose_t->sdsnlist)->selection != NULL) gtk_clist_get_text (GTK_CLIST (choose_t->sdsnlist), GPOINTER_TO_INT (GTK_CLIST (choose_t->sdsnlist)->selection->data), 0, &szDSN); if (szDSN && event && event->type == GDK_2BUTTON_PRESS) gtk_signal_emit_by_name (GTK_OBJECT (choose_t->sconfigure), "clicked", choose_t); gtk_widget_set_sensitive (choose_t->sremove, TRUE); gtk_widget_set_sensitive (choose_t->sconfigure, TRUE); gtk_widget_set_sensitive (choose_t->stest, TRUE); } } void systemdsn_list_unselect (GtkWidget *widget, gint row, gint column, GdkEvent *event, TDSNCHOOSER *choose_t) { if (choose_t) { gtk_widget_set_sensitive (choose_t->sremove, FALSE); gtk_widget_set_sensitive (choose_t->sconfigure, FALSE); gtk_widget_set_sensitive (choose_t->stest, FALSE); } } static void dsnchooser_ok_clicked (GtkWidget *widget, TDSNCHOOSER *choose_t) { char *szDSN; if (choose_t) { switch (choose_t->type_dsn) { case USER_DSN: if (GTK_CLIST (choose_t->udsnlist)->selection != NULL) { gtk_clist_get_text (GTK_CLIST (choose_t->udsnlist), GPOINTER_TO_INT (GTK_CLIST (choose_t->udsnlist)->selection-> data), 0, &szDSN); choose_t->dsn = dm_SQL_A2W(szDSN, SQL_NTS); } else choose_t->dsn = NULL; break; case SYSTEM_DSN: if (GTK_CLIST (choose_t->sdsnlist)->selection != NULL) { gtk_clist_get_text (GTK_CLIST (choose_t->sdsnlist), GPOINTER_TO_INT (GTK_CLIST (choose_t->sdsnlist)->selection-> data), 0, &szDSN); choose_t->dsn = dm_SQL_A2W (szDSN, SQL_NTS); } else choose_t->dsn = NULL; break; default: choose_t->dsn = NULL; break; }; done: choose_t->udsnlist = choose_t->sdsnlist = NULL; choose_t->uadd = choose_t->uremove = choose_t->utest = choose_t->uconfigure = NULL; choose_t->sadd = choose_t->sremove = choose_t->stest = choose_t->sconfigure = NULL; gtk_signal_disconnect_by_func (GTK_OBJECT (choose_t->mainwnd), GTK_SIGNAL_FUNC (gtk_main_quit), NULL); gtk_main_quit (); gtk_widget_destroy (choose_t->mainwnd); } } static void dsnchooser_cancel_clicked (GtkWidget *widget, TDSNCHOOSER *choose_t) { if (choose_t) { choose_t->udsnlist = choose_t->sdsnlist = NULL; choose_t->uadd = choose_t->uremove = choose_t->utest = choose_t->uconfigure = NULL; choose_t->sadd = choose_t->sremove = choose_t->stest = choose_t->sconfigure = NULL; choose_t->type_dsn = -1; choose_t->dsn = NULL; gtk_signal_disconnect_by_func (GTK_OBJECT (choose_t->mainwnd), GTK_SIGNAL_FUNC (gtk_main_quit), NULL); gtk_main_quit (); gtk_widget_destroy (choose_t->mainwnd); } } static gint delete_event (GtkWidget *widget, GdkEvent *event, TDSNCHOOSER *choose_t) { dsnchooser_cancel_clicked (widget, choose_t); return FALSE; } void create_dsnchooser (HWND hwnd, TDSNCHOOSER * choose_t) { GdkPixmap *pixmap; GdkBitmap *mask; GtkStyle *style; GtkWidget *dsnchooser; GtkWidget *vbox27; GtkWidget *notebook1; GtkWidget *vbox28; GtkWidget *frame60; GtkWidget *alignment52; GtkWidget *hbox36; GtkWidget *scrolledwindow17; GtkWidget *clist1; GtkWidget *label104; GtkWidget *label105; GtkWidget *label106; GtkWidget *vbox29; GtkWidget *b_add; GtkWidget *b_remove; GtkWidget *b_configure; GtkWidget *b_test; GtkWidget *frame61; GtkWidget *alignment53; GtkWidget *label107; GtkWidget *frame62; GtkWidget *alignment54; GtkWidget *hbox37; GtkWidget *pixmap1; GtkWidget *label108; GtkWidget *label109; GtkWidget *vbox30; GtkWidget *frame63; GtkWidget *alignment55; GtkWidget *hbox38; GtkWidget *scrolledwindow18; GtkWidget *clist2; GtkWidget *label110; GtkWidget *label111; GtkWidget *label112; GtkWidget *vbox31; GtkWidget *bs_add; GtkWidget *bs_remove; GtkWidget *bs_configure; GtkWidget *bs_test; GtkWidget *frame64; GtkWidget *alignment56; GtkWidget *label113; GtkWidget *frame65; GtkWidget *alignment57; GtkWidget *hbox39; GtkWidget *pixmap2; GtkWidget *label114; GtkWidget *label115; GtkWidget *vbox32; GtkWidget *frame66; GtkWidget *alignment58; GtkWidget *hbox40; GtkWidget *vbox33; GtkWidget *hbox41; GtkWidget *frame67; GtkWidget *alignment59; GtkWidget *hbox42; GtkWidget *label116; GtkWidget *optionmenu1; GtkWidget *menu2; GtkWidget *hbox43; GtkWidget *scrolledwindow19; GtkWidget *clist3; GtkWidget *label117; GtkWidget *scrolledwindow20; GtkWidget *clist4; GtkWidget *label118; GtkWidget *frame68; GtkWidget *alignment60; GtkWidget *hbox44; GtkWidget *label119; GtkWidget *t_fileselected; GtkWidget *vbox34; GtkWidget *bf_add; GtkWidget *bf_remove; GtkWidget *bf_configure; GtkWidget *bf_test; GtkWidget *bf_setdir; GtkWidget *frame69; GtkWidget *alignment61; GtkWidget *frame70; GtkWidget *alignment62; GtkWidget *hbox45; GtkWidget *pixmap3; GtkWidget *label120; GtkWidget *label121; GtkWidget *hbuttonbox2; GtkWidget *b_cancel; GtkWidget *b_ok; GtkAccelGroup *accel_group; if (!GTK_IS_WIDGET (hwnd)) { gtk_init (0, NULL); hwnd = gtk_window_new (GTK_WINDOW_TOPLEVEL); } if (hwnd == NULL || !GTK_IS_WIDGET (hwnd)) return; accel_group = gtk_accel_group_new (); dsnchooser = gtk_dialog_new (); gtk_widget_set_name (dsnchooser, "dsnchooser"); gtk_widget_set_size_request (dsnchooser, 570, 420); gtk_window_set_title (GTK_WINDOW (dsnchooser), _("Select Data Source")); gtk_window_set_position (GTK_WINDOW (dsnchooser), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (dsnchooser), TRUE); gtk_window_set_default_size (GTK_WINDOW (dsnchooser), 600, 450); gtk_window_set_type_hint (GTK_WINDOW (dsnchooser), GDK_WINDOW_TYPE_HINT_DIALOG); #if GTK_CHECK_VERSION(2,0,0) gtk_widget_show (dsnchooser); #endif vbox27 = GTK_DIALOG (dsnchooser)->vbox; gtk_widget_set_name (vbox27, "vbox27"); gtk_widget_show (vbox27); notebook1 = gtk_notebook_new (); gtk_widget_set_name (notebook1, "notebook1"); gtk_widget_show (notebook1); gtk_box_pack_start (GTK_BOX (vbox27), notebook1, TRUE, TRUE, 0); vbox28 = gtk_vbox_new (FALSE, 0); gtk_widget_set_name (vbox28, "vbox28"); gtk_widget_show (vbox28); gtk_container_add (GTK_CONTAINER (notebook1), vbox28); frame60 = gtk_frame_new (NULL); gtk_widget_set_name (frame60, "frame60"); gtk_widget_show (frame60); gtk_box_pack_start (GTK_BOX (vbox28), frame60, TRUE, TRUE, 0); gtk_frame_set_shadow_type (GTK_FRAME (frame60), GTK_SHADOW_NONE); alignment52 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment52, "alignment52"); gtk_widget_show (alignment52); gtk_container_add (GTK_CONTAINER (frame60), alignment52); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment52), 0, 0, 4, 0); hbox36 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox36, "hbox36"); gtk_widget_show (hbox36); gtk_container_add (GTK_CONTAINER (alignment52), hbox36); scrolledwindow17 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_set_name (scrolledwindow17, "scrolledwindow17"); gtk_widget_show (scrolledwindow17); gtk_box_pack_start (GTK_BOX (hbox36), scrolledwindow17, TRUE, TRUE, 0); gtk_widget_set_size_request (scrolledwindow17, 440, 219); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow17), GTK_SHADOW_IN); clist1 = gtk_clist_new (3); gtk_widget_set_name (clist1, "clist1"); gtk_widget_show (clist1); gtk_container_add (GTK_CONTAINER (scrolledwindow17), clist1); gtk_clist_set_column_width (GTK_CLIST (clist1), 0, 100); gtk_clist_set_column_width (GTK_CLIST (clist1), 1, 162); gtk_clist_set_column_width (GTK_CLIST (clist1), 2, 80); gtk_clist_column_titles_show (GTK_CLIST (clist1)); label104 = gtk_label_new (_("Name")); gtk_widget_set_name (label104, "label104"); gtk_widget_show (label104); gtk_clist_set_column_widget (GTK_CLIST (clist1), 0, label104); gtk_widget_set_size_request (label104, 100, -1); label105 = gtk_label_new (_("Description")); gtk_widget_set_name (label105, "label105"); gtk_widget_show (label105); gtk_clist_set_column_widget (GTK_CLIST (clist1), 1, label105); gtk_widget_set_size_request (label105, 162, -1); label106 = gtk_label_new (_("Driver")); gtk_widget_set_name (label106, "label106"); gtk_widget_show (label106); gtk_clist_set_column_widget (GTK_CLIST (clist1), 2, label106); gtk_widget_set_size_request (label106, 80, -1); vbox29 = gtk_vbox_new (FALSE, 0); gtk_widget_set_name (vbox29, "vbox29"); gtk_widget_show (vbox29); gtk_box_pack_start (GTK_BOX (hbox36), vbox29, FALSE, TRUE, 0); b_add = gtk_button_new_from_stock ("gtk-add"); gtk_widget_set_name (b_add, "b_add"); gtk_widget_show (b_add); gtk_box_pack_start (GTK_BOX (vbox29), b_add, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (b_add), 4); GTK_WIDGET_SET_FLAGS (b_add, GTK_CAN_DEFAULT); gtk_widget_add_accelerator (b_add, "clicked", accel_group, GDK_A, (GdkModifierType) GDK_MOD1_MASK, GTK_ACCEL_VISIBLE); b_remove = gtk_button_new_from_stock ("gtk-remove"); gtk_widget_set_name (b_remove, "b_remove"); gtk_widget_show (b_remove); gtk_box_pack_start (GTK_BOX (vbox29), b_remove, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (b_remove), 4); gtk_widget_set_sensitive (b_remove, FALSE); GTK_WIDGET_SET_FLAGS (b_remove, GTK_CAN_DEFAULT); gtk_widget_add_accelerator (b_remove, "clicked", accel_group, GDK_R, (GdkModifierType) GDK_MOD1_MASK, GTK_ACCEL_VISIBLE); b_configure = gtk_button_new_with_mnemonic (_("Confi_gure")); gtk_widget_set_name (b_configure, "b_configure"); gtk_widget_show (b_configure); gtk_box_pack_start (GTK_BOX (vbox29), b_configure, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (b_configure), 4); gtk_widget_set_sensitive (b_configure, FALSE); GTK_WIDGET_SET_FLAGS (b_configure, GTK_CAN_DEFAULT); gtk_widget_add_accelerator (b_configure, "clicked", accel_group, GDK_G, (GdkModifierType) GDK_MOD1_MASK, GTK_ACCEL_VISIBLE); gtk_widget_add_accelerator (b_configure, "clicked", accel_group, GDK_g, (GdkModifierType) GDK_MOD1_MASK, GTK_ACCEL_VISIBLE); b_test = gtk_button_new_with_mnemonic (_("_Test")); gtk_widget_set_name (b_test, "b_test"); gtk_widget_show (b_test); gtk_box_pack_start (GTK_BOX (vbox29), b_test, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (b_test), 4); gtk_widget_set_sensitive (b_test, FALSE); GTK_WIDGET_SET_FLAGS (b_test, GTK_CAN_DEFAULT); gtk_widget_add_accelerator (b_test, "clicked", accel_group, GDK_T, (GdkModifierType) GDK_MOD1_MASK, GTK_ACCEL_VISIBLE); frame61 = gtk_frame_new (NULL); gtk_widget_set_name (frame61, "frame61"); gtk_widget_show (frame61); gtk_box_pack_start (GTK_BOX (vbox29), frame61, TRUE, TRUE, 0); gtk_widget_set_size_request (frame61, -1, 80); gtk_frame_set_shadow_type (GTK_FRAME (frame61), GTK_SHADOW_NONE); alignment53 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment53, "alignment53"); gtk_widget_show (alignment53); gtk_container_add (GTK_CONTAINER (frame61), alignment53); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment53), 0, 0, 12, 0); label107 = gtk_label_new (_(" User Data Sources:")); gtk_widget_set_name (label107, "label107"); gtk_widget_show (label107); gtk_frame_set_label_widget (GTK_FRAME (frame60), label107); gtk_label_set_use_markup (GTK_LABEL (label107), TRUE); frame62 = gtk_frame_new (NULL); gtk_widget_set_name (frame62, "frame62"); gtk_widget_show (frame62); gtk_box_pack_start (GTK_BOX (vbox28), frame62, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (frame62), 3); alignment54 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment54, "alignment54"); gtk_widget_show (alignment54); gtk_container_add (GTK_CONTAINER (frame62), alignment54); hbox37 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox37, "hbox37"); gtk_widget_show (hbox37); gtk_container_add (GTK_CONTAINER (alignment54), hbox37); #if GTK_CHECK_VERSION(2,0,0) style = gtk_widget_get_style (dsnchooser); pixmap = gdk_pixmap_create_from_xpm_d (dsnchooser->window, &mask, &style->bg[GTK_STATE_NORMAL], (gchar **) odbc4_xpm); #else style = gtk_widget_get_style (GTK_WIDGET (hwnd)); pixmap = gdk_pixmap_create_from_xpm_d (GTK_WIDGET (hwnd)->window, &mask, &style->bg[GTK_STATE_NORMAL], (gchar **) odbc4_xpm); #endif pixmap1 = gtk_pixmap_new (pixmap, mask); gtk_widget_set_name (pixmap1, "pixmap1"); gtk_widget_show (pixmap1); gtk_box_pack_start (GTK_BOX (hbox37), pixmap1, FALSE, TRUE, 10); label108 = gtk_label_new (_("An ODBC User data source stores information about to connect to\nthe indicated data provider. A User data source is only available to you,\nand can only be used on the current machine.")); gtk_widget_set_name (label108, "label108"); gtk_widget_show (label108); gtk_box_pack_start (GTK_BOX (hbox37), label108, FALSE, TRUE, 0); gtk_label_set_justify (GTK_LABEL (label108), GTK_JUSTIFY_FILL); label109 = gtk_label_new (_("User DSN")); gtk_widget_set_name (label109, "label109"); gtk_widget_show (label109); gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 0), label109); choose_t->uadd = b_add; choose_t->uremove = b_remove; choose_t->utest = b_test; choose_t->uconfigure = b_configure; vbox30 = gtk_vbox_new (FALSE, 0); gtk_widget_set_name (vbox30, "vbox30"); gtk_widget_show (vbox30); gtk_container_add (GTK_CONTAINER (notebook1), vbox30); frame63 = gtk_frame_new (NULL); gtk_widget_set_name (frame63, "frame63"); gtk_widget_show (frame63); gtk_box_pack_start (GTK_BOX (vbox30), frame63, TRUE, TRUE, 0); gtk_frame_set_shadow_type (GTK_FRAME (frame63), GTK_SHADOW_NONE); alignment55 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment55, "alignment55"); gtk_widget_show (alignment55); gtk_container_add (GTK_CONTAINER (frame63), alignment55); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment55), 0, 0, 4, 0); hbox38 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox38, "hbox38"); gtk_widget_show (hbox38); gtk_container_add (GTK_CONTAINER (alignment55), hbox38); scrolledwindow18 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_set_name (scrolledwindow18, "scrolledwindow18"); gtk_widget_show (scrolledwindow18); gtk_box_pack_start (GTK_BOX (hbox38), scrolledwindow18, TRUE, TRUE, 0); gtk_widget_set_size_request (scrolledwindow18, 440, 219); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow18), GTK_SHADOW_IN); clist2 = gtk_clist_new (3); gtk_widget_set_name (clist2, "clist2"); gtk_widget_show (clist2); gtk_container_add (GTK_CONTAINER (scrolledwindow18), clist2); gtk_clist_set_column_width (GTK_CLIST (clist2), 0, 100); gtk_clist_set_column_width (GTK_CLIST (clist2), 1, 163); gtk_clist_set_column_width (GTK_CLIST (clist2), 2, 80); gtk_clist_column_titles_show (GTK_CLIST (clist2)); label110 = gtk_label_new (_("Name")); gtk_widget_set_name (label110, "label110"); gtk_widget_show (label110); gtk_clist_set_column_widget (GTK_CLIST (clist2), 0, label110); gtk_widget_set_size_request (label110, 100, -1); label111 = gtk_label_new (_("Description")); gtk_widget_set_name (label111, "label111"); gtk_widget_show (label111); gtk_clist_set_column_widget (GTK_CLIST (clist2), 1, label111); gtk_widget_set_size_request (label111, 162, -1); label112 = gtk_label_new (_("Driver")); gtk_widget_set_name (label112, "label112"); gtk_widget_show (label112); gtk_clist_set_column_widget (GTK_CLIST (clist2), 2, label112); gtk_widget_set_size_request (label112, 80, -1); vbox31 = gtk_vbox_new (FALSE, 0); gtk_widget_set_name (vbox31, "vbox31"); gtk_widget_show (vbox31); gtk_box_pack_start (GTK_BOX (hbox38), vbox31, FALSE, TRUE, 0); bs_add = gtk_button_new_from_stock ("gtk-add"); gtk_widget_set_name (bs_add, "bs_add"); gtk_widget_show (bs_add); gtk_box_pack_start (GTK_BOX (vbox31), bs_add, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (bs_add), 4); GTK_WIDGET_SET_FLAGS (bs_add, GTK_CAN_DEFAULT); gtk_widget_add_accelerator (bs_add, "clicked", accel_group, GDK_A, (GdkModifierType) GDK_MOD1_MASK, GTK_ACCEL_VISIBLE); bs_remove = gtk_button_new_from_stock ("gtk-remove"); gtk_widget_set_name (bs_remove, "bs_remove"); gtk_widget_show (bs_remove); gtk_box_pack_start (GTK_BOX (vbox31), bs_remove, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (bs_remove), 4); gtk_widget_set_sensitive (bs_remove, FALSE); GTK_WIDGET_SET_FLAGS (bs_remove, GTK_CAN_DEFAULT); gtk_widget_add_accelerator (bs_remove, "clicked", accel_group, GDK_R, (GdkModifierType) GDK_MOD1_MASK, GTK_ACCEL_VISIBLE); bs_configure = gtk_button_new_with_mnemonic (_("Confi_gure")); gtk_widget_set_name (bs_configure, "bs_configure"); gtk_widget_show (bs_configure); gtk_box_pack_start (GTK_BOX (vbox31), bs_configure, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (bs_configure), 4); gtk_widget_set_sensitive (bs_configure, FALSE); GTK_WIDGET_SET_FLAGS (bs_configure, GTK_CAN_DEFAULT); gtk_widget_add_accelerator (bs_configure, "clicked", accel_group, GDK_G, (GdkModifierType) GDK_MOD1_MASK, GTK_ACCEL_VISIBLE); gtk_widget_add_accelerator (bs_configure, "clicked", accel_group, GDK_g, (GdkModifierType) GDK_MOD1_MASK, GTK_ACCEL_VISIBLE); bs_test = gtk_button_new_with_mnemonic (_("_Test")); gtk_widget_set_name (bs_test, "bs_test"); gtk_widget_show (bs_test); gtk_box_pack_start (GTK_BOX (vbox31), bs_test, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (bs_test), 4); gtk_widget_set_sensitive (bs_test, FALSE); GTK_WIDGET_SET_FLAGS (bs_test, GTK_CAN_DEFAULT); gtk_widget_add_accelerator (bs_test, "clicked", accel_group, GDK_T, (GdkModifierType) GDK_MOD1_MASK, GTK_ACCEL_VISIBLE); frame64 = gtk_frame_new (NULL); gtk_widget_set_name (frame64, "frame64"); gtk_widget_show (frame64); gtk_box_pack_start (GTK_BOX (vbox31), frame64, TRUE, TRUE, 0); gtk_widget_set_size_request (frame64, -1, 80); gtk_frame_set_shadow_type (GTK_FRAME (frame64), GTK_SHADOW_NONE); alignment56 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment56, "alignment56"); gtk_widget_show (alignment56); gtk_container_add (GTK_CONTAINER (frame64), alignment56); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment56), 0, 0, 12, 0); label113 = gtk_label_new (_(" System Data Sources:")); gtk_widget_set_name (label113, "label113"); gtk_widget_show (label113); gtk_frame_set_label_widget (GTK_FRAME (frame63), label113); gtk_label_set_use_markup (GTK_LABEL (label113), TRUE); frame65 = gtk_frame_new (NULL); gtk_widget_set_name (frame65, "frame65"); gtk_widget_show (frame65); gtk_box_pack_start (GTK_BOX (vbox30), frame65, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (frame65), 3); alignment57 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment57, "alignment57"); gtk_widget_show (alignment57); gtk_container_add (GTK_CONTAINER (frame65), alignment57); hbox39 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox39, "hbox39"); gtk_widget_show (hbox39); gtk_container_add (GTK_CONTAINER (alignment57), hbox39); gtk_container_set_border_width (GTK_CONTAINER (hbox39), 10); pixmap2 = gtk_pixmap_new (pixmap, mask); gtk_widget_set_name (pixmap2, "pixmap2"); gtk_widget_show (pixmap2); gtk_box_pack_start (GTK_BOX (hbox39), pixmap2, FALSE, TRUE, 10); label114 = gtk_label_new (_("An ODBC System data source stores information about to connect to\nthe indicated data provider. A System data source is visible to all\nusers on this machine, including daemons.")); gtk_widget_set_name (label114, "label114"); gtk_widget_show (label114); gtk_box_pack_start (GTK_BOX (hbox39), label114, FALSE, TRUE, 0); gtk_label_set_justify (GTK_LABEL (label114), GTK_JUSTIFY_FILL); label115 = gtk_label_new (_("System DSN")); gtk_widget_set_name (label115, "label115"); gtk_widget_show (label115); gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 1), label115); choose_t->sadd = bs_add; choose_t->sremove = bs_remove; choose_t->stest = bs_test; choose_t->sconfigure = bs_configure; vbox32 = gtk_vbox_new (FALSE, 0); gtk_widget_set_name (vbox32, "vbox32"); gtk_widget_show (vbox32); gtk_container_add (GTK_CONTAINER (notebook1), vbox32); frame66 = gtk_frame_new (NULL); gtk_widget_set_name (frame66, "frame66"); gtk_widget_show (frame66); gtk_box_pack_start (GTK_BOX (vbox32), frame66, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (frame66), 2); gtk_frame_set_shadow_type (GTK_FRAME (frame66), GTK_SHADOW_NONE); alignment58 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment58, "alignment58"); gtk_widget_show (alignment58); gtk_container_add (GTK_CONTAINER (frame66), alignment58); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment58), 0, 0, 4, 0); hbox40 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox40, "hbox40"); gtk_widget_show (hbox40); gtk_container_add (GTK_CONTAINER (alignment58), hbox40); vbox33 = gtk_vbox_new (FALSE, 0); gtk_widget_set_name (vbox33, "vbox33"); gtk_widget_show (vbox33); gtk_box_pack_start (GTK_BOX (hbox40), vbox33, TRUE, TRUE, 0); gtk_widget_set_size_request (vbox33, 436, 250); hbox41 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox41, "hbox41"); gtk_widget_show (hbox41); gtk_box_pack_start (GTK_BOX (vbox33), hbox41, FALSE, FALSE, 0); frame67 = gtk_frame_new (NULL); gtk_widget_set_name (frame67, "frame67"); gtk_widget_show (frame67); gtk_box_pack_start (GTK_BOX (hbox41), frame67, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (frame67), 4); gtk_frame_set_shadow_type (GTK_FRAME (frame67), GTK_SHADOW_NONE); alignment59 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment59, "alignment59"); gtk_widget_show (alignment59); gtk_container_add (GTK_CONTAINER (frame67), alignment59); gtk_container_set_border_width (GTK_CONTAINER (alignment59), 2); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment59), 0, 0, 6, 0); hbox42 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox42, "hbox42"); gtk_widget_show (hbox42); gtk_container_add (GTK_CONTAINER (alignment59), hbox42); label116 = gtk_label_new (_("Look in : ")); gtk_widget_set_name (label116, "label116"); gtk_widget_show (label116); gtk_box_pack_start (GTK_BOX (hbox42), label116, FALSE, FALSE, 0); optionmenu1 = gtk_option_menu_new (); gtk_widget_set_name (optionmenu1, "optionmenu1"); gtk_widget_show (optionmenu1); gtk_box_pack_start (GTK_BOX (hbox42), optionmenu1, TRUE, TRUE, 0); menu2 = gtk_menu_new (); gtk_widget_set_name (menu2, "menu2"); gtk_option_menu_set_menu (GTK_OPTION_MENU (optionmenu1), menu2); hbox43 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox43, "hbox43"); gtk_widget_show (hbox43); gtk_box_pack_start (GTK_BOX (vbox33), hbox43, TRUE, TRUE, 0); scrolledwindow19 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_set_name (scrolledwindow19, "scrolledwindow19"); gtk_widget_show (scrolledwindow19); gtk_box_pack_start (GTK_BOX (hbox43), scrolledwindow19, TRUE, TRUE, 0); gtk_widget_set_size_request (scrolledwindow19, 96, -1); gtk_container_set_border_width (GTK_CONTAINER (scrolledwindow19), 4); clist3 = gtk_clist_new (1); gtk_widget_set_name (clist3, "clist3"); gtk_widget_show (clist3); gtk_container_add (GTK_CONTAINER (scrolledwindow19), clist3); gtk_clist_set_column_width (GTK_CLIST (clist3), 0, 80); gtk_clist_column_titles_show (GTK_CLIST (clist3)); label117 = gtk_label_new (_("Directories")); gtk_widget_set_name (label117, "label117"); gtk_widget_show (label117); gtk_clist_set_column_widget (GTK_CLIST (clist3), 0, label117); scrolledwindow20 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_set_name (scrolledwindow20, "scrolledwindow20"); gtk_widget_show (scrolledwindow20); gtk_box_pack_start (GTK_BOX (hbox43), scrolledwindow20, TRUE, TRUE, 0); gtk_widget_set_size_request (scrolledwindow20, 102, -1); gtk_container_set_border_width (GTK_CONTAINER (scrolledwindow20), 4); clist4 = gtk_clist_new (1); gtk_widget_set_name (clist4, "clist4"); gtk_widget_show (clist4); gtk_container_add (GTK_CONTAINER (scrolledwindow20), clist4); gtk_clist_set_column_width (GTK_CLIST (clist4), 0, 80); gtk_clist_column_titles_show (GTK_CLIST (clist4)); label118 = gtk_label_new (_("Files")); gtk_widget_set_name (label118, "label118"); gtk_widget_show (label118); gtk_clist_set_column_widget (GTK_CLIST (clist4), 0, label118); frame68 = gtk_frame_new (NULL); gtk_widget_set_name (frame68, "frame68"); gtk_widget_show (frame68); gtk_box_pack_start (GTK_BOX (vbox33), frame68, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (frame68), 4); gtk_frame_set_shadow_type (GTK_FRAME (frame68), GTK_SHADOW_NONE); alignment60 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment60, "alignment60"); gtk_widget_show (alignment60); gtk_container_add (GTK_CONTAINER (frame68), alignment60); gtk_container_set_border_width (GTK_CONTAINER (alignment60), 2); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment60), 0, 0, 6, 0); hbox44 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox44, "hbox44"); gtk_widget_show (hbox44); gtk_container_add (GTK_CONTAINER (alignment60), hbox44); label119 = gtk_label_new (_("File selected:")); gtk_widget_set_name (label119, "label119"); gtk_widget_show (label119); gtk_box_pack_start (GTK_BOX (hbox44), label119, FALSE, FALSE, 0); t_fileselected = gtk_entry_new (); gtk_widget_set_name (t_fileselected, "t_fileselected"); gtk_widget_show (t_fileselected); gtk_box_pack_start (GTK_BOX (hbox44), t_fileselected, TRUE, TRUE, 0); vbox34 = gtk_vbox_new (FALSE, 0); gtk_widget_set_name (vbox34, "vbox34"); gtk_widget_show (vbox34); gtk_box_pack_start (GTK_BOX (hbox40), vbox34, FALSE, TRUE, 0); bf_add = gtk_button_new_from_stock ("gtk-add"); gtk_widget_set_name (bf_add, "bf_add"); gtk_widget_show (bf_add); gtk_box_pack_start (GTK_BOX (vbox34), bf_add, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (bf_add), 4); GTK_WIDGET_SET_FLAGS (bf_add, GTK_CAN_DEFAULT); gtk_widget_add_accelerator (bf_add, "clicked", accel_group, GDK_A, (GdkModifierType) GDK_MOD1_MASK, GTK_ACCEL_VISIBLE); bf_remove = gtk_button_new_from_stock ("gtk-remove"); gtk_widget_set_name (bf_remove, "bf_remove"); gtk_widget_show (bf_remove); gtk_box_pack_start (GTK_BOX (vbox34), bf_remove, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (bf_remove), 4); GTK_WIDGET_SET_FLAGS (bf_remove, GTK_CAN_DEFAULT); gtk_widget_add_accelerator (bf_remove, "clicked", accel_group, GDK_R, (GdkModifierType) GDK_MOD1_MASK, GTK_ACCEL_VISIBLE); bf_configure = gtk_button_new_with_mnemonic (_("Confi_gure")); gtk_widget_set_name (bf_configure, "bf_configure"); gtk_widget_show (bf_configure); gtk_box_pack_start (GTK_BOX (vbox34), bf_configure, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (bf_configure), 4); GTK_WIDGET_SET_FLAGS (bf_configure, GTK_CAN_DEFAULT); gtk_widget_add_accelerator (bf_configure, "clicked", accel_group, GDK_G, (GdkModifierType) GDK_MOD1_MASK, GTK_ACCEL_VISIBLE); gtk_widget_add_accelerator (bf_configure, "clicked", accel_group, GDK_g, (GdkModifierType) GDK_MOD1_MASK, GTK_ACCEL_VISIBLE); bf_test = gtk_button_new_with_mnemonic (_("_Test")); gtk_widget_set_name (bf_test, "bf_test"); gtk_widget_show (bf_test); gtk_box_pack_start (GTK_BOX (vbox34), bf_test, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (bf_test), 4); GTK_WIDGET_SET_FLAGS (bf_test, GTK_CAN_DEFAULT); gtk_widget_add_accelerator (bf_test, "clicked", accel_group, GDK_T, (GdkModifierType) GDK_MOD1_MASK, GTK_ACCEL_VISIBLE); bf_setdir = gtk_button_new_with_mnemonic (_("_Set Dir")); gtk_widget_set_name (bf_setdir, "bf_setdir"); gtk_widget_show (bf_setdir); gtk_box_pack_start (GTK_BOX (vbox34), bf_setdir, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (bf_setdir), 4); GTK_WIDGET_SET_FLAGS (bf_setdir, GTK_CAN_DEFAULT); gtk_widget_add_accelerator (bf_setdir, "clicked", accel_group, GDK_S, (GdkModifierType) GDK_MOD1_MASK, GTK_ACCEL_VISIBLE); frame69 = gtk_frame_new (NULL); gtk_widget_set_name (frame69, "frame69"); gtk_widget_show (frame69); gtk_box_pack_start (GTK_BOX (vbox34), frame69, TRUE, TRUE, 0); gtk_widget_set_size_request (frame69, -1, 80); gtk_frame_set_shadow_type (GTK_FRAME (frame69), GTK_SHADOW_NONE); alignment61 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment61, "alignment61"); gtk_widget_show (alignment61); gtk_container_add (GTK_CONTAINER (frame69), alignment61); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment61), 0, 0, 12, 0); frame70 = gtk_frame_new (NULL); gtk_widget_set_name (frame70, "frame70"); gtk_widget_show (frame70); gtk_box_pack_start (GTK_BOX (vbox32), frame70, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (frame70), 3); alignment62 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment62, "alignment62"); gtk_widget_show (alignment62); gtk_container_add (GTK_CONTAINER (frame70), alignment62); hbox45 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox45, "hbox45"); gtk_widget_show (hbox45); gtk_container_add (GTK_CONTAINER (alignment62), hbox45); gtk_container_set_border_width (GTK_CONTAINER (hbox45), 10); pixmap3 = gtk_pixmap_new (pixmap, mask); gtk_widget_set_name (pixmap3, "pixmap3"); gtk_widget_show (pixmap3); gtk_box_pack_start (GTK_BOX (hbox45), pixmap3, FALSE, TRUE, 10); label120 = gtk_label_new (_("Select the file data source that describes the driver that you wish to\nconnect to. You can use any file data source that refers to an ODBC\ndriver which is installed on your machine.")); gtk_widget_set_name (label120, "label120"); gtk_widget_show (label120); gtk_box_pack_start (GTK_BOX (hbox45), label120, FALSE, TRUE, 0); gtk_label_set_justify (GTK_LABEL (label120), GTK_JUSTIFY_FILL); label121 = gtk_label_new (_("File DSN")); gtk_widget_set_name (label121, "label121"); gtk_widget_show (label121); gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 2), label121); choose_t->fadd = bf_add; choose_t->fremove = bf_remove; choose_t->fconfigure = bf_configure; choose_t->ftest = bf_test; choose_t->dir_list = clist3; choose_t->dir_combo = optionmenu1; choose_t->file_list = clist4; choose_t->file_entry = t_fileselected; choose_t->fsetdir = bf_setdir; hbuttonbox2 = GTK_DIALOG (dsnchooser)->action_area; gtk_widget_set_name (hbuttonbox2, "hbuttonbox2"); gtk_widget_show (hbuttonbox2); gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox2), GTK_BUTTONBOX_END); b_cancel = gtk_button_new_from_stock ("gtk-cancel"); gtk_widget_set_name (b_cancel, "b_cancel"); gtk_widget_show (b_cancel); gtk_dialog_add_action_widget (GTK_DIALOG (dsnchooser), b_cancel, GTK_RESPONSE_CANCEL); GTK_WIDGET_SET_FLAGS (b_cancel, GTK_CAN_DEFAULT); b_ok = gtk_button_new_from_stock ("gtk-ok"); gtk_widget_set_name (b_ok, "b_ok"); gtk_widget_show (b_ok); gtk_dialog_add_action_widget (GTK_DIALOG (dsnchooser), b_ok, GTK_RESPONSE_OK); GTK_WIDGET_SET_FLAGS (b_ok, GTK_CAN_DEFAULT); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (dsnchooser, dsnchooser, "dsnchooser"); GLADE_HOOKUP_OBJECT_NO_REF (dsnchooser, vbox27, "vbox27"); GLADE_HOOKUP_OBJECT (dsnchooser, notebook1, "notebook1"); GLADE_HOOKUP_OBJECT (dsnchooser, vbox28, "vbox28"); GLADE_HOOKUP_OBJECT (dsnchooser, frame60, "frame60"); GLADE_HOOKUP_OBJECT (dsnchooser, alignment52, "alignment52"); GLADE_HOOKUP_OBJECT (dsnchooser, hbox36, "hbox36"); GLADE_HOOKUP_OBJECT (dsnchooser, scrolledwindow17, "scrolledwindow17"); GLADE_HOOKUP_OBJECT (dsnchooser, clist1, "clist1"); GLADE_HOOKUP_OBJECT (dsnchooser, label104, "label104"); GLADE_HOOKUP_OBJECT (dsnchooser, label105, "label105"); GLADE_HOOKUP_OBJECT (dsnchooser, label106, "label106"); GLADE_HOOKUP_OBJECT (dsnchooser, vbox29, "vbox29"); GLADE_HOOKUP_OBJECT (dsnchooser, b_add, "b_add"); GLADE_HOOKUP_OBJECT (dsnchooser, b_remove, "b_remove"); GLADE_HOOKUP_OBJECT (dsnchooser, b_configure, "b_configure"); GLADE_HOOKUP_OBJECT (dsnchooser, b_test, "b_test"); GLADE_HOOKUP_OBJECT (dsnchooser, frame61, "frame61"); GLADE_HOOKUP_OBJECT (dsnchooser, alignment53, "alignment53"); GLADE_HOOKUP_OBJECT (dsnchooser, label107, "label107"); GLADE_HOOKUP_OBJECT (dsnchooser, frame62, "frame62"); GLADE_HOOKUP_OBJECT (dsnchooser, alignment54, "alignment54"); GLADE_HOOKUP_OBJECT (dsnchooser, hbox37, "hbox37"); GLADE_HOOKUP_OBJECT (dsnchooser, pixmap1, "pixmap1"); GLADE_HOOKUP_OBJECT (dsnchooser, label108, "label108"); GLADE_HOOKUP_OBJECT (dsnchooser, label109, "label109"); GLADE_HOOKUP_OBJECT (dsnchooser, vbox30, "vbox30"); GLADE_HOOKUP_OBJECT (dsnchooser, frame63, "frame63"); GLADE_HOOKUP_OBJECT (dsnchooser, alignment55, "alignment55"); GLADE_HOOKUP_OBJECT (dsnchooser, hbox38, "hbox38"); GLADE_HOOKUP_OBJECT (dsnchooser, scrolledwindow18, "scrolledwindow18"); GLADE_HOOKUP_OBJECT (dsnchooser, clist2, "clist2"); GLADE_HOOKUP_OBJECT (dsnchooser, label110, "label110"); GLADE_HOOKUP_OBJECT (dsnchooser, label111, "label111"); GLADE_HOOKUP_OBJECT (dsnchooser, label112, "label112"); GLADE_HOOKUP_OBJECT (dsnchooser, vbox31, "vbox31"); GLADE_HOOKUP_OBJECT (dsnchooser, bs_add, "bs_add"); GLADE_HOOKUP_OBJECT (dsnchooser, bs_remove, "bs_remove"); GLADE_HOOKUP_OBJECT (dsnchooser, bs_configure, "bs_configure"); GLADE_HOOKUP_OBJECT (dsnchooser, bs_test, "bs_test"); GLADE_HOOKUP_OBJECT (dsnchooser, frame64, "frame64"); GLADE_HOOKUP_OBJECT (dsnchooser, alignment56, "alignment56"); GLADE_HOOKUP_OBJECT (dsnchooser, label113, "label113"); GLADE_HOOKUP_OBJECT (dsnchooser, frame65, "frame65"); GLADE_HOOKUP_OBJECT (dsnchooser, alignment57, "alignment57"); GLADE_HOOKUP_OBJECT (dsnchooser, hbox39, "hbox39"); GLADE_HOOKUP_OBJECT (dsnchooser, pixmap2, "pixmap2"); GLADE_HOOKUP_OBJECT (dsnchooser, label114, "label114"); GLADE_HOOKUP_OBJECT (dsnchooser, label115, "label115"); GLADE_HOOKUP_OBJECT (dsnchooser, vbox32, "vbox32"); GLADE_HOOKUP_OBJECT (dsnchooser, frame66, "frame66"); GLADE_HOOKUP_OBJECT (dsnchooser, alignment58, "alignment58"); GLADE_HOOKUP_OBJECT (dsnchooser, hbox40, "hbox40"); GLADE_HOOKUP_OBJECT (dsnchooser, vbox33, "vbox33"); GLADE_HOOKUP_OBJECT (dsnchooser, hbox41, "hbox41"); GLADE_HOOKUP_OBJECT (dsnchooser, frame67, "frame67"); GLADE_HOOKUP_OBJECT (dsnchooser, alignment59, "alignment59"); GLADE_HOOKUP_OBJECT (dsnchooser, hbox42, "hbox42"); GLADE_HOOKUP_OBJECT (dsnchooser, label116, "label116"); GLADE_HOOKUP_OBJECT (dsnchooser, optionmenu1, "optionmenu1"); GLADE_HOOKUP_OBJECT (dsnchooser, menu2, "menu2"); GLADE_HOOKUP_OBJECT (dsnchooser, hbox43, "hbox43"); GLADE_HOOKUP_OBJECT (dsnchooser, scrolledwindow19, "scrolledwindow19"); GLADE_HOOKUP_OBJECT (dsnchooser, clist3, "clist3"); GLADE_HOOKUP_OBJECT (dsnchooser, label117, "label117"); GLADE_HOOKUP_OBJECT (dsnchooser, scrolledwindow20, "scrolledwindow20"); GLADE_HOOKUP_OBJECT (dsnchooser, clist4, "clist4"); GLADE_HOOKUP_OBJECT (dsnchooser, label118, "label118"); GLADE_HOOKUP_OBJECT (dsnchooser, frame68, "frame68"); GLADE_HOOKUP_OBJECT (dsnchooser, alignment60, "alignment60"); GLADE_HOOKUP_OBJECT (dsnchooser, hbox44, "hbox44"); GLADE_HOOKUP_OBJECT (dsnchooser, label119, "label119"); GLADE_HOOKUP_OBJECT (dsnchooser, t_fileselected, "t_fileselected"); GLADE_HOOKUP_OBJECT (dsnchooser, vbox34, "vbox34"); GLADE_HOOKUP_OBJECT (dsnchooser, bf_add, "bf_add"); GLADE_HOOKUP_OBJECT (dsnchooser, bf_remove, "bf_remove"); GLADE_HOOKUP_OBJECT (dsnchooser, bf_configure, "bf_configure"); GLADE_HOOKUP_OBJECT (dsnchooser, bf_test, "bf_test"); GLADE_HOOKUP_OBJECT (dsnchooser, bf_setdir, "bf_setdir"); GLADE_HOOKUP_OBJECT (dsnchooser, frame69, "frame69"); GLADE_HOOKUP_OBJECT (dsnchooser, alignment61, "alignment61"); GLADE_HOOKUP_OBJECT (dsnchooser, frame70, "frame70"); GLADE_HOOKUP_OBJECT (dsnchooser, alignment62, "alignment62"); GLADE_HOOKUP_OBJECT (dsnchooser, hbox45, "hbox45"); GLADE_HOOKUP_OBJECT (dsnchooser, pixmap3, "pixmap3"); GLADE_HOOKUP_OBJECT (dsnchooser, label120, "label120"); GLADE_HOOKUP_OBJECT (dsnchooser, label121, "label121"); GLADE_HOOKUP_OBJECT_NO_REF (dsnchooser, hbuttonbox2, "hbuttonbox2"); GLADE_HOOKUP_OBJECT (dsnchooser, b_cancel, "b_cancel"); GLADE_HOOKUP_OBJECT (dsnchooser, b_ok, "b_ok"); /* Notebook events */ gtk_signal_connect_after (GTK_OBJECT (notebook1), "switch_page", GTK_SIGNAL_FUNC (dsnchooser_switch_page), choose_t); /* Ok button events */ gtk_signal_connect (GTK_OBJECT (b_ok), "clicked", GTK_SIGNAL_FUNC (dsnchooser_ok_clicked), choose_t); /* Cancel button events */ gtk_signal_connect (GTK_OBJECT (b_cancel), "clicked", GTK_SIGNAL_FUNC (dsnchooser_cancel_clicked), choose_t); /* Close window button events */ gtk_signal_connect (GTK_OBJECT (dsnchooser), "delete_event", GTK_SIGNAL_FUNC (delete_event), choose_t); gtk_signal_connect (GTK_OBJECT (dsnchooser), "destroy", GTK_SIGNAL_FUNC (gtk_main_quit), NULL); /* Add user DSN button events */ gtk_signal_connect (GTK_OBJECT (choose_t->uadd), "clicked", GTK_SIGNAL_FUNC (userdsn_add_clicked), choose_t); /* Remove user DSN button events */ gtk_signal_connect (GTK_OBJECT (choose_t->uremove), "clicked", GTK_SIGNAL_FUNC (userdsn_remove_clicked), choose_t); /* Test user DSN button events */ gtk_signal_connect (GTK_OBJECT (choose_t->utest), "clicked", GTK_SIGNAL_FUNC (userdsn_test_clicked), choose_t); /* Configure user DSN button events */ gtk_signal_connect (GTK_OBJECT (choose_t->uconfigure), "clicked", GTK_SIGNAL_FUNC (userdsn_configure_clicked), choose_t); /* Add system DSN button events */ gtk_signal_connect (GTK_OBJECT (choose_t->sadd), "clicked", GTK_SIGNAL_FUNC (systemdsn_add_clicked), choose_t); /* Remove system DSN button events */ gtk_signal_connect (GTK_OBJECT (choose_t->sremove), "clicked", GTK_SIGNAL_FUNC (systemdsn_remove_clicked), choose_t); /* Test system DSN button events */ gtk_signal_connect (GTK_OBJECT (choose_t->stest), "clicked", GTK_SIGNAL_FUNC (systemdsn_test_clicked), choose_t); /* Configure system DSN button events */ gtk_signal_connect (GTK_OBJECT (choose_t->sconfigure), "clicked", GTK_SIGNAL_FUNC (systemdsn_configure_clicked), choose_t); /* User DSN list events */ gtk_signal_connect (GTK_OBJECT (clist1), "select_row", GTK_SIGNAL_FUNC (userdsn_list_select), choose_t); gtk_signal_connect (GTK_OBJECT (clist1), "unselect_row", GTK_SIGNAL_FUNC (userdsn_list_unselect), choose_t); /* System DSN list events */ gtk_signal_connect (GTK_OBJECT (clist2), "select_row", GTK_SIGNAL_FUNC (systemdsn_list_select), choose_t); gtk_signal_connect (GTK_OBJECT (clist2), "unselect_row", GTK_SIGNAL_FUNC (systemdsn_list_unselect), choose_t); /* Add file DSN button events */ gtk_signal_connect (GTK_OBJECT (choose_t->fadd), "clicked", GTK_SIGNAL_FUNC (filedsn_add_clicked), choose_t); /* Remove file DSN button events */ gtk_signal_connect (GTK_OBJECT (choose_t->fremove), "clicked", GTK_SIGNAL_FUNC (filedsn_remove_clicked), choose_t); /* Test file DSN button events */ gtk_signal_connect (GTK_OBJECT (choose_t->ftest), "clicked", GTK_SIGNAL_FUNC (filedsn_test_clicked), choose_t); /* Configure file DSN button events */ gtk_signal_connect (GTK_OBJECT (choose_t->fconfigure), "clicked", GTK_SIGNAL_FUNC (filedsn_configure_clicked), choose_t); /* Configure file DSN button events */ gtk_signal_connect (GTK_OBJECT (choose_t->fsetdir), "clicked", GTK_SIGNAL_FUNC (filedsn_setdir_clicked), choose_t); /* Directories file DSN list events */ gtk_signal_connect (GTK_OBJECT (clist3), "select_row", GTK_SIGNAL_FUNC (filedsn_dirlist_select), choose_t); /* Files file DSN list events */ gtk_signal_connect (GTK_OBJECT (clist4), "select_row", GTK_SIGNAL_FUNC (filedsn_filelist_select), choose_t); gtk_signal_connect (GTK_OBJECT (clist4), "unselect_row", GTK_SIGNAL_FUNC (filedsn_filelist_unselect), choose_t); gtk_window_add_accel_group (GTK_WINDOW (dsnchooser), accel_group); SQLSetConfigMode (ODBC_BOTH_DSN); if (!SQLGetPrivateProfileString("ODBC", "FileDSNPath", "", choose_t->curr_dir, sizeof(choose_t->curr_dir), "odbcinst.ini")) strcpy(choose_t->curr_dir, DEFAULT_FILEDSNPATH); adddsns_to_list (clist1, FALSE); choose_t->udsnlist = clist1; choose_t->sdsnlist = clist2; choose_t->type_dsn = USER_DSN; choose_t->mainwnd = dsnchooser; gtk_widget_show_all (dsnchooser); gtk_main (); } #define CHECK_DRVCONN_DIALBOX(path) \ { \ if ((handle = DLL_OPEN(path)) != NULL) \ { \ if (DLL_PROC(handle, "_iodbcdm_drvconn_dialboxw") != NULL) \ { \ DLL_CLOSE(handle); \ retVal = TRUE; \ goto quit; \ } \ else \ { \ if (DLL_PROC(handle, "_iodbcdm_drvconn_dialbox") != NULL) \ { \ DLL_CLOSE(handle); \ retVal = TRUE; \ goto quit; \ } \ } \ DLL_CLOSE(handle); \ } \ } static BOOL _CheckDriverLoginDlg ( char *drv ) { char drvbuf[4096] = { L'\0'}; HDLL handle; BOOL retVal = FALSE; if (!drv) return FALSE; SQLSetConfigMode (ODBC_USER_DSN); if (!access (drv, X_OK)) { CHECK_DRVCONN_DIALBOX (drv); } if (SQLGetPrivateProfileString (drv, "Driver", "", drvbuf, sizeof (drvbuf), "odbcinst.ini")) { CHECK_DRVCONN_DIALBOX (drvbuf); } if (SQLGetPrivateProfileString (drv, "Setup", "", drvbuf, sizeof (drvbuf), "odbcinst.ini")) { CHECK_DRVCONN_DIALBOX (drvbuf); } SQLSetConfigMode (ODBC_SYSTEM_DSN); if (!access (drv, X_OK)) { CHECK_DRVCONN_DIALBOX (drv); } if (SQLGetPrivateProfileString (drv, "Driver", "", drvbuf, sizeof (drvbuf), "odbcinst.ini")) { CHECK_DRVCONN_DIALBOX (drvbuf); } if (SQLGetPrivateProfileString (drv, "Setup", "", drvbuf, sizeof (drvbuf), "odbcinst.ini")) { CHECK_DRVCONN_DIALBOX (drvbuf); } quit: return retVal; } libiodbc-3.52.16/iodbcadm/gtk/messagebox.c0000664000175000017500000001703114424170750015220 00000000000000/* * messagebox.c * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "gui.h" static gint delete_event (GtkWidget *widget, GdkEvent *event) { return FALSE; } static void message_ok_clicked (GtkWidget *widget, GtkWidget *message) { gtk_signal_disconnect_by_func (GTK_OBJECT (message), GTK_SIGNAL_FUNC (gtk_main_quit), NULL); gtk_main_quit (); gtk_widget_destroy (message); } void create_message (HWND hwnd, LPCSTR dsn, LPCSTR text) { GtkWidget *message, *dialog_vbox1, *hbox1, *vbox1; GtkWidget *l_message, *dialog_action_area1, *hbuttonbox1, *b_ok; GtkAccelGroup *accel_group; guint b_ok_key; char msg[1024]; if (hwnd == NULL || !GTK_IS_WIDGET (hwnd)) return; accel_group = gtk_accel_group_new (); message = gtk_dialog_new (); if (dsn) sprintf (msg, "Message on DSN %s", dsn); else sprintf (msg, "Message ..."); gtk_object_set_data (GTK_OBJECT (message), "message", message); gtk_window_set_title (GTK_WINDOW (message), msg); gtk_widget_set_size_request (message, 400, 150); gtk_window_set_position (GTK_WINDOW (message), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (message), TRUE); gtk_window_set_default_size (GTK_WINDOW (message), 400, 150); gtk_window_set_type_hint (GTK_WINDOW (message), GDK_WINDOW_TYPE_HINT_DIALOG); #if GTK_CHECK_VERSION(2,0,0) gtk_widget_show (message); #endif dialog_vbox1 = GTK_DIALOG (message)->vbox; gtk_object_set_data (GTK_OBJECT (message), "dialog_vbox1", dialog_vbox1); gtk_widget_show (dialog_vbox1); hbox1 = gtk_hbox_new (FALSE, 6); gtk_widget_ref (hbox1); gtk_object_set_data_full (GTK_OBJECT (message), "hbox1", hbox1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hbox1); gtk_box_pack_start (GTK_BOX (dialog_vbox1), hbox1, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (hbox1), 6); vbox1 = gtk_vbox_new (TRUE, 0); gtk_widget_ref (vbox1); gtk_object_set_data_full (GTK_OBJECT (message), "vbox1", vbox1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (vbox1); gtk_box_pack_start (GTK_BOX (hbox1), vbox1, TRUE, TRUE, 0); l_message = gtk_label_new (""); gtk_label_parse_uline (GTK_LABEL (l_message), (text) ? text : ""); gtk_widget_ref (l_message); gtk_object_set_data_full (GTK_OBJECT (message), "l_message", l_message, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (l_message); gtk_box_pack_start (GTK_BOX (vbox1), l_message, FALSE, TRUE, 0); gtk_label_set_justify (GTK_LABEL (l_message), GTK_JUSTIFY_LEFT); gtk_label_set_line_wrap (GTK_LABEL (l_message), TRUE); dialog_action_area1 = GTK_DIALOG (message)->action_area; gtk_object_set_data (GTK_OBJECT (message), "dialog_action_area1", dialog_action_area1); gtk_widget_show (dialog_action_area1); gtk_container_set_border_width (GTK_CONTAINER (dialog_action_area1), 5); hbuttonbox1 = gtk_hbutton_box_new (); gtk_widget_ref (hbuttonbox1); gtk_object_set_data_full (GTK_OBJECT (message), "hbuttonbox1", hbuttonbox1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hbuttonbox1); gtk_box_pack_start (GTK_BOX (dialog_action_area1), hbuttonbox1, TRUE, TRUE, 0); gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox1), GTK_BUTTONBOX_END); gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbuttonbox1), 10); b_ok = gtk_button_new_from_stock ("gtk-ok"); gtk_widget_ref (b_ok); gtk_object_set_data_full (GTK_OBJECT (message), "b_ok", b_ok, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (b_ok); gtk_container_add (GTK_CONTAINER (hbuttonbox1), b_ok); gtk_dialog_add_action_widget (GTK_DIALOG (message), b_ok, GTK_RESPONSE_OK); GTK_WIDGET_SET_FLAGS (b_ok, GTK_CAN_DEFAULT); /* Ok button events */ gtk_signal_connect (GTK_OBJECT (b_ok), "clicked", GTK_SIGNAL_FUNC (message_ok_clicked), message); /* Close window button events */ gtk_signal_connect (GTK_OBJECT (message), "delete_event", GTK_SIGNAL_FUNC (delete_event), NULL); gtk_signal_connect (GTK_OBJECT (message), "destroy", GTK_SIGNAL_FUNC (gtk_main_quit), NULL); gtk_window_add_accel_group (GTK_WINDOW (message), accel_group); gtk_widget_show_all (message); gtk_main (); } void create_messagew (HWND hwnd, LPCWSTR dsn, LPCWSTR text) { LPSTR _dsn = NULL; LPSTR _text = NULL; _dsn = dm_SQL_WtoU8((SQLWCHAR*)dsn, SQL_NTS); _text = dm_SQL_WtoU8((SQLWCHAR*)text, SQL_NTS); create_message(hwnd, _dsn, _text); if (_dsn) free(_dsn); if (_text) free(_text); } libiodbc-3.52.16/iodbcadm/gtk/Makefile.am0000664000175000017500000000740214424170750014754 00000000000000# # Makefile.am # # $Id$ # # The iODBC driver manager. # # Copyright (C) 1996-2023 OpenLink Software # All Rights Reserved. # # This software is released under the terms of either of the following # licenses: # # - GNU Library General Public License (see LICENSE.LGPL) # - The BSD License (see LICENSE.BSD). # # Note that the only valid version of the LGPL license as far as this # project is concerned is the original GNU Library General Public License # Version 2, dated June 1991. # # While not mandated by the BSD license, any patches you make to the # iODBC source code may be contributed back into the iODBC project # at your discretion. Contributions will benefit the Open Source and # Data Access community as a whole. Submissions may be made at: # # http://www.iodbc.org # # # GNU Library Generic Public License Version 2 # ============================================ # 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; only # Version 2 of the License dated June 1991. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # The BSD License # =============== # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. Neither the name of OpenLink Software Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # DATEBUILD = `date +%d/%m/%Y_%T` if GTK noinst_LTLIBRARIES = libiodbcadm-gtk.la endif AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/iodbc \ -I$(top_srcdir)/iodbcadm \ -I$(top_srcdir)/iodbcinst \ @GTK_CFLAGS@ AM_CFLAGS = \ @CFLAGS@ -D__GTK__ -DDATEBUILD=\"$(DATEBUILD)\" libiodbcadm_gtk_la_LDFLAGS = #-static libiodbcadm_gtk_la_LIBADD = @GTK_LIBS@ libiodbcadm_gtk_la_SOURCES = \ administrator.c \ confirm.c \ connectionpooling.c \ driverchooser.c \ driversetup.c \ dsnchooser.c \ errorbox.c \ gensetup.c \ main.c \ messagebox.c \ translatorchooser.c noinst_HEADERS = error.xpm img.xpm odbc4.xpm question.xpm gui.h libiodbc-3.52.16/iodbcadm/gtk/administrator.c0000664000175000017500000032227314424170750015752 00000000000000/* * administrator.c * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifdef __linux # ifndef _GNU_SOURCE # define _GNU_SOURCE /* make sure dladdr is declared */ # endif # define HAVE_DL_INFO 1 #endif #include #include #include #include #include #include "../gui.h" #include "odbc4.xpm" #if defined (HAVE_DLADDR) && !defined(HAVE_DL_INFO) typedef struct { const char *dli_fname; /* File name of defining object. */ void *dli_fbase; /* Load address of that object. */ const char *dli_sname; /* Name of nearest symbol. */ void *dli_saddr; /* Exact value of nearest symbol. */ } Dl_info; #endif /* HAVE_DL_INFO */ static char *szDriverButtons[] = { "_Add a driver", "_Remove the driver", "Confi_gure the driver" }; static char *szCpLabels[] = { "Name", "Pool timeout (seconds)", "Probe query" }; static struct { char *lib_name; char *lib_desc; char *lib_ver_sym; } iODBC_Components[] = { {"libiodbc.so.2", "iODBC Driver Manager", "iodbc_version"}, {"libiodbcadm.so.2", "iODBC Administrator", "iodbcadm_version"}, {"libiodbcinst.so.2", "iODBC Installer", "iodbcinst_version"}, {"libdrvproxy.so.2", "iODBC Driver Setup Proxy", "iodbcproxy_version"}, {"libtranslator.so.2", "iODBC Translation Manager", "iodbctrans_version"} }; static void addcomponents_to_list (GtkWidget *widget) { char _date[1024], _size[1024]; char *data[5]; struct stat _stat; #if defined(HAVE_DLADDR) Dl_info info; #endif void *handle, *proc; int i; if (!GTK_IS_CLIST (widget)) return; gtk_clist_clear (GTK_CLIST (widget)); for (i = 0; i < sizeof (iODBC_Components) / sizeof (iODBC_Components[0]); i++) { /* * Collect basic info on the components */ data[0] = iODBC_Components[i].lib_desc; data[1] = VERSION; data[2] = iODBC_Components[i].lib_name; data[3] = ""; /* Modification Date */ data[4] = ""; /* Size */ if ((handle = dlopen (iODBC_Components[i].lib_name, RTLD_LAZY))) { /* Find out the version of the library */ if ((proc = dlsym (handle, iODBC_Components[i].lib_ver_sym))) data[1] = *(char **) proc; /* Check the size and modification date of the library */ #ifdef HAVE_DLADDR dladdr (proc, &info); if (!stat (info.dli_fname, &_stat)) { sprintf (_size, "%lu Kb", (unsigned long) _stat.st_size / 1024L); sprintf (_date, "%s", ctime (&_stat.st_mtime)); _date[strlen (_date) - 1] = '\0'; /* remove last \n */ data[3] = _date; data[4] = _size; } #endif gtk_clist_append (GTK_CLIST (widget), data); dlclose (handle); } } if (GTK_CLIST (widget)->rows > 0) { gtk_clist_columns_autosize (GTK_CLIST (widget)); gtk_clist_sort (GTK_CLIST (widget)); } } static void addconnectionpool_to_list (GtkWidget *widget) { char *curr, *buffer = (char *) malloc (sizeof (char) * 65536), *szDriver; char cptime[128], cpprobe[1024]; char *data[3]; int len, i; BOOL careabout; UWORD confMode = ODBC_USER_DSN; if (!buffer || !GTK_IS_CLIST (widget)) return; gtk_clist_clear (GTK_CLIST (widget)); /* Get the current config mode */ while (confMode != ODBC_SYSTEM_DSN + 1) { /* Get the list of drivers in the user context */ SQLSetConfigMode (confMode); #ifdef WIN32 len = SQLGetPrivateProfileString ("ODBC 32 bit Drivers", NULL, "", buffer, 65535, "odbcinst.ini"); #else len = SQLGetPrivateProfileString ("ODBC Drivers", NULL, "", buffer, 65535, "odbcinst.ini"); #endif if (len) goto process; goto end; process: for (curr = buffer; *curr; curr += (STRLEN (curr) + 1)) { /* Shadowing system odbcinst.ini */ for (i = 0, careabout = TRUE; i < GTK_CLIST (widget)->rows; i++) { gtk_clist_get_text (GTK_CLIST (widget), i, 0, &szDriver); if (!strcmp (szDriver, curr)) { careabout = FALSE; break; } } if (!careabout) continue; SQLSetConfigMode (confMode); #ifdef WIN32 SQLGetPrivateProfileString ("ODBC 32 bit Drivers", curr, "", cpprobe, sizeof (cpprobe), "odbcinst.ini"); #else SQLGetPrivateProfileString ("ODBC Drivers", curr, "", cpprobe, sizeof (cpprobe), "odbcinst.ini"); #endif /* Check if the driver is installed */ if (strcasecmp (cpprobe, "Installed")) goto end; /* Get the driver library name */ SQLSetConfigMode (confMode); if (!SQLGetPrivateProfileString (curr, "CPTimeout", "", cptime, sizeof (cptime), "odbcinst.ini")) { SQLSetConfigMode (confMode); SQLGetPrivateProfileString ("Default", "CPTimeout", "", cptime, sizeof (cptime), "odbcinst.ini"); } if (!SQLGetPrivateProfileString (curr, "CPProbe", "", cpprobe, sizeof (cpprobe), "odbcinst.ini")) { SQLSetConfigMode (confMode); SQLGetPrivateProfileString ("Default", "CPProbe", "", cpprobe, sizeof (cpprobe), "odbcinst.ini"); } if (STRLEN (curr) && STRLEN (cptime)) { data[0] = curr; data[1] = cptime; data[2] = cpprobe; gtk_clist_append (GTK_CLIST (widget), data); } } end: if (confMode == ODBC_USER_DSN) confMode = ODBC_SYSTEM_DSN; else confMode = ODBC_SYSTEM_DSN + 1; } if (GTK_CLIST (widget)->rows > 0) { gtk_clist_columns_autosize (GTK_CLIST (widget)); gtk_clist_sort (GTK_CLIST (widget)); } /* Make the clean up */ free (buffer); } static void admin_apply_tracing (TTRACING *tracing_t) { /* Write keywords for tracing in the ini file */ SQLWritePrivateProfileString ("ODBC", "Trace", (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (tracing_t-> allthetime_rb)) == TRUE || gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (tracing_t-> onetime_rb)) == TRUE) ? "1" : "0", NULL); SQLWritePrivateProfileString ("ODBC", "TraceAutoStop", gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (tracing_t-> onetime_rb)) ? "1" : "0", NULL); SQLWritePrivateProfileString ("ODBC", "TraceFile", gtk_entry_get_text (GTK_ENTRY (tracing_t->logfile_entry)), NULL); } static void admin_switch_page (GtkNotebook *notebook, GtkNotebookPage *page, gint page_num, void **inparams) { TDSNCHOOSER *dsnchoose_t = (inparams) ? inparams[0] : NULL; TDRIVERCHOOSER *driverchoose_t = (inparams) ? inparams[1] : NULL; TTRACING *tracing_t = (inparams) ? inparams[2] : NULL; TCOMPONENT *component_t = (inparams) ? inparams[3] : NULL; TCONNECTIONPOOLING *connectionpool_t = (inparams) ? inparams[4] : NULL; BOOL trace = FALSE, traceauto = FALSE, perfmon = FALSE; char tokenstr[4096] = { 0 }; switch (page_num) { /* The User DSN panel */ case 0: if (dsnchoose_t) { dsnchoose_t->type_dsn = USER_DSN; adddsns_to_list (dsnchoose_t->udsnlist, FALSE); } break; /* The System DSN panel */ case 1: if (dsnchoose_t) { dsnchoose_t->type_dsn = SYSTEM_DSN; adddsns_to_list (dsnchoose_t->sdsnlist, TRUE); } break; /* The File DSN panel */ case 2: if (dsnchoose_t) { dsnchoose_t->type_dsn = FILE_DSN; addlistofdir_to_optionmenu(dsnchoose_t->dir_combo, dsnchoose_t->curr_dir, dsnchoose_t); adddirectories_to_list(dsnchoose_t->mainwnd, dsnchoose_t->dir_list, dsnchoose_t->curr_dir); addfiles_to_list(dsnchoose_t->mainwnd, dsnchoose_t->file_list, dsnchoose_t->curr_dir); } break; /* The ODBC Driver panel */ case 3: if (driverchoose_t) { adddrivers_to_list (driverchoose_t->driverlist, driverchoose_t->mainwnd); gtk_widget_set_sensitive (driverchoose_t->b_remove, FALSE); gtk_widget_set_sensitive (driverchoose_t->b_configure, FALSE); } break; /* The Connection Pooling */ case 4: if (!connectionpool_t->changed) { /* Get the connection pooling options */ SQLGetPrivateProfileString ("ODBC Connection Pooling", "Perfmon", "", tokenstr, sizeof (tokenstr), "odbcinst.ini"); if (!strcasecmp (tokenstr, "1") || !strcasecmp (tokenstr, "On")) perfmon = TRUE; SQLGetPrivateProfileString ("ODBC Connection Pooling", "Retry Wait", "", tokenstr, sizeof (tokenstr), "odbcinst.ini"); if (perfmon) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (connectionpool_t->enperfmon_rb), 1); else gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (connectionpool_t->disperfmon_rb), 1); gtk_entry_set_text (GTK_ENTRY (connectionpool_t->retwait_entry), tokenstr); connectionpool_t->changed = TRUE; } addconnectionpool_to_list (connectionpool_t->driverlist); break; /* The tracing panel */ case 5: if (!tracing_t->changed) { /* Get the traces options */ SQLGetPrivateProfileString ("ODBC", "Trace", "", tokenstr, sizeof (tokenstr), NULL); if (!strcasecmp (tokenstr, "1") || !strcasecmp (tokenstr, "On")) trace = TRUE; SQLGetPrivateProfileString ("ODBC", "TraceAutoStop", "", tokenstr, sizeof (tokenstr), NULL); if (!strcasecmp (tokenstr, "1") || !strcasecmp (tokenstr, "On")) traceauto = TRUE; SQLGetPrivateProfileString ("ODBC", "TraceFile", "", tokenstr, sizeof (tokenstr), NULL); /* Set the widgets */ if (trace) { if (!traceauto) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tracing_t-> allthetime_rb), 1); else gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tracing_t-> onetime_rb), 1); } else gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tracing_t-> donttrace_rb), 1); gtk_entry_set_text (GTK_ENTRY (tracing_t->logfile_entry), (STRLEN (tokenstr)) ? tokenstr : "sql.log"); tracing_t->changed = TRUE; } break; /* The About panel */ case 6: if (component_t) addcomponents_to_list (component_t->componentlist); break; }; if (dsnchoose_t) { if (dsnchoose_t->uremove) gtk_widget_set_sensitive (dsnchoose_t->uremove, FALSE); if (dsnchoose_t->uconfigure) gtk_widget_set_sensitive (dsnchoose_t->uconfigure, FALSE); if (dsnchoose_t->utest) gtk_widget_set_sensitive (dsnchoose_t->utest, FALSE); if (dsnchoose_t->sremove) gtk_widget_set_sensitive (dsnchoose_t->sremove, FALSE); if (dsnchoose_t->sconfigure) gtk_widget_set_sensitive (dsnchoose_t->sconfigure, FALSE); if (dsnchoose_t->stest) gtk_widget_set_sensitive (dsnchoose_t->stest, FALSE); if (dsnchoose_t->fremove) gtk_widget_set_sensitive(dsnchoose_t->fremove, FALSE); if (dsnchoose_t->fconfigure) gtk_widget_set_sensitive(dsnchoose_t->fconfigure, FALSE); if (dsnchoose_t->ftest) gtk_widget_set_sensitive(dsnchoose_t->ftest, FALSE); } } static void tracing_start_clicked (GtkWidget *widget, TTRACING *tracing_t) { if (tracing_t) admin_apply_tracing (tracing_t); } static void tracing_logfile_choosen (GtkWidget *widget, TTRACING *tracing_t) { if (tracing_t) { gtk_entry_set_text (GTK_ENTRY (tracing_t->logfile_entry), gtk_file_selection_get_filename (GTK_FILE_SELECTION (tracing_t-> filesel))); tracing_t->filesel = NULL; } } static void tracing_browse_clicked (GtkWidget *widget, TTRACING *tracing_t) { GtkWidget *filesel; if (tracing_t) { filesel = gtk_file_selection_new ("Choose your log file ..."); gtk_window_set_modal (GTK_WINDOW (filesel), TRUE); gtk_file_selection_set_filename (GTK_FILE_SELECTION (filesel), gtk_entry_get_text (GTK_ENTRY (tracing_t->logfile_entry))); /* Ok button events */ gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (filesel)-> ok_button), "clicked", GTK_SIGNAL_FUNC (tracing_logfile_choosen), tracing_t); gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (filesel)-> ok_button), "clicked", GTK_SIGNAL_FUNC (gtk_main_quit), NULL); /* Cancel button events */ gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (filesel)-> cancel_button), "clicked", GTK_SIGNAL_FUNC (gtk_main_quit), NULL); /* Close window button events */ gtk_signal_connect (GTK_OBJECT (filesel), "delete_event", GTK_SIGNAL_FUNC (gtk_main_quit), NULL); tracing_t->filesel = filesel; gtk_widget_show_all (filesel); gtk_main (); gtk_widget_destroy (filesel); tracing_t->filesel = NULL; } } static void cpdriver_list_select (GtkWidget *widget, gint row, gint column, GdkEvent *event, TCONNECTIONPOOLING *connectionpool_t) { char *szDriver = NULL, *cptimeout, *cpprobe; char sztime[1024] = { 0 }; char szprobe[1024] = { 0 }; TCONNECTIONPOOLING choose_t; if (connectionpool_t) { choose_t = *connectionpool_t; if (GTK_CLIST (connectionpool_t->driverlist)->selection != NULL) { memset(choose_t.timeout, 0, sizeof(choose_t.timeout)); memset(choose_t.probe, 0, sizeof(choose_t.probe)); gtk_clist_get_text (GTK_CLIST (choose_t.driverlist), GPOINTER_TO_INT (GTK_CLIST (choose_t.driverlist)-> selection->data), 0, &szDriver); gtk_clist_get_text (GTK_CLIST (choose_t.driverlist), GPOINTER_TO_INT (GTK_CLIST (choose_t.driverlist)-> selection->data), 1, &cptimeout); gtk_clist_get_text (GTK_CLIST (choose_t.driverlist), GPOINTER_TO_INT (GTK_CLIST (choose_t.driverlist)-> selection->data), 2, &cpprobe); strncpy (choose_t.timeout, cptimeout, sizeof(choose_t.timeout)-1); strncpy (choose_t.probe, cpprobe, sizeof(choose_t.probe)-1); strncpy (choose_t.driver, szDriver, sizeof(choose_t.driver)-1); } if (szDriver && event && event->type == GDK_2BUTTON_PRESS && (create_connectionpool (connectionpool_t->mainwnd, &choose_t) == TRUE)) { sprintf (sztime, "CPTimeout=%s", choose_t.timeout); if (!SQLConfigDriver (connectionpool_t->mainwnd, ODBC_CONFIG_DRIVER, szDriver, sztime, NULL, 0, NULL)) _iodbcdm_errorbox (connectionpool_t->mainwnd, szDriver, "An error occured when trying to set the connection pooling time-out : "); sprintf (szprobe, "CPProbe=%s", choose_t.probe); if (!SQLConfigDriver (connectionpool_t->mainwnd, ODBC_CONFIG_DRIVER, szDriver, szprobe, NULL, 0, NULL)) _iodbcdm_errorbox (connectionpool_t->mainwnd, szDriver, "An error occured when trying to set the connection probe query : "); addconnectionpool_to_list (connectionpool_t->driverlist); } } } static void driver_list_select (GtkWidget *widget, gint row, gint column, GdkEvent *event, TDRIVERCHOOSER *choose_t) { char *szDriver = NULL; if (choose_t) { if (GTK_CLIST (choose_t->driverlist)->selection != NULL) gtk_clist_get_text (GTK_CLIST (choose_t->driverlist), GPOINTER_TO_INT (GTK_CLIST (choose_t->driverlist)->selection-> data), 0, &szDriver); if (szDriver && event && event->type == GDK_2BUTTON_PRESS) gtk_signal_emit_by_name (GTK_OBJECT (choose_t->b_configure), "clicked", choose_t); else { gtk_widget_set_sensitive (choose_t->b_remove, TRUE); gtk_widget_set_sensitive (choose_t->b_configure, TRUE); } } } static void driver_list_unselect (GtkWidget *widget, gint row, gint column, GdkEvent *event, TDRIVERCHOOSER *choose_t) { if (choose_t) { gtk_widget_set_sensitive (choose_t->b_remove, FALSE); gtk_widget_set_sensitive (choose_t->b_configure, FALSE); } } static void driver_add_clicked (GtkWidget *widget, TDRIVERCHOOSER *choose_t) { char connstr[4096] = { 0 }; char tokenstr[4096] = { 0 }; char *cstr; if (choose_t) { cstr = create_driversetup (choose_t->mainwnd, NULL, connstr, FALSE, TRUE); if (cstr && cstr != connstr && cstr != (LPSTR) - 1L) { SQLSetConfigMode (ODBC_USER_DSN); if (!SQLInstallDriverEx (cstr, NULL, tokenstr, sizeof (tokenstr), NULL, ODBC_INSTALL_COMPLETE, NULL)) { _iodbcdm_errorbox (choose_t->mainwnd, NULL, "An error occured when trying to add the driver : "); goto done; } free (cstr); } adddrivers_to_list (choose_t->driverlist, choose_t->mainwnd); done: if (GTK_CLIST (choose_t->driverlist)->selection == NULL) { if (choose_t->b_remove) gtk_widget_set_sensitive (choose_t->b_remove, FALSE); if (choose_t->b_configure) gtk_widget_set_sensitive (choose_t->b_configure, FALSE); } } return; } static void driver_remove_clicked (GtkWidget *widget, TDRIVERCHOOSER *choose_t) { char *szDriver = NULL; if (choose_t) { /* Retrieve the driver name */ if (GTK_CLIST (choose_t->driverlist)->selection != NULL) gtk_clist_get_text (GTK_CLIST (choose_t->driverlist), GPOINTER_TO_INT (GTK_CLIST (choose_t->driverlist)->selection-> data), 0, &szDriver); /* Call the right function */ if (szDriver && create_confirm (choose_t->mainwnd, szDriver, "Are you sure you want to remove this driver ?")) { if (!SQLRemoveDriver (szDriver, create_confirm (choose_t->mainwnd, szDriver, "Do you want to remove all the DSN associated to this driver ?"), NULL)) { _iodbcdm_errorbox (choose_t->mainwnd, szDriver, "An error occured when trying to remove the driver : "); goto done; } adddrivers_to_list (choose_t->driverlist, choose_t->mainwnd); } done: if (GTK_CLIST (choose_t->driverlist)->selection == NULL) { if (choose_t->b_remove) gtk_widget_set_sensitive (choose_t->b_remove, FALSE); if (choose_t->b_configure) gtk_widget_set_sensitive (choose_t->b_configure, FALSE); } } return; } static void driver_configure_clicked (GtkWidget *widget, TDRIVERCHOOSER *choose_t) { char connstr[4096] = { 0 }; char tokenstr[4096] = { 0 }; char *szDriver = NULL, *curr, *cour, *cstr; int size = sizeof (connstr); if (choose_t) { /* Retrieve the driver name */ if (GTK_CLIST (choose_t->driverlist)->selection != NULL) gtk_clist_get_text (GTK_CLIST (choose_t->driverlist), GPOINTER_TO_INT (GTK_CLIST (choose_t->driverlist)->selection-> data), 0, &szDriver); /* Call the right function */ if (szDriver) { SQLSetConfigMode (ODBC_USER_DSN); if (!SQLGetPrivateProfileString (szDriver, NULL, "", tokenstr, sizeof (tokenstr), "odbcinst.ini")) { _iodbcdm_errorbox (choose_t->mainwnd, szDriver, "An error occured when trying to configure the driver : "); goto done; } for (curr = tokenstr, cour = connstr; *curr; curr += (STRLEN (curr) + 1), cour += (STRLEN (cour) + 1)) { STRCPY (cour, curr); cour[STRLEN (curr)] = '='; SQLSetConfigMode (ODBC_USER_DSN); SQLGetPrivateProfileString (szDriver, curr, "", cour + STRLEN (curr) + 1, size - STRLEN (curr) - 1, "odbcinst.ini"); size -= (STRLEN (cour) + 1); } *cour = 0; cstr = create_driversetup (choose_t->mainwnd, szDriver, connstr, FALSE, TRUE); if (cstr && cstr != connstr && cstr != (LPSTR) - 1L) { SQLSetConfigMode (ODBC_USER_DSN); if (!SQLInstallDriverEx (cstr, NULL, tokenstr, sizeof (tokenstr), NULL, ODBC_INSTALL_COMPLETE, NULL)) { _iodbcdm_errorbox (choose_t->mainwnd, NULL, "An error occured when trying to configure the driver : "); goto done; } free (cstr); } adddrivers_to_list (choose_t->driverlist, choose_t->mainwnd); } done: if (GTK_CLIST (choose_t->driverlist)->selection == NULL) { if (choose_t->b_remove) gtk_widget_set_sensitive (choose_t->b_remove, FALSE); if (choose_t->b_configure) gtk_widget_set_sensitive (choose_t->b_configure, FALSE); } } return; } static void admin_ok_clicked (GtkWidget *widget, void **inparams) { TDSNCHOOSER *dsnchoose_t = (inparams) ? inparams[0] : NULL; TDRIVERCHOOSER *driverchoose_t = (inparams) ? inparams[1] : NULL; TTRACING *tracing_t = (inparams) ? inparams[2] : NULL; TCOMPONENT *component_t = (inparams) ? inparams[3] : NULL; TCONNECTIONPOOLING *connectionpool_t = (inparams) ? inparams[4] : NULL; GtkWidget *mainwnd = (inparams) ? inparams[5] : NULL; if (dsnchoose_t) { dsnchoose_t->udsnlist = dsnchoose_t->sdsnlist = dsnchoose_t->dir_list = NULL; dsnchoose_t->fadd = dsnchoose_t->fremove = dsnchoose_t->ftest = dsnchoose_t->fconfigure = dsnchoose_t->fsetdir = NULL; dsnchoose_t->uadd = dsnchoose_t->uremove = dsnchoose_t->utest = dsnchoose_t->uconfigure = NULL; dsnchoose_t->sadd = dsnchoose_t->sremove = dsnchoose_t->stest = dsnchoose_t->sconfigure = NULL; dsnchoose_t->file_list = dsnchoose_t->file_entry = dsnchoose_t->dir_combo = NULL; dsnchoose_t->type_dsn = -1; dsnchoose_t->dsn = NULL; } if (driverchoose_t) driverchoose_t->driverlist = NULL; if (component_t) component_t->componentlist = NULL; if (tracing_t) { if (tracing_t->changed) admin_apply_tracing (tracing_t); tracing_t->logfile_entry = tracing_t->tracelib_entry = tracing_t->b_start_stop = NULL; tracing_t->donttrace_rb = tracing_t->allthetime_rb = tracing_t->onetime_rb = NULL; } if (connectionpool_t) { if (connectionpool_t->changed) { /* Write keywords for tracing in the ini file */ SQLWritePrivateProfileString ("ODBC Connection Pooling", "PerfMon", (GTK_TOGGLE_BUTTON (connectionpool_t->enperfmon_rb)-> active) ? "1" : "0", "odbcinst.ini"); SQLWritePrivateProfileString ("ODBC Connection Pooling", "Retry Wait", gtk_entry_get_text (GTK_ENTRY (connectionpool_t-> retwait_entry)), "odbcinst.ini"); } connectionpool_t->driverlist = connectionpool_t->mainwnd = NULL; connectionpool_t->enperfmon_rb = connectionpool_t->disperfmon_rb = NULL; connectionpool_t->retwait_entry = NULL; } if (mainwnd) { gtk_signal_disconnect_by_func (GTK_OBJECT (mainwnd), GTK_SIGNAL_FUNC (gtk_main_quit), NULL); gtk_main_quit (); gtk_widget_destroy (mainwnd); } } static void admin_cancel_clicked (GtkWidget *widget, void **inparams) { TDSNCHOOSER *dsnchoose_t = (inparams) ? inparams[0] : NULL; TDRIVERCHOOSER *driverchoose_t = (inparams) ? inparams[1] : NULL; TTRACING *tracing_t = (inparams) ? inparams[2] : NULL; TCOMPONENT *component_t = (inparams) ? inparams[3] : NULL; TCONNECTIONPOOLING *connectionpool_t = (inparams) ? inparams[4] : NULL; GtkWidget *mainwnd = (inparams) ? inparams[5] : NULL; if (dsnchoose_t) { dsnchoose_t->udsnlist = dsnchoose_t->sdsnlist = dsnchoose_t->dir_list = NULL; dsnchoose_t->fadd = dsnchoose_t->fremove = dsnchoose_t->ftest = dsnchoose_t->fconfigure = dsnchoose_t->fsetdir = NULL; dsnchoose_t->uadd = dsnchoose_t->uremove = dsnchoose_t->utest = dsnchoose_t->uconfigure = NULL; dsnchoose_t->sadd = dsnchoose_t->sremove = dsnchoose_t->stest = dsnchoose_t->sconfigure = NULL; dsnchoose_t->file_list = dsnchoose_t->file_entry = dsnchoose_t->dir_combo = NULL; dsnchoose_t->type_dsn = -1; dsnchoose_t->dsn = NULL; } if (driverchoose_t) driverchoose_t->driverlist = NULL; if (component_t) component_t->componentlist = NULL; if (tracing_t) { tracing_t->logfile_entry = tracing_t->tracelib_entry = tracing_t->b_start_stop = NULL; tracing_t->donttrace_rb = tracing_t->allthetime_rb = tracing_t->onetime_rb = NULL; } if (connectionpool_t) { connectionpool_t->driverlist = connectionpool_t->mainwnd = NULL; connectionpool_t->enperfmon_rb = connectionpool_t->disperfmon_rb = NULL; connectionpool_t->retwait_entry = NULL; } if (mainwnd) { gtk_signal_disconnect_by_func (GTK_OBJECT (mainwnd), GTK_SIGNAL_FUNC (gtk_main_quit), NULL); gtk_main_quit (); gtk_widget_destroy (mainwnd); } } static gint delete_event (GtkWidget *widget, GdkEvent *event, void **inparams) { admin_cancel_clicked (widget, inparams); return FALSE; } void create_administrator (HWND hwnd) { GdkPixmap *pixmap; GdkBitmap *mask; GtkStyle *style; GtkWidget *admin; GtkWidget *dialog_vbox1; GtkWidget *notebook1; GtkWidget *vbox1; GtkWidget *frame1; GtkWidget *alignment1; GtkWidget *hbox2; GtkWidget *scrolledwindow1; GtkWidget *lst_usources; GtkWidget *lu_name; GtkWidget *lu_description; GtkWidget *lu_driver; GtkWidget *vbox3; GtkWidget *bu_add; GtkWidget *bu_remove; GtkWidget *bu_config; GtkWidget *bu_test; GtkWidget *frame18; GtkWidget *alignment18; GtkWidget *l_usdsn; GtkWidget *frame2; GtkWidget *alignment2; GtkWidget *hbox3; GtkWidget *pixmap1; GtkWidget *label14; GtkWidget *label1; GtkWidget *vbox4; GtkWidget *frame3; GtkWidget *alignment3; GtkWidget *hbox4; GtkWidget *scrolledwindow2; GtkWidget *lst_ssources; GtkWidget *ls_name; GtkWidget *ls_description; GtkWidget *ls_driver; GtkWidget *vbox5; GtkWidget *bs_add; GtkWidget *bs_remove; GtkWidget *bs_config; GtkWidget *bs_test; GtkWidget *frame19; GtkWidget *alignment19; GtkWidget *label18; GtkWidget *frame4; GtkWidget *alignment4; GtkWidget *hbox5; GtkWidget *pixmap2; GtkWidget *label19; GtkWidget *label2; GtkWidget *vbox6; GtkWidget *frame5; GtkWidget *alignment5; GtkWidget *hbox6; GtkWidget *vbox8; GtkWidget *hbox8; GtkWidget *frame7; GtkWidget *alignment7; GtkWidget *hbox9; GtkWidget *l_lookin; GtkWidget *optionmenu1; GtkWidget *menu1; GtkWidget *hbox11; GtkWidget *scrolledwindow3; GtkWidget *lst_fdir; GtkWidget *l_directory; GtkWidget *scrolledwindow4; GtkWidget *lst_ffiles; GtkWidget *l_files; GtkWidget *frame8; GtkWidget *alignment8; GtkWidget *hbox10; GtkWidget *l_selected; GtkWidget *t_fileselected; GtkWidget *vbox7; GtkWidget *bf_add; GtkWidget *bf_remove; GtkWidget *bf_config; GtkWidget *bf_test; GtkWidget *bf_setdir; GtkWidget *frame20; GtkWidget *alignment20; GtkWidget *frame6; GtkWidget *alignment6; GtkWidget *hbox7; GtkWidget *pixmap3; GtkWidget *label24; GtkWidget *label53; GtkWidget *vbox9; GtkWidget *frame9; GtkWidget *alignment9; GtkWidget *hbox12; GtkWidget *scrolledwindow5; GtkWidget *lst_drivers; GtkWidget *ld_name; GtkWidget *ld_file; GtkWidget *ld_date; GtkWidget *ld_size; GtkWidget *label32; GtkWidget *frame10; GtkWidget *alignment10; GtkWidget *hbox13; GtkWidget *b_add_driver; GtkWidget *b_remove_driver; GtkWidget *b_configure_driver; GtkWidget *frame17; GtkWidget *alignment17; GtkWidget *hbox20; GtkWidget *pixmap4; GtkWidget *label54; GtkWidget *label4; GtkWidget *vbox11; GtkWidget *hbox21; GtkWidget *frame21; GtkWidget *alignment21; GtkWidget *frame24; GtkWidget *alignment24; GtkWidget *scrolledwindow9; GtkWidget *lst_pool; GtkWidget *lp_name; GtkWidget *lp_timeout; GtkWidget *lp_probe; GtkWidget *label58; GtkWidget *label55; GtkWidget *vbox17; GtkWidget *frame22; GtkWidget *alignment22; GtkWidget *vbox18; GtkWidget *br_enable; GSList *br_enable_group = NULL; GtkWidget *br_disable; GtkWidget *label56; GtkWidget *frame23; GtkWidget *alignment23; GtkWidget *t_retrywait; GtkWidget *label57; GtkWidget *frame12; GtkWidget *alignment12; GtkWidget *hbox15; GtkWidget *pixmap5; GtkWidget *label38; GtkWidget *label5; GtkWidget *vbox13; GtkWidget *table1; GtkWidget *frame30; GtkWidget *frame25; GtkWidget *alignment25; GtkWidget *table2; GtkWidget *b_donottrace; GSList *b_donottrace_group = NULL; GtkWidget *b_allthetime; GtkWidget *b_onetime; GtkWidget *b_start; GtkWidget *frame28; GtkWidget *label59; GtkWidget *frame27; GtkWidget *alignment27; GtkWidget *vbox20; GtkWidget *t_tracelib; GtkWidget *hbox23; GtkWidget *frame34; GtkWidget *bt_select_library; GtkWidget *frame35; GtkWidget *frame31; GtkWidget *label61; GtkWidget *frame26; GtkWidget *alignment26; GtkWidget *vbox19; GtkWidget *t_logfile; GtkWidget *hbox22; GtkWidget *frame32; GtkWidget *bt_browse; GtkWidget *frame33; GtkWidget *frame29; GtkWidget *label60; GtkWidget *frame14; GtkWidget *alignment14; GtkWidget *hbox17; GtkWidget *pixmap6; GtkWidget *label43; GtkWidget *label6; GtkWidget *vbox15; GtkWidget *frame15; GtkWidget *alignment15; GtkWidget *hbox18; GtkWidget *scrolledwindow8; GtkWidget *lst_about; GtkWidget *la_name; GtkWidget *la_version; GtkWidget *la_file; GtkWidget *la_date; GtkWidget *la_size; GtkWidget *label47; GtkWidget *frame16; GtkWidget *alignment16; GtkWidget *hbox19; GtkWidget *pixmap7; GtkWidget *label48; GtkWidget *label7; GtkWidget *dialog_action_area1; GtkWidget *cancelbutton1; GtkWidget *okbutton1; GtkAccelGroup *accel_group; TDSNCHOOSER dsnchoose_t; TDRIVERCHOOSER driverchoose_t; TCOMPONENT component_t; TTRACING tracing_t; TCONNECTIONPOOLING connectionpool_t; void *inparams[6]; accel_group = gtk_accel_group_new (); admin = gtk_dialog_new (); gtk_widget_set_name (admin, "admin"); gtk_widget_set_size_request (admin, 600, 450); gtk_window_set_title (GTK_WINDOW (admin), _("iODBC Data Source Administrator")); gtk_window_set_position (GTK_WINDOW (admin), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (admin), TRUE); gtk_window_set_default_size (GTK_WINDOW (admin), 600, 450); gtk_window_set_type_hint (GTK_WINDOW (admin), GDK_WINDOW_TYPE_HINT_DIALOG); #if GTK_CHECK_VERSION(2,0,0) gtk_widget_show (admin); #endif dialog_vbox1 = GTK_DIALOG (admin)->vbox; gtk_widget_set_name (dialog_vbox1, "dialog_vbox1"); gtk_widget_show (dialog_vbox1); notebook1 = gtk_notebook_new (); gtk_widget_set_name (notebook1, "notebook1"); gtk_widget_show (notebook1); gtk_box_pack_start (GTK_BOX (dialog_vbox1), notebook1, TRUE, TRUE, 0); vbox1 = gtk_vbox_new (FALSE, 0); gtk_widget_set_name (vbox1, "vbox1"); gtk_widget_show (vbox1); gtk_container_add (GTK_CONTAINER (notebook1), vbox1); frame1 = gtk_frame_new (NULL); gtk_widget_set_name (frame1, "frame1"); gtk_widget_show (frame1); gtk_box_pack_start (GTK_BOX (vbox1), frame1, TRUE, TRUE, 0); gtk_frame_set_shadow_type (GTK_FRAME (frame1), GTK_SHADOW_NONE); alignment1 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment1, "alignment1"); gtk_widget_show (alignment1); gtk_container_add (GTK_CONTAINER (frame1), alignment1); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment1), 0, 0, 4, 0); hbox2 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox2, "hbox2"); gtk_widget_show (hbox2); gtk_container_add (GTK_CONTAINER (alignment1), hbox2); scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_set_name (scrolledwindow1, "scrolledwindow1"); gtk_widget_show (scrolledwindow1); gtk_box_pack_start (GTK_BOX (hbox2), scrolledwindow1, TRUE, TRUE, 0); gtk_widget_set_size_request (scrolledwindow1, 440, 219); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow1), GTK_SHADOW_IN); lst_usources = gtk_clist_new (3); gtk_widget_set_name (lst_usources, "lst_usources"); gtk_widget_show (lst_usources); gtk_container_add (GTK_CONTAINER (scrolledwindow1), lst_usources); gtk_clist_set_column_width (GTK_CLIST (lst_usources), 0, 80); gtk_clist_set_column_width (GTK_CLIST (lst_usources), 1, 80); gtk_clist_set_column_width (GTK_CLIST (lst_usources), 2, 80); gtk_clist_column_titles_show (GTK_CLIST (lst_usources)); lu_name = gtk_label_new (_("Name")); gtk_widget_set_name (lu_name, "lu_name"); gtk_widget_show (lu_name); gtk_clist_set_column_widget (GTK_CLIST (lst_usources), 0, lu_name); gtk_widget_set_size_request (lu_name, 100, -1); lu_description = gtk_label_new (_("Description")); gtk_widget_set_name (lu_description, "lu_description"); gtk_widget_show (lu_description); gtk_clist_set_column_widget (GTK_CLIST (lst_usources), 1, lu_description); gtk_widget_set_size_request (lu_description, 162, -1); lu_driver = gtk_label_new (_("Driver")); gtk_widget_set_name (lu_driver, "lu_driver"); gtk_widget_show (lu_driver); gtk_clist_set_column_widget (GTK_CLIST (lst_usources), 2, lu_driver); gtk_widget_set_size_request (lu_driver, 80, -1); vbox3 = gtk_vbox_new (FALSE, 0); gtk_widget_set_name (vbox3, "vbox3"); gtk_widget_show (vbox3); gtk_box_pack_start (GTK_BOX (hbox2), vbox3, FALSE, TRUE, 0); bu_add = gtk_button_new_from_stock ("gtk-add"); gtk_widget_set_name (bu_add, "bu_add"); gtk_widget_show (bu_add); gtk_box_pack_start (GTK_BOX (vbox3), bu_add, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (bu_add), 4); GTK_WIDGET_SET_FLAGS (bu_add, GTK_CAN_DEFAULT); gtk_widget_add_accelerator (bu_add, "clicked", accel_group, GDK_A, (GdkModifierType) GDK_MOD1_MASK, GTK_ACCEL_VISIBLE); bu_remove = gtk_button_new_from_stock ("gtk-remove"); gtk_widget_set_name (bu_remove, "bu_remove"); gtk_widget_show (bu_remove); gtk_box_pack_start (GTK_BOX (vbox3), bu_remove, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (bu_remove), 4); gtk_widget_set_sensitive (bu_remove, FALSE); GTK_WIDGET_SET_FLAGS (bu_remove, GTK_CAN_DEFAULT); gtk_widget_add_accelerator (bu_remove, "clicked", accel_group, GDK_R, (GdkModifierType) GDK_MOD1_MASK, GTK_ACCEL_VISIBLE); bu_config = gtk_button_new_with_mnemonic (_("Confi_gure")); gtk_widget_set_name (bu_config, "bu_config"); gtk_widget_show (bu_config); gtk_box_pack_start (GTK_BOX (vbox3), bu_config, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (bu_config), 4); gtk_widget_set_sensitive (bu_config, FALSE); GTK_WIDGET_SET_FLAGS (bu_config, GTK_CAN_DEFAULT); gtk_widget_add_accelerator (bu_config, "clicked", accel_group, GDK_G, (GdkModifierType) GDK_MOD1_MASK, GTK_ACCEL_VISIBLE); gtk_widget_add_accelerator (bu_config, "clicked", accel_group, GDK_g, (GdkModifierType) GDK_MOD1_MASK, GTK_ACCEL_VISIBLE); bu_test = gtk_button_new_with_mnemonic (_("_Test")); gtk_widget_set_name (bu_test, "bu_test"); gtk_widget_show (bu_test); gtk_box_pack_start (GTK_BOX (vbox3), bu_test, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (bu_test), 4); gtk_widget_set_sensitive (bu_test, FALSE); GTK_WIDGET_SET_FLAGS (bu_test, GTK_CAN_DEFAULT); gtk_widget_add_accelerator (bu_test, "clicked", accel_group, GDK_T, (GdkModifierType) GDK_MOD1_MASK, GTK_ACCEL_VISIBLE); frame18 = gtk_frame_new (NULL); gtk_widget_set_name (frame18, "frame18"); gtk_widget_show (frame18); gtk_box_pack_start (GTK_BOX (vbox3), frame18, TRUE, TRUE, 0); gtk_widget_set_size_request (frame18, -1, 80); gtk_frame_set_shadow_type (GTK_FRAME (frame18), GTK_SHADOW_NONE); alignment18 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment18, "alignment18"); gtk_widget_show (alignment18); gtk_container_add (GTK_CONTAINER (frame18), alignment18); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment18), 0, 0, 12, 0); l_usdsn = gtk_label_new (_(" User Data Sources:")); gtk_widget_set_name (l_usdsn, "l_usdsn"); gtk_widget_show (l_usdsn); gtk_frame_set_label_widget (GTK_FRAME (frame1), l_usdsn); gtk_label_set_use_markup (GTK_LABEL (l_usdsn), TRUE); frame2 = gtk_frame_new (NULL); gtk_widget_set_name (frame2, "frame2"); gtk_widget_show (frame2); gtk_box_pack_start (GTK_BOX (vbox1), frame2, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (frame2), 3); alignment2 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment2, "alignment2"); gtk_widget_show (alignment2); gtk_container_add (GTK_CONTAINER (frame2), alignment2); hbox3 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox3, "hbox3"); gtk_widget_show (hbox3); gtk_container_add (GTK_CONTAINER (alignment2), hbox3); gtk_container_set_border_width (GTK_CONTAINER (hbox3), 10); #if GTK_CHECK_VERSION(2,0,0) style = gtk_widget_get_style (admin); pixmap = gdk_pixmap_create_from_xpm_d (admin->window, &mask, &style->bg[GTK_STATE_NORMAL], (gchar **) odbc4_xpm); #else style = gtk_widget_get_style (GTK_WIDGET (hwnd)); pixmap = gdk_pixmap_create_from_xpm_d (GTK_WIDGET (hwnd)->window, &mask, &style->bg[GTK_STATE_NORMAL], (gchar **) odbc4_xpm); #endif pixmap1 = gtk_pixmap_new (pixmap, mask); gtk_widget_set_name (pixmap1, "pixmap1"); gtk_widget_show (pixmap1); gtk_box_pack_start (GTK_BOX (hbox3), pixmap1, FALSE, TRUE, 10); label14 = gtk_label_new (_("An ODBC User data source stores information about to connect to\nthe indicated data provider. A User data source is only available to you,\nand can only be used on the current machine.")); gtk_widget_set_name (label14, "label14"); gtk_widget_show (label14); gtk_box_pack_start (GTK_BOX (hbox3), label14, FALSE, TRUE, 0); gtk_label_set_justify (GTK_LABEL (label14), GTK_JUSTIFY_FILL); label1 = gtk_label_new (_("User DSN")); gtk_widget_set_name (label1, "label1"); gtk_widget_show (label1); gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 0), label1); dsnchoose_t.uadd = bu_add; dsnchoose_t.uremove = bu_remove; dsnchoose_t.utest = bu_test; dsnchoose_t.uconfigure = bu_config; vbox4 = gtk_vbox_new (FALSE, 0); gtk_widget_set_name (vbox4, "vbox4"); gtk_widget_show (vbox4); gtk_container_add (GTK_CONTAINER (notebook1), vbox4); frame3 = gtk_frame_new (NULL); gtk_widget_set_name (frame3, "frame3"); gtk_widget_show (frame3); gtk_box_pack_start (GTK_BOX (vbox4), frame3, TRUE, TRUE, 0); gtk_frame_set_shadow_type (GTK_FRAME (frame3), GTK_SHADOW_NONE); alignment3 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment3, "alignment3"); gtk_widget_show (alignment3); gtk_container_add (GTK_CONTAINER (frame3), alignment3); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment3), 0, 0, 4, 0); hbox4 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox4, "hbox4"); gtk_widget_show (hbox4); gtk_container_add (GTK_CONTAINER (alignment3), hbox4); scrolledwindow2 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_set_name (scrolledwindow2, "scrolledwindow2"); gtk_widget_show (scrolledwindow2); gtk_box_pack_start (GTK_BOX (hbox4), scrolledwindow2, TRUE, TRUE, 0); gtk_widget_set_size_request (scrolledwindow2, 440, 219); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow2), GTK_SHADOW_IN); lst_ssources = gtk_clist_new (3); gtk_widget_set_name (lst_ssources, "lst_ssources"); gtk_widget_show (lst_ssources); gtk_container_add (GTK_CONTAINER (scrolledwindow2), lst_ssources); gtk_clist_set_column_width (GTK_CLIST (lst_ssources), 0, 80); gtk_clist_set_column_width (GTK_CLIST (lst_ssources), 1, 80); gtk_clist_set_column_width (GTK_CLIST (lst_ssources), 2, 80); gtk_clist_column_titles_show (GTK_CLIST (lst_ssources)); ls_name = gtk_label_new (_("Name")); gtk_widget_set_name (ls_name, "ls_name"); gtk_widget_show (ls_name); gtk_clist_set_column_widget (GTK_CLIST (lst_ssources), 0, ls_name); gtk_widget_set_size_request (ls_name, 100, -1); ls_description = gtk_label_new (_("Description")); gtk_widget_set_name (ls_description, "ls_description"); gtk_widget_show (ls_description); gtk_clist_set_column_widget (GTK_CLIST (lst_ssources), 1, ls_description); gtk_widget_set_size_request (ls_description, 162, -1); ls_driver = gtk_label_new (_("Driver")); gtk_widget_set_name (ls_driver, "ls_driver"); gtk_widget_show (ls_driver); gtk_clist_set_column_widget (GTK_CLIST (lst_ssources), 2, ls_driver); gtk_widget_set_size_request (ls_driver, 80, -1); vbox5 = gtk_vbox_new (FALSE, 0); gtk_widget_set_name (vbox5, "vbox5"); gtk_widget_show (vbox5); gtk_box_pack_start (GTK_BOX (hbox4), vbox5, FALSE, TRUE, 0); bs_add = gtk_button_new_from_stock ("gtk-add"); gtk_widget_set_name (bs_add, "bs_add"); gtk_widget_show (bs_add); gtk_box_pack_start (GTK_BOX (vbox5), bs_add, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (bs_add), 4); GTK_WIDGET_SET_FLAGS (bs_add, GTK_CAN_DEFAULT); gtk_widget_add_accelerator (bs_add, "clicked", accel_group, GDK_A, (GdkModifierType) GDK_MOD1_MASK, GTK_ACCEL_VISIBLE); bs_remove = gtk_button_new_from_stock ("gtk-remove"); gtk_widget_set_name (bs_remove, "bs_remove"); gtk_widget_show (bs_remove); gtk_box_pack_start (GTK_BOX (vbox5), bs_remove, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (bs_remove), 4); gtk_widget_set_sensitive (bs_remove, FALSE); GTK_WIDGET_SET_FLAGS (bs_remove, GTK_CAN_DEFAULT); gtk_widget_add_accelerator (bs_remove, "clicked", accel_group, GDK_R, (GdkModifierType) GDK_MOD1_MASK, GTK_ACCEL_VISIBLE); bs_config = gtk_button_new_with_mnemonic (_("Confi_gure")); gtk_widget_set_name (bs_config, "bs_config"); gtk_widget_show (bs_config); gtk_box_pack_start (GTK_BOX (vbox5), bs_config, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (bs_config), 4); gtk_widget_set_sensitive (bs_config, FALSE); GTK_WIDGET_SET_FLAGS (bs_config, GTK_CAN_DEFAULT); gtk_widget_add_accelerator (bs_config, "clicked", accel_group, GDK_G, (GdkModifierType) GDK_MOD1_MASK, GTK_ACCEL_VISIBLE); gtk_widget_add_accelerator (bs_config, "clicked", accel_group, GDK_g, (GdkModifierType) GDK_MOD1_MASK, GTK_ACCEL_VISIBLE); bs_test = gtk_button_new_with_mnemonic (_("_Test")); gtk_widget_set_name (bs_test, "bs_test"); gtk_widget_show (bs_test); gtk_box_pack_start (GTK_BOX (vbox5), bs_test, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (bs_test), 4); gtk_widget_set_sensitive (bs_test, FALSE); GTK_WIDGET_SET_FLAGS (bs_test, GTK_CAN_DEFAULT); gtk_widget_add_accelerator (bs_test, "clicked", accel_group, GDK_T, (GdkModifierType) GDK_MOD1_MASK, GTK_ACCEL_VISIBLE); frame19 = gtk_frame_new (NULL); gtk_widget_set_name (frame19, "frame19"); gtk_widget_show (frame19); gtk_box_pack_start (GTK_BOX (vbox5), frame19, TRUE, TRUE, 0); gtk_widget_set_size_request (frame19, -1, 80); gtk_frame_set_shadow_type (GTK_FRAME (frame19), GTK_SHADOW_NONE); alignment19 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment19, "alignment19"); gtk_widget_show (alignment19); gtk_container_add (GTK_CONTAINER (frame19), alignment19); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment19), 0, 0, 12, 0); label18 = gtk_label_new (_(" System Data Sources:")); gtk_widget_set_name (label18, "label18"); gtk_widget_show (label18); gtk_frame_set_label_widget (GTK_FRAME (frame3), label18); gtk_label_set_use_markup (GTK_LABEL (label18), TRUE); frame4 = gtk_frame_new (NULL); gtk_widget_set_name (frame4, "frame4"); gtk_widget_show (frame4); gtk_box_pack_start (GTK_BOX (vbox4), frame4, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (frame4), 3); alignment4 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment4, "alignment4"); gtk_widget_show (alignment4); gtk_container_add (GTK_CONTAINER (frame4), alignment4); hbox5 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox5, "hbox5"); gtk_widget_show (hbox5); gtk_container_add (GTK_CONTAINER (alignment4), hbox5); gtk_container_set_border_width (GTK_CONTAINER (hbox5), 10); pixmap2 = gtk_pixmap_new (pixmap, mask); gtk_widget_set_name (pixmap2, "pixmap2"); gtk_widget_show (pixmap2); gtk_box_pack_start (GTK_BOX (hbox5), pixmap2, FALSE, TRUE, 10); label19 = gtk_label_new (_("An ODBC System data source stores information about to connect to\nthe indicated data provider. A System data source is visible to all\nusers on this machine, including daemons.")); gtk_widget_set_name (label19, "label19"); gtk_widget_show (label19); gtk_box_pack_start (GTK_BOX (hbox5), label19, FALSE, TRUE, 0); gtk_label_set_justify (GTK_LABEL (label19), GTK_JUSTIFY_FILL); label2 = gtk_label_new (_("System DSN")); gtk_widget_set_name (label2, "label2"); gtk_widget_show (label2); gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 1), label2); dsnchoose_t.sadd = bs_add; dsnchoose_t.sremove = bs_remove; dsnchoose_t.stest = bs_test; dsnchoose_t.sconfigure = bs_config; vbox6 = gtk_vbox_new (FALSE, 0); gtk_widget_set_name (vbox6, "vbox6"); gtk_widget_show (vbox6); gtk_container_add (GTK_CONTAINER (notebook1), vbox6); frame5 = gtk_frame_new (NULL); gtk_widget_set_name (frame5, "frame5"); gtk_widget_show (frame5); gtk_box_pack_start (GTK_BOX (vbox6), frame5, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (frame5), 2); gtk_frame_set_shadow_type (GTK_FRAME (frame5), GTK_SHADOW_NONE); alignment5 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment5, "alignment5"); gtk_widget_show (alignment5); gtk_container_add (GTK_CONTAINER (frame5), alignment5); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment5), 0, 0, 4, 0); hbox6 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox6, "hbox6"); gtk_widget_show (hbox6); gtk_container_add (GTK_CONTAINER (alignment5), hbox6); vbox8 = gtk_vbox_new (FALSE, 0); gtk_widget_set_name (vbox8, "vbox8"); gtk_widget_show (vbox8); gtk_box_pack_start (GTK_BOX (hbox6), vbox8, TRUE, TRUE, 0); gtk_widget_set_size_request (vbox8, 436, 250); hbox8 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox8, "hbox8"); gtk_widget_show (hbox8); gtk_box_pack_start (GTK_BOX (vbox8), hbox8, FALSE, FALSE, 0); frame7 = gtk_frame_new (NULL); gtk_widget_set_name (frame7, "frame7"); gtk_widget_show (frame7); gtk_box_pack_start (GTK_BOX (hbox8), frame7, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (frame7), 4); gtk_frame_set_shadow_type (GTK_FRAME (frame7), GTK_SHADOW_NONE); alignment7 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment7, "alignment7"); gtk_widget_show (alignment7); gtk_container_add (GTK_CONTAINER (frame7), alignment7); gtk_container_set_border_width (GTK_CONTAINER (alignment7), 2); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment7), 0, 0, 6, 0); hbox9 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox9, "hbox9"); gtk_widget_show (hbox9); gtk_container_add (GTK_CONTAINER (alignment7), hbox9); l_lookin = gtk_label_new (_("Look in : ")); gtk_widget_set_name (l_lookin, "l_lookin"); gtk_widget_show (l_lookin); gtk_box_pack_start (GTK_BOX (hbox9), l_lookin, FALSE, FALSE, 0); optionmenu1 = gtk_option_menu_new (); gtk_widget_set_name (optionmenu1, "optionmenu1"); gtk_widget_show (optionmenu1); gtk_box_pack_start (GTK_BOX (hbox9), optionmenu1, TRUE, TRUE, 0); menu1 = gtk_menu_new (); gtk_widget_set_name (menu1, "menu1"); gtk_option_menu_set_menu (GTK_OPTION_MENU (optionmenu1), menu1); hbox11 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox11, "hbox11"); gtk_widget_show (hbox11); gtk_box_pack_start (GTK_BOX (vbox8), hbox11, TRUE, TRUE, 0); scrolledwindow3 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_set_name (scrolledwindow3, "scrolledwindow3"); gtk_widget_show (scrolledwindow3); gtk_box_pack_start (GTK_BOX (hbox11), scrolledwindow3, TRUE, TRUE, 0); gtk_widget_set_size_request (scrolledwindow3, 96, -1); gtk_container_set_border_width (GTK_CONTAINER (scrolledwindow3), 4); lst_fdir = gtk_clist_new (1); gtk_widget_set_name (lst_fdir, "lst_fdir"); gtk_widget_show (lst_fdir); gtk_container_add (GTK_CONTAINER (scrolledwindow3), lst_fdir); gtk_clist_set_column_width (GTK_CLIST (lst_fdir), 0, 80); gtk_clist_column_titles_show (GTK_CLIST (lst_fdir)); l_directory = gtk_label_new (_("Directories")); gtk_widget_set_name (l_directory, "l_directory"); gtk_widget_show (l_directory); gtk_clist_set_column_widget (GTK_CLIST (lst_fdir), 0, l_directory); scrolledwindow4 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_set_name (scrolledwindow4, "scrolledwindow4"); gtk_widget_show (scrolledwindow4); gtk_box_pack_start (GTK_BOX (hbox11), scrolledwindow4, TRUE, TRUE, 0); gtk_widget_set_size_request (scrolledwindow4, 102, -1); gtk_container_set_border_width (GTK_CONTAINER (scrolledwindow4), 4); lst_ffiles = gtk_clist_new (1); gtk_widget_set_name (lst_ffiles, "lst_ffiles"); gtk_widget_show (lst_ffiles); gtk_container_add (GTK_CONTAINER (scrolledwindow4), lst_ffiles); gtk_clist_set_column_width (GTK_CLIST (lst_ffiles), 0, 80); gtk_clist_column_titles_show (GTK_CLIST (lst_ffiles)); l_files = gtk_label_new (_("Files")); gtk_widget_set_name (l_files, "l_files"); gtk_widget_show (l_files); gtk_clist_set_column_widget (GTK_CLIST (lst_ffiles), 0, l_files); frame8 = gtk_frame_new (NULL); gtk_widget_set_name (frame8, "frame8"); gtk_widget_show (frame8); gtk_box_pack_start (GTK_BOX (vbox8), frame8, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (frame8), 4); gtk_frame_set_shadow_type (GTK_FRAME (frame8), GTK_SHADOW_NONE); alignment8 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment8, "alignment8"); gtk_widget_show (alignment8); gtk_container_add (GTK_CONTAINER (frame8), alignment8); gtk_container_set_border_width (GTK_CONTAINER (alignment8), 2); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment8), 0, 0, 6, 0); hbox10 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox10, "hbox10"); gtk_widget_show (hbox10); gtk_container_add (GTK_CONTAINER (alignment8), hbox10); l_selected = gtk_label_new (_("File selected:")); gtk_widget_set_name (l_selected, "l_selected"); gtk_widget_show (l_selected); gtk_box_pack_start (GTK_BOX (hbox10), l_selected, FALSE, FALSE, 0); t_fileselected = gtk_entry_new (); gtk_widget_set_name (t_fileselected, "t_fileselected"); gtk_widget_show (t_fileselected); gtk_box_pack_start (GTK_BOX (hbox10), t_fileselected, TRUE, TRUE, 0); vbox7 = gtk_vbox_new (FALSE, 0); gtk_widget_set_name (vbox7, "vbox7"); gtk_widget_show (vbox7); gtk_box_pack_start (GTK_BOX (hbox6), vbox7, FALSE, TRUE, 0); bf_add = gtk_button_new_from_stock ("gtk-add"); gtk_widget_set_name (bf_add, "bf_add"); gtk_widget_show (bf_add); gtk_box_pack_start (GTK_BOX (vbox7), bf_add, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (bf_add), 4); GTK_WIDGET_SET_FLAGS (bf_add, GTK_CAN_DEFAULT); gtk_widget_add_accelerator (bf_add, "clicked", accel_group, GDK_A, (GdkModifierType) GDK_MOD1_MASK, GTK_ACCEL_VISIBLE); bf_remove = gtk_button_new_from_stock ("gtk-remove"); gtk_widget_set_name (bf_remove, "bf_remove"); gtk_widget_show (bf_remove); gtk_box_pack_start (GTK_BOX (vbox7), bf_remove, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (bf_remove), 4); GTK_WIDGET_SET_FLAGS (bf_remove, GTK_CAN_DEFAULT); gtk_widget_add_accelerator (bf_remove, "clicked", accel_group, GDK_R, (GdkModifierType) GDK_MOD1_MASK, GTK_ACCEL_VISIBLE); bf_config = gtk_button_new_with_mnemonic (_("Confi_gure")); gtk_widget_set_name (bf_config, "bf_config"); gtk_widget_show (bf_config); gtk_box_pack_start (GTK_BOX (vbox7), bf_config, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (bf_config), 4); GTK_WIDGET_SET_FLAGS (bf_config, GTK_CAN_DEFAULT); gtk_widget_add_accelerator (bf_config, "clicked", accel_group, GDK_G, (GdkModifierType) GDK_MOD1_MASK, GTK_ACCEL_VISIBLE); gtk_widget_add_accelerator (bf_config, "clicked", accel_group, GDK_g, (GdkModifierType) GDK_MOD1_MASK, GTK_ACCEL_VISIBLE); bf_test = gtk_button_new_with_mnemonic (_("_Test")); gtk_widget_set_name (bf_test, "bf_test"); gtk_widget_show (bf_test); gtk_box_pack_start (GTK_BOX (vbox7), bf_test, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (bf_test), 4); GTK_WIDGET_SET_FLAGS (bf_test, GTK_CAN_DEFAULT); gtk_widget_add_accelerator (bf_test, "clicked", accel_group, GDK_T, (GdkModifierType) GDK_MOD1_MASK, GTK_ACCEL_VISIBLE); bf_setdir = gtk_button_new_with_mnemonic (_("_Set Dir")); gtk_widget_set_name (bf_setdir, "bf_setdir"); gtk_widget_show (bf_setdir); gtk_box_pack_start (GTK_BOX (vbox7), bf_setdir, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (bf_setdir), 4); GTK_WIDGET_SET_FLAGS (bf_setdir, GTK_CAN_DEFAULT); gtk_widget_add_accelerator (bf_setdir, "clicked", accel_group, GDK_S, (GdkModifierType) GDK_MOD1_MASK, GTK_ACCEL_VISIBLE); frame20 = gtk_frame_new (NULL); gtk_widget_set_name (frame20, "frame20"); gtk_widget_show (frame20); gtk_box_pack_start (GTK_BOX (vbox7), frame20, TRUE, TRUE, 0); gtk_widget_set_size_request (frame20, -1, 80); gtk_frame_set_shadow_type (GTK_FRAME (frame20), GTK_SHADOW_NONE); alignment20 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment20, "alignment20"); gtk_widget_show (alignment20); gtk_container_add (GTK_CONTAINER (frame20), alignment20); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment20), 0, 0, 12, 0); frame6 = gtk_frame_new (NULL); gtk_widget_set_name (frame6, "frame6"); gtk_widget_show (frame6); gtk_box_pack_start (GTK_BOX (vbox6), frame6, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (frame6), 3); alignment6 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment6, "alignment6"); gtk_widget_show (alignment6); gtk_container_add (GTK_CONTAINER (frame6), alignment6); hbox7 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox7, "hbox7"); gtk_widget_show (hbox7); gtk_container_add (GTK_CONTAINER (alignment6), hbox7); gtk_container_set_border_width (GTK_CONTAINER (hbox7), 10); pixmap3 = gtk_pixmap_new (pixmap, mask); gtk_widget_set_name (pixmap3, "pixmap3"); gtk_widget_show (pixmap3); gtk_box_pack_start (GTK_BOX (hbox7), pixmap3, FALSE, TRUE, 10); label24 = gtk_label_new (_("Select the file data source that describes the driver that you wish to\nconnect to. You can use any file data source that refers to an ODBC\ndriver which is installed on your machine.")); gtk_widget_set_name (label24, "label24"); gtk_widget_show (label24); gtk_box_pack_start (GTK_BOX (hbox7), label24, FALSE, TRUE, 0); gtk_label_set_justify (GTK_LABEL (label24), GTK_JUSTIFY_FILL); label53 = gtk_label_new (_("File DSN")); gtk_widget_set_name (label53, "label53"); gtk_widget_show (label53); gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 2), label53); dsnchoose_t.fadd = bf_add; dsnchoose_t.fremove = bf_remove; dsnchoose_t.fconfigure = bf_config; dsnchoose_t.ftest = bf_test; dsnchoose_t.dir_list = lst_fdir; dsnchoose_t.dir_combo = optionmenu1; dsnchoose_t.file_list = lst_ffiles; dsnchoose_t.file_entry = t_fileselected; dsnchoose_t.fsetdir = bf_setdir; dsnchoose_t.udsnlist = lst_usources; dsnchoose_t.sdsnlist = lst_ssources; dsnchoose_t.type_dsn = 0; dsnchoose_t.mainwnd = admin; vbox9 = gtk_vbox_new (FALSE, 0); gtk_widget_set_name (vbox9, "vbox9"); gtk_widget_show (vbox9); gtk_container_add (GTK_CONTAINER (notebook1), vbox9); frame9 = gtk_frame_new (NULL); gtk_widget_set_name (frame9, "frame9"); gtk_widget_show (frame9); gtk_box_pack_start (GTK_BOX (vbox9), frame9, TRUE, TRUE, 0); gtk_frame_set_shadow_type (GTK_FRAME (frame9), GTK_SHADOW_NONE); alignment9 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment9, "alignment9"); gtk_widget_show (alignment9); gtk_container_add (GTK_CONTAINER (frame9), alignment9); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment9), 0, 0, 4, 0); hbox12 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox12, "hbox12"); gtk_widget_show (hbox12); gtk_container_add (GTK_CONTAINER (alignment9), hbox12); scrolledwindow5 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_set_name (scrolledwindow5, "scrolledwindow5"); gtk_widget_show (scrolledwindow5); gtk_box_pack_start (GTK_BOX (hbox12), scrolledwindow5, TRUE, TRUE, 0); gtk_widget_set_size_request (scrolledwindow5, 440, 185); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow5), GTK_SHADOW_IN); lst_drivers = gtk_clist_new (4); gtk_widget_set_name (lst_drivers, "lst_drivers"); gtk_widget_show (lst_drivers); gtk_container_add (GTK_CONTAINER (scrolledwindow5), lst_drivers); gtk_clist_set_column_width (GTK_CLIST (lst_drivers), 0, 80); gtk_clist_set_column_width (GTK_CLIST (lst_drivers), 1, 80); gtk_clist_set_column_width (GTK_CLIST (lst_drivers), 2, 80); gtk_clist_set_column_width (GTK_CLIST (lst_drivers), 3, 80); gtk_clist_column_titles_show (GTK_CLIST (lst_drivers)); ld_name = gtk_label_new (_("Name")); gtk_widget_set_name (ld_name, "ld_name"); gtk_widget_show (ld_name); gtk_clist_set_column_widget (GTK_CLIST (lst_drivers), 0, ld_name); gtk_widget_set_size_request (ld_name, 188, -1); ld_file = gtk_label_new (_("File")); gtk_widget_set_name (ld_file, "ld_file"); gtk_widget_show (ld_file); gtk_clist_set_column_widget (GTK_CLIST (lst_drivers), 1, ld_file); gtk_widget_set_size_request (ld_file, 170, -1); ld_date = gtk_label_new (_("Date")); gtk_widget_set_name (ld_date, "ld_date"); gtk_widget_show (ld_date); gtk_clist_set_column_widget (GTK_CLIST (lst_drivers), 2, ld_date); gtk_widget_set_size_request (ld_date, 134, -1); ld_size = gtk_label_new (_("Size")); gtk_widget_set_name (ld_size, "ld_size"); gtk_widget_show (ld_size); gtk_clist_set_column_widget (GTK_CLIST (lst_drivers), 3, ld_size); gtk_widget_set_size_request (ld_size, 80, -1); label32 = gtk_label_new (_(" ODBC Drivers that are installed on your system :")); gtk_widget_set_name (label32, "label32"); gtk_widget_show (label32); gtk_frame_set_label_widget (GTK_FRAME (frame9), label32); gtk_label_set_use_markup (GTK_LABEL (label32), TRUE); frame10 = gtk_frame_new (NULL); gtk_widget_set_name (frame10, "frame10"); gtk_widget_show (frame10); gtk_box_pack_start (GTK_BOX (vbox9), frame10, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (frame10), 3); alignment10 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment10, "alignment10"); gtk_widget_show (alignment10); gtk_container_add (GTK_CONTAINER (frame10), alignment10); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment10), 0, 0, 10, 10); hbox13 = gtk_hbox_new (FALSE, 50); gtk_widget_set_name (hbox13, "hbox13"); gtk_widget_show (hbox13); gtk_container_add (GTK_CONTAINER (alignment10), hbox13); gtk_container_set_border_width (GTK_CONTAINER (hbox13), 4); b_add_driver = gtk_button_new_with_mnemonic (_(" _Add a driver ")); gtk_widget_set_name (b_add_driver, "b_add_driver"); gtk_widget_show (b_add_driver); gtk_box_pack_start (GTK_BOX (hbox13), b_add_driver, FALSE, TRUE, 0); GTK_WIDGET_SET_FLAGS (b_add_driver, GTK_CAN_DEFAULT); gtk_widget_add_accelerator (b_add_driver, "clicked", accel_group, GDK_A, (GdkModifierType) GDK_MOD1_MASK, GTK_ACCEL_VISIBLE); b_remove_driver = gtk_button_new_with_mnemonic (_(" _Remove the driver ")); gtk_widget_set_name (b_remove_driver, "b_remove_driver"); gtk_widget_show (b_remove_driver); gtk_box_pack_start (GTK_BOX (hbox13), b_remove_driver, FALSE, TRUE, 0); GTK_WIDGET_SET_FLAGS (b_remove_driver, GTK_CAN_DEFAULT); gtk_widget_add_accelerator (b_remove_driver, "clicked", accel_group, GDK_R, (GdkModifierType) GDK_MOD1_MASK, GTK_ACCEL_VISIBLE); b_configure_driver = gtk_button_new_with_mnemonic (_(" Confi_gure the driver ")); gtk_widget_set_name (b_configure_driver, "b_configure_driver"); gtk_widget_show (b_configure_driver); gtk_box_pack_start (GTK_BOX (hbox13), b_configure_driver, FALSE, TRUE, 0); GTK_WIDGET_SET_FLAGS (b_configure_driver, GTK_CAN_DEFAULT); gtk_widget_add_accelerator (b_configure_driver, "clicked", accel_group, GDK_G, (GdkModifierType) GDK_MOD1_MASK, GTK_ACCEL_VISIBLE); gtk_widget_add_accelerator (b_configure_driver, "clicked", accel_group, GDK_g, (GdkModifierType) GDK_MOD1_MASK, GTK_ACCEL_VISIBLE); frame17 = gtk_frame_new (NULL); gtk_widget_set_name (frame17, "frame17"); gtk_widget_show (frame17); gtk_box_pack_start (GTK_BOX (vbox9), frame17, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (frame17), 3); alignment17 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment17, "alignment17"); gtk_widget_show (alignment17); gtk_container_add (GTK_CONTAINER (frame17), alignment17); hbox20 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox20, "hbox20"); gtk_widget_show (hbox20); gtk_container_add (GTK_CONTAINER (alignment17), hbox20); gtk_container_set_border_width (GTK_CONTAINER (hbox20), 10); pixmap4 = gtk_pixmap_new (pixmap, mask); gtk_widget_set_name (pixmap4, "pixmap4"); gtk_widget_show (pixmap4); gtk_box_pack_start (GTK_BOX (hbox20), pixmap4, FALSE, TRUE, 10); label54 = gtk_label_new (_("An ODBC driver allows ODBC-enabled programs to get information from\nODBC data sources. To install new drivers, use the driver's setup\nprogram if available, or add it with the 'Add' button.")); gtk_widget_set_name (label54, "label54"); gtk_widget_show (label54); gtk_box_pack_start (GTK_BOX (hbox20), label54, FALSE, TRUE, 0); gtk_label_set_justify (GTK_LABEL (label54), GTK_JUSTIFY_FILL); label4 = gtk_label_new (_("ODBC Drivers")); gtk_widget_set_name (label4, "label4"); gtk_widget_show (label4); gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 3), label4); driverchoose_t.driverlist = lst_drivers; driverchoose_t.mainwnd = admin; driverchoose_t.b_add = b_add_driver; driverchoose_t.b_remove = b_remove_driver; driverchoose_t.b_configure = b_configure_driver; vbox11 = gtk_vbox_new (FALSE, 0); gtk_widget_set_name (vbox11, "vbox11"); gtk_widget_show (vbox11); gtk_container_add (GTK_CONTAINER (notebook1), vbox11); hbox21 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox21, "hbox21"); gtk_widget_show (hbox21); gtk_box_pack_start (GTK_BOX (vbox11), hbox21, TRUE, TRUE, 0); frame21 = gtk_frame_new (NULL); gtk_widget_set_name (frame21, "frame21"); gtk_widget_show (frame21); gtk_box_pack_start (GTK_BOX (hbox21), frame21, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (frame21), 2); alignment21 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment21, "alignment21"); gtk_widget_show (alignment21); gtk_container_add (GTK_CONTAINER (frame21), alignment21); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment21), 0, 0, 6, 0); frame24 = gtk_frame_new (NULL); gtk_widget_set_name (frame24, "frame24"); gtk_widget_show (frame24); gtk_container_add (GTK_CONTAINER (alignment21), frame24); gtk_frame_set_shadow_type (GTK_FRAME (frame24), GTK_SHADOW_NONE); alignment24 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment24, "alignment24"); gtk_widget_show (alignment24); gtk_container_add (GTK_CONTAINER (frame24), alignment24); scrolledwindow9 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_set_name (scrolledwindow9, "scrolledwindow9"); gtk_widget_show (scrolledwindow9); gtk_container_add (GTK_CONTAINER (alignment24), scrolledwindow9); gtk_widget_set_size_request (scrolledwindow9, 427, 160); lst_pool = gtk_clist_new (3); gtk_widget_set_name (lst_pool, "lst_pool"); gtk_widget_show (lst_pool); gtk_container_add (GTK_CONTAINER (scrolledwindow9), lst_pool); gtk_clist_set_column_width (GTK_CLIST (lst_pool), 0, 80); gtk_clist_set_column_width (GTK_CLIST (lst_pool), 1, 80); gtk_clist_set_column_width (GTK_CLIST (lst_pool), 2, 80); gtk_clist_column_titles_show (GTK_CLIST (lst_pool)); lp_name = gtk_label_new (_("Name")); gtk_widget_set_name (lp_name, "lp_name"); gtk_widget_show (lp_name); gtk_clist_set_column_widget (GTK_CLIST (lst_pool), 0, lp_name); lp_timeout = gtk_label_new (_("Pool timeout")); gtk_widget_set_name (lp_timeout, "lp_timeout"); gtk_widget_show (lp_timeout); gtk_clist_set_column_widget (GTK_CLIST (lst_pool), 1, lp_timeout); lp_probe = gtk_label_new (_("Probe query")); gtk_widget_set_name (lp_probe, "lp_probe"); gtk_widget_show (lp_probe); gtk_clist_set_column_widget (GTK_CLIST (lst_pool), 2, lp_probe); label58 = gtk_label_new (_("ODBC Drivers")); gtk_widget_set_name (label58, "label58"); gtk_widget_show (label58); gtk_frame_set_label_widget (GTK_FRAME (frame24), label58); gtk_label_set_use_markup (GTK_LABEL (label58), TRUE); label55 = gtk_label_new (_(" Connection Pooling Timeout ")); gtk_widget_set_name (label55, "label55"); gtk_widget_show (label55); gtk_frame_set_label_widget (GTK_FRAME (frame21), label55); gtk_label_set_use_markup (GTK_LABEL (label55), TRUE); vbox17 = gtk_vbox_new (FALSE, 0); gtk_widget_set_name (vbox17, "vbox17"); gtk_widget_show (vbox17); gtk_box_pack_start (GTK_BOX (hbox21), vbox17, TRUE, TRUE, 0); frame22 = gtk_frame_new (NULL); gtk_widget_set_name (frame22, "frame22"); gtk_widget_show (frame22); gtk_box_pack_start (GTK_BOX (vbox17), frame22, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (frame22), 3); alignment22 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment22, "alignment22"); gtk_widget_show (alignment22); gtk_container_add (GTK_CONTAINER (frame22), alignment22); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment22), 0, 0, 12, 0); vbox18 = gtk_vbox_new (FALSE, 0); gtk_widget_set_name (vbox18, "vbox18"); gtk_widget_show (vbox18); gtk_container_add (GTK_CONTAINER (alignment22), vbox18); br_enable = gtk_radio_button_new_with_mnemonic (NULL, _("_Enable")); gtk_widget_set_name (br_enable, "br_enable"); gtk_widget_show (br_enable); gtk_box_pack_start (GTK_BOX (vbox18), br_enable, FALSE, FALSE, 0); GTK_WIDGET_SET_FLAGS (br_enable, GTK_CAN_DEFAULT); gtk_widget_add_accelerator (br_enable, "clicked", accel_group, GDK_E, (GdkModifierType) GDK_MOD1_MASK, GTK_ACCEL_VISIBLE); gtk_radio_button_set_group (GTK_RADIO_BUTTON (br_enable), br_enable_group); br_enable_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (br_enable)); br_disable = gtk_radio_button_new_with_mnemonic (NULL, _("_Disable")); gtk_widget_set_name (br_disable, "br_disable"); gtk_widget_show (br_disable); gtk_box_pack_start (GTK_BOX (vbox18), br_disable, FALSE, FALSE, 0); GTK_WIDGET_SET_FLAGS (br_disable, GTK_CAN_DEFAULT); gtk_widget_add_accelerator (br_disable, "clicked", accel_group, GDK_D, (GdkModifierType) GDK_MOD1_MASK, GTK_ACCEL_VISIBLE); gtk_radio_button_set_group (GTK_RADIO_BUTTON (br_disable), br_enable_group); br_enable_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (br_disable)); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (br_disable), TRUE); label56 = gtk_label_new (_(" PerfMon ")); gtk_widget_set_name (label56, "label56"); gtk_widget_show (label56); gtk_frame_set_label_widget (GTK_FRAME (frame22), label56); gtk_label_set_use_markup (GTK_LABEL (label56), TRUE); frame23 = gtk_frame_new (NULL); gtk_widget_set_name (frame23, "frame23"); gtk_widget_show (frame23); gtk_box_pack_start (GTK_BOX (vbox17), frame23, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (frame23), 3); alignment23 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment23, "alignment23"); gtk_widget_show (alignment23); gtk_container_add (GTK_CONTAINER (frame23), alignment23); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment23), 0, 0, 12, 0); t_retrywait = gtk_entry_new (); gtk_widget_set_name (t_retrywait, "t_retrywait"); gtk_widget_show (t_retrywait); gtk_container_add (GTK_CONTAINER (alignment23), t_retrywait); label57 = gtk_label_new (_(" Retry Wait time ")); gtk_widget_set_name (label57, "label57"); gtk_widget_show (label57); gtk_frame_set_label_widget (GTK_FRAME (frame23), label57); gtk_label_set_use_markup (GTK_LABEL (label57), TRUE); frame12 = gtk_frame_new (NULL); gtk_widget_set_name (frame12, "frame12"); gtk_widget_show (frame12); gtk_box_pack_start (GTK_BOX (vbox11), frame12, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (frame12), 3); alignment12 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment12, "alignment12"); gtk_widget_show (alignment12); gtk_container_add (GTK_CONTAINER (frame12), alignment12); hbox15 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox15, "hbox15"); gtk_widget_show (hbox15); gtk_container_add (GTK_CONTAINER (alignment12), hbox15); gtk_container_set_border_width (GTK_CONTAINER (hbox15), 15); pixmap5 = gtk_pixmap_new (pixmap, mask); gtk_widget_set_name (pixmap5, "pixmap5"); gtk_widget_show (pixmap5); gtk_box_pack_start (GTK_BOX (hbox15), pixmap5, FALSE, TRUE, 10); label38 = gtk_label_new (_("Connection pooling allows an application to reuse open connection\nhandles, which saves round-trips to the server.")); gtk_widget_set_name (label38, "label38"); gtk_widget_show (label38); gtk_box_pack_start (GTK_BOX (hbox15), label38, FALSE, TRUE, 0); gtk_label_set_justify (GTK_LABEL (label38), GTK_JUSTIFY_FILL); label5 = gtk_label_new (_("Connection Pooling")); gtk_widget_set_name (label5, "label5"); gtk_widget_show (label5); gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 4), label5); connectionpool_t.driverlist = lst_pool; connectionpool_t.enperfmon_rb = br_enable; connectionpool_t.disperfmon_rb = br_disable; connectionpool_t.retwait_entry = t_retrywait; connectionpool_t.changed = FALSE; connectionpool_t.mainwnd = admin; vbox13 = gtk_vbox_new (FALSE, 0); gtk_widget_set_name (vbox13, "vbox13"); gtk_widget_show (vbox13); gtk_container_add (GTK_CONTAINER (notebook1), vbox13); table1 = gtk_table_new (3, 2, FALSE); gtk_widget_set_name (table1, "table1"); gtk_widget_show (table1); gtk_box_pack_start (GTK_BOX (vbox13), table1, TRUE, TRUE, 0); gtk_widget_set_size_request (table1, -1, 250); frame30 = gtk_frame_new (NULL); gtk_widget_set_name (frame30, "frame30"); gtk_widget_show (frame30); gtk_table_attach (GTK_TABLE (table1), frame30, 0, 1, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); gtk_frame_set_shadow_type (GTK_FRAME (frame30), GTK_SHADOW_NONE); frame25 = gtk_frame_new (NULL); gtk_widget_set_name (frame25, "frame25"); gtk_widget_show (frame25); gtk_table_attach (GTK_TABLE (table1), frame25, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_FILL), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (frame25), 3); alignment25 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment25, "alignment25"); gtk_widget_show (alignment25); gtk_container_add (GTK_CONTAINER (frame25), alignment25); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment25), 0, 0, 12, 0); table2 = gtk_table_new (4, 2, FALSE); gtk_widget_set_name (table2, "table2"); gtk_widget_show (table2); gtk_container_add (GTK_CONTAINER (alignment25), table2); gtk_container_set_border_width (GTK_CONTAINER (table2), 4); gtk_table_set_col_spacings (GTK_TABLE (table2), 13); b_donottrace = gtk_radio_button_new_with_mnemonic (NULL, _("_Don't trace")); gtk_widget_set_name (b_donottrace, "b_donottrace"); gtk_widget_show (b_donottrace); gtk_table_attach (GTK_TABLE (table2), b_donottrace, 0, 1, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (GTK_EXPAND), 0, 0); gtk_radio_button_set_group (GTK_RADIO_BUTTON (b_donottrace), b_donottrace_group); b_donottrace_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (b_donottrace)); b_allthetime = gtk_radio_button_new_with_mnemonic (NULL, _("All the t_ime")); gtk_widget_set_name (b_allthetime, "b_allthetime"); gtk_widget_show (b_allthetime); gtk_table_attach (GTK_TABLE (table2), b_allthetime, 0, 1, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (GTK_EXPAND), 0, 0); gtk_radio_button_set_group (GTK_RADIO_BUTTON (b_allthetime), b_donottrace_group); b_donottrace_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (b_allthetime)); b_onetime = gtk_radio_button_new_with_mnemonic (NULL, _("One-_time only")); gtk_widget_set_name (b_onetime, "b_onetime"); gtk_widget_show (b_onetime); gtk_table_attach (GTK_TABLE (table2), b_onetime, 0, 1, 2, 3, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (GTK_EXPAND), 0, 0); gtk_radio_button_set_group (GTK_RADIO_BUTTON (b_onetime), b_donottrace_group); b_donottrace_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (b_onetime)); b_start = gtk_button_new_with_mnemonic (_("_Apply tracing settings")); gtk_widget_set_name (b_start, "b_start"); gtk_widget_show (b_start); gtk_table_attach (GTK_TABLE (table2), b_start, 1, 2, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (GTK_EXPAND), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (b_start), 2); frame28 = gtk_frame_new (NULL); gtk_widget_set_name (frame28, "frame28"); gtk_widget_show (frame28); gtk_table_attach (GTK_TABLE (table2), frame28, 0, 1, 3, 4, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); gtk_frame_set_shadow_type (GTK_FRAME (frame28), GTK_SHADOW_NONE); label59 = gtk_label_new (_(" When to trace ")); gtk_widget_set_name (label59, "label59"); gtk_widget_show (label59); gtk_frame_set_label_widget (GTK_FRAME (frame25), label59); gtk_label_set_use_markup (GTK_LABEL (label59), TRUE); frame27 = gtk_frame_new (NULL); gtk_widget_set_name (frame27, "frame27"); gtk_widget_show (frame27); gtk_table_attach (GTK_TABLE (table1), frame27, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_FILL), 0, 0); gtk_widget_set_size_request (frame27, -1, 110); gtk_container_set_border_width (GTK_CONTAINER (frame27), 3); alignment27 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment27, "alignment27"); gtk_widget_show (alignment27); gtk_container_add (GTK_CONTAINER (frame27), alignment27); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment27), 0, 0, 10, 0); vbox20 = gtk_vbox_new (FALSE, 5); gtk_widget_set_name (vbox20, "vbox20"); gtk_widget_show (vbox20); gtk_container_add (GTK_CONTAINER (alignment27), vbox20); gtk_widget_set_size_request (vbox20, -1, 70); gtk_container_set_border_width (GTK_CONTAINER(vbox20), 2); t_tracelib = gtk_entry_new (); gtk_widget_set_name (t_tracelib, "t_tracelib"); gtk_widget_show (t_tracelib); gtk_box_pack_start (GTK_BOX (vbox20), t_tracelib, FALSE, TRUE, 0); hbox23 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox23, "hbox23"); gtk_widget_show (hbox23); gtk_box_pack_start (GTK_BOX (vbox20), hbox23, FALSE, TRUE, 0); frame34 = gtk_frame_new (NULL); gtk_widget_set_name (frame34, "frame34"); gtk_widget_show (frame34); gtk_box_pack_start (GTK_BOX (hbox23), frame34, TRUE, TRUE, 0); gtk_widget_set_size_request (frame34, -1, 30); gtk_frame_set_shadow_type (GTK_FRAME (frame34), GTK_SHADOW_NONE); bt_select_library = gtk_button_new_with_mnemonic (_("_Select library")); gtk_widget_set_name (bt_select_library, "bt_select_library"); gtk_widget_show (bt_select_library); gtk_box_pack_start (GTK_BOX (hbox23), bt_select_library, FALSE, TRUE, 0); GTK_WIDGET_SET_FLAGS (bt_select_library, GTK_CAN_DEFAULT); gtk_widget_add_accelerator (bt_select_library, "clicked", accel_group, GDK_S, (GdkModifierType) GDK_MOD1_MASK, GTK_ACCEL_VISIBLE); frame35 = gtk_frame_new (NULL); gtk_widget_set_name (frame35, "frame35"); gtk_widget_show (frame35); gtk_box_pack_start (GTK_BOX (hbox23), frame35, TRUE, TRUE, 0); gtk_widget_set_size_request (frame35, -1, 30); gtk_frame_set_shadow_type (GTK_FRAME (frame35), GTK_SHADOW_NONE); frame31 = gtk_frame_new (NULL); gtk_widget_set_name (frame31, "frame31"); gtk_widget_show (frame31); gtk_box_pack_start (GTK_BOX (vbox20), frame31, TRUE, TRUE, 0); gtk_widget_set_size_request (frame31, -1, 30); gtk_frame_set_shadow_type (GTK_FRAME (frame31), GTK_SHADOW_NONE); label61 = gtk_label_new (_(" Custom trace library ")); gtk_widget_set_name (label61, "label61"); gtk_widget_show (label61); gtk_frame_set_label_widget (GTK_FRAME (frame27), label61); gtk_label_set_use_markup (GTK_LABEL (label61), TRUE); frame26 = gtk_frame_new (NULL); gtk_widget_set_name (frame26, "frame26"); gtk_widget_show (frame26); gtk_table_attach (GTK_TABLE (table1), frame26, 1, 2, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (GTK_FILL), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (frame26), 3); alignment26 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment26, "alignment26"); gtk_widget_show (alignment26); gtk_container_add (GTK_CONTAINER (frame26), alignment26); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment26), 0, 0, 12, 0); vbox19 = gtk_vbox_new (FALSE, 0); gtk_widget_set_name (vbox19, "vbox19"); gtk_widget_show (vbox19); gtk_container_add (GTK_CONTAINER (alignment26), vbox19); t_logfile = gtk_entry_new (); gtk_widget_set_name (t_logfile, "t_logfile"); gtk_widget_show (t_logfile); gtk_box_pack_start (GTK_BOX (vbox19), t_logfile, TRUE, TRUE, 0); gtk_entry_set_text (GTK_ENTRY (t_logfile), _("sql.log")); hbox22 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox22, "hbox22"); gtk_widget_show (hbox22); gtk_box_pack_start (GTK_BOX (vbox19), hbox22, FALSE, TRUE, 0); frame32 = gtk_frame_new (NULL); gtk_widget_set_name (frame32, "frame32"); gtk_widget_show (frame32); gtk_box_pack_start (GTK_BOX (hbox22), frame32, TRUE, TRUE, 0); gtk_widget_set_size_request (frame32, -1, 30); gtk_frame_set_shadow_type (GTK_FRAME (frame32), GTK_SHADOW_NONE); bt_browse = gtk_button_new_with_mnemonic (_("_Browse")); gtk_widget_set_name (bt_browse, "bt_browse"); gtk_widget_show (bt_browse); gtk_box_pack_start (GTK_BOX (hbox22), bt_browse, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER(bt_browse), 2); GTK_WIDGET_SET_FLAGS (bt_browse, GTK_CAN_DEFAULT); gtk_widget_add_accelerator (bt_browse, "clicked", accel_group, GDK_B, (GdkModifierType) GDK_MOD1_MASK, GTK_ACCEL_VISIBLE); frame33 = gtk_frame_new (NULL); gtk_widget_set_name (frame33, "frame33"); gtk_widget_show (frame33); gtk_box_pack_start (GTK_BOX (hbox22), frame33, TRUE, TRUE, 0); gtk_widget_set_size_request (frame33, -1, 30); gtk_frame_set_shadow_type (GTK_FRAME (frame33), GTK_SHADOW_NONE); frame29 = gtk_frame_new (NULL); gtk_widget_set_name (frame29, "frame29"); gtk_widget_show (frame29); gtk_box_pack_start (GTK_BOX (vbox19), frame29, TRUE, TRUE, 0); gtk_widget_set_size_request (frame29, -1, 30); gtk_frame_set_shadow_type (GTK_FRAME (frame29), GTK_SHADOW_NONE); label60 = gtk_label_new (_(" Log file path ")); gtk_widget_set_name (label60, "label60"); gtk_widget_show (label60); gtk_frame_set_label_widget (GTK_FRAME (frame26), label60); gtk_label_set_use_markup (GTK_LABEL (label60), TRUE); frame14 = gtk_frame_new (NULL); gtk_widget_set_name (frame14, "frame14"); gtk_widget_show (frame14); gtk_box_pack_start (GTK_BOX (vbox13), frame14, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (frame14), 3); alignment14 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment14, "alignment14"); gtk_widget_show (alignment14); gtk_container_add (GTK_CONTAINER (frame14), alignment14); hbox17 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox17, "hbox17"); gtk_widget_show (hbox17); gtk_container_add (GTK_CONTAINER (alignment14), hbox17); gtk_container_set_border_width (GTK_CONTAINER (hbox17), 10); pixmap6 = gtk_pixmap_new (pixmap, mask); gtk_widget_set_name (pixmap6, "pixmap6"); gtk_widget_show (pixmap6); gtk_box_pack_start (GTK_BOX (hbox17), pixmap6, FALSE, TRUE, 10); label43 = gtk_label_new (_("ODBC tracing allows you to create logs of the calls to ODBC drivers for\nuse by support personnel or to aid you in debugging your applications.\nNote: log files can become very large.")); gtk_widget_set_name (label43, "label43"); gtk_widget_show (label43); gtk_box_pack_start (GTK_BOX (hbox17), label43, FALSE, TRUE, 0); gtk_label_set_justify (GTK_LABEL (label43), GTK_JUSTIFY_FILL); label6 = gtk_label_new (_("Tracing")); gtk_widget_set_name (label6, "label6"); gtk_widget_show (label6); gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 5), label6); tracing_t.logfile_entry = t_logfile; tracing_t.tracelib_entry = t_tracelib; tracing_t.b_start_stop = b_start; tracing_t.donttrace_rb = b_donottrace; tracing_t.allthetime_rb = b_allthetime; tracing_t.onetime_rb = b_onetime; tracing_t.changed = FALSE; vbox15 = gtk_vbox_new (FALSE, 0); gtk_widget_set_name (vbox15, "vbox15"); gtk_widget_show (vbox15); gtk_container_add (GTK_CONTAINER (notebook1), vbox15); frame15 = gtk_frame_new (NULL); gtk_widget_set_name (frame15, "frame15"); gtk_widget_show (frame15); gtk_box_pack_start (GTK_BOX (vbox15), frame15, TRUE, TRUE, 0); gtk_frame_set_shadow_type (GTK_FRAME (frame15), GTK_SHADOW_NONE); alignment15 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment15, "alignment15"); gtk_widget_show (alignment15); gtk_container_add (GTK_CONTAINER (frame15), alignment15); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment15), 0, 0, 4, 0); hbox18 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox18, "hbox18"); gtk_widget_show (hbox18); gtk_container_add (GTK_CONTAINER (alignment15), hbox18); scrolledwindow8 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_set_name (scrolledwindow8, "scrolledwindow8"); gtk_widget_show (scrolledwindow8); gtk_box_pack_start (GTK_BOX (hbox18), scrolledwindow8, TRUE, TRUE, 0); gtk_widget_set_size_request (scrolledwindow8, 440, 219); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow8), GTK_SHADOW_IN); lst_about = gtk_clist_new (5); gtk_widget_set_name (lst_about, "lst_about"); gtk_widget_show (lst_about); gtk_container_add (GTK_CONTAINER (scrolledwindow8), lst_about); gtk_clist_set_column_width (GTK_CLIST (lst_about), 0, 80); gtk_clist_set_column_width (GTK_CLIST (lst_about), 1, 80); gtk_clist_set_column_width (GTK_CLIST (lst_about), 2, 80); gtk_clist_set_column_width (GTK_CLIST (lst_about), 3, 80); gtk_clist_set_column_width (GTK_CLIST (lst_about), 4, 80); gtk_clist_column_titles_show (GTK_CLIST (lst_about)); la_name = gtk_label_new (_("Name")); gtk_widget_set_name (la_name, "la_name"); gtk_widget_show (la_name); gtk_clist_set_column_widget (GTK_CLIST (lst_about), 0, la_name); la_version = gtk_label_new (_("Version")); gtk_widget_set_name (la_version, "la_version"); gtk_widget_show (la_version); gtk_clist_set_column_widget (GTK_CLIST (lst_about), 1, la_version); la_file = gtk_label_new (_("File")); gtk_widget_set_name (la_file, "la_file"); gtk_widget_show (la_file); gtk_clist_set_column_widget (GTK_CLIST (lst_about), 2, la_file); la_date = gtk_label_new (_("Date")); gtk_widget_set_name (la_date, "la_date"); gtk_widget_show (la_date); gtk_clist_set_column_widget (GTK_CLIST (lst_about), 3, la_date); la_size = gtk_label_new (_("Size")); gtk_widget_set_name (la_size, "la_size"); gtk_widget_show (la_size); gtk_clist_set_column_widget (GTK_CLIST (lst_about), 4, la_size); label47 = gtk_label_new (_(" ODBC components installed on your system :")); gtk_widget_set_name (label47, "label47"); gtk_widget_show (label47); gtk_frame_set_label_widget (GTK_FRAME (frame15), label47); gtk_label_set_use_markup (GTK_LABEL (label47), TRUE); frame16 = gtk_frame_new (NULL); gtk_widget_set_name (frame16, "frame16"); gtk_widget_show (frame16); gtk_box_pack_start (GTK_BOX (vbox15), frame16, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (frame16), 3); alignment16 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment16, "alignment16"); gtk_widget_show (alignment16); gtk_container_add (GTK_CONTAINER (frame16), alignment16); hbox19 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox19, "hbox19"); gtk_widget_show (hbox19); gtk_container_add (GTK_CONTAINER (alignment16), hbox19); gtk_container_set_border_width (GTK_CONTAINER (hbox19), 10); pixmap7 = gtk_pixmap_new (pixmap, mask); gtk_widget_set_name (pixmap7, "pixmap7"); gtk_widget_show (pixmap7); gtk_box_pack_start (GTK_BOX (hbox19), pixmap7, FALSE, TRUE, 10); label48 = gtk_label_new (_("ODBC is a programming interface that enables applications to access\ndata in database management systems that use Structured Query\nLanguage (SQL) as a data access standard.")); gtk_widget_set_name (label48, "label48"); gtk_widget_show (label48); gtk_box_pack_start (GTK_BOX (hbox19), label48, FALSE, TRUE, 0); gtk_label_set_justify (GTK_LABEL (label48), GTK_JUSTIFY_FILL); label7 = gtk_label_new (_("About")); gtk_widget_set_name (label7, "label7"); gtk_widget_show (label7); gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 6), label7); dialog_action_area1 = GTK_DIALOG (admin)->action_area; gtk_widget_set_name (dialog_action_area1, "dialog_action_area1"); gtk_widget_show (dialog_action_area1); gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END); cancelbutton1 = gtk_button_new_from_stock ("gtk-cancel"); gtk_widget_set_name (cancelbutton1, "cancelbutton1"); gtk_widget_show (cancelbutton1); gtk_dialog_add_action_widget (GTK_DIALOG (admin), cancelbutton1, GTK_RESPONSE_CANCEL); GTK_WIDGET_SET_FLAGS (cancelbutton1, GTK_CAN_DEFAULT); okbutton1 = gtk_button_new_from_stock ("gtk-ok"); gtk_widget_set_name (okbutton1, "okbutton1"); gtk_widget_show (okbutton1); gtk_dialog_add_action_widget (GTK_DIALOG (admin), okbutton1, GTK_RESPONSE_OK); GTK_WIDGET_SET_FLAGS (okbutton1, GTK_CAN_DEFAULT); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (admin, admin, "admin"); GLADE_HOOKUP_OBJECT_NO_REF (admin, dialog_vbox1, "dialog_vbox1"); GLADE_HOOKUP_OBJECT (admin, notebook1, "notebook1"); GLADE_HOOKUP_OBJECT (admin, vbox1, "vbox1"); GLADE_HOOKUP_OBJECT (admin, frame1, "frame1"); GLADE_HOOKUP_OBJECT (admin, alignment1, "alignment1"); GLADE_HOOKUP_OBJECT (admin, hbox2, "hbox2"); GLADE_HOOKUP_OBJECT (admin, scrolledwindow1, "scrolledwindow1"); GLADE_HOOKUP_OBJECT (admin, lst_usources, "lst_usources"); GLADE_HOOKUP_OBJECT (admin, lu_name, "lu_name"); GLADE_HOOKUP_OBJECT (admin, lu_description, "lu_description"); GLADE_HOOKUP_OBJECT (admin, lu_driver, "lu_driver"); GLADE_HOOKUP_OBJECT (admin, vbox3, "vbox3"); GLADE_HOOKUP_OBJECT (admin, bu_add, "bu_add"); GLADE_HOOKUP_OBJECT (admin, bu_remove, "bu_remove"); GLADE_HOOKUP_OBJECT (admin, bu_config, "bu_config"); GLADE_HOOKUP_OBJECT (admin, bu_test, "bu_test"); GLADE_HOOKUP_OBJECT (admin, frame18, "frame18"); GLADE_HOOKUP_OBJECT (admin, alignment18, "alignment18"); GLADE_HOOKUP_OBJECT (admin, l_usdsn, "l_usdsn"); GLADE_HOOKUP_OBJECT (admin, frame2, "frame2"); GLADE_HOOKUP_OBJECT (admin, alignment2, "alignment2"); GLADE_HOOKUP_OBJECT (admin, hbox3, "hbox3"); GLADE_HOOKUP_OBJECT (admin, pixmap1, "pixmap1"); GLADE_HOOKUP_OBJECT (admin, label14, "label14"); GLADE_HOOKUP_OBJECT (admin, label1, "label1"); GLADE_HOOKUP_OBJECT (admin, vbox4, "vbox4"); GLADE_HOOKUP_OBJECT (admin, frame3, "frame3"); GLADE_HOOKUP_OBJECT (admin, alignment3, "alignment3"); GLADE_HOOKUP_OBJECT (admin, hbox4, "hbox4"); GLADE_HOOKUP_OBJECT (admin, scrolledwindow2, "scrolledwindow2"); GLADE_HOOKUP_OBJECT (admin, lst_ssources, "lst_ssources"); GLADE_HOOKUP_OBJECT (admin, ls_name, "ls_name"); GLADE_HOOKUP_OBJECT (admin, ls_description, "ls_description"); GLADE_HOOKUP_OBJECT (admin, ls_driver, "ls_driver"); GLADE_HOOKUP_OBJECT (admin, vbox5, "vbox5"); GLADE_HOOKUP_OBJECT (admin, bs_add, "bs_add"); GLADE_HOOKUP_OBJECT (admin, bs_remove, "bs_remove"); GLADE_HOOKUP_OBJECT (admin, bs_config, "bs_config"); GLADE_HOOKUP_OBJECT (admin, bs_test, "bs_test"); GLADE_HOOKUP_OBJECT (admin, frame19, "frame19"); GLADE_HOOKUP_OBJECT (admin, alignment19, "alignment19"); GLADE_HOOKUP_OBJECT (admin, label18, "label18"); GLADE_HOOKUP_OBJECT (admin, frame4, "frame4"); GLADE_HOOKUP_OBJECT (admin, alignment4, "alignment4"); GLADE_HOOKUP_OBJECT (admin, hbox5, "hbox5"); GLADE_HOOKUP_OBJECT (admin, pixmap2, "pixmap2"); GLADE_HOOKUP_OBJECT (admin, label19, "label19"); GLADE_HOOKUP_OBJECT (admin, label2, "label2"); GLADE_HOOKUP_OBJECT (admin, vbox6, "vbox6"); GLADE_HOOKUP_OBJECT (admin, frame5, "frame5"); GLADE_HOOKUP_OBJECT (admin, alignment5, "alignment5"); GLADE_HOOKUP_OBJECT (admin, hbox6, "hbox6"); GLADE_HOOKUP_OBJECT (admin, vbox8, "vbox8"); GLADE_HOOKUP_OBJECT (admin, hbox8, "hbox8"); GLADE_HOOKUP_OBJECT (admin, frame7, "frame7"); GLADE_HOOKUP_OBJECT (admin, alignment7, "alignment7"); GLADE_HOOKUP_OBJECT (admin, hbox9, "hbox9"); GLADE_HOOKUP_OBJECT (admin, l_lookin, "l_lookin"); GLADE_HOOKUP_OBJECT (admin, optionmenu1, "optionmenu1"); GLADE_HOOKUP_OBJECT (admin, menu1, "menu1"); GLADE_HOOKUP_OBJECT (admin, hbox11, "hbox11"); GLADE_HOOKUP_OBJECT (admin, scrolledwindow3, "scrolledwindow3"); GLADE_HOOKUP_OBJECT (admin, lst_fdir, "lst_fdir"); GLADE_HOOKUP_OBJECT (admin, l_directory, "l_directory"); GLADE_HOOKUP_OBJECT (admin, scrolledwindow4, "scrolledwindow4"); GLADE_HOOKUP_OBJECT (admin, lst_ffiles, "lst_ffiles"); GLADE_HOOKUP_OBJECT (admin, l_files, "l_files"); GLADE_HOOKUP_OBJECT (admin, frame8, "frame8"); GLADE_HOOKUP_OBJECT (admin, alignment8, "alignment8"); GLADE_HOOKUP_OBJECT (admin, hbox10, "hbox10"); GLADE_HOOKUP_OBJECT (admin, l_selected, "l_selected"); GLADE_HOOKUP_OBJECT (admin, t_fileselected, "t_fileselected"); GLADE_HOOKUP_OBJECT (admin, vbox7, "vbox7"); GLADE_HOOKUP_OBJECT (admin, bf_add, "bf_add"); GLADE_HOOKUP_OBJECT (admin, bf_remove, "bf_remove"); GLADE_HOOKUP_OBJECT (admin, bf_config, "bf_config"); GLADE_HOOKUP_OBJECT (admin, bf_test, "bf_test"); GLADE_HOOKUP_OBJECT (admin, bf_setdir, "bf_setdir"); GLADE_HOOKUP_OBJECT (admin, frame20, "frame20"); GLADE_HOOKUP_OBJECT (admin, alignment20, "alignment20"); GLADE_HOOKUP_OBJECT (admin, frame6, "frame6"); GLADE_HOOKUP_OBJECT (admin, alignment6, "alignment6"); GLADE_HOOKUP_OBJECT (admin, hbox7, "hbox7"); GLADE_HOOKUP_OBJECT (admin, pixmap3, "pixmap3"); GLADE_HOOKUP_OBJECT (admin, label24, "label24"); GLADE_HOOKUP_OBJECT (admin, label53, "label53"); GLADE_HOOKUP_OBJECT (admin, vbox9, "vbox9"); GLADE_HOOKUP_OBJECT (admin, frame9, "frame9"); GLADE_HOOKUP_OBJECT (admin, alignment9, "alignment9"); GLADE_HOOKUP_OBJECT (admin, hbox12, "hbox12"); GLADE_HOOKUP_OBJECT (admin, scrolledwindow5, "scrolledwindow5"); GLADE_HOOKUP_OBJECT (admin, lst_drivers, "lst_drivers"); GLADE_HOOKUP_OBJECT (admin, ld_name, "ld_name"); GLADE_HOOKUP_OBJECT (admin, ld_file, "ld_file"); GLADE_HOOKUP_OBJECT (admin, ld_date, "ld_date"); GLADE_HOOKUP_OBJECT (admin, ld_size, "ld_size"); GLADE_HOOKUP_OBJECT (admin, label32, "label32"); GLADE_HOOKUP_OBJECT (admin, frame10, "frame10"); GLADE_HOOKUP_OBJECT (admin, alignment10, "alignment10"); GLADE_HOOKUP_OBJECT (admin, hbox13, "hbox13"); GLADE_HOOKUP_OBJECT (admin, b_add_driver, "b_add_driver"); GLADE_HOOKUP_OBJECT (admin, b_remove_driver, "b_remove_driver"); GLADE_HOOKUP_OBJECT (admin, b_configure_driver, "b_configure_driver"); GLADE_HOOKUP_OBJECT (admin, frame17, "frame17"); GLADE_HOOKUP_OBJECT (admin, alignment17, "alignment17"); GLADE_HOOKUP_OBJECT (admin, hbox20, "hbox20"); GLADE_HOOKUP_OBJECT (admin, pixmap4, "pixmap4"); GLADE_HOOKUP_OBJECT (admin, label54, "label54"); GLADE_HOOKUP_OBJECT (admin, label4, "label4"); GLADE_HOOKUP_OBJECT (admin, vbox11, "vbox11"); GLADE_HOOKUP_OBJECT (admin, hbox21, "hbox21"); GLADE_HOOKUP_OBJECT (admin, frame21, "frame21"); GLADE_HOOKUP_OBJECT (admin, alignment21, "alignment21"); GLADE_HOOKUP_OBJECT (admin, frame24, "frame24"); GLADE_HOOKUP_OBJECT (admin, alignment24, "alignment24"); GLADE_HOOKUP_OBJECT (admin, scrolledwindow9, "scrolledwindow9"); GLADE_HOOKUP_OBJECT (admin, lst_pool, "lst_pool"); GLADE_HOOKUP_OBJECT (admin, lp_name, "lp_name"); GLADE_HOOKUP_OBJECT (admin, lp_timeout, "lp_timeout"); GLADE_HOOKUP_OBJECT (admin, lp_probe, "lp_probe"); GLADE_HOOKUP_OBJECT (admin, label58, "label58"); GLADE_HOOKUP_OBJECT (admin, label55, "label55"); GLADE_HOOKUP_OBJECT (admin, vbox17, "vbox17"); GLADE_HOOKUP_OBJECT (admin, frame22, "frame22"); GLADE_HOOKUP_OBJECT (admin, alignment22, "alignment22"); GLADE_HOOKUP_OBJECT (admin, vbox18, "vbox18"); GLADE_HOOKUP_OBJECT (admin, br_enable, "br_enable"); GLADE_HOOKUP_OBJECT (admin, br_disable, "br_disable"); GLADE_HOOKUP_OBJECT (admin, label56, "label56"); GLADE_HOOKUP_OBJECT (admin, frame23, "frame23"); GLADE_HOOKUP_OBJECT (admin, alignment23, "alignment23"); GLADE_HOOKUP_OBJECT (admin, t_retrywait, "t_retrywait"); GLADE_HOOKUP_OBJECT (admin, label57, "label57"); GLADE_HOOKUP_OBJECT (admin, frame12, "frame12"); GLADE_HOOKUP_OBJECT (admin, alignment12, "alignment12"); GLADE_HOOKUP_OBJECT (admin, hbox15, "hbox15"); GLADE_HOOKUP_OBJECT (admin, pixmap5, "pixmap5"); GLADE_HOOKUP_OBJECT (admin, label38, "label38"); GLADE_HOOKUP_OBJECT (admin, label5, "label5"); GLADE_HOOKUP_OBJECT (admin, vbox13, "vbox13"); GLADE_HOOKUP_OBJECT (admin, table1, "table1"); GLADE_HOOKUP_OBJECT (admin, frame25, "frame25"); GLADE_HOOKUP_OBJECT (admin, alignment25, "alignment25"); GLADE_HOOKUP_OBJECT (admin, table2, "table2"); GLADE_HOOKUP_OBJECT (admin, b_donottrace, "b_donottrace"); GLADE_HOOKUP_OBJECT (admin, b_allthetime, "b_allthetime"); GLADE_HOOKUP_OBJECT (admin, b_onetime, "b_onetime"); GLADE_HOOKUP_OBJECT (admin, b_start, "b_start"); GLADE_HOOKUP_OBJECT (admin, frame28, "frame28"); GLADE_HOOKUP_OBJECT (admin, label59, "label59"); GLADE_HOOKUP_OBJECT (admin, frame26, "frame26"); GLADE_HOOKUP_OBJECT (admin, alignment26, "alignment26"); GLADE_HOOKUP_OBJECT (admin, vbox19, "vbox19"); GLADE_HOOKUP_OBJECT (admin, t_logfile, "t_logfile"); GLADE_HOOKUP_OBJECT (admin, hbox22, "hbox22"); GLADE_HOOKUP_OBJECT (admin, frame32, "frame32"); GLADE_HOOKUP_OBJECT (admin, bt_browse, "bt_browse"); GLADE_HOOKUP_OBJECT (admin, frame33, "frame33"); GLADE_HOOKUP_OBJECT (admin, frame29, "frame29"); GLADE_HOOKUP_OBJECT (admin, label60, "label60"); GLADE_HOOKUP_OBJECT (admin, frame27, "frame27"); GLADE_HOOKUP_OBJECT (admin, alignment27, "alignment27"); GLADE_HOOKUP_OBJECT (admin, vbox20, "vbox20"); GLADE_HOOKUP_OBJECT (admin, t_tracelib, "t_tracelib"); GLADE_HOOKUP_OBJECT (admin, hbox23, "hbox23"); GLADE_HOOKUP_OBJECT (admin, frame34, "frame34"); GLADE_HOOKUP_OBJECT (admin, bt_select_library, "bt_select_library"); GLADE_HOOKUP_OBJECT (admin, frame35, "frame35"); GLADE_HOOKUP_OBJECT (admin, frame31, "frame31"); GLADE_HOOKUP_OBJECT (admin, label61, "label61"); GLADE_HOOKUP_OBJECT (admin, frame30, "frame30"); GLADE_HOOKUP_OBJECT (admin, frame14, "frame14"); GLADE_HOOKUP_OBJECT (admin, alignment14, "alignment14"); GLADE_HOOKUP_OBJECT (admin, hbox17, "hbox17"); GLADE_HOOKUP_OBJECT (admin, pixmap6, "pixmap6"); GLADE_HOOKUP_OBJECT (admin, label43, "label43"); GLADE_HOOKUP_OBJECT (admin, label6, "label6"); GLADE_HOOKUP_OBJECT (admin, vbox15, "vbox15"); GLADE_HOOKUP_OBJECT (admin, frame15, "frame15"); GLADE_HOOKUP_OBJECT (admin, alignment15, "alignment15"); GLADE_HOOKUP_OBJECT (admin, hbox18, "hbox18"); GLADE_HOOKUP_OBJECT (admin, scrolledwindow8, "scrolledwindow8"); GLADE_HOOKUP_OBJECT (admin, lst_about, "lst_about"); GLADE_HOOKUP_OBJECT (admin, la_name, "la_name"); GLADE_HOOKUP_OBJECT (admin, la_version, "la_version"); GLADE_HOOKUP_OBJECT (admin, la_file, "la_file"); GLADE_HOOKUP_OBJECT (admin, la_date, "la_date"); GLADE_HOOKUP_OBJECT (admin, la_size, "la_size"); GLADE_HOOKUP_OBJECT (admin, label47, "label47"); GLADE_HOOKUP_OBJECT (admin, frame16, "frame16"); GLADE_HOOKUP_OBJECT (admin, alignment16, "alignment16"); GLADE_HOOKUP_OBJECT (admin, hbox19, "hbox19"); GLADE_HOOKUP_OBJECT (admin, pixmap7, "pixmap7"); GLADE_HOOKUP_OBJECT (admin, label48, "label48"); GLADE_HOOKUP_OBJECT (admin, label7, "label7"); GLADE_HOOKUP_OBJECT_NO_REF (admin, dialog_action_area1, "dialog_action_area1"); GLADE_HOOKUP_OBJECT (admin, cancelbutton1, "cancelbutton1"); GLADE_HOOKUP_OBJECT (admin, okbutton1, "okbutton1"); /* Notebook events */ gtk_signal_connect_after (GTK_OBJECT (notebook1), "switch_page", GTK_SIGNAL_FUNC (admin_switch_page), inparams); /* Ok button events */ gtk_signal_connect (GTK_OBJECT (okbutton1), "clicked", GTK_SIGNAL_FUNC (admin_ok_clicked), inparams); /* Cancel button events */ gtk_signal_connect (GTK_OBJECT (cancelbutton1), "clicked", GTK_SIGNAL_FUNC (admin_cancel_clicked), inparams); /* Close window button events */ gtk_signal_connect (GTK_OBJECT (admin), "delete_event", GTK_SIGNAL_FUNC (delete_event), inparams); gtk_signal_connect (GTK_OBJECT (admin), "destroy", GTK_SIGNAL_FUNC (gtk_main_quit), NULL); /* Add user DSN button events */ gtk_signal_connect (GTK_OBJECT (dsnchoose_t.uadd), "clicked", GTK_SIGNAL_FUNC (userdsn_add_clicked), &dsnchoose_t); /* Remove user DSN button events */ gtk_signal_connect (GTK_OBJECT (dsnchoose_t.uremove), "clicked", GTK_SIGNAL_FUNC (userdsn_remove_clicked), &dsnchoose_t); /* Test user DSN button events */ gtk_signal_connect (GTK_OBJECT (dsnchoose_t.utest), "clicked", GTK_SIGNAL_FUNC (userdsn_test_clicked), &dsnchoose_t); /* Configure user DSN button events */ gtk_signal_connect (GTK_OBJECT (dsnchoose_t.uconfigure), "clicked", GTK_SIGNAL_FUNC (userdsn_configure_clicked), &dsnchoose_t); /* Add system DSN button events */ gtk_signal_connect (GTK_OBJECT (dsnchoose_t.sadd), "clicked", GTK_SIGNAL_FUNC (systemdsn_add_clicked), &dsnchoose_t); /* Remove system DSN button events */ gtk_signal_connect (GTK_OBJECT (dsnchoose_t.sremove), "clicked", GTK_SIGNAL_FUNC (systemdsn_remove_clicked), &dsnchoose_t); /* Test system DSN button events */ gtk_signal_connect (GTK_OBJECT (dsnchoose_t.stest), "clicked", GTK_SIGNAL_FUNC (systemdsn_test_clicked), &dsnchoose_t); /* Configure system DSN button events */ gtk_signal_connect (GTK_OBJECT (dsnchoose_t.sconfigure), "clicked", GTK_SIGNAL_FUNC (systemdsn_configure_clicked), &dsnchoose_t); /* Add file DSN button events */ gtk_signal_connect (GTK_OBJECT (dsnchoose_t.fadd), "clicked", GTK_SIGNAL_FUNC (filedsn_add_clicked), &dsnchoose_t); /* Remove file DSN button events */ gtk_signal_connect (GTK_OBJECT (dsnchoose_t.fremove), "clicked", GTK_SIGNAL_FUNC (filedsn_remove_clicked), &dsnchoose_t); /* Test file DSN button events */ gtk_signal_connect (GTK_OBJECT (dsnchoose_t.ftest), "clicked", GTK_SIGNAL_FUNC (filedsn_test_clicked), &dsnchoose_t); /* Configure file DSN button events */ gtk_signal_connect (GTK_OBJECT (dsnchoose_t.fconfigure), "clicked", GTK_SIGNAL_FUNC (filedsn_configure_clicked), &dsnchoose_t); /* Configure file DSN button events */ gtk_signal_connect (GTK_OBJECT (dsnchoose_t.fsetdir), "clicked", GTK_SIGNAL_FUNC (filedsn_setdir_clicked), &dsnchoose_t); /* Add driver button events */ gtk_signal_connect (GTK_OBJECT (driverchoose_t.b_add), "clicked", GTK_SIGNAL_FUNC (driver_add_clicked), &driverchoose_t); /* Remove driver button events */ gtk_signal_connect (GTK_OBJECT (driverchoose_t.b_remove), "clicked", GTK_SIGNAL_FUNC (driver_remove_clicked), &driverchoose_t); /* Configure driver button events */ gtk_signal_connect (GTK_OBJECT (driverchoose_t.b_configure), "clicked", GTK_SIGNAL_FUNC (driver_configure_clicked), &driverchoose_t); /* User DSN list events */ gtk_signal_connect (GTK_OBJECT (lst_usources), "select_row", GTK_SIGNAL_FUNC (userdsn_list_select), &dsnchoose_t); gtk_signal_connect (GTK_OBJECT (lst_usources), "unselect_row", GTK_SIGNAL_FUNC (userdsn_list_unselect), &dsnchoose_t); /* System DSN list events */ gtk_signal_connect (GTK_OBJECT (lst_ssources), "select_row", GTK_SIGNAL_FUNC (systemdsn_list_select), &dsnchoose_t); gtk_signal_connect (GTK_OBJECT (lst_ssources), "unselect_row", GTK_SIGNAL_FUNC (systemdsn_list_unselect), &dsnchoose_t); /* Directories file DSN list events */ gtk_signal_connect (GTK_OBJECT (lst_fdir), "select_row", GTK_SIGNAL_FUNC (filedsn_dirlist_select), &dsnchoose_t); /* Files file DSN list events */ gtk_signal_connect (GTK_OBJECT (lst_ffiles), "select_row", GTK_SIGNAL_FUNC (filedsn_filelist_select), &dsnchoose_t); gtk_signal_connect (GTK_OBJECT (lst_ffiles), "unselect_row", GTK_SIGNAL_FUNC (filedsn_filelist_unselect), &dsnchoose_t); /* Start tracing button events */ gtk_signal_connect (GTK_OBJECT (b_start), "clicked", GTK_SIGNAL_FUNC (tracing_start_clicked), &tracing_t); /* Browse file entry events */ gtk_signal_connect (GTK_OBJECT (bt_browse), "clicked", GTK_SIGNAL_FUNC (tracing_browse_clicked), &tracing_t); /* Driver list events */ gtk_signal_connect (GTK_OBJECT (lst_drivers), "select_row", GTK_SIGNAL_FUNC (driver_list_select), &driverchoose_t); gtk_signal_connect (GTK_OBJECT (lst_drivers), "unselect_row", GTK_SIGNAL_FUNC (driver_list_unselect), &driverchoose_t); /* Connection pooling list events */ gtk_signal_connect (GTK_OBJECT (lst_pool), "select_row", GTK_SIGNAL_FUNC (cpdriver_list_select), &connectionpool_t); SQLSetConfigMode (ODBC_BOTH_DSN); if (!SQLGetPrivateProfileString("ODBC", "FileDSNPath", "", dsnchoose_t.curr_dir, sizeof(dsnchoose_t.curr_dir), "odbcinst.ini")) strcpy(dsnchoose_t.curr_dir, DEFAULT_FILEDSNPATH); adddsns_to_list (lst_usources, FALSE); component_t.componentlist = lst_about; inparams[0] = &dsnchoose_t; inparams[1] = &driverchoose_t; inparams[2] = &tracing_t; inparams[3] = &component_t; inparams[4] = &connectionpool_t; inparams[5] = admin; gtk_widget_show_all (admin); gtk_main (); } libiodbc-3.52.16/iodbcadm/gtk/odbc4.xpm0000664000175000017500000001133314424170750014437 00000000000000/* * odbc4.xpm * * $Id$ * * ODBC logo in XPM format * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* XPM */ static char *odbc4_xpm[] = { "32 29 17 1", " c None", ". c #000000", "+ c #800000", "@ c #008000", "# c #808000", "$ c #000080", "% c #800080", "& c #008080", "* c #808080", "= c #C0C0C0", "- c #FF0000", "; c #00FF00", "> c #FFFF00", ", c #0000FF", "' c #FF00FF", ") c #00FFFF", "! c #FFFFFF", " ", " ", " ", " $$$$$$$$$$$$$$$$$$ ", " $,,, ,, ,, ,, ,,,.* ", " $$$$$$$$$$$$$$$$$.* ", " ....... =* ** ***.* ", " ..)=)==&.. .* ", " ..)==)=@@@@@. ** ***.* ", " )=))=@@@@@@@. .* ", " . )=)@@@)@@@@@@@. .* ", " .))=)=@@))@@@@@@@. ***.* ", " .)==)=)))@@@@@@@@@& .* ", " .=))=)&=@@@@@@)@@@@=***.* ", " .)=))=)=@@@@)@@@@&@&.***.* ", " .=)==)=&#@@)@#@#@@&&.= .* ", " .)=))=)@@)))@#@)#@&&.***.* ", " .=)==)=@#)@##@@@#&&&.= .* ", " .)=))=)==##@@@@#&&&&.***.* ", " .)=))=)==@#@@@@@&&&&.....* ", " .)==)=))=)@@@@@&&&&****** ", " .=))=)==)=&@@@@&&&&* ", " .==)=)&=&=@@@@&&&.* ", " .=&=&&=&&@@@@&&.* ", " &=&=&&&&&@@&&.** ", " ..&&&&&&&&&&.** ", " ..&&&&&&..** ", " ******* ", " " }; libiodbc-3.52.16/iodbcadm/gtk/driversetup.c0000664000175000017500000007055714424170750015453 00000000000000/* * driversetup.c * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "gui.h" static char* STRCONN = "%s\0Driver=%s\0Setup=%s\0\0"; static int STRCONN_NB_TOKENS = 3; char *szKeysColumnNames[] = { "Keyword", "Value" }; char *szKeysButtons[] = { "_Add", "_Update" }; static void addkeywords_to_list (GtkWidget *widget, LPCSTR attrs, TDRIVERSETUP *driversetup_t) { char *curr, *cour; char *data[2]; if (!GTK_IS_CLIST (widget)) return; gtk_clist_clear (GTK_CLIST (widget)); for (curr = (LPSTR) attrs; *curr; curr += (STRLEN (curr) + 1)) { if (!strncasecmp (curr, "Driver=", STRLEN ("Driver="))) { gtk_entry_set_text (GTK_ENTRY (driversetup_t->driver_entry), curr + STRLEN ("Driver=")); continue; } if (!strncasecmp (curr, "Setup=", STRLEN ("Setup="))) { gtk_entry_set_text (GTK_ENTRY (driversetup_t->setup_entry), curr + STRLEN ("Setup=")); continue; } data[0] = curr; if ((cour = strchr (curr, '='))) { data[1] = cour + 1; *cour = 0; gtk_clist_append (GTK_CLIST (widget), data); *cour = '='; } else { data[1] = ""; gtk_clist_append (GTK_CLIST (widget), data); } } if (GTK_CLIST (widget)->rows > 0) gtk_clist_sort (GTK_CLIST (widget)); } static void parse_attribute_line (TDRIVERSETUP *driversetup_t, LPCSTR driver, LPCSTR attrs, BOOL add) { if (driver) { gtk_entry_set_text (GTK_ENTRY (driversetup_t->name_entry), driver); if (add) gtk_entry_set_editable (GTK_ENTRY (driversetup_t->name_entry), FALSE); else gtk_entry_set_editable (GTK_ENTRY (driversetup_t->name_entry), TRUE); } addkeywords_to_list (driversetup_t->key_list, attrs, driversetup_t); } static void driver_file_choosen (GtkWidget *widget, TDRIVERSETUP *driversetup_t) { if (driversetup_t) { gtk_entry_set_text (GTK_ENTRY (driversetup_t->driver_entry), gtk_file_selection_get_filename (GTK_FILE_SELECTION (driversetup_t-> filesel))); driversetup_t->filesel = NULL; } } static void setup_file_choosen (GtkWidget *widget, TDRIVERSETUP *driversetup_t) { if (driversetup_t) { gtk_entry_set_text (GTK_ENTRY (driversetup_t->setup_entry), gtk_file_selection_get_filename (GTK_FILE_SELECTION (driversetup_t-> filesel))); driversetup_t->filesel = NULL; } } static void driversetup_browsedriver_clicked (GtkWidget *widget, TDRIVERSETUP *driversetup_t) { GtkWidget *filesel; if (driversetup_t) { filesel = gtk_file_selection_new ("Choose your driver library ..."); gtk_window_set_modal (GTK_WINDOW (filesel), TRUE); gtk_file_selection_set_filename (GTK_FILE_SELECTION (filesel), gtk_entry_get_text (GTK_ENTRY (driversetup_t->driver_entry))); /* Ok button events */ gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (filesel)-> ok_button), "clicked", GTK_SIGNAL_FUNC (driver_file_choosen), driversetup_t); gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (filesel)-> ok_button), "clicked", GTK_SIGNAL_FUNC (gtk_main_quit), NULL); /* Cancel button events */ gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (filesel)-> cancel_button), "clicked", GTK_SIGNAL_FUNC (gtk_main_quit), NULL); /* Close window button events */ gtk_signal_connect (GTK_OBJECT (filesel), "delete_event", GTK_SIGNAL_FUNC (gtk_main_quit), NULL); driversetup_t->filesel = filesel; gtk_widget_show_all (filesel); gtk_main (); gtk_widget_destroy (filesel); driversetup_t->filesel = NULL; } } static void driversetup_browsesetup_clicked (GtkWidget *widget, TDRIVERSETUP *driversetup_t) { GtkWidget *filesel; if (driversetup_t) { filesel = gtk_file_selection_new ("Choose your setup library ..."); gtk_window_set_modal (GTK_WINDOW (filesel), TRUE); gtk_file_selection_set_filename (GTK_FILE_SELECTION (filesel), gtk_entry_get_text (GTK_ENTRY (driversetup_t->setup_entry))); /* Ok button events */ gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (filesel)-> ok_button), "clicked", GTK_SIGNAL_FUNC (setup_file_choosen), driversetup_t); gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (filesel)-> ok_button), "clicked", GTK_SIGNAL_FUNC (gtk_main_quit), NULL); /* Cancel button events */ gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (filesel)-> cancel_button), "clicked", GTK_SIGNAL_FUNC (gtk_main_quit), NULL); /* Close window button events */ gtk_signal_connect (GTK_OBJECT (filesel), "delete_event", GTK_SIGNAL_FUNC (gtk_main_quit), NULL); driversetup_t->filesel = filesel; gtk_widget_show_all (filesel); gtk_main (); gtk_widget_destroy (filesel); driversetup_t->filesel = NULL; } } static void driversetup_add_clicked (GtkWidget *widget, TDRIVERSETUP *driversetup_t) { char *szKey; char *data[2]; int i = 0; if (driversetup_t) { data[0] = (char*)gtk_entry_get_text (GTK_ENTRY (driversetup_t->key_entry)); if (!STRLEN (data[0])) goto done; data[1] = (char*)gtk_entry_get_text (GTK_ENTRY (driversetup_t->value_entry)); for (i = 0; i < GTK_CLIST (driversetup_t->key_list)->rows; i++) { gtk_clist_get_text (GTK_CLIST (driversetup_t->key_list), i, 0, &szKey); if (!strcmp (szKey, data[0])) { gtk_clist_remove (GTK_CLIST (driversetup_t->key_list), i); break; } } gtk_clist_append (GTK_CLIST (driversetup_t->key_list), data); if (GTK_CLIST (driversetup_t->key_list)->rows > 0) gtk_clist_sort (GTK_CLIST (driversetup_t->key_list)); done: gtk_entry_set_text (GTK_ENTRY (driversetup_t->key_entry), ""); gtk_entry_set_text (GTK_ENTRY (driversetup_t->value_entry), ""); } } static void driversetup_update_clicked (GtkWidget *widget, TDRIVERSETUP *driversetup_t) { char *data[2]; int i; if (driversetup_t) { data[0] = (char*)gtk_entry_get_text (GTK_ENTRY (driversetup_t->key_entry)); if (STRLEN (data[0])) { data[1] = (char*)gtk_entry_get_text (GTK_ENTRY (driversetup_t->value_entry)); if (GTK_CLIST (driversetup_t->key_list)->selection != NULL) i = GPOINTER_TO_INT (GTK_CLIST (driversetup_t->key_list)->selection-> data); else i = 0; /* An update operation */ if (i < GTK_CLIST (driversetup_t->key_list)->rows) { gtk_clist_set_text (GTK_CLIST (driversetup_t->key_list), i, 0, data[0]); gtk_clist_set_text (GTK_CLIST (driversetup_t->key_list), i, 1, data[1]); } } gtk_entry_set_text (GTK_ENTRY (driversetup_t->key_entry), ""); gtk_entry_set_text (GTK_ENTRY (driversetup_t->value_entry), ""); } } static void driversetup_list_select (GtkWidget *widget, gint row, gint column, GdkEvent *event, TDRIVERSETUP *driversetup_t) { char *szKey, *szValue; if (driversetup_t && GTK_CLIST (driversetup_t->key_list)->selection != NULL) { gtk_clist_get_text (GTK_CLIST (driversetup_t->key_list), GPOINTER_TO_INT (GTK_CLIST (driversetup_t->key_list)->selection-> data), 0, &szKey); gtk_clist_get_text (GTK_CLIST (driversetup_t->key_list), GPOINTER_TO_INT (GTK_CLIST (driversetup_t->key_list)->selection-> data), 1, &szValue); gtk_entry_set_text (GTK_ENTRY (driversetup_t->key_entry), szKey); gtk_entry_set_text (GTK_ENTRY (driversetup_t->value_entry), szValue); gtk_widget_set_sensitive (driversetup_t->bupdate, TRUE); } } static void driversetup_list_unselect (GtkWidget *widget, gint row, gint column, GdkEvent *event, TDRIVERSETUP *driversetup_t) { if (driversetup_t) { gtk_widget_set_sensitive (driversetup_t->bupdate, FALSE); gtk_entry_set_text (GTK_ENTRY (driversetup_t->key_entry), ""); gtk_entry_set_text (GTK_ENTRY (driversetup_t->value_entry), ""); } } static void driversetup_ok_clicked (GtkWidget *widget, TDRIVERSETUP *driversetup_t) { char *curr, *cour, *szKey, *szValue; int i = 0, size; if (driversetup_t) { driversetup_t->connstr = (char *) malloc (sizeof (char) * (size = ((STRLEN (gtk_entry_get_text (GTK_ENTRY (driversetup_t-> name_entry))) ? STRLEN (gtk_entry_get_text (GTK_ENTRY (driversetup_t-> name_entry))) + 1 : 0) + (STRLEN (gtk_entry_get_text (GTK_ENTRY (driversetup_t-> driver_entry))) ? STRLEN (gtk_entry_get_text (GTK_ENTRY (driversetup_t-> driver_entry))) + STRLEN ("Driver=") + 1 : 0) + (STRLEN (gtk_entry_get_text (GTK_ENTRY (driversetup_t-> setup_entry))) ? STRLEN (gtk_entry_get_text (GTK_ENTRY (driversetup_t-> setup_entry))) + STRLEN ("Setup=") + 1 : 0) + 1))); if (driversetup_t->connstr) { for (curr = STRCONN, cour = driversetup_t->connstr; i < STRCONN_NB_TOKENS; i++, curr += (STRLEN (curr) + 1)) switch (i) { case 0: if (STRLEN (gtk_entry_get_text (GTK_ENTRY (driversetup_t-> name_entry)))) { sprintf (cour, curr, gtk_entry_get_text (GTK_ENTRY (driversetup_t-> name_entry))); cour += (STRLEN (cour) + 1); } break; case 1: if (STRLEN (gtk_entry_get_text (GTK_ENTRY (driversetup_t-> driver_entry)))) { sprintf (cour, curr, gtk_entry_get_text (GTK_ENTRY (driversetup_t-> driver_entry))); cour += (STRLEN (cour) + 1); } break; case 2: if (STRLEN (gtk_entry_get_text (GTK_ENTRY (driversetup_t-> setup_entry)))) { sprintf (cour, curr, gtk_entry_get_text (GTK_ENTRY (driversetup_t-> setup_entry))); cour += (STRLEN (cour) + 1); } break; }; for (i = 0; i < GTK_CLIST (driversetup_t->key_list)->rows; i++) { gtk_clist_get_text (GTK_CLIST (driversetup_t->key_list), i, 0, &szKey); gtk_clist_get_text (GTK_CLIST (driversetup_t->key_list), i, 1, &szValue); cour = (char *) driversetup_t->connstr; driversetup_t->connstr = (LPSTR) malloc (size + STRLEN (szKey) + STRLEN (szValue) + 2); if (driversetup_t->connstr) { memcpy (driversetup_t->connstr, cour, size); sprintf (driversetup_t->connstr + size - 1, "%s=%s", szKey, szValue); free (cour); size += STRLEN (szKey) + STRLEN (szValue) + 2; } else driversetup_t->connstr = cour; } driversetup_t->connstr[size - 1] = 0; } driversetup_t->name_entry = driversetup_t->driver_entry = driversetup_t->setup_entry = NULL; driversetup_t->key_list = driversetup_t->filesel = NULL; gtk_signal_disconnect_by_func (GTK_OBJECT (driversetup_t->mainwnd), GTK_SIGNAL_FUNC (gtk_main_quit), NULL); gtk_main_quit (); gtk_widget_destroy (driversetup_t->mainwnd); } } static void driversetup_cancel_clicked (GtkWidget *widget, TDRIVERSETUP *driversetup_t) { if (driversetup_t) { driversetup_t->connstr = (LPSTR) - 1L; driversetup_t->name_entry = driversetup_t->driver_entry = driversetup_t->setup_entry = NULL; driversetup_t->key_list = driversetup_t->filesel = NULL; gtk_signal_disconnect_by_func (GTK_OBJECT (driversetup_t->mainwnd), GTK_SIGNAL_FUNC (gtk_main_quit), NULL); gtk_main_quit (); gtk_widget_destroy (driversetup_t->mainwnd); } } static gint delete_event (GtkWidget *widget, GdkEvent *event, TDRIVERSETUP *driversetup_t) { driversetup_cancel_clicked (widget, driversetup_t); return FALSE; } LPSTR create_driversetup (HWND hwnd, LPCSTR driver, LPCSTR attrs, BOOL add, BOOL user) { GdkPixmap *pixmap; GdkBitmap *mask; GtkStyle *style; GtkWidget *driversetup; GtkWidget *dialog_vbox6; GtkWidget *vbox26; GtkWidget *frame57; GtkWidget *alignment49; GtkWidget *table6; GtkWidget *label99; GtkWidget *label100; GtkWidget *label101; GtkWidget *t_name; GtkWidget *t_driver; GtkWidget *t_setup; GtkWidget *b_browse; GtkWidget *b_browse1; GtkWidget *frame58; GtkWidget *alignment50; GtkWidget *scrolledwindow16; GtkWidget *clist1; GtkWidget *label97; GtkWidget *label98; GtkWidget *frame59; GtkWidget *alignment51; GtkWidget *table7; GtkWidget *label102; GtkWidget *label103; GtkWidget *t_keyword; GtkWidget *t_value; GtkWidget *b_add; GtkWidget *b_update; GtkWidget *dialog_action_area6; GtkWidget *b_cancel; GtkWidget *b_ok; TDRIVERSETUP driversetup_t; if (hwnd == NULL || !GTK_IS_WIDGET (hwnd)) return (LPSTR) attrs; driversetup = gtk_dialog_new (); gtk_widget_set_name (driversetup, "driversetup"); gtk_widget_set_size_request (driversetup, 505, 480); gtk_window_set_title (GTK_WINDOW (driversetup), _("ODBC Driver Add/Setup")); gtk_window_set_position (GTK_WINDOW (driversetup), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (driversetup), TRUE); gtk_window_set_default_size (GTK_WINDOW (driversetup), 600, 450); gtk_window_set_type_hint (GTK_WINDOW (driversetup), GDK_WINDOW_TYPE_HINT_DIALOG); #if GTK_CHECK_VERSION(2,0,0) gtk_widget_show (driversetup); #endif dialog_vbox6 = GTK_DIALOG (driversetup)->vbox; gtk_widget_set_name (dialog_vbox6, "dialog_vbox6"); gtk_widget_show (dialog_vbox6); vbox26 = gtk_vbox_new (FALSE, 0); gtk_widget_set_name (vbox26, "vbox26"); gtk_widget_show (vbox26); gtk_box_pack_start (GTK_BOX (dialog_vbox6), vbox26, TRUE, TRUE, 0); frame57 = gtk_frame_new (NULL); gtk_widget_set_name (frame57, "frame57"); gtk_widget_show (frame57); gtk_box_pack_start (GTK_BOX (vbox26), frame57, FALSE, TRUE, 0); gtk_frame_set_shadow_type (GTK_FRAME (frame57), GTK_SHADOW_NONE); alignment49 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment49, "alignment49"); gtk_widget_show (alignment49); gtk_container_add (GTK_CONTAINER (frame57), alignment49); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment49), 16, 0, 4, 4); table6 = gtk_table_new (3, 3, FALSE); gtk_widget_set_name (table6, "table6"); gtk_widget_show (table6); gtk_container_add (GTK_CONTAINER (alignment49), table6); gtk_table_set_row_spacings (GTK_TABLE (table6), 6); gtk_table_set_col_spacings (GTK_TABLE (table6), 10); label99 = gtk_label_new (_("Description of the driver :")); gtk_widget_set_name (label99, "label99"); gtk_widget_show (label99); gtk_table_attach (GTK_TABLE (table6), label99, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label99), 0, 0.5); label100 = gtk_label_new (_(" Driver file name :")); gtk_widget_set_name (label100, "label100"); gtk_widget_show (label100); gtk_table_attach (GTK_TABLE (table6), label100, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (label100), GTK_JUSTIFY_RIGHT); gtk_misc_set_alignment (GTK_MISC (label100), 0, 0.5); label101 = gtk_label_new (_(" Setup file name :")); gtk_widget_set_name (label101, "label101"); gtk_widget_show (label101); gtk_table_attach (GTK_TABLE (table6), label101, 0, 1, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (label101), GTK_JUSTIFY_RIGHT); gtk_misc_set_alignment (GTK_MISC (label101), 0, 0.5); t_name = gtk_entry_new (); gtk_widget_set_name (t_name, "t_name"); gtk_widget_show (t_name); gtk_table_attach (GTK_TABLE (table6), t_name, 1, 2, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); t_driver = gtk_entry_new (); gtk_widget_set_name (t_driver, "t_driver"); gtk_widget_show (t_driver); gtk_table_attach (GTK_TABLE (table6), t_driver, 1, 2, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); t_setup = gtk_entry_new (); gtk_widget_set_name (t_setup, "t_setup"); gtk_widget_show (t_setup); gtk_table_attach (GTK_TABLE (table6), t_setup, 1, 2, 2, 3, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); b_browse = gtk_button_new_with_mnemonic (_("Browse . . .")); gtk_widget_set_name (b_browse, "b_browse"); gtk_widget_show (b_browse); gtk_table_attach (GTK_TABLE (table6), b_browse, 2, 3, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); b_browse1 = gtk_button_new_with_mnemonic (_(" Browse . . . ")); gtk_widget_set_name (b_browse1, "b_browse1"); gtk_widget_show (b_browse1); gtk_table_attach (GTK_TABLE (table6), b_browse1, 2, 3, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); frame58 = gtk_frame_new (NULL); gtk_widget_set_name (frame58, "frame58"); gtk_widget_show (frame58); gtk_box_pack_start (GTK_BOX (vbox26), frame58, TRUE, TRUE, 0); gtk_widget_set_size_request (frame58, -1, 220); gtk_frame_set_shadow_type (GTK_FRAME (frame58), GTK_SHADOW_NONE); alignment50 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment50, "alignment50"); gtk_widget_show (alignment50); gtk_container_add (GTK_CONTAINER (frame58), alignment50); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment50), 0, 0, 4, 4); scrolledwindow16 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_set_name (scrolledwindow16, "scrolledwindow16"); gtk_widget_show (scrolledwindow16); gtk_container_add (GTK_CONTAINER (alignment50), scrolledwindow16); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow16), GTK_SHADOW_IN); clist1 = gtk_clist_new (2); gtk_widget_set_name (clist1, "clist1"); gtk_widget_show (clist1); gtk_container_add (GTK_CONTAINER (scrolledwindow16), clist1); gtk_clist_set_column_width (GTK_CLIST (clist1), 0, 134); gtk_clist_set_column_width (GTK_CLIST (clist1), 1, 80); gtk_clist_column_titles_show (GTK_CLIST (clist1)); label97 = gtk_label_new (_("Keyword")); gtk_widget_set_name (label97, "label97"); gtk_widget_show (label97); gtk_clist_set_column_widget (GTK_CLIST (clist1), 0, label97); gtk_widget_set_size_request (label97, 134, -1); label98 = gtk_label_new (_("Value")); gtk_widget_set_name (label98, "label98"); gtk_widget_show (label98); gtk_clist_set_column_widget (GTK_CLIST (clist1), 1, label98); gtk_widget_set_size_request (label98, 80, -1); frame59 = gtk_frame_new (NULL); gtk_widget_set_name (frame59, "frame59"); gtk_widget_show (frame59); gtk_box_pack_start (GTK_BOX (vbox26), frame59, FALSE, TRUE, 0); gtk_frame_set_shadow_type (GTK_FRAME (frame59), GTK_SHADOW_NONE); alignment51 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment51, "alignment51"); gtk_widget_show (alignment51); gtk_container_add (GTK_CONTAINER (frame59), alignment51); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment51), 10, 10, 4, 4); table7 = gtk_table_new (2, 3, FALSE); gtk_widget_set_name (table7, "table7"); gtk_widget_show (table7); gtk_container_add (GTK_CONTAINER (alignment51), table7); gtk_table_set_row_spacings (GTK_TABLE (table7), 6); gtk_table_set_col_spacings (GTK_TABLE (table7), 10); label102 = gtk_label_new (_("Keyword :")); gtk_widget_set_name (label102, "label102"); gtk_widget_show (label102); gtk_table_attach (GTK_TABLE (table7), label102, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label102), 0, 0.5); label103 = gtk_label_new (_(" Value :")); gtk_widget_set_name (label103, "label103"); gtk_widget_show (label103); gtk_table_attach (GTK_TABLE (table7), label103, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label103), 0, 0.5); t_keyword = gtk_entry_new (); gtk_widget_set_name (t_keyword, "t_keyword"); gtk_widget_show (t_keyword); gtk_table_attach (GTK_TABLE (table7), t_keyword, 1, 2, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); t_value = gtk_entry_new (); gtk_widget_set_name (t_value, "t_value"); gtk_widget_show (t_value); gtk_table_attach (GTK_TABLE (table7), t_value, 1, 2, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); b_add = gtk_button_new_from_stock ("gtk-add"); gtk_widget_set_name (b_add, "b_add"); gtk_widget_show (b_add); gtk_table_attach (GTK_TABLE (table7), b_add, 2, 3, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); b_update = gtk_button_new_with_mnemonic (_("_Update")); gtk_widget_set_name (b_update, "b_update"); gtk_widget_show (b_update); gtk_table_attach (GTK_TABLE (table7), b_update, 2, 3, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); dialog_action_area6 = GTK_DIALOG (driversetup)->action_area; gtk_widget_set_name (dialog_action_area6, "dialog_action_area6"); gtk_widget_show (dialog_action_area6); gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area6), GTK_BUTTONBOX_END); b_cancel = gtk_button_new_from_stock ("gtk-cancel"); gtk_widget_set_name (b_cancel, "b_cancel"); gtk_widget_show (b_cancel); gtk_dialog_add_action_widget (GTK_DIALOG (driversetup), b_cancel, GTK_RESPONSE_CANCEL); GTK_WIDGET_SET_FLAGS (b_cancel, GTK_CAN_DEFAULT); b_ok = gtk_button_new_from_stock ("gtk-ok"); gtk_widget_set_name (b_ok, "b_ok"); gtk_widget_show (b_ok); gtk_dialog_add_action_widget (GTK_DIALOG (driversetup), b_ok, GTK_RESPONSE_OK); GTK_WIDGET_SET_FLAGS (b_ok, GTK_CAN_DEFAULT); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (driversetup, driversetup, "driversetup"); GLADE_HOOKUP_OBJECT_NO_REF (driversetup, dialog_vbox6, "dialog_vbox6"); GLADE_HOOKUP_OBJECT (driversetup, vbox26, "vbox26"); GLADE_HOOKUP_OBJECT (driversetup, frame57, "frame57"); GLADE_HOOKUP_OBJECT (driversetup, alignment49, "alignment49"); GLADE_HOOKUP_OBJECT (driversetup, table6, "table6"); GLADE_HOOKUP_OBJECT (driversetup, label99, "label99"); GLADE_HOOKUP_OBJECT (driversetup, label100, "label100"); GLADE_HOOKUP_OBJECT (driversetup, label101, "label101"); GLADE_HOOKUP_OBJECT (driversetup, t_name, "t_name"); GLADE_HOOKUP_OBJECT (driversetup, t_driver, "t_driver"); GLADE_HOOKUP_OBJECT (driversetup, t_setup, "t_setup"); GLADE_HOOKUP_OBJECT (driversetup, b_browse, "b_browse"); GLADE_HOOKUP_OBJECT (driversetup, b_browse1, "b_browse1"); GLADE_HOOKUP_OBJECT (driversetup, frame58, "frame58"); GLADE_HOOKUP_OBJECT (driversetup, alignment50, "alignment50"); GLADE_HOOKUP_OBJECT (driversetup, scrolledwindow16, "scrolledwindow16"); GLADE_HOOKUP_OBJECT (driversetup, clist1, "clist1"); GLADE_HOOKUP_OBJECT (driversetup, label97, "label97"); GLADE_HOOKUP_OBJECT (driversetup, label98, "label98"); GLADE_HOOKUP_OBJECT (driversetup, frame59, "frame59"); GLADE_HOOKUP_OBJECT (driversetup, alignment51, "alignment51"); GLADE_HOOKUP_OBJECT (driversetup, table7, "table7"); GLADE_HOOKUP_OBJECT (driversetup, label102, "label102"); GLADE_HOOKUP_OBJECT (driversetup, label103, "label103"); GLADE_HOOKUP_OBJECT (driversetup, t_keyword, "t_keyword"); GLADE_HOOKUP_OBJECT (driversetup, t_value, "t_value"); GLADE_HOOKUP_OBJECT (driversetup, b_add, "b_add"); GLADE_HOOKUP_OBJECT (driversetup, b_update, "b_update"); GLADE_HOOKUP_OBJECT_NO_REF (driversetup, dialog_action_area6, "dialog_action_area6"); GLADE_HOOKUP_OBJECT (driversetup, b_cancel, "b_cancel"); GLADE_HOOKUP_OBJECT (driversetup, b_ok, "b_ok"); /* Ok button events */ gtk_signal_connect (GTK_OBJECT (b_ok), "clicked", GTK_SIGNAL_FUNC (driversetup_ok_clicked), &driversetup_t); /* Cancel button events */ gtk_signal_connect (GTK_OBJECT (b_cancel), "clicked", GTK_SIGNAL_FUNC (driversetup_cancel_clicked), &driversetup_t); /* Add button events */ gtk_signal_connect (GTK_OBJECT (b_add), "clicked", GTK_SIGNAL_FUNC (driversetup_add_clicked), &driversetup_t); /* Update button events */ gtk_signal_connect (GTK_OBJECT (b_update), "clicked", GTK_SIGNAL_FUNC (driversetup_update_clicked), &driversetup_t); /* Close window button events */ gtk_signal_connect (GTK_OBJECT (driversetup), "delete_event", GTK_SIGNAL_FUNC (delete_event), &driversetup_t); gtk_signal_connect (GTK_OBJECT (driversetup), "destroy", GTK_SIGNAL_FUNC (gtk_main_quit), NULL); /* List events */ gtk_signal_connect (GTK_OBJECT (clist1), "select_row", GTK_SIGNAL_FUNC (driversetup_list_select), &driversetup_t); gtk_signal_connect (GTK_OBJECT (clist1), "unselect_row", GTK_SIGNAL_FUNC (driversetup_list_unselect), &driversetup_t); /* Browse button events */ gtk_signal_connect (GTK_OBJECT (b_browse), "clicked", GTK_SIGNAL_FUNC (driversetup_browsedriver_clicked), &driversetup_t); gtk_signal_connect (GTK_OBJECT (b_browse1), "clicked", GTK_SIGNAL_FUNC (driversetup_browsesetup_clicked), &driversetup_t); driversetup_t.name_entry = t_name; driversetup_t.driver_entry = t_driver; driversetup_t.key_list = clist1; driversetup_t.bupdate = b_update; driversetup_t.key_entry = t_keyword; driversetup_t.value_entry = t_value; driversetup_t.mainwnd = driversetup; driversetup_t.setup_entry = t_setup; /* Parse the attributes line */ parse_attribute_line (&driversetup_t, driver, attrs, add); gtk_widget_show_all (driversetup); gtk_main (); return driversetup_t.connstr; } libiodbc-3.52.16/iodbcadm/gtk/Makefile.in0000664000175000017500000005506214424171020014761 00000000000000# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 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@ # # Makefile.am # # $Id$ # # The iODBC driver manager. # # Copyright (C) 1996-2023 OpenLink Software # All Rights Reserved. # # This software is released under the terms of either of the following # licenses: # # - GNU Library General Public License (see LICENSE.LGPL) # - The BSD License (see LICENSE.BSD). # # Note that the only valid version of the LGPL license as far as this # project is concerned is the original GNU Library General Public License # Version 2, dated June 1991. # # While not mandated by the BSD license, any patches you make to the # iODBC source code may be contributed back into the iODBC project # at your discretion. Contributions will benefit the Open Source and # Data Access community as a whole. Submissions may be made at: # # http://www.iodbc.org # # # GNU Library Generic Public License Version 2 # ============================================ # 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; only # Version 2 of the License dated June 1991. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # The BSD License # =============== # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. Neither the name of OpenLink Software Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = iodbcadm/gtk ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/admin/gtk-2.0.m4 \ $(top_srcdir)/admin/gtk.m4 $(top_srcdir)/admin/libtool.m4 \ $(top_srcdir)/admin/ltoptions.m4 \ $(top_srcdir)/admin/ltsugar.m4 \ $(top_srcdir)/admin/ltversion.m4 \ $(top_srcdir)/admin/lt~obsolete.m4 \ $(top_srcdir)/admin/openlink.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libiodbcadm_gtk_la_DEPENDENCIES = am_libiodbcadm_gtk_la_OBJECTS = administrator.lo confirm.lo \ connectionpooling.lo driverchooser.lo driversetup.lo \ dsnchooser.lo errorbox.lo gensetup.lo main.lo messagebox.lo \ translatorchooser.lo libiodbcadm_gtk_la_OBJECTS = $(am_libiodbcadm_gtk_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libiodbcadm_gtk_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libiodbcadm_gtk_la_LDFLAGS) \ $(LDFLAGS) -o $@ @GTK_TRUE@am_libiodbcadm_gtk_la_rpath = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/admin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libiodbcadm_gtk_la_SOURCES) DIST_SOURCES = $(libiodbcadm_gtk_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/admin/depcomp \ $(top_srcdir)/admin/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_CONFIG = @GTK_CONFIG@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBADD_DL = @LIBADD_DL@ LIBADD_OS = @LIBADD_OS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ filedsnpath = @filedsnpath@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ inidir = @inidir@ install_sh = @install_sh@ lib_version = @lib_version@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ odbcmode = @odbcmode@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ DATEBUILD = `date +%d/%m/%Y_%T` @GTK_TRUE@noinst_LTLIBRARIES = libiodbcadm-gtk.la AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/iodbc \ -I$(top_srcdir)/iodbcadm \ -I$(top_srcdir)/iodbcinst \ @GTK_CFLAGS@ AM_CFLAGS = \ @CFLAGS@ -D__GTK__ -DDATEBUILD=\"$(DATEBUILD)\" libiodbcadm_gtk_la_LDFLAGS = #-static libiodbcadm_gtk_la_LIBADD = @GTK_LIBS@ libiodbcadm_gtk_la_SOURCES = \ administrator.c \ confirm.c \ connectionpooling.c \ driverchooser.c \ driversetup.c \ dsnchooser.c \ errorbox.c \ gensetup.c \ main.c \ messagebox.c \ translatorchooser.c noinst_HEADERS = error.xpm img.xpm odbc4.xpm question.xpm gui.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu iodbcadm/gtk/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu iodbcadm/gtk/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libiodbcadm-gtk.la: $(libiodbcadm_gtk_la_OBJECTS) $(libiodbcadm_gtk_la_DEPENDENCIES) $(EXTRA_libiodbcadm_gtk_la_DEPENDENCIES) $(AM_V_CCLD)$(libiodbcadm_gtk_la_LINK) $(am_libiodbcadm_gtk_la_rpath) $(libiodbcadm_gtk_la_OBJECTS) $(libiodbcadm_gtk_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/administrator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/confirm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/connectionpooling.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/driverchooser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/driversetup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsnchooser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/errorbox.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gensetup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/messagebox.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/translatorchooser.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # 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: libiodbc-3.52.16/iodbcadm/gtk/question.xpm0000664000175000017500000001066214424170750015317 00000000000000/* * question.xpm * * $Id$ * * Questionmark in XPM format * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* XPM */ static char * question_xpm[] = { "32 32 2 1", " c None", ". c #000000", " ", " ", " ...... ", " ............ ", " ................ ", " ................. ", " ...... ....... ", " ...... ...... ", " ...... ....... ", " ...... ....... ", " ...... ....... ", " ..... ...... ", " ... ....... ", " ....... ", " ........ ", " ......... ", " ........ ", " ...... ", " ..... ", " .... ", " .... ", " ", " ", " ", " ..... ", " ....... ", " ....... ", " ....... ", " ...... ", " ..... ", " ", " "}; libiodbc-3.52.16/iodbcadm/gtk/main.c0000664000175000017500000001545614424170750014020 00000000000000/* * main.c * * $Id$ * * Main program * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include #include "gui.h" int gtk_gui (int *argc, char **argv[]) { GtkWidget *mainwnd; #if GTK_CHECK_VERSION(2,0,0) gtk_set_locale(); #endif gtk_init (argc, argv); mainwnd = gtk_window_new (GTK_WINDOW_TOPLEVEL); return SQLManageDataSources (mainwnd); } int kde_gui (int *argc, char **argv[]) { return -1; } void display_help (void) { printf ("-help\t\t\tDisplay the list of options.\n\r"); printf ("-odbc filename\t\tSet the location of the user ODBC.INI file.\n\r"); printf ("-odbcinst filename\tSet the location of the user ODBCINST.INI file.\n\r"); printf ("-sysodbc filename\tSet the location of the system ODBC.INI file.\n\r"); printf ("-sysodbcinst filename\tSet the location of the system ODBCINST.INI file.\n\r"); printf ("-gui guitype\t\tSet the GUI type : GTK, KDE.\n\r"); printf ("-debug\t\t\tThe error messages are displayed on the console.\n\r"); printf ("-admin odbcinstfile\tUsed to administrate the system odbcinst.ini file.\n\r\n\r"); _exit (1); } #if !defined(HAVE_SETENV) static int setenv (const char *name, const char *value, int overwrite) { int rc; char *entry; /* * Allocate some space for new environment variable */ if ((entry = (char *) malloc (strlen (name) + strlen (value) + 2)) == NULL) return -1; strcpy (entry, name); strcat (entry, "="); strcat (entry, value); /* * Check if variable already exists in current environment and whether * we want to overwrite it with a new value if it exists. */ if (getenv (name) != NULL && !overwrite) { free (entry); return 0; } /* * Add the variable to the environment. */ rc = putenv (entry); free (entry); return (rc == 0) ? 0 : -1; } #endif /* HAVE_SETENV */ int main (int argc, char *argv[]) { BOOL debug = FALSE; char path[4096]; char *gui = NULL; int i = 1; printf ("iODBC Administrator (GTK)\n"); printf ("%s\n", PACKAGE_STRING); printf ("Copyright (C) 2000-2023 OpenLink Software\n"); printf ("Please report all bugs to <%s>\n\n", PACKAGE_BUGREPORT); /* Check options commands */ if (argc > 1) { for (; i < argc; i++) { if (!strcasecmp (argv[i], "-help")) display_help (); if (!strcasecmp (argv[i], "-debug")) debug = TRUE; if (!strcasecmp (argv[i], "-odbc")) { if (i + 1 >= argc) display_help (); setenv ("ODBCINI", argv[++i], TRUE); } if (!strcasecmp (argv[i], "-admin")) { if (i + 1 >= argc) display_help (); setenv ("ODBCINSTINI", argv[++i], TRUE); setenv ("SYSODBCINSTINI", argv[i], TRUE); } if (!strcasecmp (argv[i], "-odbcinst")) { if (i + 1 >= argc) display_help (); setenv ("ODBCINSTINI", argv[++i], TRUE); } if (!strcasecmp (argv[i], "-sysodbc")) { if (i + 1 >= argc) display_help (); setenv ("SYSODBCINI", argv[++i], TRUE); } if (!strcasecmp (argv[i], "-sysodbcinst")) { if (i + 1 >= argc) display_help (); setenv ("SYSODBCINSTINI", argv[++i], TRUE); } if (!strcasecmp (argv[i], "-gui")) { if (i + 2 >= argc) display_help (); gui = argv[++i]; } } } if (!getenv ("ODBCINI") && getenv ("HOME")) { STRCPY (path, getenv ("HOME")); STRCAT (path, "/.odbc.ini"); setenv ("ODBCINI", path, TRUE); } if (!debug) { close (STDOUT_FILENO); close (STDERR_FILENO); } if (gui && !strcasecmp (gui, "KDE")) return kde_gui (&argc, &argv); return gtk_gui (&argc, &argv); } libiodbc-3.52.16/iodbcadm/gtk/connectionpooling.c0000664000175000017500000003267414424170750016624 00000000000000/* * connectionpooling.c * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "gui.h" static void connectionpool_finish_clicked (GtkWidget *widget, TCONNECTIONPOOLING *connectionpool_t) { if (connectionpool_t) { connectionpool_t->changed = TRUE; memset(connectionpool_t->timeout, 0, sizeof(connectionpool_t->timeout)); memset(connectionpool_t->probe, 0, sizeof(connectionpool_t->probe)); strncpy (connectionpool_t->timeout, gtk_entry_get_text (GTK_ENTRY (connectionpool_t->timeout_entry)), sizeof(connectionpool_t->timeout)-1); strncpy (connectionpool_t->probe, gtk_entry_get_text (GTK_ENTRY (connectionpool_t->probe_entry)), sizeof(connectionpool_t->probe)-1); gtk_signal_disconnect_by_func (GTK_OBJECT (connectionpool_t->mainwnd), GTK_SIGNAL_FUNC (gtk_main_quit), NULL); gtk_main_quit (); gtk_widget_destroy (connectionpool_t->mainwnd); } } static void connectionpool_cancel_clicked (GtkWidget *widget, TCONNECTIONPOOLING *connectionpool_t) { if (connectionpool_t) { connectionpool_t->changed = FALSE; gtk_signal_disconnect_by_func (GTK_OBJECT (connectionpool_t->mainwnd), GTK_SIGNAL_FUNC (gtk_main_quit), NULL); gtk_main_quit (); gtk_widget_destroy (connectionpool_t->mainwnd); } } static gint delete_event (GtkWidget *widget, GdkEvent *event, TCONNECTIONPOOLING *connectionpool_t) { connectionpool_cancel_clicked (widget, connectionpool_t); return FALSE; } BOOL create_connectionpool (HWND hwnd, TCONNECTIONPOOLING *choose_t) { GdkPixmap *pixmap; GdkBitmap *mask; GtkStyle *style; GtkWidget *connectionpool; GtkWidget *dialog_vbox7; GtkWidget *frame1; GtkWidget *alignment76; GtkWidget *vbox40; GtkWidget *frame93; GtkWidget *alignment77; GtkWidget *label154; GtkWidget *frame94; GtkWidget *alignment78; GtkWidget *hbox55; GtkWidget *label156; GtkWidget *t_cptimeout; GtkWidget *frame95; GtkWidget *alignment79; GtkWidget *label155; GtkWidget *frame96; GtkWidget *alignment80; GtkWidget *hbox56; GtkWidget *label157; GtkWidget *t_probe; GtkWidget *flabel1; GtkWidget *dialog_action_area7; GtkWidget *b_cancel; GtkWidget *b_finish; char msg[1024]; if (hwnd == NULL || !GTK_IS_WIDGET (hwnd) || !choose_t) return FALSE; connectionpool = gtk_dialog_new (); gtk_widget_set_name (connectionpool, "connectionpool"); gtk_widget_set_size_request (connectionpool, 433, 227); gtk_window_set_title (GTK_WINDOW (connectionpool), _("Connection pooling attributes")); gtk_window_set_position (GTK_WINDOW (connectionpool), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (connectionpool), TRUE); gtk_window_set_default_size (GTK_WINDOW (connectionpool), 433, 227); gtk_window_set_type_hint (GTK_WINDOW (connectionpool), GDK_WINDOW_TYPE_HINT_DIALOG); #if GTK_CHECK_VERSION(2,0,0) gtk_widget_show (connectionpool); #endif dialog_vbox7 = GTK_DIALOG (connectionpool)->vbox; gtk_widget_set_name (dialog_vbox7, "dialog_vbox7"); gtk_widget_show (dialog_vbox7); frame1 = gtk_frame_new (choose_t->driver); gtk_widget_set_name (frame1, "frame1"); gtk_widget_show (frame1); gtk_box_pack_start (GTK_BOX (dialog_vbox7), frame1, TRUE, TRUE, 0); alignment76 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment76, "alignment76"); gtk_widget_show (alignment76); gtk_container_add (GTK_CONTAINER (frame1), alignment76); vbox40 = gtk_vbox_new (FALSE, 0); gtk_widget_set_name (vbox40, "vbox40"); gtk_widget_show (vbox40); gtk_container_add (GTK_CONTAINER (alignment76), vbox40); frame93 = gtk_frame_new (NULL); gtk_widget_set_name (frame93, "frame93"); gtk_widget_show (frame93); gtk_box_pack_start (GTK_BOX (vbox40), frame93, FALSE, TRUE, 0); gtk_frame_set_shadow_type (GTK_FRAME (frame93), GTK_SHADOW_NONE); alignment77 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment77, "alignment77"); gtk_widget_show (alignment77); gtk_container_add (GTK_CONTAINER (frame93), alignment77); label154 = gtk_label_new (_("Enable connection pooling for this driver by specifying\na timeout in seconds")); gtk_widget_set_name (label154, "label154"); gtk_widget_show (label154); gtk_container_add (GTK_CONTAINER (alignment77), label154); frame94 = gtk_frame_new (NULL); gtk_widget_set_name (frame94, "frame94"); gtk_widget_show (frame94); gtk_box_pack_start (GTK_BOX (vbox40), frame94, FALSE, TRUE, 0); gtk_frame_set_shadow_type (GTK_FRAME (frame94), GTK_SHADOW_NONE); alignment78 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment78, "alignment78"); gtk_widget_show (alignment78); gtk_container_add (GTK_CONTAINER (frame94), alignment78); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment78), 0, 0, 4, 10); hbox55 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox55, "hbox55"); gtk_widget_show (hbox55); gtk_container_add (GTK_CONTAINER (alignment78), hbox55); label156 = gtk_label_new (_("Timeout : ")); gtk_widget_set_name (label156, "label156"); gtk_widget_show (label156); gtk_box_pack_start (GTK_BOX (hbox55), label156, FALSE, FALSE, 0); t_cptimeout = gtk_entry_new (); gtk_widget_set_name (t_cptimeout, "t_cptimeout"); gtk_widget_show (t_cptimeout); gtk_box_pack_start (GTK_BOX (hbox55), t_cptimeout, TRUE, TRUE, 0); if (choose_t) gtk_entry_set_text (GTK_ENTRY (t_cptimeout), choose_t->timeout); frame95 = gtk_frame_new (NULL); gtk_widget_set_name (frame95, "frame95"); gtk_widget_show (frame95); gtk_box_pack_start (GTK_BOX (vbox40), frame95, FALSE, TRUE, 0); gtk_frame_set_shadow_type (GTK_FRAME (frame95), GTK_SHADOW_NONE); alignment79 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment79, "alignment79"); gtk_widget_show (alignment79); gtk_container_add (GTK_CONTAINER (frame95), alignment79); label155 = gtk_label_new (_("Set an optional probe query, used for additional verification\nof the connection state")); gtk_widget_set_name (label155, "label155"); gtk_widget_show (label155); gtk_container_add (GTK_CONTAINER (alignment79), label155); frame96 = gtk_frame_new (NULL); gtk_widget_set_name (frame96, "frame96"); gtk_widget_show (frame96); gtk_box_pack_start (GTK_BOX (vbox40), frame96, FALSE, TRUE, 0); gtk_frame_set_shadow_type (GTK_FRAME (frame96), GTK_SHADOW_NONE); alignment80 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_set_name (alignment80, "alignment80"); gtk_widget_show (alignment80); gtk_container_add (GTK_CONTAINER (frame96), alignment80); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment80), 0, 10, 4, 10); hbox56 = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (hbox56, "hbox56"); gtk_widget_show (hbox56); gtk_container_add (GTK_CONTAINER (alignment80), hbox56); label157 = gtk_label_new (_(" Query : ")); gtk_widget_set_name (label157, "label157"); gtk_widget_show (label157); gtk_box_pack_start (GTK_BOX (hbox56), label157, FALSE, FALSE, 0); t_probe = gtk_entry_new (); gtk_widget_set_name (t_probe, "t_probe"); gtk_widget_show (t_probe); gtk_box_pack_start (GTK_BOX (hbox56), t_probe, TRUE, TRUE, 0); if (choose_t) gtk_entry_set_text (GTK_ENTRY (t_probe), choose_t->probe); dialog_action_area7 = GTK_DIALOG (connectionpool)->action_area; gtk_widget_set_name (dialog_action_area7, "dialog_action_area7"); gtk_widget_show (dialog_action_area7); gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area7), GTK_BUTTONBOX_END); b_cancel = gtk_button_new_from_stock ("gtk-cancel"); gtk_widget_set_name (b_cancel, "b_cancel"); gtk_widget_show (b_cancel); gtk_dialog_add_action_widget (GTK_DIALOG (connectionpool), b_cancel, GTK_RESPONSE_CANCEL); GTK_WIDGET_SET_FLAGS (b_cancel, GTK_CAN_DEFAULT); b_finish = gtk_button_new_from_stock ("gtk-ok"); gtk_widget_set_name (b_finish, "b_finish"); gtk_widget_show (b_finish); gtk_dialog_add_action_widget (GTK_DIALOG (connectionpool), b_finish, GTK_RESPONSE_OK); GTK_WIDGET_SET_FLAGS (b_finish, GTK_CAN_DEFAULT); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (connectionpool, connectionpool, "connectionpool"); GLADE_HOOKUP_OBJECT_NO_REF (connectionpool, dialog_vbox7, "dialog_vbox7"); GLADE_HOOKUP_OBJECT (connectionpool, frame1, "frame1"); GLADE_HOOKUP_OBJECT (connectionpool, alignment76, "alignment76"); GLADE_HOOKUP_OBJECT (connectionpool, vbox40, "vbox40"); GLADE_HOOKUP_OBJECT (connectionpool, frame93, "frame93"); GLADE_HOOKUP_OBJECT (connectionpool, alignment77, "alignment77"); GLADE_HOOKUP_OBJECT (connectionpool, label154, "label154"); GLADE_HOOKUP_OBJECT (connectionpool, frame94, "frame94"); GLADE_HOOKUP_OBJECT (connectionpool, alignment78, "alignment78"); GLADE_HOOKUP_OBJECT (connectionpool, hbox55, "hbox55"); GLADE_HOOKUP_OBJECT (connectionpool, label156, "label156"); GLADE_HOOKUP_OBJECT (connectionpool, t_cptimeout, "t_cptimeout"); GLADE_HOOKUP_OBJECT (connectionpool, frame95, "frame95"); GLADE_HOOKUP_OBJECT (connectionpool, alignment79, "alignment79"); GLADE_HOOKUP_OBJECT (connectionpool, label155, "label155"); GLADE_HOOKUP_OBJECT (connectionpool, frame96, "frame96"); GLADE_HOOKUP_OBJECT (connectionpool, alignment80, "alignment80"); GLADE_HOOKUP_OBJECT (connectionpool, hbox56, "hbox56"); GLADE_HOOKUP_OBJECT (connectionpool, label157, "label157"); GLADE_HOOKUP_OBJECT (connectionpool, t_probe, "t_probe"); GLADE_HOOKUP_OBJECT (connectionpool, flabel1, "flabel1"); GLADE_HOOKUP_OBJECT_NO_REF (connectionpool, dialog_action_area7, "dialog_action_area7"); GLADE_HOOKUP_OBJECT (connectionpool, b_cancel, "b_cancel"); GLADE_HOOKUP_OBJECT (connectionpool, b_finish, "b_finish"); /* Finish button events */ gtk_signal_connect (GTK_OBJECT (b_finish), "clicked", GTK_SIGNAL_FUNC (connectionpool_finish_clicked), choose_t); /* Cancel button events */ gtk_signal_connect (GTK_OBJECT (b_cancel), "clicked", GTK_SIGNAL_FUNC (connectionpool_cancel_clicked), choose_t); /* Close window button events */ gtk_signal_connect (GTK_OBJECT (connectionpool), "delete_event", GTK_SIGNAL_FUNC (delete_event), choose_t); gtk_signal_connect (GTK_OBJECT (connectionpool), "destroy", GTK_SIGNAL_FUNC (gtk_main_quit), NULL); choose_t->timeout_entry = t_cptimeout; choose_t->probe_entry = t_probe; choose_t->mainwnd = connectionpool; gtk_widget_show_all (connectionpool); gtk_main (); return choose_t->changed; } libiodbc-3.52.16/iodbcadm/drvconn.c0000664000175000017500000005425414424170750013757 00000000000000/* * drvconn.c * * $Id$ * * The data_sources dialog for SQLDriverConnect * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "gui.h" #include "herr.h" #include "unicode.h" #include "dlproc.h" #ifndef WIN32 #include typedef SQLRETURN SQL_API (*pDriverConnFunc) (HWND hwnd, LPSTR szInOutConnStr, DWORD cbInOutConnStr, int FAR * sqlStat, SQLUSMALLINT fDriverCompletion, UWORD *config); typedef SQLRETURN SQL_API (*pDriverConnWFunc) (HWND hwnd, LPWSTR szInOutConnStr, DWORD cbInOutConnStr, int FAR * sqlStat, SQLUSMALLINT fDriverCompletion, UWORD *config); #if defined (__APPLE__) #define CALL_DRVCONN_DIALBOXW(path, a) \ if (path) \ { \ char *_path_u8 = (a == 'A') ? strdup((const char *)path) : (char*)dm_SQL_W2A ((wchar_t*)path, SQL_NTS); \ if (_path_u8) { \ char *ptr = strstr(_path_u8, "/Contents/MacOS/"); \ if (ptr) \ *ptr = 0; \ liburl = CFURLCreateFromFileSystemRepresentation (NULL, (UInt8*)_path_u8, strlen(_path_u8), FALSE); \ CFArrayRef arr = CFBundleCopyExecutableArchitecturesForURL(liburl); \ if (arr) \ bundle_dll = CFBundleCreate (NULL, liburl); \ if (arr) \ CFRelease(arr); \ if (liburl) \ CFRelease(liburl); \ } \ MEM_FREE(_path_u8); \ CALL_DRVCONN_DIALBOXW_BUNDLE(); \ } #define CALL_DRVCONN_DIALBOXW_BUNDLE() \ if (bundle_dll != NULL) \ { \ if ((pDrvConnW = (pDriverConnWFunc)CFBundleGetFunctionPointerForName(bundle_dll, CFSTR("_iodbcdm_drvconn_dialboxw"))) != NULL) \ { \ SQLSetConfigMode (*config); \ if (pDrvConnW (hwnd, szInOutConnStr, cbInOutConnStr, sqlStat, fDriverCompletion, config) == SQL_SUCCESS) \ { \ retcode = SQL_SUCCESS; \ goto quit; \ } \ else \ { \ retcode = SQL_NO_DATA_FOUND; \ goto quit; \ } \ } \ else \ { \ if ((pDrvConn = (pDriverConnFunc)CFBundleGetFunctionPointerForName(bundle_dll, CFSTR("_iodbcdm_drvconn_dialbox"))) != NULL) \ { \ char *_szinoutconstr_u8 = malloc (cbInOutConnStr + 1); \ wchar_t *_prvw; char *_prvu8; \ for (_prvw = szInOutConnStr, _prvu8 = _szinoutconstr_u8 ; \ *_prvw != L'\0' ; _prvw += WCSLEN (_prvw) + 1, \ _prvu8 += STRLEN (_prvu8) + 1) \ dm_StrCopyOut2_W2A (_prvw, (SQLCHAR *)_prvu8, cbInOutConnStr, NULL); \ *_prvu8 = '\0'; \ SQLSetConfigMode (*config); \ if (pDrvConn (hwnd, _szinoutconstr_u8, cbInOutConnStr, sqlStat, fDriverCompletion, config) == SQL_SUCCESS) \ { \ dm_StrCopyOut2_A2W ((SQLCHAR *)_szinoutconstr_u8, szInOutConnStr, cbInOutConnStr, NULL); \ MEM_FREE (_szinoutconstr_u8); \ retcode = SQL_SUCCESS; \ goto quit; \ } \ else \ { \ MEM_FREE (_szinoutconstr_u8); \ retcode = SQL_NO_DATA_FOUND; \ goto quit; \ } \ } \ } \ } #else #define CALL_DRVCONN_DIALBOXW(path, a) \ { \ char *_path_u8 = (a == 'A') ? NULL : dm_SQL_W2A ((wchar_t*)path, SQL_NTS); \ if ((handle = DLL_OPEN((a == 'A') ? (char*)path : _path_u8)) != NULL) \ { \ if ((pDrvConnW = (pDriverConnWFunc)DLL_PROC(handle, "_iodbcdm_drvconn_dialboxw")) != NULL) \ { \ SQLSetConfigMode (*config); \ if (pDrvConnW (hwnd, szInOutConnStr, cbInOutConnStr, sqlStat, fDriverCompletion, config) == SQL_SUCCESS) \ { \ MEM_FREE (_path_u8); \ DLL_CLOSE(handle); \ retcode = SQL_SUCCESS; \ goto quit; \ } \ else \ { \ MEM_FREE (_path_u8); \ DLL_CLOSE(handle); \ retcode = SQL_NO_DATA_FOUND; \ goto quit; \ } \ } \ else \ { \ if ((pDrvConn = (pDriverConnFunc)DLL_PROC(handle, "_iodbcdm_drvconn_dialbox")) != NULL) \ { \ char *_szinoutconstr_u8 = malloc (cbInOutConnStr + 1); \ wchar_t *_prvw; char *_prvu8; \ for (_prvw = szInOutConnStr, _prvu8 = _szinoutconstr_u8 ; \ *_prvw != L'\0' ; _prvw += WCSLEN (_prvw) + 1, \ _prvu8 += STRLEN (_prvu8) + 1) \ dm_StrCopyOut2_W2A (_prvw, _prvu8, cbInOutConnStr, NULL); \ *_prvu8 = '\0'; \ SQLSetConfigMode (*config); \ if (pDrvConn (hwnd, _szinoutconstr_u8, cbInOutConnStr, sqlStat, fDriverCompletion, config) == SQL_SUCCESS) \ { \ dm_StrCopyOut2_A2W (_szinoutconstr_u8, szInOutConnStr, cbInOutConnStr, NULL); \ MEM_FREE (_path_u8); \ MEM_FREE (_szinoutconstr_u8); \ DLL_CLOSE(handle); \ retcode = SQL_SUCCESS; \ goto quit; \ } \ else \ { \ MEM_FREE (_path_u8); \ MEM_FREE (_szinoutconstr_u8); \ DLL_CLOSE(handle); \ retcode = SQL_NO_DATA_FOUND; \ goto quit; \ } \ } \ } \ DLL_CLOSE(handle); \ } \ MEM_FREE (_path_u8); \ } #endif #endif SQLRETURN SQL_API iodbcdm_drvconn_dialbox ( HWND hwnd, LPSTR szInOutConnStr, DWORD cbInOutConnStr, int * sqlStat, SQLUSMALLINT fDriverCompletion, UWORD *config) { RETCODE retcode = SQL_ERROR; wchar_t *_string_w = NULL; if (cbInOutConnStr > 0) { if ((_string_w = malloc (cbInOutConnStr * sizeof(wchar_t) + 1)) == NULL) goto done; } dm_StrCopyOut2_A2W ((SQLCHAR*)szInOutConnStr, _string_w, cbInOutConnStr * sizeof(wchar_t), NULL); retcode = iodbcdm_drvconn_dialboxw (hwnd, _string_w, cbInOutConnStr, sqlStat, fDriverCompletion, config); if (retcode == SQL_SUCCESS) { dm_StrCopyOut2_W2A (_string_w, (SQLCHAR*)szInOutConnStr, cbInOutConnStr - 1, NULL); } done: MEM_FREE (_string_w); return retcode; } SQLRETURN SQL_API iodbcdm_drvconn_dialboxw ( HWND hwnd, LPWSTR szInOutConnStr, DWORD cbInOutConnStr, int * sqlStat, SQLUSMALLINT fDriverCompletion, UWORD *config) { RETCODE retcode = SQL_ERROR; TDSNCHOOSER choose_t; wchar_t *string = NULL, *prov, *prov1, *szDSN = NULL, *szDriver = NULL; wchar_t *szFILEDSN = NULL, *szSAVEFILE = NULL; wchar_t tokenstr[4096]; wchar_t drvbuf[4096] = { L'\0'}; char *_szdriver_u8 = NULL; wchar_t *_szdriver_w = NULL; HDLL handle; pDriverConnFunc pDrvConn; pDriverConnWFunc pDrvConnW; int i, skip; #if defined (__APPLE__) && !defined (NO_FRAMEWORKS) CFBundleRef bundle = NULL; CFBundleRef bundle_dll = NULL; CFURLRef liburl = NULL; #endif memset(&choose_t, 0, sizeof(choose_t)); /* Check input parameters */ if (!szInOutConnStr || cbInOutConnStr < 1) goto quit; /* Transform the string connection to list of key pairs */ string = (wchar_t*) malloc((cbInOutConnStr + 1) * sizeof(wchar_t)); if (string == NULL) { if (sqlStat) #if (ODBCVER>=0x3000) *sqlStat = en_HY092; #else *sqlStat = en_S1000; #endif retcode = SQL_ERROR; goto quit; } /* Conversion to the list of key pairs */ wcsncpy (string, szInOutConnStr, cbInOutConnStr); string[WCSLEN (string) + 1] = L'\0'; skip = 0; for (i = WCSLEN (string) - 1 ; i >= 0 ; i--) { if (string[i] == L'}') skip = 1; else if (string[i] == L'{') skip = 0; else if (skip == 0 && string[i] == L';') string[i] = L'\0'; } /* Look for the DSN and DRIVER keyword */ for (prov = string ; *prov != L'\0' ; prov += WCSLEN (prov) + 1) { if (!wcsncasecmp (prov, L"DSN=", WCSLEN (L"DSN="))) { szDSN = prov + WCSLEN (L"DSN="); continue; } if (!wcsncasecmp (prov, L"DRIVER=", WCSLEN (L"DRIVER="))) { szDriver = prov + WCSLEN (L"DRIVER="); continue; } if (!wcsncasecmp (prov, L"FILEDSN=", WCSLEN (L"FILEDSN="))) { szFILEDSN = prov + WCSLEN (L"FILEDSN="); continue; } if (!wcsncasecmp (prov, L"SAVEFILE=", WCSLEN (L"SAVEFILE="))) { szSAVEFILE = prov + WCSLEN (L"SAVEFILE="); continue; } } if (!szDSN && !szDriver) { /* Initialize members in case of early create_dsnchooser return */ choose_t.dsn = NULL; choose_t.fdsn = NULL; /* Display the DSN chooser dialog box */ create_dsnchooser (hwnd, &choose_t); /* Check output parameters */ if (choose_t.dsn || choose_t.fdsn) { #if (ODBCVER>=0x3000) int errSqlStat = en_HY092; #else int errSqlStat = en_HY092; #endif /* Change the config mode */ switch (choose_t.type_dsn) { case USER_DSN: *config = ODBC_USER_DSN; break; case SYSTEM_DSN: *config = ODBC_SYSTEM_DSN; break; }; if (choose_t.dsn && (choose_t.type_dsn == USER_DSN || choose_t.type_dsn == SYSTEM_DSN)) { /* Try to copy the DSN */ if (cbInOutConnStr > WCSLEN (choose_t.dsn) + WCSLEN (L"DSN=") + 2) { WCSCPY (string, L"DSN="); WCSCAT (string, choose_t.dsn); string[WCSLEN (string) + 1] = L'\0'; szDSN = string + WCSLEN (L"DSN="); retcode = SQL_SUCCESS; } else { if (sqlStat) *sqlStat = errSqlStat; } } else if (choose_t.fdsn && choose_t.type_dsn == FILE_DSN) { DWORD sz, sz_entry; wchar_t entries[4096]; WORD read_len; wchar_t *p, *p_next; sz = WCSLEN(choose_t.fdsn) + WCSLEN(L"FILEDSN=") + 2; if (cbInOutConnStr > sz) { WCSCPY (string, L"FILEDSN="); WCSCAT (string, choose_t.fdsn); WCSCAT (string, L";"); retcode = SQL_SUCCESS; } /* Get list of entries in .dsn file */ if (retcode == SQL_SUCCESS && SQLReadFileDSNW (choose_t.fdsn, L"ODBC", NULL, entries, sizeof (entries)/sizeof(wchar_t), &read_len)) { /* add params from the .dsn file */ for (p = entries; *p != '\0'; p = p_next) { wchar_t value[1024]; /* get next entry */ p_next = wcschr (p, L';'); if (p_next) *p_next++ = L'\0'; if (!SQLReadFileDSNW (choose_t.fdsn, L"ODBC", p, value, sizeof(value)/sizeof(wchar_t), &read_len)) { retcode = SQL_ERROR; break; } if (!wcsncasecmp (p, L"DRIVER", WCSLEN(L"DRIVER"))) { szDriver = _szdriver_w = (wchar_t*) malloc((WCSLEN(value) + 1) * sizeof(wchar_t)); if (szDriver) WCSCPY(szDriver, value); } sz_entry = WCSLEN(p) + 1 + WCSLEN(value) + 2; if (cbInOutConnStr > sz + sz_entry) { WCSCAT (string, p); WCSCAT (string, L"="); WCSCAT (string, value); WCSCAT (string, L";"); sz += sz_entry; } else { retcode = SQL_ERROR; } } } if (retcode == SQL_SUCCESS) { string[WCSLEN (string) + 1] = L'\0'; for (i = WCSLEN (string) - 1 ; i >= 0 ; i--) if (string[i] == L';') string[i] = L'\0'; } else if (sqlStat) *sqlStat = errSqlStat; } else { if (sqlStat) *sqlStat = errSqlStat; } } else retcode = SQL_NO_DATA_FOUND; if (choose_t.dsn) free (choose_t.dsn); if (choose_t.fdsn) free (choose_t.fdsn); if (retcode != SQL_SUCCESS) goto quit; } /* Constitute the string connection */ for (prov = szInOutConnStr, prov1 = string, i = 0 ; *prov1 != L'\0' ; prov1 += WCSLEN (prov) + 1, i += WCSLEN (prov) + 1, prov += WCSLEN (prov) + 1) WCSCPY (prov, prov1); *prov = L'\0'; /* Check if the driver is provided */ if (szDriver == NULL) { SQLSetConfigMode (ODBC_BOTH_DSN); SQLGetPrivateProfileStringW (L"ODBC Data Sources", szDSN && szDSN[0] != L'\0' ? szDSN : L"default", L"", tokenstr, sizeof (tokenstr)/sizeof(wchar_t), NULL); szDriver = tokenstr; } /* Call the iodbcdm_drvconn_dialbox */ _szdriver_u8 = (char *)dm_SQL_W2A (szDriver, SQL_NTS); SQLSetConfigMode (ODBC_USER_DSN); if (!access (_szdriver_u8, X_OK)) { CALL_DRVCONN_DIALBOXW (_szdriver_u8, 'A'); } if (SQLGetPrivateProfileStringW (szDriver, L"Driver", L"", drvbuf, sizeof (drvbuf) / sizeof(wchar_t), L"odbcinst.ini")) { CALL_DRVCONN_DIALBOXW (drvbuf, 'W'); } if (SQLGetPrivateProfileStringW (szDriver, L"Setup", L"", drvbuf, sizeof (drvbuf) / sizeof(wchar_t), L"odbcinst.ini")) { CALL_DRVCONN_DIALBOXW (drvbuf, 'W'); } if (SQLGetPrivateProfileStringW (L"Default", L"Driver", L"", drvbuf, sizeof (drvbuf) / sizeof(wchar_t), L"odbcinst.ini")) { CALL_DRVCONN_DIALBOXW (drvbuf, 'W'); } if (SQLGetPrivateProfileStringW (L"Default", L"Setup", L"", drvbuf, sizeof (drvbuf) / sizeof(wchar_t), L"odbcinst.ini")) { CALL_DRVCONN_DIALBOXW (drvbuf, 'W'); } SQLSetConfigMode (ODBC_SYSTEM_DSN); if (!access (_szdriver_u8, X_OK)) { CALL_DRVCONN_DIALBOXW (_szdriver_u8, 'A'); } if (SQLGetPrivateProfileStringW (szDriver, L"Driver", L"", drvbuf, sizeof (drvbuf) / sizeof(wchar_t), L"odbcinst.ini")) { CALL_DRVCONN_DIALBOXW (drvbuf, 'W'); } if (SQLGetPrivateProfileStringW (szDriver, L"Setup", L"", drvbuf, sizeof (drvbuf) / sizeof(wchar_t), L"odbcinst.ini")) { CALL_DRVCONN_DIALBOXW (drvbuf, 'W'); } if (SQLGetPrivateProfileStringW (L"Default", L"Driver", L"", drvbuf, sizeof (drvbuf) / sizeof(wchar_t), L"odbcinst.ini")) { CALL_DRVCONN_DIALBOXW (drvbuf, 'W'); } if (SQLGetPrivateProfileStringW (L"Default", L"Setup", L"", drvbuf, sizeof (drvbuf) / sizeof(wchar_t), L"odbcinst.ini")) { CALL_DRVCONN_DIALBOXW (drvbuf, 'W'); } /* The last ressort, a proxy driver */ #if defined (__APPLE__) # if !defined(NO_FRAMEWORKS) bundle = CFBundleGetBundleWithIdentifier (CFSTR ("org.iodbc.core")); if (bundle) { /* Search for the drvproxy library */ liburl = CFBundleCopyResourceURL (bundle, CFSTR ("iODBCdrvproxy.bundle"), NULL, NULL); if (liburl) { bundle_dll = CFBundleCreate (NULL, liburl); CFRelease(liburl); CALL_DRVCONN_DIALBOXW_BUNDLE(); } } # endif #else CALL_DRVCONN_DIALBOXW ("libdrvproxy.so.2", 'A'); #endif if (sqlStat) *sqlStat = en_IM003; quit: MEM_FREE (string); MEM_FREE (_szdriver_u8); MEM_FREE (_szdriver_w); return retcode; } SQLRETURN SQL_API _iodbcdm_drvchoose_dialbox ( HWND hwnd, LPSTR szInOutConnStr, DWORD cbInOutConnStr, int * sqlStat) { RETCODE retcode = SQL_ERROR; wchar_t *_string_w = NULL; WORD len; if (cbInOutConnStr > 0) { if ((_string_w = malloc ((cbInOutConnStr + 1) * sizeof(wchar_t))) == NULL) goto done; } retcode = _iodbcdm_drvchoose_dialboxw (hwnd, _string_w, cbInOutConnStr * sizeof(wchar_t), sqlStat); if (retcode == SQL_SUCCESS) { dm_StrCopyOut2_W2A (_string_w, (SQLCHAR*)szInOutConnStr, cbInOutConnStr - 1, &len); } done: MEM_FREE (_string_w); return retcode; } SQLRETURN SQL_API _iodbcdm_drvchoose_dialboxw (HWND hwnd, LPWSTR szInOutConnStr, DWORD cbInOutConnStr, int FAR * sqlStat) { RETCODE retcode = SQL_ERROR; TDRIVERCHOOSER choose_t; /* Check input parameters */ if (!hwnd || !szInOutConnStr || cbInOutConnStr < 1) goto quit; create_driverchooser (hwnd, &choose_t); /* Check output parameters */ if (choose_t.driver) { if (cbInOutConnStr > WCSLEN (choose_t.driver) + WCSLEN (L"DRIVER=")) { WCSCPY (szInOutConnStr, L"DRIVER="); WCSCAT (szInOutConnStr, choose_t.driver); retcode = SQL_SUCCESS; } else { if (sqlStat) #if (ODBCVER>=0x3000) *sqlStat = en_HY092; #else *sqlStat = en_S1000; #endif retcode = SQL_ERROR; } } else retcode = SQL_NO_DATA; if (choose_t.driver) free (choose_t.driver); quit: return retcode; } SQLRETURN SQL_API _iodbcdm_admin_dialbox (HWND hwnd) { RETCODE retcode = SQL_ERROR; /* Check input parameters */ if (!hwnd) goto quit; create_administrator (hwnd); retcode = SQL_SUCCESS; quit: return retcode; } SQLRETURN SQL_API _iodbcdm_trschoose_dialbox ( HWND hwnd, LPSTR szInOutConnStr, DWORD cbInOutConnStr, int FAR * sqlStat) { RETCODE retcode = SQL_ERROR; wchar_t *_string_w = NULL; WORD len; if (cbInOutConnStr > 0) { if ((_string_w = malloc ((cbInOutConnStr + 1) * sizeof(wchar_t))) == NULL) goto done; } retcode = _iodbcdm_trschoose_dialboxw (hwnd, _string_w, cbInOutConnStr * sizeof(wchar_t), sqlStat); if (retcode == SQL_SUCCESS) { dm_StrCopyOut2_W2A (_string_w, (SQLCHAR*)szInOutConnStr, cbInOutConnStr - 1, &len); } done: MEM_FREE (_string_w); return retcode; } SQLRETURN SQL_API _iodbcdm_trschoose_dialboxw ( HWND hwnd, LPWSTR szInOutConnStr, DWORD cbInOutConnStr, int * sqlStat) { RETCODE retcode = SQL_ERROR; TTRANSLATORCHOOSER choose_t; /* Check input parameters */ if (!hwnd || !szInOutConnStr || cbInOutConnStr < 1) goto quit; create_translatorchooser (hwnd, &choose_t); /* Check output parameters */ if (choose_t.translator) { if (cbInOutConnStr > WCSLEN (choose_t.translator) + WCSLEN (L"TranslationName=")) { WCSCPY (szInOutConnStr, L"TranslationName"); WCSCAT (szInOutConnStr, choose_t.translator); retcode = SQL_SUCCESS; } else { if (sqlStat) #if (ODBCVER>=0x3000) *sqlStat = en_HY092; #else *sqlStat = en_S1000; #endif retcode = SQL_ERROR; } } else retcode = SQL_NO_DATA; if (choose_t.translator) free (choose_t.translator); quit: return retcode; } libiodbc-3.52.16/iodbcadm/Makefile.in0000664000175000017500000010046014424171020014165 00000000000000# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 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@ # # Makefile.am # # The iODBC driver manager. # # Copyright (C) 1996-2023 OpenLink Software # All Rights Reserved. # # This software is released under the terms of either of the following # licenses: # # - GNU Library General Public License (see LICENSE.LGPL) # - The BSD License (see LICENSE.BSD). # # Note that the only valid version of the LGPL license as far as this # project is concerned is the original GNU Library General Public License # Version 2, dated June 1991. # # While not mandated by the BSD license, any patches you make to the # iODBC source code may be contributed back into the iODBC project # at your discretion. Contributions will benefit the Open Source and # Data Access community as a whole. Submissions may be made at: # # http://www.iodbc.org # # # GNU Library Generic Public License Version 2 # ============================================ # 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; only # Version 2 of the License dated June 1991. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # The BSD License # =============== # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. Neither the name of OpenLink Software Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @GUI_TRUE@bin_PROGRAMS = iodbcadm-gtk$(EXEEXT) subdir = iodbcadm ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/admin/gtk-2.0.m4 \ $(top_srcdir)/admin/gtk.m4 $(top_srcdir)/admin/libtool.m4 \ $(top_srcdir)/admin/ltoptions.m4 \ $(top_srcdir)/admin/ltsugar.m4 \ $(top_srcdir)/admin/ltversion.m4 \ $(top_srcdir)/admin/lt~obsolete.m4 \ $(top_srcdir)/admin/openlink.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = @GTK_FALSE@libiodbcadm_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ @GTK_FALSE@ ../iodbcinst/libiodbc_common.la \ @GTK_FALSE@ ../iodbcinst/libiodbcinst.la ../iodbc/libiodbc.la @GTK_TRUE@libiodbcadm_la_DEPENDENCIES = gtk/libiodbcadm-gtk.la \ @GTK_TRUE@ $(am__DEPENDENCIES_1) \ @GTK_TRUE@ ../iodbcinst/libiodbc_common.la \ @GTK_TRUE@ ../iodbcinst/libiodbcinst.la ../iodbc/libiodbc.la am_libiodbcadm_la_OBJECTS = Info.lo drvconn.lo error.lo libiodbcadm_la_OBJECTS = $(am_libiodbcadm_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libiodbcadm_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libiodbcadm_la_LDFLAGS) $(LDFLAGS) -o \ $@ @GUI_TRUE@am_libiodbcadm_la_rpath = -rpath $(libdir) PROGRAMS = $(bin_PROGRAMS) am_iodbcadm_gtk_OBJECTS = iodbcadm_gtk_OBJECTS = $(am_iodbcadm_gtk_OBJECTS) iodbcadm_gtk_DEPENDENCIES = gtk/main.lo libiodbcadm.la \ ../iodbcinst/libiodbcinst.la ../iodbc/libiodbc.la iodbcadm_gtk_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(iodbcadm_gtk_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/admin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libiodbcadm_la_SOURCES) $(iodbcadm_gtk_SOURCES) DIST_SOURCES = $(libiodbcadm_la_SOURCES) $(iodbcadm_gtk_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = gtk am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/admin/depcomp \ $(top_srcdir)/admin/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_CONFIG = @GTK_CONFIG@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBADD_DL = @LIBADD_DL@ LIBADD_OS = @LIBADD_OS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ filedsnpath = @filedsnpath@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ inidir = @inidir@ install_sh = @install_sh@ lib_version = @lib_version@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ odbcmode = @odbcmode@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @GUI_TRUE@SUBDIRS = gtk @GUI_TRUE@lib_LTLIBRARIES = libiodbcadm.la @GTK_FALSE@AM_CPPFLAGS = \ @GTK_FALSE@ -I$(top_srcdir)/include \ @GTK_FALSE@ -I$(top_srcdir)/iodbc \ @GTK_FALSE@ -I$(top_srcdir)/iodbcinst @GTK_TRUE@AM_CPPFLAGS = \ @GTK_TRUE@ -I$(top_srcdir)/include \ @GTK_TRUE@ -I$(top_srcdir)/iodbc \ @GTK_TRUE@ -I$(top_srcdir)/iodbcinst \ @GTK_TRUE@ @GTK_CFLAGS@ -D__GTK__ libiodbcadm_la_LDFLAGS = \ -version-info @lib_version@ \ -export-symbols $(srcdir)/iodbcadm.exp @GTK_FALSE@libiodbcadm_la_LIBADD = \ @GTK_FALSE@ $(LIBADD_DL) \ @GTK_FALSE@ ../iodbcinst/libiodbc_common.la \ @GTK_FALSE@ ../iodbcinst/libiodbcinst.la \ @GTK_FALSE@ ../iodbc/libiodbc.la @GTK_TRUE@libiodbcadm_la_LIBADD = \ @GTK_TRUE@ gtk/libiodbcadm-gtk.la \ @GTK_TRUE@ $(LIBADD_DL) \ @GTK_TRUE@ @GTK_LIBS@ \ @GTK_TRUE@ ../iodbcinst/libiodbc_common.la \ @GTK_TRUE@ ../iodbcinst/libiodbcinst.la \ @GTK_TRUE@ ../iodbc/libiodbc.la libiodbcadm_la_SOURCES = \ Info.c \ drvconn.c \ error.c iodbcadm_gtk_SOURCES = iodbcadm_gtk_LDADD = \ gtk/main.lo \ libiodbcadm.la \ ../iodbcinst/libiodbcinst.la \ ../iodbc/libiodbc.la \ @GTK_LIBS@ iodbcadm_gtk_LDFLAGS = # -static noinst_HEADERS = \ gui.h \ iodbcadm.h EXTRA_DIST = \ $(srcdir)/*.c \ $(srcdir)/*.h \ $(srcdir)/iodbcadm.exp \ $(srcdir)/Makefile.am \ $(srcdir)/gtk/*.c \ $(srcdir)/gtk/*.h \ $(srcdir)/gtk/*.xpm \ $(srcdir)/mac/*.c \ $(srcdir)/mac/*.h \ $(srcdir)/mac/*.m \ $(srcdir)/mac/*.png \ $(srcdir)/mac/Base.lproj/*.xib all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu iodbcadm/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu iodbcadm/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libiodbcadm.la: $(libiodbcadm_la_OBJECTS) $(libiodbcadm_la_DEPENDENCIES) $(EXTRA_libiodbcadm_la_DEPENDENCIES) $(AM_V_CCLD)$(libiodbcadm_la_LINK) $(am_libiodbcadm_la_rpath) $(libiodbcadm_la_OBJECTS) $(libiodbcadm_la_LIBADD) $(LIBS) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list iodbcadm-gtk$(EXEEXT): $(iodbcadm_gtk_OBJECTS) $(iodbcadm_gtk_DEPENDENCIES) $(EXTRA_iodbcadm_gtk_DEPENDENCIES) @rm -f iodbcadm-gtk$(EXEEXT) $(AM_V_CCLD)$(iodbcadm_gtk_LINK) $(iodbcadm_gtk_OBJECTS) $(iodbcadm_gtk_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Info.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drvconn.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) install-binPROGRAMS: install-libLTLIBRARIES installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ clean-libtool mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binPROGRAMS install-libLTLIBRARIES install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-libLTLIBRARIES .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-binPROGRAMS clean-generic \ clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \ ctags-am 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-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-libLTLIBRARIES \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS \ uninstall-libLTLIBRARIES .PRECIOUS: Makefile # 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: libiodbc-3.52.16/iodbcadm/iodbcadm.h0000664000175000017500000001242514424170750014047 00000000000000/* * iodbcadm.h * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include #ifndef _IODBCADM_H #define _IODBCADM_H #define USER_DSN 0 #define SYSTEM_DSN 1 #define FILE_DSN 2 SQLRETURN SQL_API iodbcdm_drvconn_dialbox (HWND hwnd, LPSTR szInOutConnStr, DWORD cbInOutConnStr, int *sqlStat, SQLUSMALLINT fDriverCompletion, UWORD * config); SQLRETURN SQL_API iodbcdm_drvconn_dialboxw (HWND hwnd, LPWSTR szInOutConnStr, DWORD cbInOutConnStr, int *sqlStat, SQLUSMALLINT fDriverCompletion, UWORD * config); SQLRETURN SQL_API _iodbcdm_drvchoose_dialbox (HWND hwnd, LPSTR szInOutDrvStr, DWORD cbInOutDrvStr, int *sqlStat); SQLRETURN SQL_API _iodbcdm_drvchoose_dialboxw (HWND hwnd, LPWSTR szInOutConnStr, DWORD cbInOutConnStr, int * sqlStat); SQLRETURN SQL_API _iodbcdm_trschoose_dialbox (HWND hwnd, LPSTR szInOutDrvStr, DWORD cbInOutDrvStr, int *sqlStat); SQLRETURN SQL_API _iodbcdm_trschoose_dialboxw (HWND hwnd, LPWSTR szInOutDrvStr, DWORD cbInOutDrvStr, int * sqlStat); void SQL_API _iodbcdm_errorbox (HWND hwnd, LPCSTR szDSN, LPCSTR szText); void SQL_API _iodbcdm_errorboxw (HWND hwnd, LPCWSTR szDSN, LPCWSTR szText); void SQL_API _iodbcdm_messagebox (HWND hwnd, LPCSTR szDSN, LPCSTR szText); void SQL_API _iodbcdm_messageboxw (HWND hwnd, LPCWSTR szDSN, LPCWSTR szText); BOOL SQL_API _iodbcdm_confirmbox (HWND hwnd, LPCSTR szDSN, LPCSTR szText); BOOL SQL_API _iodbcdm_confirmboxw (HWND hwnd, LPCWSTR szDSN, LPCWSTR szText); void _iodbcdm_nativeerrorbox (HWND hwnd, HENV henv, HDBC hdbc, HSTMT hstmt); SQLRETURN SQL_API _iodbcdm_admin_dialbox (HWND hwnd); typedef SQLRETURN SQL_API (*pAdminBoxFunc) (HWND hwnd); typedef SQLRETURN SQL_API (*pTrsChooseFunc) (HWND hwnd, LPSTR szInOutDrvStr, DWORD cbInOutDrvStr, int *sqlStat); typedef SQLRETURN SQL_API (*pDrvConnFunc) (HWND hwnd, LPSTR szInOutConnStr, DWORD cbInOutConnStr, int *sqlStat, SQLUSMALLINT fDriverCompletion, UWORD * config); typedef SQLRETURN SQL_API (*pDrvConnWFunc) (HWND hwnd, LPWSTR szInOutConnStr, DWORD cbInOutConnStr, int * sqlStat, SQLUSMALLINT fDriverCompletion, UWORD *config); #endif libiodbc-3.52.16/iodbcadm/Info.c0000664000175000017500000000635414424170750013177 00000000000000/* * Info.c * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include char *iodbcadm_version = VERSION; libiodbc-3.52.16/iodbcadm/mac/0000775000175000017500000000000014424171427012752 500000000000000libiodbc-3.52.16/iodbcadm/mac/IODBCadm_DriverChooseDSNController.h0000664000175000017500000000715614424170750021441 00000000000000/* * IODBCadm_DriverChooseDSNController.h * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import #import @interface IODBCadm_DriverChooseDSNController : NSWindowController { NSArrayController *_Drv_ArrayController; int _dialogCode; NSMutableArray *_Drv_list; } @property (assign) IBOutlet NSArrayController *Drv_ArrayController; @property (nonatomic, retain) NSMutableArray *Drv_list; - (IBAction)call_Cancel:(id)sender; - (IBAction)call_Ok:(id)sender; @end libiodbc-3.52.16/iodbcadm/mac/drvchoose.png0000664000175000017500000003675714013216212015400 00000000000000PNG  IHDRu {lsRGBgAMA a cHRMz&u0`:pQ< pHYs  ~=XIDATx^}uG3SP N)(KRp ¥?KRЧ 3KRzrwB{/>ӧ#|_O//?󗗗_/?yG~ׯ߿ӗԿ~9@\]A駟h~9X觯w@Ѐtu7RYV-%,c|ıX RAHe=KY7QjPEi`cwwkNYrx7mnHݽW߿|)yϧckݙ;IRfSR+DSM픜J~49Hf>!U^]zk~]dsO OHT'mj'41֩ H1o_h#P~tT9r[T3^tmWGS瞲^U`!R|blHTa{=kBPpz4_OͭVDJ5)ۚgaGLSP{) *͏z}Ay~$Q4,?;kj.1ZO9E?*MgGĽcG{Ko>\O}X&RT?BMFؿ&lv( pB1O1k-UVa.oW':,j'sNؓ-+?RM0 #.^or&]թ2lDlAZ7+_s_C*8 &zWIғ5(55]Cm5bLX5#,5 qO&kB ߐcZSpؓ^OnL9'ʮjMd=^1 ݄?;u"ڏ"+gS[k^zF"G٣$b'[[b, PM}jUz:BU?Li2O';J $Y>'sm=z)^UԶꮚ q~羹 GS=9r"Ukފ٥rZ3YC"WE3jlBKZ>t?h:P]k$oVi\:V̇l} Rj1V's^#5k^F/;x}O[ǕJ3viw´>TWyi;KVYsG,3hMșL&E8տ.DKH,0eHMĴ6!uVկ^xɵdMdV:vd$Ia6jfgI)5QMiWE]{NG{*M^\SkۥNwf,P>ޯOJ25Oϭ}]rt">WAQ͏;1[Xi:AB)nHAϊlk>ڛw{F>̀S-[S9QA{(&)͇j+2#Y>߉ZP?u:pgze*\ s̽<'Cl2]1T>>Yzy09q4ó멽)Oi* MǼ^H=Jz~\׉H5<]BꆭcWijs9o6> :.t&5գY&Qn~]ˮroUY)!:߀T=ثe+xWf-t{ܧاqFV*٩=x H^Ԗ].ei}ѡ'-z$zԅIo>n>fkNTͣW>/$MO׮% +Ja@{|H'߳}l5.mZz5>a]XUTOOҷ^mb\)UWHkHrw6z,uBZ"0o}cy>ԗ>SMԬل?쓣L*jp* ZNHjk-R @}+c$MuN?u.D֚ۧ͝NQXZ^4)Hh-a~rE\2gmQȁZ[䱀ط$>KD_|mf ƻ.+RSdի}(/l'=VЍNV*^1cykdzt<$y?o?f|BOۨrZ"ݩũ$u?➤I~~ҧqP؟xx< BiGs&??jqNV߈<ғ? N,_ǦxP'4&tU'*~8[c.NtBIF_Ju~[Af*]?oT=W'j]ڳ.Z *3}%ˆK)4ӥ_K6>35IRyM;߶nݎ\(JG(u$<4u&rS='uzβSL|J4pIN4!j F#\W;59WiH^gVf>EtyCc?UΒ|;I{ ?s_iA:]WL&7gG<5ӣbCHgg 9f9'JrgLK^Uojx'uwu5e=QZS |~_EZj5X'{ yNlչ mJ 6ǹG9R_Rޣ4bדlV3 gA/lr'DĹSyb>f4x?]e<)i*®Z:WKDErMbsnizM57f[:S2M{{Du޸v/UCN֥!vTWm2 kyE_ng'  Ν}U'guOĘ:_ k%HIAۣaWMIJ6YAeO뢦OЬSMy;* ^#ē |\$i2g;MD?ëmN&3c-XJS):M t u^~rL-vNa;*5EY3TۙjRUOtsZ(,贄L|(>lum vWz7{P纗{+v<ׅTǞg%sT Sv ®_"9M®zL[; w[(j,+ &asV5qD_Ȭ^<7_{\﬊W} nPR]׏_cEz/;+*KGL3ǘ\S_' FN'I?4"z :s}Cw|>sb0!Գ8ԌTfb*WGv+RsZ{Op9ݥ[ix|;U؜ݨ!w׭Z惻wf5.p?b*}@&:z"ьW9dkuRkSDfz$OGRwV}ήfm>|S}oU}{W*<^N_ۚjFdP{,'vX϶Jk* joM9;+/nCԟyG{txb?}R8e Ũym}%9٨< _lBuPŒ'fJ|kp< 7j@Wit \.xT6EOZz6Ry̭F^جǻwKRmt[F&5oi3zlOA"!8/ syV~Q[{z^R.-z՟Tz0'JDjliHcޖG{iJ}T귦@U5=$D@ ]MMKm[ *~K.­v7$%Bufك>2΅L5}v,R~/nY9!tRMN}gbRJ-kbցI{9/ nKH2&h6SmֱV06K{\xNo+Z{ N{i׷ꭌi0(ZqL}m㻋\kMo(Sd5x?65&;XKJGTL O_>[3I:prz P)4xziL=5p&N~h=?kjb1)&#Q4Їv %I䬅-*s[-Ǿ}0,3pnTqM)R Z܉loThwqu>5hb+-3`y 5}Nvi?]ˌך,ЋV*juWZAPy\ԗA=.$'vDnH] cqdh]KSъ^e/JhQ/m'ePubA 6J(HjW!H՞ +Mx$>Б'Ӄv ZEI~"T}>; 1P/سMtޣTZY"05;9J{t=5 {Lzre~II9Bk ª2Jw;MN6)H 0ѕ~(0Tmz@k9Z ̅Tu2Fg^Vk0pjEwmݧ")FHu51KmUU[gMz[cRKr>\whG@*a$һŠCߩXa4K;2YT@"dh=t^pYk*c)ep>~UbZEhRujm ꮌ  >&spݜą@s]%|sHBgw*I¨N6'ނ!/CJup,uTUgEþ>=ִ VZc*B\`Ti}_^K0,"=k"`4 +S VY)Q۝ZUH`&YӆjH(l9{TsSE*  ˖E MxGWzu<(҉農O5BE\*7*1h ǥˆQ@Gkl:=v>uG mx}:YQrH\qa:_{$1j~CDVvHi+{W^ s=# /"D?riD2(fUWGkwz'5(-+88UU=5Υ2tw7Er UT}EZ@Vf+:?g jue.M=a1pzM{k1;M5=M[$uTU1Ds k2nۙlߘ4"$#6$T+kiϋpRMGt%+:Rkt6482*[ue8F L\*-jIW-4d  X-S>8_)Z> uz"r*9.iFg!t@HZHuP m-Xx<:QI*Z5'=;$T=%ԯ}+ !⼎Wotm檼'=FG]@P1BM$/(SkQt]Q,@Jw*R\P%J܎:vk&j-ӉbS]j֞j$6t9STnBi=OW^jOfksVi']*0tȯsG?m [9Tg9Ekip-|ƚHU+䮒Զ&Ռ~}َDǧN:&k&;ꜨG{PNϾ޺B"A2S*$R7Zq}٬ $  쉡Q ,TT04g Bu2ڙk*5UHcU2*҈Lq9PuQbx*~&΃ki2%|&ە twdZ^kjQݞX73J,h5mB4 ,],76[`Q W̃cUkڊkPkO=ҰنFJJú[Dt%FPjLNOGaMVf.6!&< r:Uˍ(jMb C"5}U$+;h)rT UVKS'iɚʽZU{P]JAEboZ. :X5JOux'j~*=ѶrZJ5ѨL?M.Xg2NxAU\iAFHM2U>KՋ |$(CU]D=au?W|Thqr8_u*T iqC7nHE:Rʫ4'AX?;+WH_n]cDY:4G'EbjfϸFUؽ`\أPRU*%UNNBЀI€TjQkU bRv0t|:j 81=F:Ee< 誖 Fu^z"*XځB6"Sw}z$ ͤA)Ta}zc *2{H 44xJ36.4S &tX/PErbS2ZԽ-{6TQRwI5Ns놢N ׵r]L+"l뽚MZS,}=%^4ص!U*gt\,!;9FJկng^ԃ@9RqbP )m*IHM#xxϮ{4DLpP32w!Gu kP[[7ibnՍgjh_kj]by3 E֣uL&ZJX bAxkdMR*VtjਸR 5ѯ3WBjsU(Q]-8QB+4}UMőb ØpIj 8Rq $r~T̕Fw&@*'Šf(Xl[5p:P>ZibhR:4R5Jn>x)y4c}ɵumiz*n EPF Tg8Fik'^DECiCk :MZKQk0[aW/T#WowI4Z7PtgD]zm_nȡeuLu.>+{RbQkdǩSNYkKS7xmU7HiKVMiY4hpA+ZS A f'Js7}бWmDONĺu :xU M zY'[{F;׻uC,zh=Sg\R.:5/TGPPʸ8Ŝ#Y_AU JCŅmE\9z@U^'1Zs~Ӟodm8wxnAZ#YS^Sam~S=:|{UoGE$脫Q#0L >^~j tNz *]঳7T8?aJ)\i*N*f`oE^h46k=qHt[V>:ij{ |Fj>}OOݕM6>LPu** 6ťƕN)صwjg.y`||})"k]Нx}&8RQGU>.ZVNMEpmH5{_:>^#f6՚5\>k}YIzq'"&MmF~Dk| I(bv. Wٹi,MךڊchbffLJII׳ӱ{P6d$Zײ%fBWqx$+Cocj{7_8 2O_=Yv[+ N' wӇkB|z~ZQKWWr(PG+لݑh;v[15JJowtl`ӥc5T,֢!EU!Z.S6e &\kj ]eս>yWRRO@4hm~*hp`O4:i DVna4g5)XnLw0IA xCW}gwC>B﫣Veя^7S})k|VdBhw%֠NY<(,^ΑڕzHK+:fW{{Lv~~ԝO"5S&,?͚j[UpL )CM$筻/z l=yZӸړx;-5Wn4 ::`2GéV$1{=I]ߗFsUOl\ R+RKX7O+e9-sBσrtcL3-DLWjz iqψT_(BSMHRPbeEfzWN$s:咒iHG,ZѺdJ`)ꤟNxH< 񩿮J}f;ae]R7_B듩p jNM^|_}4pf> DsMIe(4zGfeSN TWnHF?B{PkLuf" Eu_/ewBmDWGvw8Yx:!5w I- S&[P>1{YH]eKç(;ɭhI#=&wn#V&P$ϼћU'|E*uJK/etv5-V[2&}֓I_]8 O;p 郞 ~cuE[ѩ+ݵ;* ({rOY(S껦<9xZϧ] Tys R ~TS5e!"h@1g9!Ul1T-zo0T% V U߁Sz@^_i;`*v *nlZ]zQ/e&\_:JB}+Z ݁ߵӞV'lݣ^O(b<kV6&  ف_h⫙=܊tӡSkB]GYgkh-zno}皣D,N 7)H15:]x1Mۋ %u=QI;wH]^[F?oN-5ϥbϭA6{2~m1 5um M]Ab>L j~z;܊*|*Pg:: )@*ښ~N1FutQWY5DE8״#=[YP'(b^數ҽ_LE zLT+YV+Ru{9MG'@< pQ6?w TSߧƺZQ~ W7Q0Q F'*xg̞о=׳ zYU!լIuZ[ a;[k:"uAZA_u7^"r/#Wtѭ-4NR# ^Ǿ_ iC!uUQJrrYDBƦe¨Lȏ 8{0oS?^*d (M$id*0+S1D%DB4B՜qcZ뜠y "W|eo,:K#(D*z/M$'SSəDQ5ePZ7u&ߞ̍漢Q2_ (}d.vɫ֑K]bWfǨ)1{#WjFG/k/MԑɰJ^v/{1*v~b&\oSPgqQ ~GM]/tІZ/j7(TSuPOXRsۣps`9IMm[MeG$Ϧx-VFxRTCɰzbA]_nv#9;5`hð%@rWu$`VًؾNP aSpg C;^d5M>6mLPnW _>H%?-$(^]8lBEO jB*[lM}-cWڭ.Ѻ7ҤʝvkSd %ٮO[JO{a.٠|' |J8]mj}je/2R}BU@]M*~3 %#UVWmR5vw:Us!JAUV1`?= uNjo O۾_ߡI'):_0ņJ\>[Ƀ߯wk$KgLV:_3b!Uf#V;uԵJiԦ4d(;`DibM=J9]̭(:XǥFcmzA1qȊlQC*L(s RCJւ4:j2z j&-z|=K hS^#2:JR7i :LlNNE'?hJ:AH(>[}_ne`jkxΩt5/ow*(j }κ,׷v'7 ڒb=H;TAS[S3'WKL(ِ@>.@*S"{gI@]rbd;E@Rx9Y}G>qAh}vyRԼ]Q{mOz ̿O(gj2,"\Cݭqf4_,5#w:Lbyٞ'NhU; 1Jgn$ji㮁`|Vdgky[IS.[i=w~?u^.|v^FKد4oz&Pϼ IQ%3'{=Xu7Kɓj+-ޫp|;{B"=O 2ql$Dk[] h|f]Nu5G;ݺ"=" 'H^bxm*=ٞ8zr4:gϵ(e O )Q'k ܞՠwm̼PP"5F˥N;'M!#V{( #:@;dK[6 u;GioۛGD{MsYDU(&kf<&Ͽ{SџTozOE*E7T/w$V6}d@ױn9J:AwCl[ tP#]$O{x#uc:41ǛVSzOEru>IuDvd4^O"T7~MDCBEHU'O(NToqݶOR$폷3HPERlfv#Ծ,g5' N5d)a^dHwROWRxn^ұ}O`"̬5}DL`Vs})Ӯ>z$ҎZu'35~G,)LþSԙB/\)OE$"JhA^Hş'f$\~Nү;2"WǬACu7NԚe&A{{=YzgrYs}N G gb;zռeD =1Jn)| u}{p# vFvBJZFsӝ P=/˂=W.O(MbJBGnلx4,v*ĕJCF SߚZ{)9u*њmͺ$,wM}E*QGS2YI$*w*`U_٢>.j]wRzz_ȹnHlۣ= $$#\Qb+&եsG~ź" q=5]-vz1߃v}@s;(UfQ:?+Mƾ H!@Mcy0du0 fZzڒ3=z.hde$sj`3r\9~ 8a;u`TE5~g9f)@R.U岦s` $O~KfP5u3{[_i"bBvo[ڇBeޟДa|絷D5A~]ܩM*6 MV ;)L 6^o77}؉ߧJgGL~z7cWS;V4x$lz?=p"?=K NgvEkDm'gHld /} ?e?/:";{Z 5!Zh}ω>!^^V@AuJѕbNx wudUTՄk[wx_[~?ޣDЩե$ gS>H^QѯI0D׆O_V`:sӱHfD >:U0hNsѪGM}؄//Ě6^EI]R_X'rwnͦvj`}S2Q6u_OqB'A=ot EN?!uROSOz{NuV1HWZKkob~vT+.G;e+N]o % * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import "Helpers.h" #include "iodbc.h" #include "iodbcext.h" #include #include #include #include #include #include #include #include "dlf.h" static BOOL _CheckDriverLoginDlg (char *drv); static void filedsn_configure (char *drv, char *dsn, char *in_attrs, BOOL b_add, BOOL verify_conn); static BOOL test_driver_connect (char *connstr); //??--extern void __create_message (void* hwnd, const void *dsn, const void *text, char waMode, int alertType); /** helpers ***/ void addComponents_to_list(NSArrayController* list) { NSArray *components = @[@"org.iodbc.core", @"org.iodbc.inst", @"org.iodbc.adm", @"org.iodbc.drvproxy", @"org.iodbc.trans"]; NSBundle *bundle, *bundle0 = nil; [list removeObjects:[list arrangedObjects]]; for(int i=0; i < components.count; i++) { BOOL isBundle = FALSE; NSString *a_name; NSString *a_ver; NSString *a_ident; NSString *a_date = @"-"; NSString *a_size = @"-"; NSString *a_comp_name = [components objectAtIndex:i]; bundle = [NSBundle bundleWithIdentifier:a_comp_name]; if (i == 0) bundle0 = bundle; if (bundle) { NSURL *liburl; CFStringRef cflibname; NSDictionary *bundledict = [bundle infoDictionary]; a_name = [bundledict valueForKey:@"CFBundleName"]; a_ver = [bundledict valueForKey:@"CFBundleVersion"]; a_ident = bundle.bundleIdentifier; NSString *type_pkg = [bundledict valueForKey:@"CFBundlePackageType"]; if (type_pkg && [type_pkg isEqualToString:@"BNDL"]) isBundle = TRUE; NSString *exec_name = [bundledict valueForKey:@"CFBundleExecutable"]; if (isBundle && bundle0) { NSString *mstr = [NSString stringWithFormat:@"%@.bundle/Contents/MacOS", exec_name]; liburl = [bundle0 URLForResource:exec_name withExtension:nil subdirectory:mstr]; } else liburl = [bundle URLForResource:exec_name withExtension:nil subdirectory:nil]; if (liburl && (cflibname = CFURLCopyFileSystemPath ((CFURLRef)liburl, kCFURLPOSIXPathStyle))) { char *libname = conv_NSString_to_char((NSString*)cflibname); if (libname!=NULL) { struct stat _stat; /* Get some information about the component */ if (!stat (libname, &_stat)) { struct tm drivertime; char buf[100]; localtime_r (&_stat.st_mtime, &drivertime); strftime (buf, sizeof(buf), "%c", &drivertime); a_date = conv_char_to_NSString(buf); a_size = [NSString stringWithFormat:@"%d Kb", (int) (_stat.st_size / 1024)]; } free(libname); } CFRelease(cflibname); } [list addObject:[NSMutableDictionary dictionaryWithObjectsAndKeys:a_name, @"name", a_ver, @"ver", a_ident, @"file", a_date, @"date", a_size, @"size", nil]]; } } } void addPools_to_list(NSArrayController* list) { wchar_t drvdesc[1024], drvattrs[1024]; SQLSMALLINT len, len1; SQLRETURN ret; HENV henv; [list removeObjects:[list arrangedObjects]]; /* Create a HENV to get the list of data sources then */ ret = SQLAllocHandle (SQL_HANDLE_ENV, SQL_NULL_HANDLE, &henv); if (ret != SQL_SUCCESS && ret != SQL_SUCCESS_WITH_INFO) { _iodbcdm_nativeerrorbox ((void*)1L, henv, SQL_NULL_HANDLE, SQL_NULL_HANDLE); goto end; } SQLSetEnvAttr (henv, SQL_ATTR_APP_UNICODE_TYPE, (SQLPOINTER) SQL_DM_CP_DEF, SQL_IS_UINTEGER); /* Set the version ODBC API to use */ SQLSetEnvAttr (henv, SQL_ATTR_ODBC_VERSION, (SQLPOINTER) SQL_OV_ODBC3, SQL_IS_UINTEGER); /* Get the list of drivers */ ret = SQLDriversW (henv, SQL_FETCH_FIRST, drvdesc, sizeof (drvdesc)/sizeof(wchar_t), &len, drvattrs, sizeof (drvattrs)/sizeof(wchar_t), &len1); if (ret != SQL_SUCCESS && ret != SQL_SUCCESS_WITH_INFO && ret != SQL_NO_DATA) { _iodbcdm_nativeerrorbox ((void*)1L, henv, SQL_NULL_HANDLE, SQL_NULL_HANDLE); goto error; } while (ret != SQL_NO_DATA) { NSString *a_name = conv_wchar_to_NSString(drvdesc); NSString *a_timeout = NULL; NSString *a_query = NULL; /* Get the driver library name */ SQLSetConfigMode (ODBC_BOTH_DSN); SQLGetPrivateProfileStringW (drvdesc, L"CPTimeout", L"", drvattrs, sizeof (drvattrs) / sizeof(wchar_t), L"odbcinst.ini"); if (drvattrs[0] == L'\0') SQLGetPrivateProfileStringW (L"Default", L"CPTimeout", L"", drvattrs, sizeof (drvattrs) / sizeof(wchar_t), L"odbcinst.ini"); a_timeout = conv_wchar_to_NSString(drvattrs); SQLGetPrivateProfileStringW (drvdesc, L"CPProbe", L"", drvattrs, sizeof (drvattrs) / sizeof(wchar_t), L"odbcinst.ini"); if (drvattrs[0] == L'\0') SQLGetPrivateProfileStringW (L"Default", L"CPProbe", L"", drvattrs, sizeof (drvattrs) / sizeof(wchar_t), L"odbcinst.ini"); a_query = conv_wchar_to_NSString(drvattrs); [list addObject:[NSMutableDictionary dictionaryWithObjectsAndKeys:a_name, @"drv", a_timeout, @"timeout", a_query, @"query", nil]]; /* Process next one */ ret = SQLDriversW (henv, SQL_FETCH_NEXT, drvdesc, sizeof (drvdesc)/sizeof(wchar_t), &len, drvattrs, sizeof (drvattrs)/sizeof(wchar_t), &len1); if (ret != SQL_SUCCESS && ret != SQL_SUCCESS_WITH_INFO && ret != SQL_NO_DATA) { _iodbcdm_nativeerrorbox ((void*)1L, henv, SQL_NULL_HANDLE, SQL_NULL_HANDLE); goto error; } } error: /* Clean all that */ SQLFreeHandle (SQL_HANDLE_ENV, henv); end: return; } void addDrivers_to_list(NSArrayController* list) { wchar_t drvdesc[1024], drvattrs[1024], driver[1024]; void *handle; struct stat _stat; SQLSMALLINT len, len1; SQLRETURN ret; HENV henv, drv_henv; HDBC drv_hdbc; pSQLGetInfoFunc funcHdl; pSQLAllocHandle allocHdl; pSQLAllocEnv allocEnvHdl = NULL; pSQLAllocConnect allocConnectHdl = NULL; pSQLFreeHandle freeHdl; pSQLFreeEnv freeEnvHdl; pSQLFreeConnect freeConnectHdl; char *_drv_u8 = NULL; [list removeObjects:[list arrangedObjects]]; /* Create a HENV to get the list of data sources then */ ret = SQLAllocHandle (SQL_HANDLE_ENV, SQL_NULL_HANDLE, &henv); if (ret != SQL_SUCCESS && ret != SQL_SUCCESS_WITH_INFO) { _iodbcdm_nativeerrorbox ((void*)1L, henv, SQL_NULL_HANDLE, SQL_NULL_HANDLE); goto end; } SQLSetEnvAttr (henv, SQL_ATTR_APP_UNICODE_TYPE, (SQLPOINTER) SQL_DM_CP_DEF, SQL_IS_UINTEGER); /* Set the version ODBC API to use */ SQLSetEnvAttr (henv, SQL_ATTR_ODBC_VERSION, (SQLPOINTER) SQL_OV_ODBC3, SQL_IS_UINTEGER); /* Get the list of drivers */ ret = SQLDriversW (henv, SQL_FETCH_FIRST, drvdesc, sizeof (drvdesc)/sizeof(wchar_t), &len, drvattrs, sizeof (drvattrs)/sizeof(wchar_t), &len1); if (ret != SQL_SUCCESS && ret != SQL_SUCCESS_WITH_INFO && ret != SQL_NO_DATA) { _iodbcdm_nativeerrorbox ((void*)1L, henv, SQL_NULL_HANDLE, SQL_NULL_HANDLE); goto error; } while (ret != SQL_NO_DATA) { NSString *a_name = conv_wchar_to_NSString(drvdesc); NSString *a_drv = NULL; NSString *a_ver = NULL; NSString *a_size = NULL; NSString *a_date = NULL; /* Get the driver library name */ SQLSetConfigMode (ODBC_BOTH_DSN); SQLGetPrivateProfileStringW (drvdesc, L"Driver", L"", driver, sizeof (driver)/sizeof(wchar_t), L"odbcinst.ini"); if (driver[0] == L'\0') SQLGetPrivateProfileStringW (L"Default", L"Driver", L"", driver, sizeof (driver)/sizeof(wchar_t), L"odbcinst.ini"); if (driver[0] == L'\0') goto skip; a_drv = conv_wchar_to_NSString(driver); /* Alloc a connection handle */ drv_hdbc = NULL; drv_henv = NULL; _drv_u8 = (char *) conv_NSString_to_char(a_drv); if (_drv_u8 == NULL) goto skip; if ((handle = DLL_OPEN(_drv_u8)) != NULL) { if ((allocHdl = (pSQLAllocHandle)DLL_PROC(handle, "SQLAllocHandle")) != NULL) { ret = allocHdl(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &drv_henv); if (ret == SQL_ERROR) goto nodriverver; ret = allocHdl(SQL_HANDLE_DBC, drv_henv, &drv_hdbc); if (ret == SQL_ERROR) goto nodriverver; } else { if ((allocEnvHdl = (pSQLAllocEnv)DLL_PROC(handle, "SQLAllocEnv")) != NULL) { ret = allocEnvHdl(&drv_henv); if (ret == SQL_ERROR) goto nodriverver; } else goto nodriverver; if ((allocConnectHdl = (pSQLAllocConnect)DLL_PROC(handle, "SQLAllocConnect")) != NULL) { ret = allocConnectHdl(drv_henv, &drv_hdbc); if (ret == SQL_ERROR) goto nodriverver; } else goto nodriverver; } /* * Use SQLGetInfoA for Unicode drivers * and SQLGetInfo for ANSI drivers */ funcHdl = (pSQLGetInfoFunc)DLL_PROC(handle, "SQLGetInfoA"); if (!funcHdl) funcHdl = (pSQLGetInfoFunc)DLL_PROC(handle, "SQLGetInfo"); if (funcHdl) { /* Retrieve some informations */ ret = funcHdl (drv_hdbc, SQL_DRIVER_VER, drvattrs, sizeof(drvattrs), &len); if (ret == SQL_SUCCESS || ret == SQL_SUCCESS_WITH_INFO) { char *p = (char*)drvattrs; /* Find the description if one provided */ for (; *p ; p++) { if (*p == ' ') { *p++ = '\0'; break; } } /* * Store Version */ a_ver = conv_char_to_NSString((char*)drvattrs); } else goto nodriverver; } else if ((funcHdl = (pSQLGetInfoFunc)DLL_PROC(handle, "SQLGetInfoW")) != NULL) { /* Retrieve some informations */ ret = funcHdl (drv_hdbc, SQL_DRIVER_VER, drvattrs, sizeof(drvattrs), &len); if (ret == SQL_SUCCESS || ret == SQL_SUCCESS_WITH_INFO) { wchar_t *p = drvattrs; /* Find the description if one provided */ for (; *p ; p++) { if (*p == L' ') { *p++ = L'\0'; break; } } /* * Store Version */ a_ver = conv_wchar_to_NSString(drvattrs); } else goto nodriverver; } else goto nodriverver; } else { nodriverver: a_ver = @"##.##"; } if(drv_hdbc || drv_henv) { if(allocConnectHdl && (freeConnectHdl = (pSQLFreeConnect)DLL_PROC(handle, "SQLFreeConnect")) != NULL) { freeConnectHdl(drv_hdbc); drv_hdbc = NULL; } if(allocEnvHdl && (freeEnvHdl = (pSQLFreeEnv)DLL_PROC(handle, "SQLFreeEnv")) != NULL) { freeEnvHdl(drv_henv); drv_henv = NULL; } } if ((drv_hdbc || drv_henv) && (freeHdl = (pSQLFreeHandle)DLL_PROC(handle, "SQLFreeHandle")) != NULL) { if(drv_hdbc) freeHdl(SQL_HANDLE_DBC, drv_hdbc); if(drv_henv) freeHdl(SQL_HANDLE_ENV, drv_henv); } DLL_CLOSE(handle); /* Get the size and date of the driver */ if (!stat (_drv_u8, &_stat)) { struct tm drivertime; char buf[100]; a_size = [NSString stringWithFormat:@"%d Kb", (int) (_stat.st_size / 1024)]; localtime_r (&_stat.st_mtime, &drivertime); strftime (buf, sizeof (buf), "%c", &drivertime); a_date = conv_char_to_NSString(buf); } else { a_size = @"-"; a_date = @"-"; } [list addObject:[NSMutableDictionary dictionaryWithObjectsAndKeys:a_name, @"name", a_drv, @"file", a_ver, @"ver", a_size, @"size", a_date, @"date", nil]]; /* Process next one */ skip: MEM_FREE (_drv_u8); _drv_u8 = NULL; ret = SQLDriversW (henv, SQL_FETCH_NEXT, drvdesc, sizeof (drvdesc)/sizeof(wchar_t), &len, drvattrs, sizeof (drvattrs)/sizeof(wchar_t), &len1); if (ret != SQL_SUCCESS && ret != SQL_SUCCESS_WITH_INFO && ret != SQL_NO_DATA) { _iodbcdm_nativeerrorbox ((void*)1L, henv, SQL_NULL_HANDLE, SQL_NULL_HANDLE); goto error; } } error: /* Clean all that */ SQLFreeHandle (SQL_HANDLE_ENV, henv); end: return; } void addDSNs_to_list(BOOL systemDSN, NSArrayController* list) { wchar_t dsnname[1024], dsndesc[1024]; SQLSMALLINT len; SQLRETURN ret; HENV henv; [list removeObjects:[list arrangedObjects]]; /* Create a HENV to get the list of data sources then */ ret = SQLAllocHandle (SQL_HANDLE_ENV, SQL_NULL_HANDLE, &henv); if (ret != SQL_SUCCESS && ret != SQL_SUCCESS_WITH_INFO) { _iodbcdm_nativeerrorbox ((void*)1L, henv, SQL_NULL_HANDLE, SQL_NULL_HANDLE); goto end; } /* Set the version ODBC API to use */ SQLSetEnvAttr (henv, SQL_ATTR_ODBC_VERSION, (SQLPOINTER) SQL_OV_ODBC3, SQL_IS_UINTEGER); SQLSetEnvAttr (henv, SQL_ATTR_APP_UNICODE_TYPE, (SQLPOINTER) SQL_DM_CP_DEF, SQL_IS_UINTEGER); /* Get the list of datasources */ ret = SQLDataSourcesW (henv, systemDSN ? SQL_FETCH_FIRST_SYSTEM : SQL_FETCH_FIRST_USER, dsnname, sizeof (dsnname)/sizeof(wchar_t), &len, dsndesc, sizeof (dsndesc)/sizeof(wchar_t), NULL); if (ret != SQL_SUCCESS && ret != SQL_SUCCESS_WITH_INFO && ret != SQL_NO_DATA) { _iodbcdm_nativeerrorbox ((void*)1L, henv, SQL_NULL_HANDLE, SQL_NULL_HANDLE); goto error; } while (ret != SQL_NO_DATA) { NSString *name = conv_wchar_to_NSString(dsnname); if (dsndesc[0] == L'\0') { SQLSetConfigMode (ODBC_BOTH_DSN); SQLGetPrivateProfileStringW (L"Default", L"Driver", L"", dsndesc, sizeof (dsndesc)/sizeof(wchar_t), L"odbc.ini"); } NSString *drv = dsndesc[0]!=L'\0'? conv_wchar_to_NSString(dsndesc): @"-"; /* Get the description */ SQLSetConfigMode (systemDSN ? ODBC_SYSTEM_DSN : ODBC_USER_DSN); SQLGetPrivateProfileStringW (dsnname, L"Description", L"", dsndesc, sizeof (dsndesc)/sizeof(wchar_t), L"odbc.ini"); NSString *desc = dsndesc[0]!=L'\0'? conv_wchar_to_NSString(dsndesc): @"-"; [list addObject:[NSMutableDictionary dictionaryWithObjectsAndKeys:name, @"name", desc, @"desc", drv, @"drv", nil]]; /* Process next one */ ret = SQLDataSourcesW (henv, SQL_FETCH_NEXT, dsnname, sizeof (dsnname)/sizeof(wchar_t), &len, dsndesc, sizeof (dsndesc)/sizeof(wchar_t), NULL); if (ret != SQL_SUCCESS && ret != SQL_SUCCESS_WITH_INFO && ret != SQL_NO_DATA) { _iodbcdm_nativeerrorbox ((void*)1L, henv, SQL_NULL_HANDLE, SQL_NULL_HANDLE); goto error; } } error: /* Clean all that */ SQLFreeHandle (SQL_HANDLE_ENV, henv); end: return; } #define MAX_ROWS 1024 void addFDSNs_to_list(NSString* path, BOOL b_reset, NSArrayController* list) { NSError *err; [list removeObjects:[list arrangedObjects]]; NSFileManager *mgr =[NSFileManager defaultManager]; NSArray *arr = [mgr contentsOfDirectoryAtPath:path error:&err]; if (err != nil) { create_error (NULL, NULL, "Error during accessing directory information", NULL); } for(int i=0; i < arr.count; i++) { NSString *name = [arr objectAtIndex:i]; NSString *full_name = [path stringByAppendingPathComponent:name]; NSDictionary *dict = [mgr attributesOfItemAtPath:full_name error:nil]; NSString *itype = [dict objectForKey:@"NSFileType"]; if ([itype isEqualToString:@"NSFileTypeDirectory"]) { if ([name characterAtIndex:0]!='.') { NSImage *icon = [NSImage imageNamed:NSImageNameFolder]; [list addObject:[NSMutableDictionary dictionaryWithObjectsAndKeys:name, @"name", icon, @"icon", [NSNumber numberWithBool:TRUE], @"isdir", nil]]; } } else { if ([name hasSuffix:@".dsn"]) { NSImage *icon = [[NSWorkspace sharedWorkspace] iconForFileType:NSFileTypeForHFSTypeCode(kGenericDocumentIcon)]; [list addObject:[NSMutableDictionary dictionaryWithObjectsAndKeys:name, @"name", icon, @"icon", [NSNumber numberWithBool:FALSE], @"isdir", nil]]; } } } } void fill_dir_menu(wchar_t* path, NSPopUpButton* list) { wchar_t *curr_dir, *prov, *dir; if (!path || !(prov = WCSDUP(path))) return; if (prov[WCSLEN(prov) - 1] == '/' && WCSLEN(prov) > 1) prov[WCSLEN(prov) - 1] = 0; [list removeAllItems]; /* Add the root directory */ [list addItemWithTitle:@"/"]; if (WCSLEN(prov) > 1) for (curr_dir = prov, dir = NULL; curr_dir; curr_dir = wcschr(curr_dir + 1, L'/')) { if (wcschr (curr_dir + 1, '/')) { dir = wcschr (curr_dir + 1, L'/'); *dir = 0; } [list addItemWithTitle:conv_wchar_to_NSString(prov)]; if (dir) *dir = L'/'; } free(prov); [list selectItemAtIndex:list.numberOfItems-1]; } BOOL remove_dsn(BOOL systemDSN, NSString *_dsn, NSString *_driver) { wchar_t *szDSN = conv_NSString_to_wchar(_dsn); wchar_t *szDriver = conv_NSString_to_wchar(_driver); wchar_t dsn_remove[1024] = { L'\0' }; BOOL ret = FALSE; if (szDSN && szDriver){ if (create_confirmw ((void*)1L, szDSN, L"Are you sure you want to remove this DSN ?")) { /* Call the right function */ WCSCPY(dsn_remove, L"DSN="); WCSCAT(dsn_remove, szDSN); dsn_remove[WCSLEN(dsn_remove)+1] = L'\0'; if (!SQLConfigDataSourceW ((void*)1L, systemDSN?ODBC_REMOVE_SYS_DSN:ODBC_REMOVE_DSN, szDriver, dsn_remove)) _iodbcdm_errorboxw ((void*)1L, szDSN, L"An error occurred when trying to remove the DSN "); ret = TRUE; } } if (szDSN) free(szDSN); if (szDSN) free(szDriver); return ret; } BOOL configure_dsn(BOOL systemDSN, NSString *dsn, NSString *driver) { wchar_t *szDSN = conv_NSString_to_wchar(dsn); wchar_t *szDriver = conv_NSString_to_wchar(driver); wchar_t connstr[4096] = { L'\0' }, tokenstr[4096] = { L'\0' }; int size = sizeof (connstr)/sizeof(wchar_t); wchar_t *curr, *cour; DWORD error; BOOL ret = FALSE; if (szDSN && szDriver){ /* Call the right function */ WCSCPY(connstr, L"DSN="); WCSCAT(connstr, szDSN); connstr[WCSLEN(connstr)+1] = L'\0'; size -= (WCSLEN (connstr) + 1); SQLSetConfigMode (systemDSN? ODBC_SYSTEM_DSN: ODBC_USER_DSN); if (!SQLGetPrivateProfileStringW (szDSN, NULL, L"", tokenstr, sizeof (tokenstr)/sizeof(wchar_t), NULL)) { _iodbcdm_errorboxw ((void*)1L, szDSN, L"An error occurred when trying to configure the DSN "); goto done; } for (curr = tokenstr, cour = connstr + WCSLEN (connstr) + 1; *curr != L'\0' ; curr += (WCSLEN (curr) + 1), cour += (WCSLEN (cour) + 1)) { WCSCPY (cour, curr); cour[WCSLEN (curr)] = L'='; SQLSetConfigMode (systemDSN? ODBC_SYSTEM_DSN: ODBC_USER_DSN); SQLGetPrivateProfileStringW (szDSN, curr, L"", cour + WCSLEN (curr) + 1, size - WCSLEN (curr) - 1, NULL); size -= (WCSLEN (cour) + 1); } *cour = L'\0'; if (!SQLConfigDataSourceW ((void*)1L, systemDSN? ODBC_CONFIG_SYS_DSN:ODBC_CONFIG_DSN, szDriver, connstr)) { if (SQLInstallerErrorW (1, &error, connstr, sizeof (connstr)/sizeof(wchar_t), NULL) != SQL_NO_DATA && error != ODBC_ERROR_REQUEST_FAILED) create_errorw ((void*)1L, szDSN, L"An error occurred when trying to configure the DSN : ", connstr); goto done; } ret = TRUE; } done: if (szDSN) free(szDSN); if (szDSN) free(szDriver); return ret; } void test_dsn(BOOL systemDSN, NSString *dsn, NSString *driver) { wchar_t *szDSN = conv_NSString_to_wchar(dsn); wchar_t *szDriver = conv_NSString_to_wchar(driver); wchar_t connstr[4096] = { L'\0' }, outconnstr[4096] = { L'\0' }; HENV henv; HDBC hdbc; SWORD buflen; if (szDSN && szDriver){ /* Make the connection */ #if (ODBCVER < 0x300) if (SQLAllocEnv (&henv) != SQL_SUCCESS) #else if (SQLAllocHandle (SQL_HANDLE_ENV, NULL, &henv) != SQL_SUCCESS) #endif { _iodbcdm_nativeerrorbox ((void*)1L, henv, SQL_NULL_HDBC, SQL_NULL_HSTMT); goto done; } SQLSetEnvAttr (henv, SQL_ATTR_APP_UNICODE_TYPE, (SQLPOINTER) SQL_DM_CP_DEF, SQL_IS_UINTEGER); #if (ODBCVER < 0x300) if (SQLAllocConnect (henv, &hdbc) != SQL_SUCCESS) #else SQLSetEnvAttr (henv, SQL_ATTR_ODBC_VERSION, (SQLPOINTER) SQL_OV_ODBC3, SQL_IS_UINTEGER); if (SQLAllocHandle (SQL_HANDLE_DBC, henv, &hdbc) != SQL_SUCCESS) #endif { _iodbcdm_nativeerrorbox ((void*)1L, henv, hdbc, SQL_NULL_HSTMT); SQLFreeEnv (henv); goto done; } WCSCPY(connstr, L"DSN="); WCSCAT(connstr, szDSN); SQLSetConfigMode (systemDSN?ODBC_SYSTEM_DSN: ODBC_USER_DSN); if (SQLDriverConnectW (hdbc, (void*)1L, connstr, SQL_NTS, outconnstr, sizeof (outconnstr) / sizeof(wchar_t), &buflen, SQL_DRIVER_PROMPT) != SQL_SUCCESS) { _iodbcdm_nativeerrorbox ((void*)1L, henv, hdbc, SQL_NULL_HSTMT); } else { create_messagew ((void*)1L, szDSN, L"The connection DSN was tested successfully, and can be used at this time."); SQLDisconnect (hdbc); } #if (ODBCVER < 0x300) SQLFreeConnect (hdbc); SQLFreeEnv (henv); #else SQLFreeHandle (SQL_HANDLE_DBC, hdbc); SQLFreeHandle (SQL_HANDLE_ENV, henv); #endif } done: if (szDSN) free(szDSN); if (szDSN) free(szDriver); } BOOL remove_file_dsn(NSString *cur_dir, NSString *dsn) { if (cur_dir && dsn) { NSString *nspath = [NSString stringWithFormat:@"%@/%@", cur_dir, dsn]; char *path = conv_NSString_to_char(nspath); if (path) { if (create_confirm ((void*)1L, path, "Are you sure you want to remove this File DSN ?")) { /* Call the right function */ if (unlink(path) < 0) { create_error ((void*)1L, NULL, "Error removing file DSN:", strerror (errno)); } } free(path); return TRUE; } } return FALSE; } void test_file_dsn(NSString *cur_dir, NSString *dsn) { if (cur_dir && dsn) { NSString *nspath = [NSString stringWithFormat:@"%@/%@", cur_dir, dsn]; char *path = conv_NSString_to_char(nspath); if (path) { char connstr[4096] = { 0 }; /* Create connection string and connect to data source */ snprintf (connstr, sizeof (connstr), "FILEDSN=%s", path); if (test_driver_connect(connstr)) { _iodbcdm_messagebox ((void*)1L, path, "The connection DSN was tested successfully, and can be used at this time."); } free(path); } } } BOOL configure_file_dsn(NSString *cur_dir, NSString *dsn) { BOOL ret = FALSE; char *path = NULL; char *drv = NULL; char *attrs = NULL; char *_attrs = NULL; /* attr list */ size_t len = 0; /* current attr list length (w/o list-terminating NUL) */ char *p, *p_next; WORD read_len; char entries[4096]; if (cur_dir && dsn) { NSString *nspath = [NSString stringWithFormat:@"%@/%@", cur_dir, dsn]; path = conv_NSString_to_char(nspath); if (path) { /* Get list of entries in .dsn file */ if (!SQLReadFileDSN (path, "ODBC", NULL, entries, sizeof (entries), &read_len)) { create_error ((void*)1L, NULL, "SQLReadFileDSN failed", NULL); goto done; } /* add params from the .dsn file */ for (p = entries; *p != '\0'; p = p_next) { char *tmp; size_t add_len; /* length of added attribute */ char value[1024]; /* get next entry */ p_next = strchr (p, ';'); if (p_next) *p_next++ = '\0'; if (!SQLReadFileDSN (path, "ODBC", p, value, sizeof(value), &read_len)) { create_error ((void*)1L, NULL, "SQLReadFileDSN failed", NULL); goto done; } if (!strcasecmp (p, "DRIVER")) { /* got driver keyword */ add_len = strlen ("DRIVER=") + strlen (value) + 1; drv = malloc (add_len); snprintf (drv, add_len, "DRIVER=%s", value); continue; } /* +1 for '=', +1 for NUL */ add_len = strlen (p) + 1 + strlen (value) + 1; /* +1 for list-terminating NUL */; tmp = realloc (attrs, len + add_len + 1); if (tmp == NULL) { create_error ((void*)1L, NULL, "Error adding file DSN:", strerror (errno)); goto done; } attrs = tmp; snprintf (attrs + len, add_len, "%s=%s", p, value); len += add_len; } if (drv == NULL) { /* no driver found, probably unshareable file data source */ create_error ((void*)1L, NULL, "Can't configure file DSN without DRIVER keyword (probably unshareable data source?)", NULL); goto done; } if (attrs == NULL) attrs = "\0\0"; else { /* NUL-terminate the list */ attrs[len] = '\0'; _attrs = attrs; } /* Configure file DSN */ filedsn_configure (drv, path, attrs, FALSE, TRUE); } } done: if (path) free(path); return ret; } void setdir_file_dsn(NSString *cur_dir) { char msg[4096]; char *path = conv_NSString_to_char(cur_dir); if (path){ /* confirm setting a directory */ snprintf (msg, sizeof (msg), "Are you sure that you want to make '%s' the default file DSN directory?", path); if (!create_confirm ((void*)1L, NULL, msg)) goto done; /* write FileDSNPath value */ if (!SQLWritePrivateProfileString ("ODBC", "FileDSNPath", path, "odbcinst.ini")) { create_error ((void*)1L, NULL, "Error setting default file DSN directory", NULL); goto done; } } done: if (path) free(path); } BOOL add_file_dsn(NSString *_curr_dir) { TFDRIVERCHOOSER drvchoose_t; BOOL ret = FALSE; /* Try first to get the driver name */ SQLSetConfigMode (ODBC_USER_DSN); drvchoose_t.attrs = NULL; drvchoose_t.dsn = NULL; drvchoose_t.driver = NULL; drvchoose_t.curr_dir = (char*)_curr_dir.UTF8String; create_fdriverchooser ((void*)1L, &drvchoose_t); /* Check output parameters */ if (drvchoose_t.ok == TRUE) { ret = TRUE; NSString *drv = [NSString stringWithFormat:@"DRIVER=%@", conv_wchar_to_NSString(drvchoose_t.driver)]; char *attrs = drvchoose_t.attrs; filedsn_configure ((char*)drv.UTF8String, drvchoose_t.dsn, attrs ? attrs :"\0\0", TRUE, drvchoose_t.verify_conn); } if (drvchoose_t.driver) free (drvchoose_t.driver); if (drvchoose_t.attrs) free (drvchoose_t.attrs); if (drvchoose_t.dsn) free (drvchoose_t.dsn); return ret; } NSString * get_user_documents_dir() { NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); if (paths.count>0) return [paths objectAtIndex:0]; else return @""; } static BOOL test_driver_connect (char *connstr) { HENV henv; HDBC hdbc; #if (ODBCVER < 0x300) if (SQLAllocEnv (&henv) != SQL_SUCCESS) #else if (SQLAllocHandle (SQL_HANDLE_ENV, NULL, &henv) != SQL_SUCCESS) #endif { _iodbcdm_nativeerrorbox ((void*)1L, henv, SQL_NULL_HDBC, SQL_NULL_HSTMT); return FALSE; } SQLSetEnvAttr (henv, SQL_ATTR_APP_UNICODE_TYPE, (SQLPOINTER) SQL_DM_CP_DEF, SQL_IS_UINTEGER); #if (ODBCVER < 0x300) if (SQLAllocConnect (henv, &hdbc) != SQL_SUCCESS) #else SQLSetEnvAttr (henv, SQL_ATTR_ODBC_VERSION, (SQLPOINTER) SQL_OV_ODBC3, SQL_IS_UINTEGER); if (SQLAllocHandle (SQL_HANDLE_DBC, henv, &hdbc) != SQL_SUCCESS) #endif { _iodbcdm_nativeerrorbox ((void*)1L, henv, hdbc, SQL_NULL_HSTMT); SQLFreeEnv (henv); return FALSE; } SQLSetConfigMode (ODBC_BOTH_DSN); if (SQLDriverConnect (hdbc, (void*)1L, (SQLCHAR*)connstr, SQL_NTS, NULL, 0, NULL, SQL_DRIVER_PROMPT) != SQL_SUCCESS) { _iodbcdm_nativeerrorbox ((void*)1L, henv, hdbc, SQL_NULL_HSTMT); SQLFreeEnv (henv); return FALSE; } else { SQLDisconnect (hdbc); } #if (ODBCVER < 0x300) SQLFreeConnect (hdbc); SQLFreeEnv (henv); #else SQLFreeHandle (SQL_HANDLE_DBC, hdbc); SQLFreeHandle (SQL_HANDLE_ENV, henv); #endif return TRUE; } static void filedsn_configure (char *drv, char *dsn, char *in_attrs, BOOL b_add, BOOL verify_conn) { char *connstr = NULL; size_t len; /* current connstr len */ size_t add_len; /* len of appended string */ LPSTR attrs = NULL, curr, tmp, attr_lst = NULL; BOOL b_Save = TRUE; attrs = in_attrs; if (!b_add && !_CheckDriverLoginDlg(drv + STRLEN("DRIVER="))) { /* Get DSN name and additional attributes */ attr_lst = create_gensetup ((void*)1L, dsn, in_attrs, b_add, &verify_conn); attrs = attr_lst; } if (!attrs) { create_error ((void*)1L, NULL, "Error adding File DSN:", strerror (ENOMEM)); return; } if (attrs == (LPSTR) - 1L) return; /* Build the connection string */ connstr = strdup (drv); len = strlen (connstr); for (curr = attrs; *curr; curr += (STRLEN (curr) + 1)) { if (!strncasecmp (curr, "DSN=", STRLEN ("DSN="))) { if (dsn == NULL) { /* got dsn name */ dsn = curr + STRLEN ("DSN="); } continue; } /* append attr */ add_len = 1 + strlen (curr); /* +1 for ';' */ tmp = realloc (connstr, len + add_len + 1); /* +1 for NUL */ if (tmp == NULL) { create_error ((void*)1L, NULL, "Error adding File DSN:", strerror (errno)); goto done; } connstr = tmp; snprintf (connstr + len, add_len + 1, ";%s", curr); len += add_len; } /* Nothing to do if no DSN */ if (!dsn || STRLEN (dsn) == 0) goto done; if (verify_conn) { BOOL ret; /* Append SAVEFILE */ add_len = strlen (";SAVEFILE=") + strlen (dsn); tmp = realloc (connstr, len + add_len + 1); /* +1 for NUL */ if (tmp == NULL) { create_error ((void*)1L, NULL, "Error adding file DSN:", strerror (errno)); goto done; } connstr = tmp; snprintf (connstr + len, add_len + 1, ";SAVEFILE=%s", dsn); len += add_len; /* Connect to data source */ ret = test_driver_connect (connstr); if (!ret && b_add) { if (create_confirm ((void*)1L, dsn, "Can't check the connection. Do you want to store the FileDSN without verification ?")) b_Save = TRUE; else b_Save = FALSE; } else b_Save = FALSE; } if (b_Save) { char key[512]; char *p; size_t sz; if (drv) { p = strchr(drv, '='); if (!SQLWriteFileDSN (dsn, "ODBC", "DRIVER", p + 1)) { create_error ((void*)1L, NULL, "Error adding File DSN:", strerror (errno)); goto done; } } for (curr = attrs; *curr; curr += (STRLEN (curr) + 1)) { if (!strncasecmp (curr, "DSN=", STRLEN ("DSN="))) continue; else if (!strncasecmp (curr, "PWD=", STRLEN ("PWD="))) continue; else if (!strncasecmp (curr, "SAVEFILE=", STRLEN ("SAVEFILE="))) continue; else if (!strncasecmp (curr, "FILEDSN=", STRLEN ("FILEDSN="))) continue; p = strchr(curr, '='); sz = p - curr < sizeof(key) ? p - curr : sizeof(key); memset(key, 0, sizeof(key)); strncpy(key, curr, sz); if (!SQLWriteFileDSN (dsn, "ODBC", key, p + 1)) { create_error ((void*)1L, NULL, "Error adding File DSN:", strerror (errno)); goto done; } } } done: if (attr_lst != NULL) free (attr_lst); if (connstr != NULL) free (connstr); } #define CHECK_DRVCONN_DIALBOX(path) \ if (path) \ { \ CFBundleRef bundle_dll = NULL; \ char *tmp_path = strdup(path); \ if (tmp_path) { \ char *ptr = strstr(tmp_path, "/Contents/MacOS/"); \ if (ptr) \ *ptr = 0; \ CFURLRef liburl = CFURLCreateFromFileSystemRepresentation (NULL, (UInt8*)tmp_path, strlen(tmp_path), FALSE); \ CFArrayRef arr = CFBundleCopyExecutableArchitecturesForURL(liburl); \ if (arr) \ bundle_dll = CFBundleCreate (NULL, liburl); \ if (arr) \ CFRelease(arr); \ if (liburl) \ CFRelease(liburl); \ } \ MEM_FREE(tmp_path); \ if (bundle_dll != NULL) \ { \ if (CFBundleGetFunctionPointerForName(bundle_dll, CFSTR("_iodbcdm_drvconn_dialboxw")) != NULL) \ { \ retVal = TRUE; \ goto quit; \ } \ else if (CFBundleGetFunctionPointerForName(bundle_dll, CFSTR("_iodbcdm_drvconn_dialbox")) != NULL) \ { \ retVal = TRUE; \ goto quit; \ } \ } \ } static BOOL _CheckDriverLoginDlg (char *drv) { char drvbuf[4096] = { L'\0'}; BOOL retVal = FALSE; if (!drv) return FALSE; SQLSetConfigMode (ODBC_USER_DSN); if (!access (drv, X_OK)) { CHECK_DRVCONN_DIALBOX (drv); } if (SQLGetPrivateProfileString (drv, "Driver", "", drvbuf, sizeof (drvbuf), "odbcinst.ini")) { CHECK_DRVCONN_DIALBOX (drvbuf); } if (SQLGetPrivateProfileString (drv, "Setup", "", drvbuf, sizeof (drvbuf), "odbcinst.ini")) { CHECK_DRVCONN_DIALBOX (drvbuf); } SQLSetConfigMode (ODBC_SYSTEM_DSN); if (!access (drv, X_OK)) { CHECK_DRVCONN_DIALBOX (drv); } if (SQLGetPrivateProfileString (drv, "Driver", "", drvbuf, sizeof (drvbuf), "odbcinst.ini")) { CHECK_DRVCONN_DIALBOX (drvbuf); } if (SQLGetPrivateProfileString (drv, "Setup", "", drvbuf, sizeof (drvbuf), "odbcinst.ini")) { CHECK_DRVCONN_DIALBOX (drvbuf); } quit: return retVal; } libiodbc-3.52.16/iodbcadm/mac/IODBCadm_DrvRemoveController.h0000664000175000017500000000740514424170750020406 00000000000000/* * IODBCadm_DrvRemoveController.h * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import #import @interface IODBCadm_DrvRemoveController : NSWindowController { int _dialogCode; NSButton *_chk_User; NSButton *_chk_System; NSMatrix *_rb_remove; BOOL _deletedsn; int _dsns; } @property (assign) IBOutlet NSButton *chk_User; @property (assign) IBOutlet NSButton *chk_System; @property (assign) IBOutlet NSMatrix *rb_remove; @property (assign) BOOL deletedsn; @property (assign) int dsns; - (id)initWithDSNS:(int) dsns; - (IBAction)call_Cancel:(id)sender; - (IBAction)call_Ok:(id)sender; @end libiodbc-3.52.16/iodbcadm/mac/IODBCadm_KeyValController.m0000664000175000017500000001224514424170750017673 00000000000000/* * IODBCadm_KeyValController.m * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import "IODBCadm_KeyValController.h" #import "utils.h" @interface IODBCadm_KeyValController () @end @implementation IODBCadm_KeyValController @synthesize Attrs_ArrController; @synthesize chk_Verify; @synthesize Attrs_list=_Attrs_list; - (id)initWithAttrs:(const char*)attrs { self = [super initWithWindowNibName:@"IODBCadm_KeyValController"]; if (self) { self.Attrs_list = [NSMutableArray arrayWithCapacity:16]; [self parse_attrs:attrs]; } return self; } - (void)dealloc { [_Attrs_list removeAllObjects]; [_Attrs_list release]; [super dealloc]; } - (id)initWithWindow:(NSWindow *)window { self = [super initWithWindow:window]; if (self) { // Initialization code here. } return self; } - (void)parse_attrs:(const char *)attrs { char *curr, *cour; [_Attrs_list removeAllObjects]; for (curr = (char*) attrs; *curr; curr += (strlen(curr) + 1)) { if (!strncasecmp (curr, "DSN=", strlen("DSN=")) || !strncasecmp (curr, "Driver=", strlen("Driver=")) || !strncasecmp (curr, "Description=", strlen("Description="))) continue; if ((cour = strchr (curr, '='))) { NSString *key, *val; *cour = '\0'; key = conv_char_to_NSString(curr); *cour = '='; val = conv_char_to_NSString(cour+1); [_Attrs_list addObject:[NSMutableDictionary dictionaryWithObjectsAndKeys:key!=nil?key:@"", @"key", val!=nil?val:@"", @"val", nil]]; } } } - (void)windowDidLoad { [super windowDidLoad]; _dialogCode = 0; [[self window] center]; // Center the window. } - (void)windowWillClose:(NSNotification*)notification { [NSApp stopModalWithCode:_dialogCode]; } - (IBAction)call_Ok:(id)sender { _dialogCode = 1; [self.window close]; } - (IBAction)call_Cancel:(id)sender { _dialogCode = 0; [self.window close]; } @end libiodbc-3.52.16/iodbcadm/mac/IODBCadm_DrvConfigController.m0000664000175000017500000001662514424170750020367 00000000000000/* * IODBCadm_DrvConfigController.m * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import "IODBCadm_DrvConfigController.h" #import "utils.h" #import "Helpers.h" @interface IODBCadm_DrvConfigController () @end @implementation IODBCadm_DrvConfigController @synthesize Attrs_ArrController; @synthesize Attrs_list=_Attrs_list; @synthesize rb_sysuser = _rb_sysuser; @synthesize drv_name = _drv_name; @synthesize drv_file = _drv_file; @synthesize setup_file = _setup_file; @synthesize add = _add; @synthesize user = _user; - (id)initWithAttrs:(const wchar_t*)attrs { self = [super initWithWindowNibName:@"IODBCadm_DrvConfigController"]; if (self) { self.drv_file = @""; self.setup_file = @""; self.Attrs_list = [NSMutableArray arrayWithCapacity:16]; [self parse_attrs:attrs]; } return self; } - (void)dealloc { [_Attrs_list removeAllObjects]; [_Attrs_list release]; [_drv_name release]; [_drv_file release]; [_setup_file release]; [super dealloc]; } - (id)initWithWindow:(NSWindow *)window { self = [super initWithWindow:window]; if (self) { // Initialization code here. } return self; } - (void)parse_attrs:(const wchar_t *)attrs { wchar_t *curr, *cour; [_Attrs_list removeAllObjects]; for (curr = (LPWSTR) attrs; *curr != L'\0' ; curr += (wcslen (curr) + 1)) { if (!wcsncasecmp (curr, L"Driver=", wcslen (L"Driver="))) { self.drv_file = conv_wchar_to_NSString(curr + wcslen(L"Driver=")); continue; } if (!wcsncasecmp (curr, L"Setup=", wcslen(L"Setup="))) { self.setup_file = conv_wchar_to_NSString(curr + wcslen(L"Setup=")); continue; } if ((cour = wcschr (curr, L'='))) { NSString *key, *val; *cour = '\0'; key = conv_wchar_to_NSString(curr); *cour = '='; val = conv_wchar_to_NSString(cour+1); [_Attrs_list addObject:[NSMutableDictionary dictionaryWithObjectsAndKeys:key!=nil?key:@"", @"key", val!=nil?val:@"", @"val", nil]]; } } } - (void)windowDidLoad { [super windowDidLoad]; _dialogCode = 0; [_rb_sysuser setEnabled:_add]; [_rb_sysuser selectCellAtRow:0 column:(_user?0:1)]; [[self window] center]; // Center the window. } - (void)windowWillClose:(NSNotification*)notification { [NSApp stopModalWithCode:_dialogCode]; } - (IBAction)call_Ok:(id)sender { _dialogCode = 1; [self.window close]; } - (IBAction)call_Cancel:(id)sender { _dialogCode = 0; [self.window close]; } - (IBAction)call_DrvFile_Browse:(id)sender { NSOpenPanel *panel = [NSOpenPanel openPanel]; NSURL *file_url = [NSURL fileURLWithPath:_drv_file]; NSString *fpath = file_url.path; NSString *fname = file_url.lastPathComponent; NSString *dir = [fpath substringToIndex:(fpath.length - fname.length)]; [panel setTitle:@"Choose a file ..."]; [panel setNameFieldStringValue:(fname.length>0)? fname: @""]; if (dir.length>0) [panel setDirectoryURL:[NSURL fileURLWithPath:dir isDirectory:TRUE]]; panel.allowsMultipleSelection = FALSE; panel.canChooseDirectories = FALSE; NSInteger rc = [panel runModal]; if (rc==NSFileHandlingPanelOKButton) self.drv_file = ((NSURL*)[panel.URLs objectAtIndex:0]).path; [self.window makeKeyAndOrderFront:self.window]; } - (IBAction)call_SetupFile_Browse:(id)sender { NSOpenPanel *panel = [NSOpenPanel openPanel]; NSURL *file_url = [NSURL fileURLWithPath:_setup_file]; NSString *fpath = file_url.path; NSString *fname = file_url.lastPathComponent; NSString *dir = [fpath substringToIndex:(fpath.length - fname.length)]; [panel setTitle:@"Choose a file ..."]; [panel setNameFieldStringValue:(fname.length>0)? fname: @""]; if (dir.length>0) [panel setDirectoryURL:[NSURL fileURLWithPath:dir isDirectory:TRUE]]; panel.allowsMultipleSelection = FALSE; panel.canChooseDirectories = FALSE; NSInteger rc = [panel runModal]; if (rc==NSFileHandlingPanelOKButton) self.setup_file = ((NSURL*)[panel.URLs objectAtIndex:0]).path; [self.window makeKeyAndOrderFront:self.window]; } @end libiodbc-3.52.16/iodbcadm/mac/IODBCadm_DSNchooserController.h0000664000175000017500000001213314424170750020476 00000000000000/* * IODBCadm_DSNchooserController.h * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import #import @interface IODBCadm_DSNchooserController : NSWindowController { NSArrayController *_UserDSN_ArrController; NSArrayController *_SysDSN_ArrController; NSArrayController *_FileDSN_ArrController; NSTabView *_tab_view; NSTableView *_fdsn_tableView; NSPopUpButton *_popup_dir_btn; int _dialogCode; NSString* _type_dsn; NSMutableArray *_UserDSN_list; NSMutableArray *_SysDSN_list; NSMutableArray *_FileDSN_list; NSString *_cur_dir; } @property (assign) IBOutlet NSPopUpButton *popup_dir_btn; @property (assign) IBOutlet NSTableView *fdsn_tableView; @property (assign) IBOutlet NSTabView *tab_view; @property (assign) IBOutlet NSArrayController *FileDSN_ArrController; @property (assign) IBOutlet NSArrayController *SysDSN_ArrController; @property (assign) IBOutlet NSArrayController *UserDSN_ArrController; @property (nonatomic, retain) NSMutableArray *UserDSN_list; @property (nonatomic, retain) NSMutableArray *SysDSN_list; @property (nonatomic, retain) NSMutableArray *FileDSN_list; @property (nonatomic, retain) NSString *cur_dir; @property (nonatomic, retain) NSString *type_dsn; - (IBAction)call_UserDSN_Add:(id)sender; - (IBAction)call_UserDSN_Remove:(id)sender; - (IBAction)call_UserDSN_Config:(id)sender; - (IBAction)call_UserDSN_Test:(id)sender; - (IBAction)call_SysDSN_Add:(id)sender; - (IBAction)call_SysDSN_Remove:(id)sender; - (IBAction)call_SysDSN_Config:(id)sender; - (IBAction)call_SysDSN_Test:(id)sender; - (IBAction)call_FileDSN_Dir_Browse:(id)sender; - (IBAction)call_Dir_PopupBtn:(id)sender; - (IBAction)call_FileDSN_Add:(id)sender; - (IBAction)call_FileDSN_Remove:(id)sender; - (IBAction)call_FileDSN_Config:(id)sender; - (IBAction)call_FileDSN_Test:(id)sender; - (IBAction)call_FileDSN_SetDir:(id)sender; - (IBAction)call_Cancel:(id)sender; - (IBAction)call_Ok:(id)sender; @end libiodbc-3.52.16/iodbcadm/mac/IODBCadm_PoolConfigController.m0000664000175000017500000001101014424170750020524 00000000000000/* * IODBCadm_PoolConfigController.m * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import "IODBCadm_PoolConfigController.h" #import "utils.h" #import "Helpers.h" @interface IODBCadm_PoolConfigController () @end @implementation IODBCadm_PoolConfigController @synthesize g_box = _g_box; @synthesize ptitle = _ptitle; @synthesize ptimeout = _ptimeout; @synthesize pquery = _pquery; - (id)initWithTitle:(NSString *) title Timeout:(NSString *) timeout Query:(NSString *) query { self = [super initWithWindowNibName:@"IODBCadm_PoolConfigController"]; if (self) { self.ptitle = title; self.ptimeout = (timeout==nil || timeout.length==0) ? nil : timeout; self.pquery = query; } return self; } - (void)dealloc { [_ptitle release]; [_ptimeout release]; [_pquery release]; [super dealloc]; } - (id)initWithWindow:(NSWindow *)window { self = [super initWithWindow:window]; if (self) { // Initialization code here. } return self; } - (void)windowDidLoad { [super windowDidLoad]; _dialogCode = 0; [[self window] center]; // Center the window. } - (void)windowWillClose:(NSNotification*)notification { [NSApp stopModalWithCode:_dialogCode]; } - (IBAction)call_Ok:(id)sender { _dialogCode = 1; [self.window close]; } - (IBAction)call_Cancel:(id)sender { _dialogCode = 0; [self.window close]; } @end libiodbc-3.52.16/iodbcadm/mac/IODBCadm_SetupController.m0000664000175000017500000002231214424170750017574 00000000000000/* * IODBCadm_SetupController.m * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import "IODBCadm_SetupController.h" #import "utils.h" static char *STRCONN = "DSN=%s\0Description=%s\0\0"; static int STRCONN_NB_TOKENS = 2; LPSTR create_gensetup (HWND hwnd, LPCSTR dsn, LPCSTR attrs, BOOL addEnable, BOOL *verify_conn) { char *connstr = (char*) - 1L; @autoreleasepool { NSApplication *app = [NSApplication sharedApplication]; IODBCadm_SetupController *dlg = [[IODBCadm_SetupController alloc] initWithAttrs:attrs]; if (dsn) dlg.d_dsn = conv_char_to_NSString(dsn); dlg._addEnabled = addEnable; NSInteger rc = [app runModalForWindow:dlg.window]; [dlg.window orderOut:dlg.window]; if (rc == 1){ char *cour, *curr; int i = 0, size = 0; char *val,*key; char *dsn,*comment; Size len; if (verify_conn) *verify_conn = (dlg.chk_verify.state == NSOnState); dsn = (char*)conv_NSString_to_char(dlg.d_dsn); comment = (char*)conv_NSString_to_char(dlg.d_comment); len = (dsn!=NULL) ? strlen(dsn) : 0; size += len + strlen("DSN=") + 1; len = (comment!=NULL) ? strlen(comment) : 0; size += len + strlen("Description=") + 1; // Malloc it if ((connstr = (char *) malloc (++size))) { for (curr = STRCONN, cour = connstr; i < STRCONN_NB_TOKENS; i++, curr += (strlen(curr) + 1)) { switch (i) { case 0: sprintf (cour, curr, dsn?dsn:""); cour += (strlen(cour) + 1); break; case 1: sprintf (cour, curr, comment?comment:""); cour += (strlen(cour) + 1); break; } } for (i = 0; i < dlg.Attrs_list.count; i++) { int alen = 0; NSDictionary *row = [dlg.Attrs_list objectAtIndex:i]; NSString *nskey = (NSString*)[row valueForKey:@"key"]; if ([nskey isEqualToString:@"..."] || nskey.length==0) continue; key = (char*)conv_NSString_to_char(nskey); alen += key ? strlen(key) : 0; val = (char*)conv_NSString_to_char((NSString*)[row valueForKey:@"val"]); alen += val ? strlen(val) : 0; cour = connstr; connstr = (char*) malloc (size + alen + 2); if (connstr) { memcpy (connstr, cour, size); sprintf (connstr + size - 1, "%s=%s", key?key:"", val?val:""); free (cour); size += alen + 2; } else connstr = cour; if (key!=NULL) free(key); if (val!=NULL) free(val); } connstr[size - 1] = '\0'; if (dsn!=NULL) free(dsn); if (comment!=NULL) free(comment); } } [dlg release]; return connstr; } } #define MODE_ADD 1 #define MODE_VIEW 0 @interface IODBCadm_SetupController () @end @implementation IODBCadm_SetupController @synthesize Attrs_ArrController; @synthesize fld_DSN; @synthesize btn_Add; @synthesize chk_verify; @synthesize d_dsn, d_comment, _addEnabled; @synthesize Attrs_list=_Attrs_list; - (id)initWithAttrs:(const char*)attrs { self = [super initWithWindowNibName:@"IODBCadm_SetupController"]; if (self) { self.Attrs_list = [NSMutableArray arrayWithCapacity:16]; [self parse_attrs:attrs]; } return self; } - (void)dealloc { [d_dsn release]; [d_comment release]; [_Attrs_list release]; [super dealloc]; } - (id)initWithWindow:(NSWindow *)window { self = [super initWithWindow:window]; if (self) { // Initialization code here. } return self; } - (void)parse_attrs:(const char *)attrs { char *curr, *cour; for (curr = (char*) attrs; *curr; curr += (strlen(curr) + 1)) { if (!strncasecmp (curr, "Description=", strlen("Description="))) self.d_comment = conv_char_to_NSString(curr + strlen("Description=")); if (!strncasecmp (curr, "DSN=", strlen("DSN=")) || !strncasecmp (curr, "Driver=", strlen("Driver=")) || !strncasecmp (curr, "Description=", strlen("Description="))) continue; if ((cour = strchr (curr, '='))) { NSString *key, *val; *cour = '\0'; key = conv_char_to_NSString(curr); *cour = '='; val = conv_char_to_NSString(cour+1); [_Attrs_list addObject:[NSMutableDictionary dictionaryWithObjectsAndKeys:key!=nil?key:@"", @"key", val!=nil?val:@"", @"val", nil]]; } else{ [_Attrs_list addObject:[NSMutableDictionary dictionaryWithObjectsAndKeys:@"", @"key", @"", @"val", nil]]; } } } - (void)windowDidLoad { [super windowDidLoad]; _dialogCode = 0; _curMode = MODE_VIEW; [[self window] center]; // Center the window. if (d_dsn!=nil){ self.window.title = [NSString stringWithFormat:@"Setup of %@", d_dsn]; self.fld_DSN.stringValue = d_dsn; } if (!_addEnabled) [btn_Add setEnabled:NO]; } - (void)windowWillClose:(NSNotification*)notification { [NSApp stopModalWithCode:_dialogCode]; } - (IBAction)call_Ok:(id)sender { _dialogCode = 1; self.d_dsn = fld_DSN.stringValue; [self.window close]; } - (IBAction)call_Cancel:(id)sender { _dialogCode = 0; [self.window close]; } @end libiodbc-3.52.16/iodbcadm/mac/Base.lproj/0000775000175000017500000000000014424171430014743 500000000000000libiodbc-3.52.16/iodbcadm/mac/Base.lproj/IODBCadm_DSNmanageController.xib0000664000175000017500000063221214424170750022624 00000000000000 call_UserDSN_Config: call_UserDSN_Config: User Data Source Names create user-specific ODBC Data Names that resolve to Data Source connection information. This kind of Data Source Name is only visible to specific operating system user account. System Data Source Names create systems-wide ODBC Data Names that resolve to Data Source connection information. call_SysDSN_Config: call_SysDSN_Config: File Data Source Names enable you save your ODBC Data Source connection information to a file. The file in question could be local or mounted over network. call_Drv_Config: call_Drv_Config: <Not pooled> ODBC tracing allows you to create logs of the calls to ODBC drivers for use by support
personnel or to aid you in debugging your applications. Note: Log files can become
quite large and will impair performance. iODBC is an Open Source Driver Manager which is dual licensed
under LGPL and BSD licenses.
Please visit http://www.iodbc.org/ for more information. name desc drv name desc drv name icon name ver file date size drv timeout query name ver file date size libiodbc-3.52.16/iodbcadm/mac/Base.lproj/IODBCadm_DriverChooseDSNController.xib0000664000175000017500000005311014424170750023762 00000000000000 name ver file date size libiodbc-3.52.16/iodbcadm/mac/Base.lproj/IODBCadm_KeyValController.xib0000664000175000017500000004714114424170750022223 00000000000000 If you know the driver-specific keywords for this data source, you can type them and their values here. For more information on driver-specific keywords, please consult your ODBC driver documentation. ... ... key val libiodbc-3.52.16/iodbcadm/mac/Base.lproj/IODBCadm_DriverChooseFDSNController.xib0000664000175000017500000013157714424170750024106 00000000000000 When you click Finish, you will create the data source which you have just configured. The driver may prompt you more information. name ver file date size libiodbc-3.52.16/iodbcadm/mac/Base.lproj/IODBCadm_PoolConfigController.xib0000664000175000017500000003714114424170750023066 00000000000000 <Not pooled> libiodbc-3.52.16/iodbcadm/mac/Base.lproj/IODBCadm_SetupController.xib0000664000175000017500000005420214424170750022124 00000000000000 If you know the driver-specific keywords for this data source, you can type them and their values here. For more information on driver-specific keywords, please consult your ODBC driver documentation. ... ... key val libiodbc-3.52.16/iodbcadm/mac/Base.lproj/IODBCadm_DrvConfigController.xib0000664000175000017500000007701414424170750022713 00000000000000 ... ... key val libiodbc-3.52.16/iodbcadm/mac/Base.lproj/IODBCadm_DrvRemoveController.xib0000664000175000017500000002671614424170750022746 00000000000000 libiodbc-3.52.16/iodbcadm/mac/Base.lproj/IODBCadm_DSNchooserController.xib0000664000175000017500000027153714424170750023047 00000000000000 call_Ok: call_Ok: User Data Source Names create user-specific ODBC Data Names that resolve to Data Source connection information. This kind of Data Source Name is only visible to specific operating system user account. System Data Source Names create systems-wide ODBC Data Names that resolve to Data Source connection information. call_Ok: call_Ok: File Data Source Names enable you save your ODBC Data Source connection information to a file. The file in question could be local or mounted over network. name desc drv name desc drv name icon libiodbc-3.52.16/iodbcadm/mac/IODBCadm_DriverChooseFDSNController.m0000664000175000017500000003076514424170750021556 00000000000000/* * IODBCadm_DriverChooseFDSNController.m * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import "IODBCadm_DriverChooseFDSNController.h" #import "IODBCadm_KeyValController.h" #import "utils.h" #import "Helpers.h" static char* showKeyVal(NSWindow *mainWin, char* attrs, BOOL *verify_conn); void create_fdriverchooser (HWND hwnd, TFDRIVERCHOOSER * choose_t) { choose_t->attrs = NULL; choose_t->verify_conn = TRUE; choose_t->driver = NULL; choose_t->dsn = NULL; choose_t->ok = FALSE; if (hwnd == NULL) return; @autoreleasepool { NSApplication *app = [NSApplication sharedApplication]; IODBCadm_DriverChooseFDSNController *dlg = [[IODBCadm_DriverChooseFDSNController alloc] init]; if (choose_t && choose_t->curr_dir) dlg.fdsn_dir = [NSString stringWithUTF8String:choose_t->curr_dir]; NSInteger rc = [app runModalForWindow:dlg.window]; if (choose_t) { choose_t->attrs = NULL; choose_t->verify_conn = TRUE; choose_t->driver = NULL; choose_t->dsn = NULL; choose_t->ok = FALSE; if (rc == 1) { NSArray *item = [dlg.Drv_ArrController selectedObjects]; if (item!=nil && item.count>0){ NSDictionary *dict = [item objectAtIndex:0]; choose_t->driver = conv_NSString_to_wchar([dict valueForKey:@"name"]); } NSString *fdsn = dlg.fld_FDSN.stringValue; NSCharacterSet *set = [NSCharacterSet characterSetWithCharactersInString:@"/"]; if ([fdsn rangeOfCharacterFromSet:set].location == NSNotFound) choose_t->dsn = strdup([[NSString stringWithFormat:@"%@/%@", dlg.fdsn_dir, fdsn] UTF8String]); else choose_t->dsn = strdup(fdsn.UTF8String); choose_t->attrs = dlg.attrs; dlg.attrs = NULL; choose_t->ok = TRUE; } } [dlg.window orderOut:dlg.window]; [dlg release]; } } static char* showKeyVal(NSWindow *mainWin, char* attrs, BOOL *verify_conn) { char *connstr = NULL; @autoreleasepool { IODBCadm_KeyValController *dlg = [[IODBCadm_KeyValController alloc] initWithAttrs:attrs]; NSInteger rc = [NSApp runModalForWindow:dlg.window]; [dlg.window orderOut:dlg.window]; if (rc == 1){ char *cour; int i = 0, size = 1; char *val,*key; /* Malloc it */ if ((connstr = (char *) calloc(sizeof(char), 2))) { for (i = 0; i < dlg.Attrs_list.count; i++) { int alen = 0; NSDictionary *row = [dlg.Attrs_list objectAtIndex:i]; key = (char*)conv_NSString_to_char((NSString*)[row valueForKey:@"key"]); alen += key ? strlen(key) : 0; val = (char*)conv_NSString_to_char((NSString*)[row valueForKey:@"val"]); alen += val ? strlen(val) : 0; cour = connstr; connstr = (char*) malloc (size + alen + 2); if (connstr) { memcpy (connstr, cour, size); sprintf (connstr + size - 1, "%s=%s", key?key:"", val?val:""); free (cour); size += alen + 2; } else connstr = cour; if (key!=NULL) free(key); if (val!=NULL) free(val); } connstr[size - 1] = '\0'; } if (verify_conn) *verify_conn = (dlg.chk_Verify.state == NSOnState); } [dlg release]; return connstr; } } @interface IODBCadm_DriverChooseFDSNController () @end @implementation IODBCadm_DriverChooseFDSNController @synthesize Drv_ArrController = _Drv_ArrController; @synthesize Results_ArrController = _Results_ArrController; @synthesize btn_Continue = _btn_Continue; @synthesize tab_view = _tab_view; @synthesize btn_Back = _btn_Back; @synthesize fld_FDSN = _fld_FDSN; @synthesize Drv_list=_Drv_list; @synthesize Results_list=_Results_list; @synthesize fdsn_dir=_fdsn_dir; @synthesize attrs=_attrs; - (id)init { self = [super initWithWindowNibName:@"IODBCadm_DriverChooseFDSNController"]; if (self) { self.Drv_list = [NSMutableArray arrayWithCapacity:16]; self.Results_list = [NSMutableArray arrayWithCapacity:16]; _verify_conn = TRUE; _attrs = calloc(sizeof(char), 2); } return self; } - (void)dealloc { [_Drv_list release]; [_Results_list release]; if (_attrs) free(_attrs); [super dealloc]; } - (id)initWithWindow:(NSWindow *)window { self = [super initWithWindow:window]; if (self) { // Initialization code here. } return self; } - (void)windowDidLoad { [super windowDidLoad]; _dialogCode = 0; [[self window] center]; // Center the window. addDrivers_to_list(_Drv_ArrController); } - (void)windowWillClose:(NSNotification*)notification { [NSApp stopModalWithCode:_dialogCode]; } - (void) updateResArray { NSString *fdsn = _fld_FDSN.stringValue; [_Results_ArrController removeObjects:[_Results_ArrController arrangedObjects]]; [_Results_ArrController addObject:@"File Data Source:"]; NSCharacterSet *set = [NSCharacterSet characterSetWithCharactersInString:@"/"]; if ([fdsn rangeOfCharacterFromSet:set].location == NSNotFound) [_Results_ArrController addObject:[NSString stringWithFormat:@"Filename: %@/%@", _fdsn_dir, fdsn]]; else [_Results_ArrController addObject:[NSString stringWithFormat:@"Filename: %@", fdsn]]; NSArray *item = [_Drv_ArrController selectedObjects]; if (item!=nil && item.count>0){ NSDictionary *dict = [item objectAtIndex:0]; [_Results_ArrController addObject:[NSString stringWithFormat:@"Driver: %@", [dict valueForKey:@"name"]]]; } [_Results_ArrController addObject:@"Driver-specific Keywords:"]; if (_attrs){ char *curr; for (curr = _attrs; *curr; curr += (strlen (curr) + 1)) { if (!strncasecmp (curr, "PWD=", strlen ("PWD="))) { continue; } [_Results_ArrController addObject:conv_char_to_NSString(curr)]; } } } /** NSTabViewDelegate **/ - (void)tabView:(NSTabView *)tabView didSelectTabViewItem:(NSTabViewItem *)tabViewItem { NSString *identifier = [tabViewItem identifier]; if ([identifier isEqualToString:@"drv"]){ [_btn_Back setEnabled:FALSE]; [_btn_Continue setTitle:@"Continue"]; } else if ([identifier isEqualToString:@"name"]){ [_btn_Back setEnabled:TRUE]; [_btn_Continue setTitle:@"Continue"]; } else if ([identifier isEqualToString:@"res"]){ [_btn_Back setEnabled:TRUE]; [_btn_Continue setTitle:@"Finish"]; [self updateResArray]; } } - (BOOL)tabView:(NSTabView *)tabView shouldSelectTabViewItem:(NSTabViewItem *)tabViewItem { NSString *identifier = [tabViewItem identifier]; if ([identifier isEqualToString:@"res"]){ if (_fld_FDSN.stringValue.length==0){ NSRunAlertPanel(@"Enter File DSN Name...", @"", @"OK", nil, nil); return FALSE; } } else if ([identifier isEqualToString:@"name"]){ NSArray *item = [_Drv_ArrController selectedObjects]; if (item==nil && item.count==0){ NSRunAlertPanel(@"Driver wasn't selected!", @"", @"OK", nil, nil); return FALSE; } } return TRUE; } - (IBAction)call_Cancel:(id)sender { _dialogCode = 0; [self.window close]; } - (IBAction)call_Continue:(id)sender { NSString *ident = _tab_view.selectedTabViewItem.identifier; if ([ident isEqualToString:@"res"]) { _dialogCode = 1; [self.window close]; } else if ([ident isEqualToString:@"name"]) { if (_fld_FDSN.stringValue.length==0) NSRunAlertPanel(@"Enter File DSN Name...", @"", @"OK", nil, nil); else [_tab_view selectNextTabViewItem:self]; } else { [_tab_view selectNextTabViewItem:self]; } } - (IBAction)call_Back:(id)sender { NSString *ident = _tab_view.selectedTabViewItem.identifier; if (![ident isEqualToString:@"drv"]) { [_tab_view selectPreviousTabViewItem:self]; } } - (IBAction)call_Advanced:(id)sender { char *connstr = showKeyVal(self.window, _attrs, &_verify_conn); if (connstr) { if (_attrs) free(_attrs); _attrs = connstr; } [self.window makeKeyAndOrderFront:self.window]; } - (IBAction)call_Browse:(id)sender { NSSavePanel *panel = [NSSavePanel savePanel]; [panel setTitle:@"Save as ..."]; [panel setNameFieldStringValue:@"xxx.dsn"]; [panel setDirectoryURL:[NSURL fileURLWithPath:_fdsn_dir isDirectory:TRUE]]; NSInteger rc = [panel runModal]; if (rc==NSFileHandlingPanelOKButton){ NSURL *dirURL = [panel directoryURL]; [_fld_FDSN setStringValue:[NSString stringWithFormat:@"%@/%@", dirURL.path, panel.nameFieldStringValue]]; } [self.window makeKeyAndOrderFront:self.window]; } @end libiodbc-3.52.16/iodbcadm/mac/utils.m0000664000175000017500000002176114424170750014215 00000000000000/* * utils.m * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import "utils.h" #import #define OPL_W2A(XW, XA, SIZE) wcstombs((char *) XA, (wchar_t *) XW, SIZE) #define OPL_A2W(XA, XW, SIZE) mbstowcs((wchar_t *) XW, (char *) XA, SIZE) static char *str_W2A (const wchar_t *inStr) { char *outStr = NULL; size_t len; if (inStr == NULL) return NULL; len = wcslen (inStr); if ((outStr = (char *) malloc (len*4 + 1)) != NULL) /* for multi-byte encodings */ { if (len > 0) OPL_W2A (inStr, outStr, len); outStr[len] = '\0'; } return outStr; } static wchar_t* str_A2W (const char *inStr) { wchar_t *outStr = NULL; size_t len; if (inStr == NULL) return NULL; len = strlen (inStr); if ((outStr = (wchar_t*) calloc (len + 1, sizeof (wchar_t))) != NULL) { if (len > 0) OPL_A2W (inStr, outStr, len); outStr[len] = L'\0'; } return outStr; } NSString* conv_wchar_to_NSString(const wchar_t* str) { if (!str) return nil; int num = 1; if(*(char *)&num == 1) return [[[NSString alloc] initWithBytes:str length:wcslen(str)*sizeof(wchar_t) encoding:NSUTF32LittleEndianStringEncoding] autorelease]; else return [[[NSString alloc] initWithBytes:str length:wcslen(str)*sizeof(wchar_t) encoding:NSUTF32BigEndianStringEncoding] autorelease]; } #if OLD_1 NSString* conv_wchar_to_NSString(const wchar_t* str) { if (!str) return nil; CFMutableStringRef prov = CFStringCreateMutable(NULL, 0); CFIndex i; UniChar c; if(prov) { for(i = 0 ; str[i] != L'\0' ; i++) { c = (UniChar)str[i]; CFStringAppendCharacters(prov, &c, 1); } } return (NSString*)prov; } #endif wchar_t* conv_NSString_to_wchar(NSString* str) { if (str == nil) return NULL; int len = str.length; wchar_t *prov = malloc(sizeof(wchar_t) * (len+1)); CFIndex i; if(prov) { for(i = 0 ; i * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include void create_translatorchooser (HWND hwnd, TTRANSLATORCHOOSER * choose_t) { //?? } libiodbc-3.52.16/iodbcadm/mac/IODBCadm_DSNmanageController.m0000664000175000017500000011007514424170750020275 00000000000000/* * IODBCadm_DSNmanageController.m * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import "IODBCadm_DSNmanageController.h" #import "utils.h" #import "Helpers.h" #import "IODBCadm_DriverChooseDSNController.h" #import "IODBCadm_PoolConfigController.h" #import "IODBCadm_DrvRemoveController.h" #import "IODBCadm_DrvConfigController.h" void create_administrator (HWND hwnd) { @autoreleasepool { NSApplication *app = [NSApplication sharedApplication]; IODBCadm_DSNmanageController *dlg = [[IODBCadm_DSNmanageController alloc] init]; [app runModalForWindow:dlg.window]; [dlg.window orderOut:dlg.window]; [dlg release]; } } static LPWSTR create_driversetupw (LPCWSTR driver, LPCWSTR attrs, BOOL add, BOOL user) { wchar_t *connstr = NULL; IODBCadm_DrvConfigController *dlg = [[IODBCadm_DrvConfigController alloc] initWithAttrs:attrs]; dlg.drv_name = conv_wchar_to_NSString(driver); dlg.add = add; NSInteger rc = [NSApp runModalForWindow:dlg.window]; if (rc == 1) { int i = 0, size = 0; wchar_t *cour, *prov; int STRCONN_NB_TOKENS = 3; size += (dlg.drv_name!=nil?dlg.drv_name.length:0) + 1; size += (dlg.drv_file!=nil?dlg.drv_file.length:0) + wcslen(L"Driver=") +1; size += (dlg.setup_file!=nil?dlg.setup_file.length:0) + wcslen(L"Setup=") +1; size += wcslen(dlg.rb_sysuser.selectedColumn==0?L"USR" : L"SYS") + 1; /* Malloc it */ if ((connstr = (wchar_t *) malloc (++size * sizeof(wchar_t)))) { wcscpy(connstr, (dlg.rb_sysuser.selectedColumn==0? L"USR" : L"SYS")); for (cour = connstr + 4; i < STRCONN_NB_TOKENS ; i++) { switch (i) { case 0: prov = conv_NSString_to_wchar(dlg.drv_name); if(prov) { wcscpy(cour, prov); free(prov); } break; case 1: prov = conv_NSString_to_wchar(dlg.drv_file); if(prov) { wcscpy(cour, L"Driver="); wcscat(cour, prov); free(prov); } break; case 2: prov = conv_NSString_to_wchar(dlg.setup_file); if(prov) { wcscpy(cour, L"Setup="); wcscat(cour, prov); free(prov); } break; }; cour += (wcslen (cour) + 1); } for (i = 0; i < dlg.Attrs_list.count; i++) { wchar_t *val,*key; int alen = 0; NSDictionary *row = [dlg.Attrs_list objectAtIndex:i]; NSString *nskey = (NSString*)[row valueForKey:@"key"]; if ([nskey isEqualToString:@"..."] || nskey.length==0) continue; key = conv_NSString_to_wchar(nskey); alen += key ? wcslen(key) : 0; val = conv_NSString_to_wchar((NSString*)[row valueForKey:@"val"]); alen += val ? wcslen(val) : 0; cour = connstr; connstr = (wchar_t*) malloc ((size + alen + 2) * sizeof(wchar_t)); if (connstr) { memcpy (connstr, cour, size*sizeof(wchar_t)); if (key) { wcscpy(connstr + size - 1, key); wcscat(connstr + size - 1, L"="); if (val) wcscat(connstr + size - 1, val); } free (cour); size += alen + 2; } else connstr = cour; if (key!=NULL) free(key); if (val!=NULL) free(val); } connstr[size - 1] = '\0'; } } [dlg.window orderOut:dlg.window]; [dlg release]; return connstr; } @interface IODBCadm_DSNmanageController () @end @implementation IODBCadm_DSNmanageController @synthesize fld_CustomTrace = _fld_CustomTrace; @synthesize fld_LogFilePath = _fld_LogFilePath; @synthesize rb_WhenToTrace = _rb_WhenToTrace; @synthesize rb_TraceWide = _rb_TraceWide; @synthesize fld_RetryWaitTime = _fld_RetryWaitTime; @synthesize pool_tableView = _pool_tableView; @synthesize rb_PerfMon = _rb_PerfMon; @synthesize popup_dir_btn = _popup_dir_btn; @synthesize fdsn_tableView = _fdsn_tableView; @synthesize tab_view = _tab_view; @synthesize FileDSN_ArrController = _FileDSN_ArrController; @synthesize SysDSN_ArrController = _SysDSN_ArrController; @synthesize UserDSN_ArrController = _UserDSN_ArrController; @synthesize Drv_ArrController = _Drv_ArrController; @synthesize Pool_ArrController = _Pool_ArrController; @synthesize About_ArrController = _About_ArrController; @synthesize FileDSN_list=_FileDSN_list; @synthesize cur_dir=_cur_dir; - (id)init { char tmp[1024] = {""}; self = [super initWithWindowNibName:@"IODBCadm_DSNmanageController"]; if (self) { self.FileDSN_list = [NSMutableArray arrayWithCapacity:16]; SQLSetConfigMode (ODBC_BOTH_DSN); if (!SQLGetPrivateProfileString("ODBC", "FileDSNPath", "", tmp, sizeof(tmp), "odbcinst.ini")) self.cur_dir = get_user_documents_dir(); else self.cur_dir = conv_char_to_NSString(tmp); } _tracing_changed = FALSE; _pool_changed = FALSE; _drivers_loaded = FALSE; return self; } - (void)dealloc { [_FileDSN_list release]; [_cur_dir release]; [super dealloc]; } - (id)initWithWindow:(NSWindow *)window { self = [super initWithWindow:window]; if (self) { // Initialization code here. } return self; } - (void)windowDidLoad { void *ptr; [super windowDidLoad]; _dialogCode = 0; [[self window] center]; // Center the window. self.window.title = #if defined (__x86_64__) @"iODBC Data Source Administrator (Intel 64bit)"; #elif defined (__aarch64__) @"iODBC Data Source Administrator (Apple Silicon)"; #elif defined (__i386__) @"iODBC Data Source Administrator (Intel 32bit)"; #else @"iODBC Data Source Administrator"; #endif addDSNs_to_list(FALSE, _UserDSN_ArrController); addDSNs_to_list(TRUE, _SysDSN_ArrController); [_fdsn_tableView setDoubleAction:@selector(call_FDSN_DoubleClick)]; addPools_to_list(_Pool_ArrController); [_pool_tableView setDoubleAction:@selector(call_Pool_DoubleClick)]; addComponents_to_list(_About_ArrController); } - (void)windowWillClose:(NSNotification*)notification { [NSApp stopModalWithCode:_dialogCode]; } - (void) call_FDSN_DoubleClick { NSInteger row = _fdsn_tableView.clickedRow; NSDictionary *dict = [_FileDSN_list objectAtIndex:row]; NSNumber *isdir = [dict valueForKey:@"isdir"]; if (isdir.boolValue==TRUE){ NSString *cliked_dir = [dict valueForKey:@"name"]; NSString *new_path = [NSString stringWithFormat:@"%@/%@", _cur_dir, cliked_dir]; self.cur_dir = new_path; wchar_t *path = conv_NSString_to_wchar(_cur_dir); addFDSNs_to_list(_cur_dir, FALSE, _FileDSN_ArrController); fill_dir_menu(path, _popup_dir_btn); if (path) free(path); } else { [self call_FileDSN_Config:self]; } } - (void) call_Pool_DoubleClick { NSArray *sarr = [_Pool_ArrController selectedObjects]; if (sarr.count>0) { NSDictionary *dct = [sarr objectAtIndex:0]; NSString *drv = [dct valueForKey:@"drv"]; NSString *tm = [dct valueForKey:@"timeout"]; NSString *qry = [dct valueForKey:@"query"]; IODBCadm_PoolConfigController *dlg = [[IODBCadm_PoolConfigController alloc] initWithTitle:drv Timeout:tm Query:qry]; NSInteger rc = [NSApp runModalForWindow:dlg.window]; if (rc == 1) { UWORD configMode; tm = [NSString stringWithFormat:@"CPTimeout=%@", dlg.ptimeout ? dlg.ptimeout :@""]; qry = [NSString stringWithFormat:@"CPProbe=%@", dlg.pquery ? dlg.pquery : @""]; wchar_t *wtimeout = conv_NSString_to_wchar(tm); wchar_t *wquery = conv_NSString_to_wchar(qry); wchar_t *wdrv = conv_NSString_to_wchar(drv); SQLGetConfigMode(&configMode); SQLSetConfigMode(ODBC_SYSTEM_DSN); if (wdrv) { if (wtimeout) { SQLSetConfigMode(ODBC_SYSTEM_DSN); if (!SQLConfigDriverW ((void*)1L, ODBC_CONFIG_DRIVER, wdrv, wtimeout, NULL, 0, NULL)) _iodbcdm_errorboxw ((void*)1L, wdrv, L"An error occurred when trying to set the connection pooling time-out "); free(wtimeout); } if (wquery) { SQLSetConfigMode(ODBC_SYSTEM_DSN); if (!SQLConfigDriverW ((void*)1L, ODBC_CONFIG_DRIVER, wdrv, wquery, NULL, 0, NULL)) _iodbcdm_errorboxw ((void*)1L, wdrv, L"An error occurred when trying to set the connection probe query "); } free(wdrv); } addPools_to_list(_Pool_ArrController); } [dlg.window orderOut:dlg.window]; [dlg release]; [self.window makeKeyAndOrderFront:self.window]; } } /** NSTabViewDelegate **/ - (void)tabView:(NSTabView *)tabView didSelectTabViewItem:(NSTabViewItem *)tabViewItem { char tmp[4096]; NSString *identifier = [tabViewItem identifier]; if ([identifier isEqualToString:@"userdsn"]){ addDSNs_to_list(FALSE, _UserDSN_ArrController); } else if ([identifier isEqualToString:@"sysdsn"]){ addDSNs_to_list(TRUE, _SysDSN_ArrController); } else if ([identifier isEqualToString:@"filedsn"]){ wchar_t *cur_path = conv_NSString_to_wchar(_cur_dir); addFDSNs_to_list(_cur_dir, FALSE, _FileDSN_ArrController); fill_dir_menu(cur_path, _popup_dir_btn); if (cur_path) free(cur_path); } else if ([identifier isEqualToString:@"drivers"]){ if (!_drivers_loaded) { addDrivers_to_list(_Drv_ArrController); _drivers_loaded = TRUE; } } else if ([identifier isEqualToString:@"pool"]){ if (!_pool_changed) { BOOL perfmon = FALSE; /* Get the connection pooling options */ SQLGetPrivateProfileString ("ODBC Connection Pooling", "Perfmon", "", (char *)tmp, sizeof (tmp), "odbcinst.ini"); if (!strcasecmp (tmp, "1") || !strcasecmp (tmp, "On")) perfmon = TRUE; SQLGetPrivateProfileString ("ODBC Connection Pooling", "Retry Wait", "", tmp, sizeof (tmp), "odbcinst.ini"); if (perfmon) [_rb_PerfMon selectCellAtRow:0 column:0]; else [_rb_PerfMon selectCellAtRow:1 column:0]; _fld_RetryWaitTime.stringValue = conv_char_to_NSString(tmp); _pool_changed = TRUE; } addPools_to_list(_Pool_ArrController); } else if ([identifier isEqualToString:@"trace"]){ wchar_t tokenstr[4096] = { L'\0' }, tokenstr1[4096] = { L'\0' }; BOOL trace = FALSE; BOOL traceauto = FALSE; if (!_tracing_changed) { int mode = ODBC_SYSTEM_DSN; /* Get the traces options */ SQLSetConfigMode (mode); SQLGetPrivateProfileStringW (L"ODBC", L"TraceFile", L"", tokenstr, sizeof (tokenstr) / sizeof(wchar_t), NULL); if (tokenstr[0] != L'\0') { /* All users wide */ [_rb_TraceWide selectCellAtRow:1 column:0]; } else { /* Only for current user */ mode = ODBC_USER_DSN; SQLSetConfigMode (mode); [_rb_TraceWide selectCellAtRow:0 column:0]; } SQLSetConfigMode (mode); SQLGetPrivateProfileString ("ODBC", "Trace", "", tmp, sizeof (tmp), NULL); if (!strcasecmp (tmp, "1") || !strcasecmp (tmp, "On")) trace = TRUE; SQLSetConfigMode (mode); SQLGetPrivateProfileString ("ODBC", "TraceAutoStop", "", (char*)tokenstr, sizeof (tokenstr), NULL); if (!strcasecmp ((char*)tokenstr, "1") || !strcasecmp ((char*)tokenstr, "On")) traceauto = TRUE; SQLSetConfigMode (mode); SQLGetPrivateProfileStringW (L"ODBC", L"TraceFile", L"", tokenstr, sizeof (tokenstr) / sizeof(wchar_t), NULL); SQLSetConfigMode (mode); SQLGetPrivateProfileStringW (L"ODBC", L"TraceDLL", L"", tokenstr1, sizeof (tokenstr1) / sizeof(wchar_t), NULL); /* Set the widgets */ if (trace) { if (!traceauto) [_rb_WhenToTrace selectCellAtRow:1 column:0]; else [_rb_WhenToTrace selectCellAtRow:2 column:0]; } else [_rb_WhenToTrace selectCellAtRow:0 column:0]; _fld_LogFilePath.stringValue = tokenstr[0] == L'\0' ? [NSString stringWithFormat:@"%@/sql.log", NSHomeDirectory()] : conv_wchar_to_NSString(tokenstr); _fld_CustomTrace.stringValue = conv_wchar_to_NSString(tokenstr1); _tracing_changed = TRUE; } } else if ([identifier isEqualToString:@"about"]){ addComponents_to_list(_About_ArrController); } } /** NSTableViewDelegate **/ - (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row { // Group our "model" object, which is a dictionary if (tableView == _fdsn_tableView) { NSDictionary *dict = [_FileDSN_list objectAtIndex:row]; NSString *identifier = [tableColumn identifier]; NSTableCellView *cellView = [tableView makeViewWithIdentifier:identifier owner:self]; // Then setup properties on the cellView based on the column cellView.textField.stringValue = [dict objectForKey:@"name"]; cellView.imageView.objectValue = [dict objectForKey:@"icon"]; return cellView; } return nil; } - (IBAction)call_Ok:(id)sender { _dialogCode = 1; if (_tracing_changed) [self call_Trace_Apply:nil]; if (_pool_changed) { UWORD configMode; char *tmp = NULL; SQLGetConfigMode(&configMode); /* Write keywords for tracing in the ini file */ SQLSetConfigMode(ODBC_SYSTEM_DSN); SQLWritePrivateProfileString ("ODBC Connection Pooling", "PerfMon", _rb_PerfMon.selectedRow == 0 ? "1" : "0", "odbcinst.ini"); tmp = conv_NSString_to_char(_fld_RetryWaitTime.stringValue); if (tmp) { SQLSetConfigMode(ODBC_SYSTEM_DSN); SQLWritePrivateProfileString ("ODBC Connection Pooling", "Retry Wait", tmp, "odbcinst.ini"); free(tmp); } SQLSetConfigMode(configMode); } [self.window close]; } - (IBAction)call_Cancel:(id)sender { _dialogCode = 0; [self.window close]; } - (IBAction)call_UserDSN_Add:(id)sender { wchar_t drv[1024] = { L'\0' }; int sqlstat; SQLSetConfigMode (ODBC_USER_DSN); /* Try first to get the driver name */ if (_iodbcdm_drvchoose_dialboxw ((void*)1L, drv, sizeof (drv) / sizeof(wchar_t), &sqlstat) == SQL_SUCCESS) { SQLSetConfigMode (ODBC_USER_DSN); if (!SQLConfigDataSourceW ((void*)1L, ODBC_ADD_DSN, drv + WCSLEN (L"DRIVER="), L"\0\0")) { _iodbcdm_errorboxw ((void*)1L, NULL, L"An error occurred when trying to add the DSN : "); goto done; } addDSNs_to_list(FALSE, _UserDSN_ArrController); } done: [self.window makeKeyAndOrderFront:self.window]; return; } - (IBAction)call_UserDSN_Remove:(id)sender { NSArray *item = [_UserDSN_ArrController selectedObjects]; if (item!=nil && item.count>0){ NSDictionary *dict = [item objectAtIndex:0]; BOOL rc = remove_dsn(FALSE, [dict valueForKey:@"name"], [dict valueForKey:@"drv"]); if (rc) addDSNs_to_list(FALSE, _UserDSN_ArrController); [self.window makeKeyAndOrderFront:self.window]; } } - (IBAction)call_UserDSN_Config:(id)sender { NSArray *item = [_UserDSN_ArrController selectedObjects]; if (item!=nil && item.count>0){ NSDictionary *dict = [item objectAtIndex:0]; BOOL rc = configure_dsn(FALSE, [dict valueForKey:@"name"], [dict valueForKey:@"drv"]); if (rc) addDSNs_to_list(FALSE, _UserDSN_ArrController); [self.window makeKeyAndOrderFront:self.window]; } } - (IBAction)call_UserDSN_Test:(id)sender { NSArray *item = [_UserDSN_ArrController selectedObjects]; if (item!=nil && item.count>0){ NSDictionary *dict = [item objectAtIndex:0]; test_dsn(FALSE, [dict valueForKey:@"name"], [dict valueForKey:@"drv"]); [self.window makeKeyAndOrderFront:self.window]; } } - (IBAction)call_SysDSN_Add:(id)sender { wchar_t drv[1024] = { L'\0' }; int sqlstat; SQLSetConfigMode (ODBC_USER_DSN); /* Try first to get the driver name */ if (_iodbcdm_drvchoose_dialboxw ((void*)1L, drv, sizeof (drv) / sizeof(wchar_t), &sqlstat) == SQL_SUCCESS) { SQLSetConfigMode (ODBC_USER_DSN); if (!SQLConfigDataSourceW ((void*)1L, ODBC_ADD_SYS_DSN, drv + WCSLEN (L"DRIVER="), L"\0\0")) { _iodbcdm_errorboxw ((void*)1L, NULL, L"An error occurred when trying to add the DSN : "); goto done; } addDSNs_to_list(TRUE, _SysDSN_ArrController); } done: [self.window makeKeyAndOrderFront:self.window]; return; } - (IBAction)call_SysDSN_Remove:(id)sender { NSArray *item = [_SysDSN_ArrController selectedObjects]; if (item!=nil && item.count>0){ NSDictionary *dict = [item objectAtIndex:0]; BOOL rc = remove_dsn(TRUE, [dict valueForKey:@"name"], [dict valueForKey:@"drv"]); if (rc) addDSNs_to_list(TRUE, _SysDSN_ArrController); [self.window makeKeyAndOrderFront:self.window]; } } - (IBAction)call_SysDSN_Config:(id)sender { NSArray *item = [_SysDSN_ArrController selectedObjects]; if (item!=nil && item.count>0){ NSDictionary *dict = [item objectAtIndex:0]; BOOL rc = configure_dsn(TRUE, [dict valueForKey:@"name"], [dict valueForKey:@"drv"]); if (rc) addDSNs_to_list(TRUE, _SysDSN_ArrController); [self.window makeKeyAndOrderFront:self.window]; } } - (IBAction)call_SysDSN_Test:(id)sender { NSArray *item = [_SysDSN_ArrController selectedObjects]; if (item!=nil && item.count>0){ NSDictionary *dict = [item objectAtIndex:0]; test_dsn(TRUE, [dict valueForKey:@"name"], [dict valueForKey:@"drv"]); [self.window makeKeyAndOrderFront:self.window]; } } - (IBAction)call_FileDSN_Dir_Browse:(id)sender { NSOpenPanel *panel = [NSOpenPanel openPanel]; [panel setTitle:@"Choose your File DSN directory ..."]; if (_cur_dir.length>0) [panel setDirectoryURL:[NSURL fileURLWithPath:_cur_dir isDirectory:TRUE]]; panel.allowsMultipleSelection = FALSE; panel.canChooseDirectories = TRUE; panel.canChooseFiles = FALSE; panel.canCreateDirectories = TRUE; NSInteger rc = [panel runModal]; if (rc==NSFileHandlingPanelOKButton) { self.cur_dir = ((NSURL*)[panel.URLs objectAtIndex:0]).path; wchar_t *path = conv_NSString_to_wchar(_cur_dir); addFDSNs_to_list(_cur_dir, FALSE, _FileDSN_ArrController); fill_dir_menu(path, _popup_dir_btn); if (path) free(path); } [self.window makeKeyAndOrderFront:self.window]; } - (IBAction)call_Dir_PopupBtn:(id)sender { self.cur_dir = _popup_dir_btn.titleOfSelectedItem; wchar_t *path = conv_NSString_to_wchar(_cur_dir); addFDSNs_to_list(_cur_dir, FALSE, _FileDSN_ArrController); fill_dir_menu(path, _popup_dir_btn); if (path) free(path); } - (IBAction)call_FileDSN_Add:(id)sender { BOOL rc = add_file_dsn(_cur_dir); if (rc) { wchar_t *cur_path = conv_NSString_to_wchar(_cur_dir); addFDSNs_to_list(_cur_dir, FALSE, _FileDSN_ArrController); fill_dir_menu(cur_path, _popup_dir_btn); if (cur_path) free(cur_path); } [self.window makeKeyAndOrderFront:self.window]; } - (IBAction)call_FileDSN_Remove:(id)sender { NSArray *item = [_FileDSN_ArrController selectedObjects]; if (item!=nil && item.count>0){ NSDictionary *dict = [item objectAtIndex:0]; NSNumber *isdir = [dict valueForKey:@"isdir"]; if (isdir.boolValue==FALSE){ BOOL rc = remove_file_dsn(_cur_dir, [dict valueForKey:@"name"]); if (rc){ wchar_t *cur_path = conv_NSString_to_wchar(_cur_dir); addFDSNs_to_list(_cur_dir, FALSE, _FileDSN_ArrController); fill_dir_menu(cur_path, _popup_dir_btn); if (cur_path) free(cur_path); } } [self.window makeKeyAndOrderFront:self.window]; } } - (IBAction)call_FileDSN_Config:(id)sender { NSArray *item = [_FileDSN_ArrController selectedObjects]; if (item!=nil && item.count>0){ NSDictionary *dict = [item objectAtIndex:0]; NSNumber *isdir = [dict valueForKey:@"isdir"]; if (isdir.boolValue==FALSE){ configure_file_dsn(_cur_dir, [dict valueForKey:@"name"]); char *cur_path = conv_NSString_to_char(_cur_dir); addFDSNs_to_list(_cur_dir, FALSE, _FileDSN_ArrController); if (cur_path) free(cur_path); } else { self.cur_dir = [NSString stringWithFormat:@"%@/%@", _cur_dir, [dict valueForKey:@"name"]]; wchar_t *path = conv_NSString_to_wchar(_cur_dir); addFDSNs_to_list(_cur_dir, FALSE, _FileDSN_ArrController); fill_dir_menu(path, _popup_dir_btn); if (path) free(path); } [self.window makeKeyAndOrderFront:self.window]; } } - (IBAction)call_FileDSN_Test:(id)sender { NSArray *item = [_FileDSN_ArrController selectedObjects]; if (item!=nil && item.count>0){ NSDictionary *dict = [item objectAtIndex:0]; NSNumber *isdir = [dict valueForKey:@"isdir"]; if (isdir.boolValue==FALSE){ test_file_dsn(_cur_dir, [dict valueForKey:@"name"]); } [self.window makeKeyAndOrderFront:self.window]; } } - (IBAction)call_FileDSN_SetDir:(id)sender { setdir_file_dsn(_cur_dir); [self.window makeKeyAndOrderFront:self.window]; } - (IBAction)call_Drv_Add:(id)sender { wchar_t connstr[4096] = { L'\0' }, tokenstr[4096] = { L'\0' }; wchar_t *cstr; cstr = (LPWSTR)create_driversetupw (NULL, (LPCWSTR)connstr, TRUE, TRUE); if (cstr && cstr != connstr && cstr != (LPWSTR)- 1L) { SQLSetConfigMode (!wcscmp(cstr, L"USR") ? ODBC_USER_DSN : ODBC_SYSTEM_DSN); if (!SQLInstallDriverExW (cstr + 4, NULL, tokenstr, sizeof (tokenstr) / sizeof(wchar_t), NULL, ODBC_INSTALL_COMPLETE, NULL)) { _iodbcdm_errorboxw ((void*)1L, NULL, L"An error occurred when trying to add the driver"); goto done; } free (cstr); } addDrivers_to_list(_Drv_ArrController); done: [self.window makeKeyAndOrderFront:self.window]; return; } - (IBAction)call_Drv_Remove:(id)sender { wchar_t tokenstr[4096] = { L'\0' }; NSArray *item = [_Drv_ArrController selectedObjects]; if (item!=nil && item.count>0){ int dsns = 0; NSDictionary *dict = [item objectAtIndex:0]; wchar_t *wdrv = conv_NSString_to_wchar([dict valueForKey:@"name"]); if (wdrv) { /* Initialize some values */ SQLSetConfigMode (ODBC_USER_DSN); if (SQLGetPrivateProfileStringW (wdrv, NULL, L"", tokenstr, sizeof (tokenstr)/sizeof(wchar_t), L"odbcinst.ini")) dsns |= 1; SQLSetConfigMode (ODBC_SYSTEM_DSN); if (SQLGetPrivateProfileStringW (wdrv, NULL, L"", tokenstr, sizeof (tokenstr)/sizeof(wchar_t), L"odbcinst.ini")) dsns |= 2; IODBCadm_DrvRemoveController *dlg = [[IODBCadm_DrvRemoveController alloc] initWithDSNS:dsns]; NSInteger rc = [NSApp runModalForWindow:dlg.window]; if (rc == 1) { if (create_confirmw ((void*)1L, wdrv, L"Are you sure you want to perform the removal of this driver ?")) { if ((dlg.dsns & 1) > 0) { SQLSetConfigMode (ODBC_USER_DSN); if (!SQLRemoveDriverW (wdrv, dlg.deletedsn, NULL)) { _iodbcdm_errorboxw ((void*)1L, wdrv, L"An error occurred when trying to remove the driver "); goto done; } } if ((dlg.dsns & 2) > 0) { SQLSetConfigMode (ODBC_SYSTEM_DSN); if (!SQLRemoveDriverW (wdrv, dlg.deletedsn, NULL)) { _iodbcdm_errorboxw ((void*)1L, wdrv, L"An error occurred when trying to remove the driver "); goto done; } } done: addDrivers_to_list(_Drv_ArrController); } } free(wdrv); [dlg.window orderOut:dlg.window]; [dlg release]; } [self.window makeKeyAndOrderFront:self.window]; } } - (IBAction)call_Drv_Config:(id)sender { wchar_t tokenstr[4096] = { L'\0' }; UWORD conf = ODBC_USER_DSN; NSArray *item = [_Drv_ArrController selectedObjects]; if (item!=nil && item.count>0){ NSDictionary *dict = [item objectAtIndex:0]; wchar_t *wdrv = conv_NSString_to_wchar([dict valueForKey:@"name"]); if (wdrv) { wchar_t *curr, *cour, *cstr; wchar_t connstr[4096] = { L'\0' }; int size = sizeof (connstr) / sizeof(wchar_t); SQLSetConfigMode (ODBC_USER_DSN); if (!SQLGetPrivateProfileStringW (wdrv, NULL, L"", tokenstr, sizeof (tokenstr) / sizeof(wchar_t), L"odbcinst.ini")) { SQLSetConfigMode (conf = ODBC_SYSTEM_DSN); if (!SQLGetPrivateProfileStringW (wdrv, NULL, L"", tokenstr, sizeof (tokenstr) / sizeof(wchar_t), L"odbcinst.ini")) { _iodbcdm_errorboxw ((void*)1L, wdrv, L"An error occurred when trying to configure the driver "); goto done; } } for (curr = tokenstr, cour = connstr; *curr != L'\0' ; curr += (wcslen (curr) + 1), cour += (wcslen(cour) + 1)) { wcscpy (cour, curr); cour[wcslen (curr)] = L'='; SQLSetConfigMode (conf); SQLGetPrivateProfileStringW (wdrv, curr, L"", cour + wcslen(curr) + 1, (int)(size - wcslen(curr) - 1), L"odbcinst.ini"); size -= (wcslen(cour) + 1); } *cour = L'\0'; cstr = (LPWSTR)create_driversetupw (wdrv, (LPCWSTR)connstr, FALSE, (conf == ODBC_SYSTEM_DSN) ? FALSE : TRUE); if (cstr && cstr != connstr && cstr != (LPWSTR) - 1L) { SQLSetConfigMode (conf); if (!SQLInstallDriverExW (cstr + 4, NULL, tokenstr, sizeof (tokenstr) / sizeof(wchar_t), NULL, ODBC_INSTALL_COMPLETE, NULL)) { _iodbcdm_errorboxw ((void*)1L, NULL, L"An error occurred when trying to configure the driver "); goto done; } free (cstr); } done: addDrivers_to_list(_Drv_ArrController); free(wdrv); } [self.window makeKeyAndOrderFront:self.window]; } } - (IBAction)call_Trace_Apply:(id)sender { int mode; wchar_t *tmp; /* Clear previous setting */ SQLSetConfigMode (ODBC_USER_DSN); SQLWritePrivateProfileString ("ODBC", "Trace", NULL, NULL); SQLSetConfigMode (ODBC_USER_DSN); SQLWritePrivateProfileString ("ODBC", "TraceAutoStop", NULL, NULL); SQLSetConfigMode (ODBC_USER_DSN); SQLWritePrivateProfileString ("ODBC", "TraceFile", NULL, NULL); SQLSetConfigMode (ODBC_USER_DSN); SQLWritePrivateProfileString ("ODBC", "TraceDLL", NULL, NULL); SQLSetConfigMode (ODBC_SYSTEM_DSN); SQLWritePrivateProfileString ("ODBC", "Trace", NULL, NULL); SQLSetConfigMode (ODBC_SYSTEM_DSN); SQLWritePrivateProfileString ("ODBC", "TraceAutoStop", NULL, NULL); SQLSetConfigMode (ODBC_SYSTEM_DSN); SQLWritePrivateProfileString ("ODBC", "TraceFile", NULL, NULL); SQLSetConfigMode (ODBC_SYSTEM_DSN); SQLWritePrivateProfileString ("ODBC", "TraceDLL", NULL, NULL); mode = _rb_TraceWide.selectedRow == 0 ? ODBC_USER_DSN : ODBC_SYSTEM_DSN; /* Write keywords for tracing in the ini file */ SQLSetConfigMode(mode); if (_rb_WhenToTrace.selectedRow == 1 || _rb_WhenToTrace.selectedRow == 2) SQLWritePrivateProfileString ("ODBC", "Trace", "1", NULL); else SQLWritePrivateProfileString ("ODBC", "Trace", "0", NULL); SQLSetConfigMode(mode); if (_rb_WhenToTrace.selectedRow == 2) SQLWritePrivateProfileString ("ODBC", "TraceAutoStop", "1", NULL); else SQLWritePrivateProfileString ("ODBC", "TraceAutoStop", "0", NULL); tmp = conv_NSString_to_wchar(_fld_LogFilePath.stringValue); if (tmp) { SQLSetConfigMode(mode); SQLWritePrivateProfileStringW (L"ODBC", L"TraceFile", tmp, NULL); free(tmp); } tmp = conv_NSString_to_wchar(_fld_CustomTrace.stringValue); if (tmp) { SQLSetConfigMode(mode); SQLWritePrivateProfileStringW (L"ODBC", L"TraceDLL", tmp, NULL); free(tmp); } } - (IBAction)call_LogFilePath_Browse:(id)sender { NSSavePanel *panel = [NSSavePanel savePanel]; NSURL *file_url = [NSURL fileURLWithPath:_fld_LogFilePath.stringValue]; NSString *fpath = file_url.path; NSString *fname = file_url.lastPathComponent; NSString *dir = [fpath substringToIndex:(fpath.length - fname.length)]; [panel setTitle:@"Choose your trace file ..."]; [panel setNameFieldStringValue:fname]; [panel setDirectoryURL:[NSURL fileURLWithPath:dir isDirectory:TRUE]]; NSInteger rc = [panel runModal]; if (rc==NSFileHandlingPanelOKButton) [_fld_LogFilePath setStringValue:[NSString stringWithFormat:@"%@/%@", panel.directoryURL.path, panel.nameFieldStringValue]]; [self.window makeKeyAndOrderFront:self.window]; } - (IBAction)call_CustomTrace_Browse:(id)sender { NSOpenPanel *panel = [NSOpenPanel openPanel]; NSURL *file_url = [NSURL fileURLWithPath:_fld_CustomTrace.stringValue]; NSString *fpath = file_url.path; NSString *fname = file_url.lastPathComponent; NSString *dir = [fpath substringToIndex:(fpath.length - fname.length)]; [panel setTitle:@"Choose your trace library ..."]; [panel setNameFieldStringValue:(fname.length>0)? fname: @"ODBC Trace Library"]; if (dir.length>0) [panel setDirectoryURL:[NSURL fileURLWithPath:dir isDirectory:TRUE]]; panel.allowsMultipleSelection = FALSE; panel.canChooseDirectories = FALSE; NSInteger rc = [panel runModal]; if (rc==NSFileHandlingPanelOKButton) [_fld_CustomTrace setStringValue: ((NSURL*)[panel.URLs objectAtIndex:0]).path]; [self.window makeKeyAndOrderFront:self.window]; } @end libiodbc-3.52.16/iodbcadm/mac/IODBCadm_DSNchooserController.m0000664000175000017500000004163114424170750020510 00000000000000/* * IODBCadm_DSNchooserController.m * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import "IODBCadm_DSNchooserController.h" #import "utils.h" #import "Helpers.h" void create_dsnchooser (HWND hwnd, TDSNCHOOSER * dsnchoose_t) { if (hwnd == NULL) return; @autoreleasepool { NSApplication *app = [NSApplication sharedApplication]; IODBCadm_DSNchooserController *dlg = [[IODBCadm_DSNchooserController alloc] init]; NSInteger rc = [app runModalForWindow:dlg.window]; if (dsnchoose_t) { dsnchoose_t->dsn = NULL; dsnchoose_t->fdsn = NULL; dsnchoose_t->type_dsn = -1; if (rc == 1) { if ([dlg.type_dsn isEqualToString:@"userdsn"]) { NSArray *item = [dlg.UserDSN_ArrController selectedObjects]; if (item!=nil && item.count>0){ NSDictionary *dict = [item objectAtIndex:0]; dsnchoose_t->type_dsn = USER_DSN; dsnchoose_t->dsn = conv_NSString_to_wchar([dict valueForKey:@"name"]); } } else if ([dlg.type_dsn isEqualToString:@"sysdsn"]) { NSArray *item = [dlg.SysDSN_ArrController selectedObjects]; if (item!=nil && item.count>0){ NSDictionary *dict = [item objectAtIndex:0]; dsnchoose_t->type_dsn = SYSTEM_DSN; dsnchoose_t->dsn = conv_NSString_to_wchar([dict valueForKey:@"name"]); } } else if ([dlg.type_dsn isEqualToString:@"filedsn"]) { NSArray *item = [dlg.FileDSN_ArrController selectedObjects]; if (item!=nil && item.count>0){ NSDictionary *dict = [item objectAtIndex:0]; dsnchoose_t->type_dsn = FILE_DSN; NSString *fdsn = [NSString stringWithFormat:@"%@/%@", dlg.cur_dir, [dict valueForKey:@"name"]]; dsnchoose_t->fdsn = conv_NSString_to_wchar(fdsn); } } } } [dlg.window orderOut:dlg.window]; [dlg release]; } } @interface IODBCadm_DSNchooserController () @end @implementation IODBCadm_DSNchooserController @synthesize popup_dir_btn = _popup_dir_btn; @synthesize fdsn_tableView = _fdsn_tableView; @synthesize tab_view = _tab_view; @synthesize FileDSN_ArrController = _FileDSN_ArrController; @synthesize SysDSN_ArrController = _SysDSN_ArrController; @synthesize UserDSN_ArrController = _UserDSN_ArrController; @synthesize UserDSN_list=_UserDSN_list; @synthesize SysDSN_list=_SysDSN_list; @synthesize FileDSN_list=_FileDSN_list; @synthesize cur_dir=_cur_dir; @synthesize type_dsn = _type_dsn; - (id)init { char tmp[1024] = {""}; self = [super initWithWindowNibName:@"IODBCadm_DSNchooserController"]; if (self) { self.UserDSN_list = [NSMutableArray arrayWithCapacity:16]; self.SysDSN_list = [NSMutableArray arrayWithCapacity:16]; self.FileDSN_list = [NSMutableArray arrayWithCapacity:16]; SQLSetConfigMode (ODBC_BOTH_DSN); if (!SQLGetPrivateProfileString("ODBC", "FileDSNPath", "", tmp, sizeof(tmp), "odbcinst.ini")) self.cur_dir = get_user_documents_dir(); else self.cur_dir = conv_char_to_NSString(tmp); } return self; } - (void)dealloc { [_UserDSN_list release]; [_SysDSN_list release]; [_FileDSN_list release]; [_type_dsn release]; [_cur_dir release]; [super dealloc]; } - (id)initWithWindow:(NSWindow *)window { self = [super initWithWindow:window]; if (self) { // Initialization code here. } return self; } - (void)windowDidLoad { [super windowDidLoad]; _dialogCode = 0; [[self window] center]; // Center the window. addDSNs_to_list(FALSE, _UserDSN_ArrController); addDSNs_to_list(TRUE, _SysDSN_ArrController); [_fdsn_tableView setDoubleAction:@selector(call_FDSN_DoubleClick)]; self.type_dsn = @"userdsn"; } - (void)windowWillClose:(NSNotification*)notification { [NSApp stopModalWithCode:_dialogCode]; } - (void) call_FDSN_DoubleClick { NSInteger row = _fdsn_tableView.clickedRow; NSDictionary *dict = [_FileDSN_list objectAtIndex:row]; NSNumber *isdir = [dict valueForKey:@"isdir"]; if (isdir.boolValue==TRUE){ NSString *cliked_dir = [dict valueForKey:@"name"]; NSString *new_path = [NSString stringWithFormat:@"%@/%@", _cur_dir, cliked_dir]; self.cur_dir = new_path; wchar_t *path = conv_NSString_to_wchar(_cur_dir); addFDSNs_to_list(_cur_dir, FALSE, _FileDSN_ArrController); fill_dir_menu(path, _popup_dir_btn); if (path) free(path); } else { [self call_Ok:self]; } } /** NSTabViewDelegate **/ - (void)tabView:(NSTabView *)tabView didSelectTabViewItem:(NSTabViewItem *)tabViewItem { NSString *identifier = [tabViewItem identifier]; self.type_dsn = identifier; if ([identifier isEqualToString:@"userdsn"]){ addDSNs_to_list(FALSE, _UserDSN_ArrController); } else if ([identifier isEqualToString:@"sysdsn"]){ addDSNs_to_list(TRUE, _SysDSN_ArrController); } else if ([identifier isEqualToString:@"filedsn"]){ wchar_t *cur_path = conv_NSString_to_wchar(_cur_dir); addFDSNs_to_list(_cur_dir, FALSE, _FileDSN_ArrController); fill_dir_menu(cur_path, _popup_dir_btn); if (cur_path) free(cur_path); } } /** NSTableViewDelegate **/ - (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row { // Group our "model" object, which is a dictionary if (tableView == _fdsn_tableView) { NSDictionary *dict = [_FileDSN_list objectAtIndex:row]; NSString *identifier = [tableColumn identifier]; NSTableCellView *cellView = [tableView makeViewWithIdentifier:identifier owner:self]; // Then setup properties on the cellView based on the column cellView.textField.stringValue = [dict objectForKey:@"name"]; cellView.imageView.objectValue = [dict objectForKey:@"icon"]; return cellView; } return nil; } - (IBAction)call_Ok:(id)sender { _dialogCode = 1; [self.window close]; } - (IBAction)call_Cancel:(id)sender { _dialogCode = 0; [self.window close]; } - (IBAction)call_UserDSN_Add:(id)sender { wchar_t drv[1024] = { L'\0' }; int sqlstat; SQLSetConfigMode (ODBC_USER_DSN); /* Try first to get the driver name */ if (_iodbcdm_drvchoose_dialboxw ((void*)1L, drv, sizeof (drv) / sizeof(wchar_t), &sqlstat) == SQL_SUCCESS) { SQLSetConfigMode (ODBC_USER_DSN); if (!SQLConfigDataSourceW ((void*)1L, ODBC_ADD_DSN, drv + WCSLEN (L"DRIVER="), L"\0\0")) { _iodbcdm_errorboxw ((void*)1L, NULL, L"An error occurred when trying to add the DSN : "); goto done; } addDSNs_to_list(FALSE, _UserDSN_ArrController); } done: [self.window makeKeyAndOrderFront:self.window]; return; } - (IBAction)call_UserDSN_Remove:(id)sender { NSArray *item = [_UserDSN_ArrController selectedObjects]; if (item!=nil && item.count>0){ NSDictionary *dict = [item objectAtIndex:0]; BOOL rc = remove_dsn(FALSE, [dict valueForKey:@"name"], [dict valueForKey:@"drv"]); if (rc) addDSNs_to_list(FALSE, _UserDSN_ArrController); [self.window makeKeyAndOrderFront:self.window]; } } - (IBAction)call_UserDSN_Config:(id)sender { NSArray *item = [_UserDSN_ArrController selectedObjects]; if (item!=nil && item.count>0){ NSDictionary *dict = [item objectAtIndex:0]; BOOL rc = configure_dsn(FALSE, [dict valueForKey:@"name"], [dict valueForKey:@"drv"]); if (rc) addDSNs_to_list(FALSE, _UserDSN_ArrController); [self.window makeKeyAndOrderFront:self.window]; } } - (IBAction)call_UserDSN_Test:(id)sender { NSArray *item = [_UserDSN_ArrController selectedObjects]; if (item!=nil && item.count>0){ NSDictionary *dict = [item objectAtIndex:0]; test_dsn(FALSE, [dict valueForKey:@"name"], [dict valueForKey:@"drv"]); [self.window makeKeyAndOrderFront:self.window]; } } - (IBAction)call_SysDSN_Add:(id)sender { wchar_t drv[1024] = { L'\0' }; int sqlstat; SQLSetConfigMode (ODBC_USER_DSN); /* Try first to get the driver name */ if (_iodbcdm_drvchoose_dialboxw ((void*)1L, drv, sizeof (drv) / sizeof(wchar_t), &sqlstat) == SQL_SUCCESS) { SQLSetConfigMode (ODBC_USER_DSN); if (!SQLConfigDataSourceW ((void*)1L, ODBC_ADD_SYS_DSN, drv + WCSLEN (L"DRIVER="), L"\0\0")) { _iodbcdm_errorboxw ((void*)1L, NULL, L"An error occurred when trying to add the DSN : "); goto done; } addDSNs_to_list(TRUE, _SysDSN_ArrController); } done: [self.window makeKeyAndOrderFront:self.window]; return; } - (IBAction)call_SysDSN_Remove:(id)sender { NSArray *item = [_SysDSN_ArrController selectedObjects]; if (item!=nil && item.count>0){ NSDictionary *dict = [item objectAtIndex:0]; BOOL rc = remove_dsn(TRUE, [dict valueForKey:@"name"], [dict valueForKey:@"drv"]); if (rc) addDSNs_to_list(TRUE, _SysDSN_ArrController); [self.window makeKeyAndOrderFront:self.window]; } } - (IBAction)call_SysDSN_Config:(id)sender { NSArray *item = [_SysDSN_ArrController selectedObjects]; if (item!=nil && item.count>0){ NSDictionary *dict = [item objectAtIndex:0]; BOOL rc = configure_dsn(TRUE, [dict valueForKey:@"name"], [dict valueForKey:@"drv"]); if (rc) addDSNs_to_list(TRUE, _SysDSN_ArrController); [self.window makeKeyAndOrderFront:self.window]; } } - (IBAction)call_SysDSN_Test:(id)sender { NSArray *item = [_SysDSN_ArrController selectedObjects]; if (item!=nil && item.count>0){ NSDictionary *dict = [item objectAtIndex:0]; test_dsn(TRUE, [dict valueForKey:@"name"], [dict valueForKey:@"drv"]); [self.window makeKeyAndOrderFront:self.window]; } } - (IBAction)call_FileDSN_Dir_Browse:(id)sender { NSOpenPanel *panel = [NSOpenPanel openPanel]; [panel setTitle:@"Choose your File DSN directory ..."]; if (_cur_dir.length>0) [panel setDirectoryURL:[NSURL fileURLWithPath:_cur_dir isDirectory:TRUE]]; panel.allowsMultipleSelection = FALSE; panel.canChooseDirectories = TRUE; panel.canChooseFiles = FALSE; panel.canCreateDirectories = TRUE; NSInteger rc = [panel runModal]; if (rc==NSFileHandlingPanelOKButton) { self.cur_dir = ((NSURL*)[panel.URLs objectAtIndex:0]).path; wchar_t *path = conv_NSString_to_wchar(_cur_dir); addFDSNs_to_list(_cur_dir, FALSE, _FileDSN_ArrController); fill_dir_menu(path, _popup_dir_btn); if (path) free(path); } [self.window makeKeyAndOrderFront:self.window]; } - (IBAction)call_Dir_PopupBtn:(id)sender { self.cur_dir = _popup_dir_btn.titleOfSelectedItem; wchar_t *path = conv_NSString_to_wchar(_cur_dir); addFDSNs_to_list(_cur_dir, FALSE, _FileDSN_ArrController); fill_dir_menu(path, _popup_dir_btn); if (path) free(path); } - (IBAction)call_FileDSN_Add:(id)sender { BOOL rc = add_file_dsn(_cur_dir); if (rc) { wchar_t *cur_path = conv_NSString_to_wchar(_cur_dir); addFDSNs_to_list(_cur_dir, FALSE, _FileDSN_ArrController); fill_dir_menu(cur_path, _popup_dir_btn); if (cur_path) free(cur_path); [self.window makeKeyAndOrderFront:self.window]; } } - (IBAction)call_FileDSN_Remove:(id)sender { NSArray *item = [_FileDSN_ArrController selectedObjects]; if (item!=nil && item.count>0){ NSDictionary *dict = [item objectAtIndex:0]; NSNumber *isdir = [dict valueForKey:@"isdir"]; if (isdir.boolValue==FALSE){ BOOL rc = remove_file_dsn(_cur_dir, [dict valueForKey:@"name"]); if (rc){ wchar_t *cur_path = conv_NSString_to_wchar(_cur_dir); addFDSNs_to_list(_cur_dir, FALSE, _FileDSN_ArrController); fill_dir_menu(cur_path, _popup_dir_btn); if (cur_path) free(cur_path); } } [self.window makeKeyAndOrderFront:self.window]; } } - (IBAction)call_FileDSN_Config:(id)sender { NSArray *item = [_FileDSN_ArrController selectedObjects]; if (item!=nil && item.count>0){ NSDictionary *dict = [item objectAtIndex:0]; NSNumber *isdir = [dict valueForKey:@"isdir"]; if (isdir.boolValue==FALSE){ configure_file_dsn(_cur_dir, [dict valueForKey:@"name"]); char *cur_path = conv_NSString_to_char(_cur_dir); addFDSNs_to_list(_cur_dir, FALSE, _FileDSN_ArrController); if (cur_path) free(cur_path); } else { self.cur_dir = [NSString stringWithFormat:@"%@/%@", _cur_dir, [dict valueForKey:@"name"]]; wchar_t *path = conv_NSString_to_wchar(_cur_dir); addFDSNs_to_list(_cur_dir, FALSE, _FileDSN_ArrController); fill_dir_menu(path, _popup_dir_btn); if (path) free(path); } [self.window makeKeyAndOrderFront:self.window]; } } - (IBAction)call_FileDSN_Test:(id)sender { NSArray *item = [_FileDSN_ArrController selectedObjects]; if (item!=nil && item.count>0){ NSDictionary *dict = [item objectAtIndex:0]; NSNumber *isdir = [dict valueForKey:@"isdir"]; if (isdir.boolValue==FALSE){ test_file_dsn(_cur_dir, [dict valueForKey:@"name"]); } [self.window makeKeyAndOrderFront:self.window]; } } - (IBAction)call_FileDSN_SetDir:(id)sender { setdir_file_dsn(_cur_dir); [self.window makeKeyAndOrderFront:self.window]; } @end libiodbc-3.52.16/iodbcadm/mac/IODBCadm_PoolConfigController.h0000664000175000017500000000742614424170750020537 00000000000000/* * IODBCadm_PoolConfigController.h * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import #import @interface IODBCadm_PoolConfigController : NSWindowController { int _dialogCode; NSBox *_g_box; NSString *_ptitle; NSString *_ptimeout; NSString *_pquery; } @property (assign) IBOutlet NSBox *g_box; @property (nonatomic, retain) NSString *ptitle; @property (nonatomic, retain) NSString *ptimeout; @property (nonatomic, retain) NSString *pquery; - (id)initWithTitle:(NSString *) title Timeout:(NSString *) timeout Query:(NSString *) query; - (IBAction)call_Cancel:(id)sender; - (IBAction)call_Ok:(id)sender; @end libiodbc-3.52.16/iodbcadm/mac/IODBCadm_SetupController.h0000664000175000017500000001022314424170750017565 00000000000000/* * IODBCadm_SetupController.h * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import #import //??--char* showSetup(char* dsn, char* attrs, BOOL addEnable, BOOL *verify_conn); @interface IODBCadm_SetupController : NSWindowController { NSTextField *fld_DSN; NSButton *btn_Add; NSButton *chk_verify; NSString *d_dsn; NSString *d_comment; int _dialogCode; int _curMode; BOOL _addEnabled; NSMutableArray *_Attrs_list; NSArrayController *Attrs_ArrController; } @property (assign) IBOutlet NSArrayController *Attrs_ArrController; @property (assign) IBOutlet NSTextField *fld_DSN; @property (assign) IBOutlet NSButton *btn_Add; @property (assign) IBOutlet NSButton *chk_verify; @property (nonatomic, retain) NSString *d_dsn; @property (nonatomic, retain) NSString *d_comment; @property (assign) BOOL _addEnabled; @property (nonatomic, retain) NSMutableArray *Attrs_list; - (id)initWithAttrs:(const char*)attrs; - (IBAction)call_Cancel:(id)sender; - (IBAction)call_Ok:(id)sender; @end libiodbc-3.52.16/iodbcadm/mac/IODBCadm_DriverChooseFDSNController.h0000664000175000017500000001061614424170750021542 00000000000000/* * IODBCadm_DriverChooseFDSNController.h * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import #import @interface IODBCadm_DriverChooseFDSNController : NSWindowController{ NSArrayController *_Drv_ArrController; NSArrayController *_Results_ArrController; NSButton *_btn_Continue; NSTabView *_tab_view; NSButton *_btn_Back; NSTextField *_fld_FDSN; int _dialogCode; NSMutableArray *_Drv_list; NSMutableArray *_Results_list; NSString *_fdsn_dir; BOOL _verify_conn; char *_attrs; } @property (assign) IBOutlet NSArrayController *Drv_ArrController; @property (assign) IBOutlet NSArrayController *Results_ArrController; @property (assign) IBOutlet NSButton *btn_Continue; @property (assign) IBOutlet NSTabView *tab_view; @property (assign) IBOutlet NSButton *btn_Back; @property (assign) IBOutlet NSTextField *fld_FDSN; @property (assign) char* attrs; @property (nonatomic, retain) NSMutableArray *Drv_list; @property (nonatomic, retain) NSMutableArray *Results_list; @property (nonatomic, retain) NSString *fdsn_dir; - (IBAction)call_Cancel:(id)sender; - (IBAction)call_Back:(id)sender; - (IBAction)call_Continue:(id)sender; - (IBAction)call_Advanced:(id)sender; - (IBAction)call_Browse:(id)sender; @end libiodbc-3.52.16/iodbcadm/mac/IODBCadm_DSNmanageController.h0000664000175000017500000001414014424170750020264 00000000000000/* * IODBCadm_DSNmanageController.h * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import #import @interface IODBCadm_DSNmanageController : NSWindowController { NSArrayController *_UserDSN_ArrController; NSArrayController *_Drv_ArrController; NSArrayController *_Pool_ArrController; NSArrayController *_About_ArrController; NSArrayController *_SysDSN_ArrController; NSArrayController *_FileDSN_ArrController; NSTabView *_tab_view; NSTableView *_fdsn_tableView; NSPopUpButton *_popup_dir_btn; int _dialogCode; BOOL _tracing_changed; BOOL _pool_changed; BOOL _drivers_loaded; NSMutableArray *_FileDSN_list; NSString *_cur_dir; NSTextField *_fld_RetryWaitTime; NSTableView *_pool_tableView; NSMatrix *_rb_PerfMon; NSTextField *_fld_LogFilePath; NSTextField *_fld_CustomTrace; NSMatrix *_rb_WhenToTrace; NSMatrix *_rb_TraceWide; } @property (assign) IBOutlet NSPopUpButton *popup_dir_btn; @property (assign) IBOutlet NSTableView *fdsn_tableView; @property (assign) IBOutlet NSTabView *tab_view; @property (assign) IBOutlet NSArrayController *FileDSN_ArrController; @property (assign) IBOutlet NSArrayController *SysDSN_ArrController; @property (assign) IBOutlet NSArrayController *UserDSN_ArrController; @property (assign) IBOutlet NSArrayController *Drv_ArrController; @property (assign) IBOutlet NSArrayController *Pool_ArrController; @property (assign) IBOutlet NSArrayController *About_ArrController; @property (nonatomic, retain) NSMutableArray *FileDSN_list; @property (nonatomic, retain) NSString *cur_dir; - (IBAction)call_UserDSN_Add:(id)sender; - (IBAction)call_UserDSN_Remove:(id)sender; - (IBAction)call_UserDSN_Config:(id)sender; - (IBAction)call_UserDSN_Test:(id)sender; - (IBAction)call_FileDSN_Dir_Browse:(id)sender; - (IBAction)call_SysDSN_Add:(id)sender; - (IBAction)call_SysDSN_Remove:(id)sender; - (IBAction)call_SysDSN_Config:(id)sender; - (IBAction)call_SysDSN_Test:(id)sender; - (IBAction)call_Dir_PopupBtn:(id)sender; - (IBAction)call_FileDSN_Add:(id)sender; - (IBAction)call_FileDSN_Remove:(id)sender; - (IBAction)call_FileDSN_Config:(id)sender; - (IBAction)call_FileDSN_Test:(id)sender; - (IBAction)call_FileDSN_SetDir:(id)sender; - (IBAction)call_Drv_Add:(id)sender; - (IBAction)call_Drv_Remove:(id)sender; - (IBAction)call_Drv_Config:(id)sender; @property (assign) IBOutlet NSTextField *fld_RetryWaitTime; @property (assign) IBOutlet NSTableView *pool_tableView; @property (assign) IBOutlet NSMatrix *rb_PerfMon; @property (assign) IBOutlet NSMatrix *rb_WhenToTrace; @property (assign) IBOutlet NSMatrix *rb_TraceWide; - (IBAction)call_Trace_Apply:(id)sender; @property (assign) IBOutlet NSTextField *fld_LogFilePath; - (IBAction)call_LogFilePath_Browse:(id)sender; @property (assign) IBOutlet NSTextField *fld_CustomTrace; - (IBAction)call_CustomTrace_Browse:(id)sender; - (IBAction)call_Cancel:(id)sender; - (IBAction)call_Ok:(id)sender; @end libiodbc-3.52.16/iodbcadm/mac/utils.h0000664000175000017500000000703214424170750014203 00000000000000/* * utils.h * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import #import #include #include NSString* conv_wchar_to_NSString(const wchar_t* str); wchar_t* conv_NSString_to_wchar(NSString* str); char* conv_NSString_to_char(NSString* str); NSString* conv_char_to_NSString(const char* str); NSString* conv_to_NSString(const void * str, char waMode); libiodbc-3.52.16/iodbcadm/mac/IODBCadm_DriverChooseDSNController.m0000664000175000017500000001230214424170750021433 00000000000000/* * IODBCadm_DriverChooseDSNController.m * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import "IODBCadm_DriverChooseDSNController.h" #import "utils.h" #import "Helpers.h" void create_driverchooser(HWND hwnd, TDRIVERCHOOSER * choose_t) { if (hwnd == NULL) return; @autoreleasepool { NSApplication *app = [NSApplication sharedApplication]; IODBCadm_DriverChooseDSNController *dlg = [[IODBCadm_DriverChooseDSNController alloc] init]; NSInteger rc = [app runModalForWindow:dlg.window]; if (choose_t) { choose_t->driver = NULL; if (rc == 1) { NSArray *item = [dlg.Drv_ArrayController selectedObjects]; if (item!=nil && item.count>0){ NSDictionary *dict = [item objectAtIndex:0]; choose_t->driver = conv_NSString_to_wchar([dict valueForKey:@"name"]); } } } [dlg.window orderOut:dlg.window]; [dlg release]; } } @interface IODBCadm_DriverChooseDSNController () @end @implementation IODBCadm_DriverChooseDSNController @synthesize Drv_ArrayController = _Drv_ArrayController; @synthesize Drv_list=_Drv_list; - (id)init { self = [super initWithWindowNibName:@"IODBCadm_DriverChooseDSNController"]; if (self) { self.Drv_list = [NSMutableArray arrayWithCapacity:16]; } return self; } - (void)dealloc { [_Drv_list release]; [super dealloc]; } - (id)initWithWindow:(NSWindow *)window { self = [super initWithWindow:window]; if (self) { // Initialization code here. } return self; } - (void)windowDidLoad { [super windowDidLoad]; _dialogCode = 0; [[self window] center]; // Center the window. addDrivers_to_list(_Drv_ArrayController); } - (void)windowWillClose:(NSNotification*)notification { [NSApp stopModalWithCode:_dialogCode]; } - (IBAction)call_Ok:(id)sender { _dialogCode = 1; [self.window close]; } - (IBAction)call_Cancel:(id)sender { _dialogCode = 0; [self.window close]; } @end libiodbc-3.52.16/iodbcadm/mac/odbc.png0000664000175000017500000000164014013216212014272 00000000000000PNG  IHDR((mgAMA a cHRMz&u0`:pQ< pHYsodtEXtSoftwarePaint.NET v3.5.5IIDATXG՘Kn@;< `eU!fˊmG .4G~PTUH,v>pۥd`$`^rXpܻsn.\{U#=ɏMQyk+~+U4V v̉xE"<8}sѤ\|r(VGJk{Q }NbL%aa?iQhJi: K{=szŔ {z?]_U >jݧU.)c`CS~ )~ę76i Ea$G R>9ȶQw#@/܋v$ᩔr)6zYQ¶KUǗr2[,kjAEM?H(Xzw8cpL=K% }Ѿ*TX7_ ٧UcYlJuƁBPS8# 7rUTۛ9'j/l}~G('+3N{Ug2s {ʑ_W>HͯfRI9ԗ-%/LTj[IENDB`libiodbc-3.52.16/iodbcadm/mac/confirm.png0000664000175000017500000000267314013216212015027 00000000000000PNG  IHDR&&=gAMA a cHRMz&u0`:pQ< pHYsodtEXtSoftwarePaint.NET v3.5.5I IDATXGXIH]IllIHȢBH/z7ٹt .%qYl,ڊ('8~Dћ{.>Wݐ˫_unտvԶ_5^dr{j?y=`Λ;݃R~lnn>][[@SSS4>>N###gcx9<5yk:~ (Ǭ&1~>[ZZrMLLPgg'Qoo/8moo?==M===*zXgl϶_FtSccd]nKoLa߮.Q~Mb֝o#ĖT VnZYYttxH"۵e# peBˮ_ 9証<AߩAgMMxr A>^dCާR\\: [ju X&0Wק_deeQll ja;oHg8›XW?SLL 6*** `0Gr I-*Ұa"@:::*|szz%166F"GRչ Abh @ND}x؍3"cLg-0 9x}ё@rr#l61G8QtEq0u8Ӫ4"JEYYh @H8+++%{{{ZDWul\RRB{|Q())I}E],_xOCi @PttsZG`[o ruO|Hrɡ(1fɞM#lQHDvy***3 y AnnUUGb!{~Ciq` p\CC{*Ot))3`ķ[K0K=1ȐCM S$xmCA{/,.K~!xx^-+x:2tH>pCY("pA"777Kkkk)77W6`Ej'J6{[5p9G^pN@r Fl}}=Y+ W]p238!'KKK% {1U5SB})VWarQ\9V[X<_983?~_S`R yO񌉟pif˳iSc㉿0Wy1r@,IENDB`libiodbc-3.52.16/iodbcadm/mac/Helpers.h0000664000175000017500000001020014424170750014434 00000000000000/* * Helpers.h * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import #import #import #include #include #import "utils.h" void addDrivers_to_list(NSArrayController* list); void addPools_to_list(NSArrayController* list); void addComponents_to_list(NSArrayController* list); void addDSNs_to_list(BOOL systemDSN, NSArrayController* list); void addFDSNs_to_list(NSString* path, BOOL b_reset, NSArrayController* list); void fill_dir_menu(wchar_t* path, NSPopUpButton* list); BOOL remove_dsn(BOOL systemDSN, NSString *dsn, NSString *driver); BOOL configure_dsn(BOOL systemDSN, NSString *dsn, NSString *driver); void test_dsn(BOOL systemDSN, NSString *dsn, NSString *driver); BOOL add_file_dsn(NSString *_curr_dir); BOOL remove_file_dsn(NSString *cur_dir, NSString *dsn); void test_file_dsn(NSString *cur_dir, NSString *dsn); void setdir_file_dsn(NSString *cur_dir); BOOL configure_file_dsn(NSString *cur_dir, NSString *dsn); NSString * get_user_documents_dir(); libiodbc-3.52.16/iodbcadm/mac/IODBCadm_DrvRemoveController.m0000664000175000017500000001140214424170750020403 00000000000000/* * IODBCadm_DrvRemoveController.m * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import "IODBCadm_DrvRemoveController.h" #import "utils.h" #import "Helpers.h" @interface IODBCadm_DrvRemoveController () @end @implementation IODBCadm_DrvRemoveController @synthesize chk_User = _chk_User; @synthesize chk_System = _chk_System; @synthesize rb_remove = _rb_remove; @synthesize deletedsn = _deletedsn; @synthesize dsns = _dsns; - (id)initWithDSNS:(int) dsns { self = [super initWithWindowNibName:@"IODBCadm_DrvRemoveController"]; if (self) { _deletedsn = FALSE; _dsns = dsns; } return self; } - (void)dealloc { [super dealloc]; } - (id)initWithWindow:(NSWindow *)window { self = [super initWithWindow:window]; if (self) { // Initialization code here. } return self; } - (void)windowDidLoad { [super windowDidLoad]; _dialogCode = 0; if (_deletedsn) [_rb_remove selectCellAtRow:0 column:1]; else [_rb_remove selectCellAtRow:0 column:0]; [_chk_User setState: ((_dsns & 1)!=0) ? NSOnState : NSOffState]; [_chk_System setState: ((_dsns & 2)!=0) ? NSOnState : NSOffState]; [[self window] center]; // Center the window. } - (void)windowWillClose:(NSNotification*)notification { [NSApp stopModalWithCode:_dialogCode]; } - (IBAction)call_Ok:(id)sender { _dialogCode = 1; _deletedsn = _rb_remove.selectedColumn==1; _dsns = 0; _dsns |= _chk_User.state==NSOnState?1:0; _dsns |= _chk_System.state==NSOnState?2:0; [self.window close]; } - (IBAction)call_Cancel:(id)sender { _dialogCode = 0; [self.window close]; } @end libiodbc-3.52.16/iodbcadm/mac/IODBCadm_KeyValController.h0000664000175000017500000000732414424170750017670 00000000000000/* * IODBCadm_KeyValController.h * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import #import @interface IODBCadm_KeyValController : NSWindowController { NSArrayController *Attrs_ArrController; NSButton *chk_Verify; int _dialogCode; NSMutableArray *_Attrs_list; } @property (assign) IBOutlet NSArrayController *Attrs_ArrController; @property (assign) IBOutlet NSButton *chk_Verify; @property (nonatomic, retain) NSMutableArray *Attrs_list; - (id)initWithAttrs:(const char*)attrs; - (IBAction)call_Cancel:(id)sender; - (IBAction)call_Ok:(id)sender; @end libiodbc-3.52.16/iodbcadm/mac/IODBCadm_DrvConfigController.h0000664000175000017500000001017214424170750020351 00000000000000/* * IODBCadm_DrvConfigController.h * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import #import @interface IODBCadm_DrvConfigController : NSWindowController { NSArrayController *Attrs_ArrController; int _dialogCode; NSMutableArray *_Attrs_list; NSMatrix *_rb_sysuser; NSString *_drv_name; NSString *_drv_file; NSString *_setup_file; BOOL _add; BOOL _user; } @property (assign) IBOutlet NSArrayController *Attrs_ArrController; @property (nonatomic, retain) NSMutableArray *Attrs_list; @property (assign) IBOutlet NSMatrix *rb_sysuser; @property (nonatomic, retain) NSString *drv_name; @property (nonatomic, retain) NSString *drv_file; @property (nonatomic, retain) NSString *setup_file; @property (assign) BOOL add; @property (assign) BOOL user; - (id)initWithAttrs:(const wchar_t*)attrs; - (IBAction)call_DrvFile_Browse:(id)sender; - (IBAction)call_SetupFile_Browse:(id)sender; - (IBAction)call_Cancel:(id)sender; - (IBAction)call_Ok:(id)sender; @end libiodbc-3.52.16/iodbcadm/mac/gui.h0000664000175000017500000002561414424170750013635 00000000000000/* * gui.h * * $Id$ * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #ifndef _MACXGUI_H #define _MACXGUI_H #define USER_DSN 0 #define SYSTEM_DSN 1 #define FILE_DSN 2 /* The column values for data browsers */ #define DBITEM_ID 'OPLs' #define DBNAME_ID 'name' #define DBVERSION_ID 'vers' #define DBFILE_ID 'file' #define DBDATE_ID 'date' #define DBSIZE_ID 'size' #define CPTIMEOUT_ID ' to ' #define CPPROBE_ID 'sql ' #define DSNDRV_ID 'drv ' #define DSNDESC_ID 'desc' #define TABS_SIGNATURE 'tabs' #define CNTL_SIGNATURE 'CNTL' #define PICT_SIGNATURE 'PICT' #define GSKEYWORD_ID 'keyw' #define GSVALUE_ID 'valu' /* The global tab control */ #define GLOBAL_TAB 128 #define NUMBER_TAB 7 #define OKBUT_CNTL 149 #define CANCELBUT_CNTL 150 /* All user tab items */ #define UDSN_TAB 129 #define ULIST_CNTL 128 #define UADD_CNTL 130 #define UDEL_CNTL 131 #define UCFG_CNTL 132 #define UTST_CNTL 133 /* All system tab items */ #define SDSN_TAB 130 #define SLIST_CNTL 129 #define SADD_CNTL 134 #define SDEL_CNTL 135 #define SCFG_CNTL 136 #define STST_CNTL 137 /* All fileDsn tab items */ #define FDSN_TAB 155 #define FLIST_CNTL 156 #define FADD_CNTL 157 #define FDEL_CNTL 158 #define FCFG_CNTL 159 #define FTST_CNTL 160 #define FDIR_CNTL 161 #define FSETDIR_CNTL 162 /* All driver tab items */ #define DRIVER_TAB 131 #define DLIST_CNTL 138 #define DADD_CNTL 139 #define DDEL_CNTL 140 #define DCFG_CNTL 141 /* All connection pooling tab items */ #define POOL_TAB 132 #define PLIST_CNTL 142 #define PPERF_CNTL 143 #define PRETR_CNTL 144 /* All tracing tab items */ #define TRACE_TAB 133 #define TLOG_CNTL 145 #define TTRLIB_CNTL 146 #define TOPTI_CNTL 147 #define TSTART_CNTL 151 #define TLOGB_CNTL 152 #define TLIBB_CNTL 153 #define TWIDE_CNTL 154 /* All about tab items */ #define ABOUT_TAB 134 #define CLIST_CNTL 148 /* Control IDs for the connection pool dialog */ #define CPFINISH_CNTL 1000 #define CPCANCEL_CNTL 1001 #define CPTIMEOUT_CNTL 1002 #define CPPROBE_CNTL 1003 #define CPGROUP_CNTL 1004 #define CPTITLE_CNTL 1005 /* Control IDs for the driver list dialog */ #define DCFINISH_CNTL 1000 #define DCCANCEL_CNTL 1001 #define DCLIST_CNTL 2000 #define GETCONTROLBYID(ctlID, ctlSIGN, ctl, wndREF, ctrlREF) { \ ctlID.signature = ctlSIGN; \ ctlID.id = ctl; \ GetControlByID(wndREF, &ctlID, &ctrlREF); \ } extern char *szDSNColumnNames[]; extern char *szTabNames[]; extern char *szDSNButtons[]; extern char *szDriverColumnNames[]; typedef struct TFILEDSN { ControlRef name_entry; WindowRef mainwnd; wchar_t *name; } TFILEDSN; typedef struct TDSNCHOOSER { ControlRef udsnlist, sdsnlist, fdsnlist; ControlRef uadd, uremove, utest, uconfigure; ControlRef sadd, sremove, stest, sconfigure; ControlRef fadd, fremove, ftest, fconfigure; ControlRef fdir; ControlRef dir_list, file_list, file_entry, dir_combo; WindowRef mainwnd; wchar_t *dsn; wchar_t *fdsn; char curr_dir[1024]; int type_dsn; } TDSNCHOOSER; typedef struct TDRIVERCHOOSER { ControlRef driverlist, b_add, b_remove, b_configure; WindowRef mainwnd; wchar_t *driver; } TDRIVERCHOOSER; typedef struct TFDRIVERCHOOSER { ControlRef driverlist, dsn_entry; ControlRef back_button, continue_button; ControlRef tab_panel, mess_entry; WindowRef mainwnd; int tab_number; char *curr_dir; char *attrs; char *dsn; BOOL verify_conn; wchar_t *driver; BOOL ok; } TFDRIVERCHOOSER; typedef struct TCONNECTIONPOOLING { ControlRef driverlist, perfmon_rb, retwait_entry, timeout_entry, probe_entry; WindowRef mainwnd; BOOL changed; wchar_t *timeout; } TCONNECTIONPOOLING; typedef struct TTRANSLATORCHOOSER { ControlRef translatorlist, b_finish, b_cancel; WindowRef mainwnd; wchar_t *translator; } TTRANSLATORCHOOSER; typedef struct TCOMPONENT { ControlRef componentlist; } TCOMPONENT; typedef struct TTRACING { ControlRef logfile_entry, tracelib_entry, b_start_stop, trace_rb; ControlRef trace_wide; BOOL changed; } TTRACING; typedef struct TCONFIRM { WindowRef mainwnd; BOOL yes_no; } TCONFIRM; typedef struct TDRIVERSETUP { ControlRef name_entry, driver_entry, setup_entry, key_list, bupdate; ControlRef key_entry, value_entry, filesel, sysuser_rb; WindowRef mainwnd; LPWSTR connstr; } TDRIVERSETUP; typedef struct TDRIVERREMOVE { ControlRef user_cb, system_cb, dsn_rb; WindowRef mainwnd; BOOL deletedsn; int dsns; } TDRIVERREMOVE; typedef struct TGENSETUP { ControlRef dsn_entry, key_list, bupdate; ControlRef key_entry, value_entry; ControlRef verify_conn_cb; WindowRef mainwnd; char *connstr; BOOL verify_conn; } TGENSETUP; typedef struct TKEYVAL { ControlRef key_list, bupdate; ControlRef key_entry, value_entry; ControlRef verify_conn_cb; WindowRef mainwnd; char *connstr; BOOL verify_conn; } TKEYVAL; extern char* convert_CFString_to_char(const CFStringRef str); pascal OSStatus userdsn_add_clicked (EventHandlerCallRef inHandlerRef, EventRef inEvent, void *inUserData); pascal OSStatus userdsn_remove_clicked (EventHandlerCallRef inHandlerRef, EventRef inEvent, void *inUserData); pascal OSStatus userdsn_configure_clicked (EventHandlerCallRef inHandlerRef, EventRef inEvent, void *inUserData); pascal OSStatus userdsn_test_clicked (EventHandlerCallRef inHandlerRef, EventRef inEvent, void *inUserData); pascal OSStatus systemdsn_add_clicked (EventHandlerCallRef inHandlerRef, EventRef inEvent, void *inUserData); pascal OSStatus systemdsn_remove_clicked (EventHandlerCallRef inHandlerRef, EventRef inEvent, void *inUserData); pascal OSStatus systemdsn_configure_clicked (EventHandlerCallRef inHandlerRef, EventRef inEvent, void *inUserData); pascal OSStatus systemdsn_test_clicked (EventHandlerCallRef inHandlerRef, EventRef inEvent, void *inUserData); pascal OSStatus filedsn_add_clicked (EventHandlerCallRef inHandlerRef, EventRef inEvent, void *inUserData); pascal OSStatus filedsn_remove_clicked (EventHandlerCallRef inHandlerRef, EventRef inEvent, void *inUserData); pascal OSStatus filedsn_configure_clicked (EventHandlerCallRef inHandlerRef, EventRef inEvent, void *inUserData); pascal OSStatus filedsn_test_clicked (EventHandlerCallRef inHandlerRef, EventRef inEvent, void *inUserData); pascal OSStatus filedsn_setdir_clicked (EventHandlerCallRef inHandlerRef, EventRef inEvent, void *inUserData); pascal OSStatus filedsn_select_clicked (EventHandlerCallRef inHandlerRef, EventRef inEvent, void *inUserData); pascal OSStatus translators_getset_item (ControlRef browser, DataBrowserItemID itemID, DataBrowserPropertyID property, DataBrowserItemDataRef itemData, Boolean changeValue); pascal OSStatus driver_configure_clicked (EventHandlerCallRef inHandlerRef, EventRef inEvent, void *inUserData); pascal OSStatus driverchooser_ok_clicked (EventHandlerCallRef inHandlerRef, EventRef inEvent, void *inUserData); pascal OSStatus translatorchooser_ok_clicked (EventHandlerCallRef inHandlerRef, EventRef inEvent, void *inUserData); void translators_notification_item (ControlRef browser, DataBrowserItemID itemID, DataBrowserItemNotification message); void DisplayTabControlNumber (int index, ControlRef tabControl, WindowRef wnd, int *tabs); void adddrivers_to_list (ControlRef widget, WindowRef dlg, BOOL addNotification); void addtranslators_to_list (ControlRef widget, WindowRef dlg); void adddsns_to_list (ControlRef widget, BOOL systemDSN, WindowRef dlg); void addconnectionpool_to_list (ControlRef widget, WindowRef dlg); void addfdsns_to_list (TDSNCHOOSER *dsnchoose_t, char *path, Boolean b_reset); LPSTR create_gensetup (HWND hwnd, LPCSTR dsn, LPCSTR attrs, BOOL add, BOOL *verify_conn); void create_fdriverchooser (HWND hwnd, TFDRIVERCHOOSER * choose_t); LPSTR create_gensetup (HWND hwnd, LPCSTR dsn, LPCSTR attrs, BOOL add, BOOL *verify_conn); #endif libiodbc-3.52.16/IAFA-PACKAGE0000664000175000017500000000271114013216212012027 00000000000000Title: iODBC Driver Manager Version: 3.52.11 Description: iODBC (independent Open Database Connectivity) driver manager is compatible with ODBC 3.x specification and performs exactly same jobs of ODBC 3.x driver manager (i.e. driver loading, Parameters and function sequence checking, driver's function Invoking, etc.). Any ODBC driver that works with ODBC 3.0 driver manager will also work with iODBC driver manager and vice versa. Applications (using ODBC function calls) linked with iODBC driver manager will be able to simultaneously access different type of data sources within one process through suitable ODBC drivers. Original Author: Ke Jin Source Code Enhancement Contributors: OpenLink Software Source Maintainers: iODBC Maintainer Web Site: http://www.iodbc.org/ Platforms: SunOS (Sparc) 4.1.x HP/UX (s700/s800) 9.x, 10.x HP/UX (s300/s400) 9.x IBM AIX 3.x, 4.x Solaris (Sparc) 2.x Solaris (PCx86) 2.x SGI Irix 5.x, 6.x NCR SVR4 3.x UnixWare SVR4.2 1.x, 2.x DEC Unix (OSF/1) 3.x, 4.x FreeBSD 2.x BSDI BSD/OS 2.x Linux ELF 1.2.x SCO OpenServer 5.x Concurrent MAX/OS 1.x DG/UX 5.x License Policy: Freely Redistributable under either the GNU Library General Public License (LGPL) (see file LICENSE.LGPL for details) or the BSD License (see file LICENSE.BSD for details) Keywords: ODBC, database, SQL, OpenLink libiodbc-3.52.16/etc/0000775000175000017500000000000014424171427011223 500000000000000libiodbc-3.52.16/etc/Makefile.am0000664000175000017500000000626114424170750013202 00000000000000# # Makefile.am # # The iODBC driver manager. # # Copyright (C) 1996-2023 OpenLink Software # All Rights Reserved. # # This software is released under the terms of either of the following # licenses: # # - GNU Library General Public License (see LICENSE.LGPL) # - The BSD License (see LICENSE.BSD). # # Note that the only valid version of the LGPL license as far as this # project is concerned is the original GNU Library General Public License # Version 2, dated June 1991. # # While not mandated by the BSD license, any patches you make to the # iODBC source code may be contributed back into the iODBC project # at your discretion. Contributions will benefit the Open Source and # Data Access community as a whole. Submissions may be made at: # # http://www.iodbc.org # # # GNU Library Generic Public License Version 2 # ============================================ # 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; only # Version 2 of the License dated June 1991. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # The BSD License # =============== # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. Neither the name of OpenLink Software Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # EXTRA_DIST = \ $(srcdir)/odbc.ini.sample \ $(srcdir)/odbcinst.ini.sample libiodbc-3.52.16/etc/Makefile.in0000664000175000017500000003651714424171020013211 00000000000000# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 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@ # # Makefile.am # # The iODBC driver manager. # # Copyright (C) 1996-2023 OpenLink Software # All Rights Reserved. # # This software is released under the terms of either of the following # licenses: # # - GNU Library General Public License (see LICENSE.LGPL) # - The BSD License (see LICENSE.BSD). # # Note that the only valid version of the LGPL license as far as this # project is concerned is the original GNU Library General Public License # Version 2, dated June 1991. # # While not mandated by the BSD license, any patches you make to the # iODBC source code may be contributed back into the iODBC project # at your discretion. Contributions will benefit the Open Source and # Data Access community as a whole. Submissions may be made at: # # http://www.iodbc.org # # # GNU Library Generic Public License Version 2 # ============================================ # 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; only # Version 2 of the License dated June 1991. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # The BSD License # =============== # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. Neither the name of OpenLink Software Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = etc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/admin/gtk-2.0.m4 \ $(top_srcdir)/admin/gtk.m4 $(top_srcdir)/admin/libtool.m4 \ $(top_srcdir)/admin/ltoptions.m4 \ $(top_srcdir)/admin/ltsugar.m4 \ $(top_srcdir)/admin/ltversion.m4 \ $(top_srcdir)/admin/lt~obsolete.m4 \ $(top_srcdir)/admin/openlink.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in \ $(top_srcdir)/admin/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_CONFIG = @GTK_CONFIG@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBADD_DL = @LIBADD_DL@ LIBADD_OS = @LIBADD_OS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ filedsnpath = @filedsnpath@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ inidir = @inidir@ install_sh = @install_sh@ lib_version = @lib_version@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ odbcmode = @odbcmode@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ $(srcdir)/odbc.ini.sample \ $(srcdir)/odbcinst.ini.sample all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu etc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu etc/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile # 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: libiodbc-3.52.16/etc/odbc.ini.sample0000664000175000017500000000065314013216212014021 00000000000000; ; odbc.ini ; [ODBC Data Sources] OpenLink = OpenLink (MT) [OpenLink] Driver = /home/openlink/lib/oplodbc.so.1 Description = Sample OpenLink MT DSN Host = localhost ServerType = Oracle 8 FetchBufferSize = 99 UserName = Password = Database = ServerOptions = ConnectOptions = Options = ReadOnly = no [Default] Driver = /home/openlink/lib/oplodbc.so.1 libiodbc-3.52.16/etc/odbcinst.ini.sample0000664000175000017500000000021414013216212014710 00000000000000[ODBC Drivers] OpenLink (MT) = Installed [OpenLink (MT)] Driver = /home/openlink/lib/oplodbc.so.1 Setup = /home/openlink/lib/oplodbc.so.1 libiodbc-3.52.16/NEWS0000664000175000017500000004553514424170750011101 00000000000000May 02 2022, V3.52.16: * Fixed issue with generic setup dialogs on macOS not saving values * Fixed issue when creating new DSN via generic setup dialogs on macOS BigSur * Fixed issue with new vertical layout for Alerts on macOS BigSur * Fixed support for modern limit path name size * Fixed SQLBindParameter trace when bind offset is in use (fixes #80) * Fixed SQLGetInstalledDrivers single entry error (fixes #79) * Fixed silent truncation of 'long' diagnostic messages in SQLGetDiagRec (fixes #78) * Fixed missing comma (fixes #72) * Fixed potential memory leak (fixes #71) * Fixed truncation of SQL_C_WCHAR parameter value when BufferLength=0 and length=SQL_NTS (fixes #68) * Fixed issue overriding SQL_DEFAULT_PARAM length indicator (fixes #67) * Fixed issue with input parameter data when using parameter arrays (fixes #66) * Fixed compiler warnings * Fixed version check of build tools * Updated documents Jun 07 2021, V3.52.15: * Added support for macOS Big Sur (11.x) on Apple Silicon using a universal build * Fixed title to show CPU architecture used * Fixed length of error message buffer * Fixed small portability issues * Removed support for Mac OS X Snow Leopard (10.6) and older * Removed deprecated iODBCcfmbridge for PPC * Upgraded iODBC build to use recent versions of Xcode - Minimum Xcode version is set to Xcode 8.0 - Minimum macOS deployment target is OS X Mavericks (10.9) - Migrated dialogs and plist files - Migrated translation support Feb 17 2021, V3.52.14: * Added support for transparent conversion between UCS4, UTF-8, and UTF-16 codepages * Small documentation fixes * Fixed issue with return buffer * Fixed compiler warnings * Fixed missing check on pcbConnStrOut * Fixed SQLSetEnvAttr doesn't return SQL_SUCCESS for option SQL_ATTR_APP_UNICODE_TYPE * Fixed issue with switch ODBC driver to best supported unicode codepage * Fixed typo in SQLBrowseConnect * Fixed SQLGetConnectOption returned wrong value for SQL_CURRENT_QUALIFIER and SQL_TRANSLATE_DLL for some cases * Fixed mixing calls to SQLFetchScroll with SQLFetch * Fixed unicode conversion issues * Fixed ansi buffers allocation * Fixed issue with tracing * Fixed truncate data in SQLGetPrivateProfileStringW Jul 23 2019, V3.52.13: * Added extra validation for SQLAllocHandle (SQL_HANDLE_DESC, ...) * Added GCC __attribute__ for checking format string * Added missing define SQL_CONVERT_GUID * Fixed issue using heap after free in SQLConnect_internal * Fixed issue with global mutex in SQLError, SQLGetDiagRec and SQLGetDiagField * Fixed SQLSetStmtAttr to cache the correct values for SQL_ATTR_ROW_ARRAY_SIZE and SQL_ATTR_ROW_BIND_TYPE * Fixed format specifiers and some casts to fix trace output * Fixed missing check for section in SQLGetPrivateProfileString * Fixed non-void function needs to return a value * Fixed issue in Mac Cocoa code * Fixed iODBC apps/frameworks CFBundleGetInfoString attribute * Fixes an issue where build fails on Alpine * Fixed package versioning * Fixed small memory leaks Jul 12 2016, V3.52.12: * Added new Cocoa based dialogs for Mac OS X which will allow 64bit applications to use the standard Login and Setup dialogs from the iODBCinst framework * Added 64bit version of the iODBC Administrator to configure and test DSNs on drivers that are only available in 64bit format * Fixed User DSN support for recent versions of Microsoft Excel and Query on Mac OS X * Documentation fixes May 25 2016, V3.52.11 (internal release): * Added xcodebuild option for Mac OS X 10.11 * Added support for x86_64 to iODBC Demo * Fix crash ODBCdemo - error message overwrite stack data * Fix iODBCdemo issue with UID/PWD values * Fixed crash in iODBC DM on push of "Test" button when 64bit ODBC driver is used. * Fixed crash when create_dsnsetup fails to load the window. * Fixed crash when passing an empty connect string with no window handle * Fixed crash when passing an empty connect string with no window handle. * Fixed iODBCadm and iODBCdrvproxy Development build errors on OS X * Fixed iODBCadm and iODBCdrvproxy Development build errors on OS X. * Fixed iODBCdrvproxy XIBs not compiling to NIBs on OS X. * Fixed issue in SQLGetInfo * Fixed issue with Xcode on Mac OS X 10.10 Xcode 7.2.1 * Fixed use only major.minor of Mac OS X version to configure flags * Fixed crash when create_dsnsetup fails to load the window Feb 10 2015, V3.52.10: * Fixed issue with ~/Library/ODBC/odbc[inst].ini on Mac OS X -- iODBC created ~/.odbc[inst].ini when ~/Library/ODBC/odbc[inst].ini did not exist * If $HOME/.odbc[inst].ini exists, automatically import it and then replace it with symlink to $HOME/Library/ODBC/odbc[inst].ini for backward compatibility with third party drivers * Always read from $HOME/Library/ODBC/odbc[inst].ini * Added build support for Mac OS X 10.10 * Updated iODBC Administrator - Renamed OpenLink ODBC Administrator to iODBC Administrator - Install iODBC Administrator in /Applications/iODBC/ - Fixed About dialog - Fixed UI elements - Fixed FileDSN default path - Fixed FileDSN save dialog - Fixed Set Trace file option - Fixed Mac OS X file chooser dialogs to return long file names * Updated iODBC Demo - Fixed app names/titles to iODBC Demo Unicode and iODBC Demo Ansi - Updated iODBCdemo on Mac OS X to support blue links in gridView - Fixed column resize in gridView for "SPARQL DESCRIBE..." queries * Fixed string truncation in Unicode <-> Ansi conversion on some API calls Apr 15 2014, V3.52.9: * Added support for building on recent versions of Mac OS X * Fixed warnings from autoconf/automake * Fixed infinite loop in connection pool * Fixed compiler warnings * Fixed build dependency for make -jX * Fixed check for Unicode driver * Fixed issue calling SQLCancel from other thread * Fixed SQLInstallDriverEx when driver is readonly Mar 27 2012, V3.52.8: * Converted from CVS to GIT * Added build support for Mac OS X 10.5, 10.6 and 10.7 * Converted old Mac OS X .nib format to newer .xib format * Fixed issue with using buffer after free * Fixed use ssize_t where appropriate * Fixed issue with strlen if param can be NULL * Fixed use ssize_t for length of string * Fixed tracing SQLGetData using multiple chunks * Fixed problem tracing on big-endian machines * Fixed wrong type label * Fixed compiler warnings Sep 10 2009, V3.52.7: * Added iODBC Graphical Administrator for Mac OS X * Added iODBC CFM Bridge * Added resizable windows and dialogs for GTK+ * Added option in tracefile for sequence number ($S) * Added additional translations between ANSI and Unicode * Fixed if tracefile gets too big, continue in new tracefile * Fixed unload bug due to wrong pointer deref * Fixed Connection Pooling UI * Fixed checking odbc_ver on connect handle * Fixed packaging of runtime only libraries * Fixed porting issues * Fixed documentation Oct 08 2007, V3.52.6: * Added support for GTK+ 2.x * Fixed long mutex lock on connect * Fixed problems with SQLBrowseConnect * Fixed missing functions in export list * Fixed core dump when checking for driver odbc version * Fixed allocation error in SQLDescribeCol * Fixed rpm specification for RedHat * Fixed porting problems on FreeBSD, OpenBSD and OSF * Use SQLFetchScroll in iodbctest Jan 05 2007, V3.52.5: * Added support for FileDSN * Added support for Connection Pooling * Added check for tracefile size * Call ODBC 2.x functions in driver if application uses ODBC 2.x only calls * Fixed problem parsing driver result in SQLSetStmtAttr * Fixed source code readability * Fixed bug in overwriting driver name * Fixed check for /Library/ODBC for Mac OS X * Fixed prototypes * Rewrote bootstrap script and configure summary * Use localtime_r in tracing when available * Fixed build issues with Mac OS X * Small code cleanups and fixes Jan 26 2006, V3.52.4: * Added support for Mac OS X 10.4 Universal kit (ppc, ppc64 and i386) * Removed dependency between iodbc and iodbcinst shared libraries * Cleanup Mac OS X build process * Clarify LGPL license conditions * Fixed problem with error on subsequent SQLExecute statements * Fixed problem building 64bit GUI components * Fixed compiler warnings * Fixed problem determining which compiler to use on AIX * Enabled SHLIB_PATH on HP/UX * Fixed problem using # as comment in odbc.ini file * Disabled --disable-odbc3 flag * Small code cleanups and fixes Nov 04 2005, V3.52.3: * Added support for DSN-less connections * Added timestamp to ENTER/EXIT lines in trace file * Added build support for AIX 5.x, HP/UX 11.23 Itanium * Added build support for Mac OS X 10.3 (32bit) and 10.4 (32bit+64bit) * Fixed problem with certain compilers hating lvalue casting * Fixed problem with truncated messages in iodbctest * Fixed problem calling setup dialog multiple times * Fixed problem with ODBC_BOTH_DSN * Fixed problem with tracing SQLGetInfo * Fixed problem with NUL termination on setup dialog * Fixed problem building on Mac OS X 10.4 64bit * Fixed problem calculating buffer length after calling setup dialog * Fixed problem with SQLDriverConnect (SQL_DRIVER_PROMPT) if no setup dialog had been registered * Fixed symbol clash between Oracle Instant client and iODBC on Mac OS X * Fixed problem building iODBCadm and drvproxy on Mac OS X * Fixed problem building on machines with older iODBC installation Feb 04 2005, V3.52.2: * Added tracing option for root without overwriting existing files * Added PORT.OpenLink script * Added special iodbc-config script for Mac OS X framework build * Fixed problem starting/stopping tracing * Fixed SQLSetConnectAttr to return SQL_SUCCESS_WITH_INFO if driver cannot handle option set before connect time * Fixed SQLInfo to use pcbInfoValue if present * Fixed NULL pointer problem in GTK choose driver dialog * Fixed problem with C++ prototypes with older 32bit code * Fixed locking problem with SQLAllocEnv/SQLAllocHandle * Fixed tracefile name expansion * Fixed problem running bootstrap.sh on machines without GTK * Fixed problem installing code in temp directory for packaging * Fixed problem calling SQLGetDiagRec on uninitialized handles in iodbctest program * Link iodbctest program with static iodbc libraries Sep 29 2004, V3.52.1: * Added support for new ODBC 3.52 specification for 64bit environments * Added support for SQLGetEnvAttr(SQL_ATTR_WCHAR_SIZE extension * Added missing Mac OS X build files * Added script to symlink Mac OS X framework into /usr/local/iODBC to allow traditional GNU configurable packages to use the same version of iODBC * Added new layer to driver loading to prevent memory leaks when drivers cannot be physically unloaded * Added man pages for iodbc-config, iodbctest and iodbcadm-gtk * Added header file iodbcunix.h for portability * Enhanced tracing for SQLGetFunctions, SQLColAttribute * Fixed NULL pointer problem when connection failed * Fixed initialization problem with SQLGetPrivateProfileString * Fixed export Unicode and ANSI names of ODBC functions in libiodbc * Fixed SQLSetScrollOption emulation * Fixed tracing for SQLSetDescRec * Fixed rpm build issue with RedHat 9 * Fixed MAC OS X install problem * Fixed Mac OS X build dependency on Carbon libraries * Fixed HP/UX shared library name handling * Fixed handling of UTF-8 sequences * Fixed compiler warnings * Small code cleanups and fixes Feb 24 2004, V3.51.2: * Added support for installation layouts for different distributions e.g. --with-layout=RedHat * Added support for Mac OS X 10.3 (panther) * Added support for creating libodbc.so symlink * Added more ODBC 3.x calls to iodbctest.c program * Added SQLRowCount for SQL UPDATE/DELETE statements in iodbctest.c * Fixed build problem with older make programs * Fixed bug in state handling SQLCloseCursor * Fixed driver statement allocation problem * Fixed double free in statement handle * Fixed problem tracing variable length strings and binary data * Use snprintf when available to guard against buffer overruns * Small documentation fixes Sept 08 2003, V3.51.1: * Fixed library dependency for PHP and other open source packages * Fixed build problems on Mac OS X * Fixed default compiler and flags for threaded builds * Small bugfixes Aug 22 2003, V3.51.0: * Added Unicode support * Added tracing functionality * Minor cleanups and bugfixes Apr 29 2002, V3.0.6: * Added instructions for building MyODBC on Mac OS X * Added support for building iODBC on Mac OS X as a framework * Fixed creating new window handle * Fixed portability issues * Use the latest versions of autoconf, automake and libtool * Updated all comments to reflect the new dual licensing policy * Fixed bug in SQLError/SQLGetDiagRec * Added support for driver specific connect options * Fixed wrong argument to SQLEndTran * Fixed handling statement descriptor * Fixed DSN string handling * Fixed mapping in SQLColumnAttributes * Minor cleanups and bugfixes Jun 7 2001, V3.0.5: * Added new iodbcinst code * Added new drvproxy and iodbcadm GTK frontend * iODBC released under LGPL or BSD license * SQLMoreResults always returned SQL_NO_DATA_FOUND Jun 4 2001, V3.0.4: * Reorganized source tree to use multiple subdirectories in preparation of adding the new iodbcinst code * Use config.h instead of massive CFLAGS * Generate libiodbc.spec with correct version number Jun 1 2001, V3.0.3: * Added support for automake 1.4-p2, autoconf 2.50 and libtool 1.4 * Fixed problems with shl_unload on HP/UX * Added support for MacOS X 1.2 (Darwin) * Disallow root to start a debug session (security risk) * SQLDatasources returns Driver Type instead of DSN Description * Added checks for ODBC 3.x date, time and timestamp defines * Fixed initialization of cip flag Feb 1 2000, V3.0.2: * Fixed deadlock problem in SQLNumResultCols * Small code fix in SQLDatasources Jan 28 2000, V3.0.1: * Added thread support into Driver Manager * Added code to allow Threaded application to call non-threaded driver * Small code fixes and cleanups Dec 16 1999, V3.0.0: * Added initial support for ODBC 3.x API and the ODBC 3.x to 2.x translation layer * Added --disable-odbc3 flag to configure.in for building ODBC 2.x compatible driver manager * Added --enable-maintainer-mode flag to configure.in * Rewrote dlopen and underscore checks in configure.in * Default iodbc-inidir is set to /etc * Clear error stack at the start of each ODBC function * Imported libtool 1.3.4 * Small code cleanups * Created iodbc-config script for other projects to find out how to link with the iodbc libraries. * Fixed bug in SQLDataSources * Added initial support for MacOS X (Rhapsody) * Add some ODBC 3.x API calls to the odbctest program June 25, 1999, V2.50.3: * Renamed public header files to conform to ODBC standard * System wide iodbc.ini can now be set with --with-odbc-inidir=, default is set to $sysconfdir/odbc.ini to comply with GNU standards * Some small bug fixes * Added AutoReqProv flag to RPM .spec file * Changed types for SQLHENV, SQLHDBC, SQLHSTMT April 26, 1999, V2.50.2: * Small code cleanups (pvk) * Wrote new handle validation checks to make the driver manager more resistant to handle misuse (pvk) * Rewrote all function prototypes to conform to ODBC 2.51 standard (pvk) * Use the internal form of the handle instead of the external representation (pvk) * Removed 2 copyright sccs stamps and comments as requested by Ke Jin (pvk) * Added rudementary SQLGetPrivateProfileString call (pvk) * Added support for VMS (ps) January 18, 1999, V2.50: * Added autoconf/automake/libtool support * Licensing moved to LGPL * Added OpenLink code enhancements and bug fixes ------------------------------------------------------------------------ Original Changelog from Ke Jin ------------------------------------------------------------------------ July 30, 1995, v2.00.beta: 0. the first release and beta version. Sep. 11, 1995, v2.10: 1. Porting to AIX 3.x and 4.x, by writing dlopen(), dlsym(), dlclose() interface. 2. Tested on SCO OpenServer 5.x 3. Awared of that, unlike s700/s800, exported function symbols on HP9000 s300/s400 will be prepended with a '_' prefix by compiler(and this '_' prefix is not automatically handled by shl_findsym()). Now, it works fine on s300/s400. 4. Support driver ODBC call tracing. Oct. 12, 1995, v2.11: 5. Driver's SQLNumResultCols() will automatically be invoked in driver manager's SQLExecute(), SQLExecDirect() and SQLParamData() after successfully (i.e. return SQL_SUCCESS or SQL_SUCCESS_WITH_INFO ) calling of their correspondent driver functions. This simplifies the state tracing/checking of the driver manager a lot and allows store procedures to return result set and also make iODBC driver manager work properly with SELECT INTO statements which actually don't return result sets. 6. Memory leaks are cleared. 7. Two bugs in dld.c for AIX are fixed 8. A bug of setting tracing option is fixed. 9. The driver will not be unloaded by SQLDisconnect() but by SQLFreeConnect() or next SQLConnect()/ SQLDriverConnect()/SQLBrowsConnect() on a different driver. This will save driver's loading time if it has been used by a previous connection(even there is no active connection on this driver). 10.Another three platforms are supported: FreeBSD 2.x Concurrent Max/OS SVR4 1.x DG/UX 5.x 11.autoconfig and build -- shell scripts to help modifying Config.mk and building iodbc driver manager Nov. 12, 1995, v2.12 12.I realized that a driver manager doesn't aware of difference between a C5 (i.e. hstmt) and a C6 (i.e. transaction) states. 13.The link flags "-lc" has been droped from Linux ELF section of Config.mk to fix a segment fault problem. Now, it works fine on Slackware 2.3 and Red Hat 2.0 (kernel version are 1.2.xx and 1.3.xx respectively). 14.On FreeBSD 2.x, dlsym() doesn't handle the '_' prefix prepended to an exportting function symbol by compiler. So, CLI_NAME_PREFIX needs to be defined as "_SQL" for FreeBSD 2.x. 15.Some files are renamed dld.c -> dlf.c dld.h -> dlf.h confg.h -> config.h 16. Fix a bug on setting tracing options. libiodbc-3.52.16/samples/0000775000175000017500000000000014424171430012106 500000000000000libiodbc-3.52.16/samples/Makefile.am0000664000175000017500000001007014424170750014064 00000000000000# # Makefile.am # # The iODBC driver manager. # # Copyright (C) 1996-2023 OpenLink Software # All Rights Reserved. # # This software is released under the terms of either of the following # licenses: # # - GNU Library General Public License (see LICENSE.LGPL) # - The BSD License (see LICENSE.BSD). # # Note that the only valid version of the LGPL license as far as this # project is concerned is the original GNU Library General Public License # Version 2, dated June 1991. # # While not mandated by the BSD license, any patches you make to the # iODBC source code may be contributed back into the iODBC project # at your discretion. Contributions will benefit the Open Source and # Data Access community as a whole. Submissions may be made at: # # http://www.iodbc.org # # # GNU Library Generic Public License Version 2 # ============================================ # 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; only # Version 2 of the License dated June 1991. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # The BSD License # =============== # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. Neither the name of OpenLink Software Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # bin_PROGRAMS = iodbctest iodbctestw AM_CPPFLAGS = -I$(top_srcdir)/include -DNO_FRAMEWORKS # # Build odbctest program # iodbctest_SOURCES = iodbctest.c iodbctest_LDADD = ../iodbc/libiodbc.la iodbctest_LDFLAGS = -static iodbctestw_CFLAGS = -DUNICODE iodbctestw_SOURCES = iodbctest.c iodbctestw_LDADD = ../iodbc/libiodbc.la iodbctestw_LDFLAGS = -static EXTRA_DIST = $(srcdir)/Makefile.sample install-exec-hook: $(mkinstalldirs) ${DESTDIR}${pkgdatadir}/samples cp $(srcdir)/iodbctest.c ${DESTDIR}${pkgdatadir}/samples/iodbctest.c cp $(srcdir)/Makefile.sample ${DESTDIR}${pkgdatadir}/samples/Makefile if DARWIN -/usr/bin/lipo ${DESTDIR}${bindir}/iodbctest -remove ppc64 -output ${DESTDIR}${bindir}/iodbctest -/usr/bin/lipo ${DESTDIR}${bindir}/iodbctestw -remove ppc64 -output ${DESTDIR}${bindir}/iodbctestw endif uninstall-hook: rm -f ${DESTDIR}${pkgdatadir}/samples/iodbctest.c rm -f ${DESTDIR}${pkgdatadir}/samples/Makefile rmdir ${DESTDIR}${pkgdatadir}/samples libiodbc-3.52.16/samples/iodbctest.c0000664000175000017500000006104714424170750014166 00000000000000/* * iodbctest.c * * $Id$ * * Sample ODBC program * * The iODBC driver manager. * * Copyright (C) 1996-2023 OpenLink Software * All Rights Reserved. * * This software is released under the terms of either of the following * licenses: * * - GNU Library General Public License (see LICENSE.LGPL) * - The BSD License (see LICENSE.BSD). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2, dated June 1991. * * While not mandated by the BSD license, any patches you make to the * iODBC source code may be contributed back into the iODBC project * at your discretion. Contributions will benefit the Open Source and * Data Access community as a whole. Submissions may be made at: * * http://www.iodbc.org * * * GNU Library Generic Public License Version 2 * ============================================ * 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; only * Version 2 of the License dated June 1991. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * The BSD License * =============== * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of OpenLink Software Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include #include #include #include /* * Prototypes */ int ODBC_Connect (char *connStr); int ODBC_Disconnect (void); int ODBC_Errors (char *where); int ODBC_Test (void); #define MAXCOLS 32 #ifdef UNICODE #define TEXT(x) (SQLWCHAR *) L##x #define TEXTC(x) (SQLWCHAR) L##x #define TXTLEN(x) wcslen((wchar_t *) x) #define TXTCMP(x1,x2) wcscmp((wchar_t *) x1, (wchar_t *) x2) # ifdef WIN32 #define OPL_A2W(a, w, cb) \ MultiByteToWideChar(CP_ACP, 0, a, -1, w, cb) # else #define OPL_A2W(XA, XW, SIZE) mbstowcs(XW, XA, SIZE) # endif /* WIN32 */ #else #define TEXT(x) (SQLCHAR *) x #define TEXTC(x) (SQLCHAR) x #define TXTLEN(x) strlen((char *) x) #define TXTCMP(x1,x2) strcmp((char *) x1, (char *) x2) #endif /* UNICODE */ #define NUMTCHAR(X) (sizeof (X) / sizeof (SQLTCHAR)) /* * Global variables */ HENV henv = SQL_NULL_HANDLE; HDBC hdbc = SQL_NULL_HANDLE; HSTMT hstmt = SQL_NULL_HANDLE; int connected = 0; /* * Unicode conversion routines */ #ifdef UNICODE static SQLWCHAR * strcpy_A2W (SQLWCHAR * destStr, char *sourStr) { size_t length; if (!sourStr || !destStr) return destStr; length = strlen (sourStr); if (length > 0) OPL_A2W (sourStr, destStr, length); destStr[length] = L'\0'; return destStr; } #endif /* * Connect to the datasource * * The connect string can have the following parts and they refer to * the values in the odbc.ini file * * DSN= [mandatory] * HOST= [optional - value of Host] * SVT= [optional - value of ServerType] * DATABASE= [optional - value of Database] * OPTIONS= [optional - value of Options] * UID= [optional - value of LastUser] * PWD= [optional] * READONLY= [optional - value of ReadOnly] * FBS= [optional - value of FetchBufferSize] * * Examples: * * HOST=star;SVT=SQLServer 2000;UID=demo;PWD=demo;DATABASE=pubs * * DSN=pubs_sqlserver;PWD=demo */ SQLTCHAR outdsn[4096]; /* Store completed DSN for later use */ int ODBC_Connect (char *connStr) { short buflen; SQLCHAR dataSource[1024]; SQLTCHAR dsn[33]; SQLTCHAR desc[255]; SQLTCHAR driverInfo[255]; SQLSMALLINT len1, len2; int status; #ifdef UNICODE SQLWCHAR wdataSource[1024]; #endif #if (ODBCVER < 0x0300) if (SQLAllocEnv (&henv) != SQL_SUCCESS) return -1; # ifdef UNICODE SQLSetEnvAttr (henv, SQL_ATTR_APP_UNICODE_TYPE, (SQLPOINTER) SQL_DM_CP_DEF, SQL_IS_UINTEGER); #endif if (SQLAllocConnect (henv, &hdbc) != SQL_SUCCESS) return -1; #else if (SQLAllocHandle (SQL_HANDLE_ENV, NULL, &henv) != SQL_SUCCESS) return -1; SQLSetEnvAttr (henv, SQL_ATTR_ODBC_VERSION, (SQLPOINTER) SQL_OV_ODBC3, SQL_IS_UINTEGER); # ifdef UNICODE SQLSetEnvAttr (henv, SQL_ATTR_APP_UNICODE_TYPE, (SQLPOINTER) SQL_DM_CP_DEF, SQL_IS_UINTEGER); #endif if (SQLAllocHandle (SQL_HANDLE_DBC, henv, &hdbc) != SQL_SUCCESS) return -1; #endif /* * Set the application name */ SQLSetConnectOption (hdbc, SQL_APPLICATION_NAME, (SQLULEN) TEXT ("odbctest")); /* * Show the version number of the driver manager */ status = SQLGetInfo (hdbc, SQL_DM_VER, driverInfo, sizeof (driverInfo), &len1); if (status == SQL_SUCCESS) { #ifdef UNICODE printf ("Driver Manager: %S\n", driverInfo); #else printf ("Driver Manager: %s\n", driverInfo); #endif } /* * Either use the connect string provided on the command line or * ask for one. If an empty string or a ? is given, show a nice * list of options */ if (connStr && *connStr) strcpy ((char *) dataSource, connStr); else while (1) { /* * Ask for the connect string */ printf ("\nEnter ODBC connect string (? shows list): "); if (fgets ((char *) dataSource, sizeof (dataSource), stdin) == NULL) return 1; /* * Remove trailing '\n' */ dataSource[strlen ((char *) dataSource) - 1] = '\0'; /* * Check if the user wants to quit */ if (!strcmp ((char *)dataSource, "quit") || !strcmp ((char *)dataSource, "exit")) return -1; /* * If the user entered something other than a ? * break out of the while loop */ if (*dataSource && *dataSource != '?') break; /* * Print headers */ fprintf (stderr, "\n%-32s | %-40s\n", "DSN", "Driver"); fprintf (stderr, "------------------------------------------------------------------------------\n"); /* * Goto the first record */ if (SQLDataSources (henv, SQL_FETCH_FIRST, dsn, NUMTCHAR (dsn), &len1, desc, NUMTCHAR (desc), &len2) != SQL_SUCCESS) continue; /* * Show all records */ do { #ifdef UNICODE fprintf (stderr, "%-32S | %-40S\n", dsn, desc); #else fprintf (stderr, "%-32s | %-40s\n", dsn, desc); #endif } while (SQLDataSources (henv, SQL_FETCH_NEXT, dsn, NUMTCHAR (dsn), &len1, desc, NUMTCHAR (desc), &len2) == SQL_SUCCESS); } #ifdef UNICODE strcpy_A2W (wdataSource, (char *) dataSource); status = SQLDriverConnectW (hdbc, 0, (SQLWCHAR *) wdataSource, SQL_NTS, (SQLWCHAR *) outdsn, NUMTCHAR (outdsn), &buflen, SQL_DRIVER_COMPLETE); if (status != SQL_SUCCESS) ODBC_Errors ("SQLDriverConnectW"); #else status = SQLDriverConnect (hdbc, 0, (SQLCHAR *) dataSource, SQL_NTS, (SQLCHAR *) outdsn, NUMTCHAR (outdsn), &buflen, SQL_DRIVER_COMPLETE); if (status != SQL_SUCCESS) ODBC_Errors ("SQLDriverConnect"); #endif if (status != SQL_SUCCESS && status != SQL_SUCCESS_WITH_INFO) return -1; connected = 1; /* * Print out the version number and the name of the connected driver */ status = SQLGetInfo (hdbc, SQL_DRIVER_VER, driverInfo, NUMTCHAR (driverInfo), &len1); if (status == SQL_SUCCESS) { #ifdef UNICODE printf ("Driver: %S", driverInfo); #else printf ("Driver: %s", driverInfo); #endif status = SQLGetInfo (hdbc, SQL_DRIVER_NAME, driverInfo, NUMTCHAR (driverInfo), &len1); if (status == SQL_SUCCESS) { #ifdef UNICODE printf (" (%S)", driverInfo); #else printf (" (%s)", driverInfo); #endif } printf ("\n"); } /* * Show the list of supported functions in trace log */ #if (ODBCVER < 0x0300) { SQLUSMALLINT exists[100]; SQLGetFunctions (hdbc, SQL_API_ALL_FUNCTIONS, exists); } #else { SQLUSMALLINT exists[SQL_API_ODBC3_ALL_FUNCTIONS_SIZE]; SQLGetFunctions (hdbc, SQL_API_ODBC3_ALL_FUNCTIONS, exists); } #endif /* * Allocate statement handle */ #if (ODBCVER < 0x0300) if (SQLAllocStmt (hdbc, &hstmt) != SQL_SUCCESS) return -1; #else if (SQLAllocHandle (SQL_HANDLE_STMT, hdbc, &hstmt) != SQL_SUCCESS) return -1; #endif return 0; } /* * Disconnect from the database */ int ODBC_Disconnect (void) { #if (ODBCVER < 0x0300) if (hstmt) SQLFreeStmt (hstmt, SQL_DROP); if (connected) SQLDisconnect (hdbc); if (hdbc) SQLFreeConnect (hdbc); if (henv) SQLFreeEnv (henv); #else if (hstmt) { SQLCloseCursor (hstmt); SQLFreeHandle (SQL_HANDLE_STMT, hstmt); } if (connected) SQLDisconnect (hdbc); if (hdbc) SQLFreeHandle (SQL_HANDLE_DBC, hdbc); if (henv) SQLFreeHandle (SQL_HANDLE_ENV, henv); #endif return 0; } /* * Perform a disconnect/reconnect using the DSN stored from the original * SQLDriverConnect */ int ODBC_Reconnect (void) { SQLRETURN status; SQLTCHAR buf[4096]; SQLSMALLINT len; /* * Free old statement handle */ #if (ODBCVER < 0x0300) SQLFreeStmt (hstmt, SQL_DROP); #else SQLFreeHandle (SQL_HANDLE_STMT, hstmt); #endif /* * Disconnect */ SQLDisconnect (hdbc); /* * Reconnect */ status = SQLDriverConnect (hdbc, 0, outdsn, SQL_NTS, buf, sizeof (buf), &len, SQL_DRIVER_NOPROMPT); /* * Allocate new statement handle */ if (SQL_SUCCEEDED (status)) { #if (ODBCVER < 0x0300) status = SQLAllocStmt (hdbc, &hstmt); #else status = SQLAllocHandle (SQL_HANDLE_STMT, hdbc, &hstmt); #endif } /* * Show why we where unsuccessful and return an error */ if (!SQL_SUCCEEDED (status)) { ODBC_Errors ("DriverConnect (reconnect)"); return -1; } /* * Success */ return 0; } /* * Show all the error information that is available */ int ODBC_Errors (char *where) { SQLTCHAR buf[512]; SQLTCHAR sqlstate[15]; SQLINTEGER native_error = 0; int force_exit = 0; SQLRETURN sts; #if (ODBCVER < 0x0300) /* * Get statement errors */ while (hstmt) { sts = SQLError (henv, hdbc, hstmt, sqlstate, &native_error, buf, NUMTCHAR (buf), NULL); if (!SQL_SUCCEEDED (sts)) break; #ifdef UNICODE fprintf (stderr, "%s = %S (%ld) SQLSTATE=%S\n", where, buf, (long) native_error, sqlstate); #else fprintf (stderr, "%s = %s (%ld) SQLSTATE=%s\n", where, buf, (long) native_error, sqlstate); #endif /* * If the driver could not be loaded, there is no point in * continuing, after reading all the error messages */ if (!TXTCMP (sqlstate, TEXT ("IM003"))) force_exit = 1; } /* * Get connection errors */ while (hdbc) { sts = SQLError (henv, hdbc, SQL_NULL_HSTMT, sqlstate, &native_error, buf, NUMTCHAR (buf), NULL); if (!SQL_SUCCEEDED (sts)) break; #ifdef UNICODE fprintf (stderr, "%s = %S (%ld) SQLSTATE=%S\n", where, buf, (long) native_error, sqlstate); #else fprintf (stderr, "%s = %s (%ld) SQLSTATE=%s\n", where, buf, (long) native_error, sqlstate); #endif /* * If the driver could not be loaded, there is no point in * continuing, after reading all the error messages */ if (!TXTCMP (sqlstate, TEXT ("IM003"))) force_exit = 1; } /* * Get environment errors */ while (henv) { sts SQLError (henv, SQL_NULL_HDBC, SQL_NULL_HSTMT, sqlstate, &native_error, buf, NUMTCHAR (buf), NULL); if (!SQL_SUCCEEDED (sts)) break; #ifdef UNICODE fprintf (stderr, "%s = %S (%ld) SQLSTATE=%S\n", where, buf, (long) native_error, sqlstate); #else fprintf (stderr, "%s = %s (%ld) SQLSTATE=%s\n", where, buf, (long) native_error, sqlstate); #endif /* * If the driver could not be loaded, there is no point in * continuing, after reading all the error messages */ if (!TXTCMP (sqlstate, TEXT ("IM003"))) force_exit = 1; } #else /* ODBCVER */ int i; /* * Get statement errors */ i = 0; while (hstmt && i < 5) { sts = SQLGetDiagRec (SQL_HANDLE_STMT, hstmt, ++i, sqlstate, &native_error, buf, NUMTCHAR (buf), NULL); if (!SQL_SUCCEEDED (sts)) break; #ifdef UNICODE fprintf (stderr, "%d: %s = %S (%ld) SQLSTATE=%S\n", i, where, buf, (long) native_error, sqlstate); #else fprintf (stderr, "%d: %s = %s (%ld) SQLSTATE=%s\n", i, where, buf, (long) native_error, sqlstate); #endif /* * If the driver could not be loaded, there is no point in * continuing, after reading all the error messages */ if (!TXTCMP (sqlstate, TEXT ("IM003"))) force_exit = 1; } /* * Get connection errors */ i = 0; while (hdbc && i < 5) { sts = SQLGetDiagRec (SQL_HANDLE_DBC, hdbc, ++i, sqlstate, &native_error, buf, NUMTCHAR (buf), NULL); if (!SQL_SUCCEEDED (sts)) break; #ifdef UNICODE fprintf (stderr, "%d: %s = %S (%ld) SQLSTATE=%S\n", i, where, buf, (long) native_error, sqlstate); #else fprintf (stderr, "%d: %s = %s (%ld) SQLSTATE=%s\n", i, where, buf, (long) native_error, sqlstate); #endif /* * If the driver could not be loaded, there is no point in * continuing, after reading all the error messages */ if (!TXTCMP (sqlstate, TEXT ("IM003"))) force_exit = 1; } /* * Get environment errors */ i = 0; while (henv && i < 5) { sts = SQLGetDiagRec (SQL_HANDLE_ENV, henv, ++i, sqlstate, &native_error, buf, NUMTCHAR (buf), NULL); if (!SQL_SUCCEEDED (sts)) break; #ifdef UNICODE fprintf (stderr, "%d: %s = %S (%ld) SQLSTATE=%S\n", i, where, buf, (long) native_error, sqlstate); #else fprintf (stderr, "%d: %s = %s (%ld) SQLSTATE=%s\n", i, where, buf, (long) native_error, sqlstate); #endif /* * If the driver could not be loaded, there is no point in * continuing, after reading all the error messages */ if (!TXTCMP (sqlstate, TEXT ("IM003"))) force_exit = 1; } #endif /* ODBCVER */ /* * Force an exit status */ if (force_exit) exit (-1); return -1; } /* * Test program to run on the connected database */ int ODBC_Test () { SQLTCHAR request[4096]; SQLTCHAR fetchBuffer[1024]; char buf[4096]; int displayWidths[MAXCOLS]; int displayWidth; short numCols; short colNum; SQLTCHAR colName[50]; SQLSMALLINT colType; SQLULEN colPrecision; SQLLEN colIndicator; SQLSMALLINT colScale; SQLSMALLINT colNullable; unsigned long totalRows; unsigned long totalSets; int i; SQLRETURN sts; while (1) { /* * Ask the user for a dynamic SQL statement */ printf ("\nSQL>"); if (fgets (buf, sizeof (buf), stdin) == NULL) break; #ifndef UNICODE strcpy ((char *) request, (char *) buf); #else strcpy_A2W (request, buf); #endif request[TXTLEN (request) - 1] = TEXTC ('\0'); if (request[0] == TEXTC ('\0')) continue; /* * If the user just types tables, give him a list */ if (!TXTCMP (request, TEXT ("tables"))) { if (SQLTables (hstmt, NULL, 0, NULL, 0, NULL, 0, NULL, 0) != SQL_SUCCESS) { ODBC_Errors ("SQLTables(tables)"); continue; } } /* * If the user just types qualifiers, give him a list */ else if (!TXTCMP (request, TEXT ("qualifiers"))) { if (SQLTables (hstmt, TEXT ("%"), SQL_NTS, TEXT (""), 0, TEXT (""), 0, TEXT (""), 0) != SQL_SUCCESS) { ODBC_Errors ("SQLTables(qualifiers)"); continue; } } /* * If the user just types owners, give him a list */ else if (!TXTCMP (request, TEXT ("owners"))) { if (SQLTables (hstmt, TEXT (""), 0, TEXT ("%"), SQL_NTS, TEXT (""), 0, TEXT (""), 0) != SQL_SUCCESS) { ODBC_Errors ("SQLTables(owners)"); continue; } } /* * If the user just types "types", give him a list */ else if (!TXTCMP (request, TEXT ("types"))) { if (SQLTables (hstmt, TEXT (""), 0, TEXT (""), 0, TEXT (""), 0, TEXT ("%"), SQL_NTS) != SQL_SUCCESS) { ODBC_Errors ("SQLTables(types)"); continue; } } /* * If the user just types "datatypes", give him a list */ else if (!TXTCMP (request, TEXT ("datatypes"))) { if (SQLGetTypeInfo (hstmt, 0) != SQL_SUCCESS) { ODBC_Errors ("SQLGetTypeInfo"); continue; } } else if (!TXTCMP (request, TEXT ("reconnect"))) { if (ODBC_Reconnect()) return -1; continue; } #if defined (unix) else if (!TXTCMP (request, TEXT ("environment"))) { extern char **environ; for (i = 0; environ[i]; i++) fprintf (stderr, "%03d: [%s]\n", i, environ[i]); continue; } #endif else if (!TXTCMP (request, TEXT ("quit")) || !TXTCMP (request, TEXT ("exit"))) break; /* If you want to quit, just say so */ else { /* * Prepare & Execute the statement */ if (SQLPrepare (hstmt, (SQLTCHAR *) request, SQL_NTS) != SQL_SUCCESS) { ODBC_Errors ("SQLPrepare"); continue; } if ((sts = SQLExecute (hstmt)) != SQL_SUCCESS) { ODBC_Errors ("SQLExec"); if (sts != SQL_SUCCESS_WITH_INFO) continue; } } /* * Loop through all the result sets */ totalSets = 1; do { /* * Get the number of result columns for this cursor. * If it is 0, then the statement was probably a select */ if (SQLNumResultCols (hstmt, &numCols) != SQL_SUCCESS) { ODBC_Errors ("SQLNumResultCols"); goto endCursor; } if (numCols == 0) { SQLLEN nrows = 0; SQLRowCount (hstmt, &nrows); printf ("Statement executed. %ld rows affected.\n", nrows > 0 ? (long) nrows : 0L); goto endCursor; } if (numCols > MAXCOLS) { numCols = MAXCOLS; fprintf (stderr, "NOTE: Resultset truncated to %d columns.\n", MAXCOLS); } /* * Get the names for the columns */ putchar ('\n'); for (colNum = 1; colNum <= numCols; colNum++) { /* * Get the name and other type information */ if (SQLDescribeCol (hstmt, colNum, (SQLTCHAR *) colName, NUMTCHAR (colName), NULL, &colType, &colPrecision, &colScale, &colNullable) != SQL_SUCCESS) { ODBC_Errors ("SQLDescribeCol"); goto endCursor; } /* * Calculate the display width for the column */ switch (colType) { case SQL_VARCHAR: case SQL_CHAR: case SQL_WVARCHAR: case SQL_WCHAR: case SQL_GUID: displayWidth = colPrecision; break; case SQL_BINARY: displayWidth = colPrecision * 2; break; case SQL_LONGVARCHAR: case SQL_WLONGVARCHAR: case SQL_LONGVARBINARY: displayWidth = 30; /* show only first 30 */ break; case SQL_BIT: displayWidth = 1; break; case SQL_TINYINT: case SQL_SMALLINT: case SQL_INTEGER: case SQL_BIGINT: displayWidth = colPrecision + 1; /* sign */ break; case SQL_DOUBLE: case SQL_DECIMAL: case SQL_NUMERIC: case SQL_FLOAT: case SQL_REAL: displayWidth = colPrecision + 2; /* sign, comma */ break; #ifdef SQL_TYPE_DATE case SQL_TYPE_DATE: #endif case SQL_DATE: displayWidth = 10; break; #ifdef SQL_TYPE_TIME case SQL_TYPE_TIME: #endif case SQL_TIME: displayWidth = 8; break; #ifdef SQL_TYPE_TIMESTAMP case SQL_TYPE_TIMESTAMP: #endif case SQL_TIMESTAMP: displayWidth = 19; if (colScale > 0) displayWidth = displayWidth + colScale + 1; break; default: displayWidths[colNum - 1] = 0; /* skip other data types */ continue; } if (displayWidth < TXTLEN (colName)) displayWidth = TXTLEN (colName); if (displayWidth > NUMTCHAR (fetchBuffer) - 1) displayWidth = NUMTCHAR (fetchBuffer) - 1; displayWidths[colNum - 1] = displayWidth; /* * Print header field */ #ifdef UNICODE printf ("%-*.*S", displayWidth, displayWidth, colName); #else printf ("%-*.*s", displayWidth, displayWidth, colName); #endif if (colNum < numCols) putchar ('|'); } putchar ('\n'); /* * Print second line */ for (colNum = 1; colNum <= numCols; colNum++) { for (i = 0; i < displayWidths[colNum - 1]; i++) putchar ('-'); if (colNum < numCols) putchar ('+'); } putchar ('\n'); /* * Print all the fields */ totalRows = 0; while (1) { #if (ODBCVER < 0x0300) sts = SQLFetch (hstmt); #else sts = SQLFetchScroll (hstmt, SQL_FETCH_NEXT, 1); #endif if (sts == SQL_NO_DATA_FOUND) break; if (sts != SQL_SUCCESS) { ODBC_Errors ("Fetch"); break; } for (colNum = 1; colNum <= numCols; colNum++) { /* * Fetch this column as character */ #ifdef UNICODE sts = SQLGetData (hstmt, colNum, SQL_C_WCHAR, fetchBuffer, NUMTCHAR (fetchBuffer), &colIndicator); #else sts = SQLGetData (hstmt, colNum, SQL_C_CHAR, fetchBuffer, NUMTCHAR (fetchBuffer), &colIndicator); #endif if (sts != SQL_SUCCESS_WITH_INFO && sts != SQL_SUCCESS) { ODBC_Errors ("SQLGetData"); goto endCursor; } /* * Show NULL fields as **** */ if (colIndicator == SQL_NULL_DATA) { for (i = 0; i < displayWidths[colNum - 1]; i++) fetchBuffer[i] = TEXTC ('*'); fetchBuffer[i] = TEXTC ('\0'); } #ifdef UNICODE printf ("%-*.*S", displayWidths[colNum - 1], displayWidths[colNum - 1], fetchBuffer); #else printf ("%-*.*s", displayWidths[colNum - 1], displayWidths[colNum - 1], fetchBuffer); #endif if (colNum < numCols) putchar ('|'); } putchar ('\n'); totalRows++; } printf ("\n result set %lu returned %lu rows.\n\n", totalSets, totalRows); totalSets++; } while ((sts = SQLMoreResults (hstmt)) == SQL_SUCCESS); if (sts == SQL_ERROR) ODBC_Errors ("SQLMoreResults"); endCursor: #if (ODBCVER < 0x0300) SQLFreeStmt (hstmt, SQL_CLOSE); #else SQLCloseCursor (hstmt); #endif } return 0; } int main (int argc, char **argv) { /* * Set locale based on environment variables */ setlocale (LC_ALL, ""); /* * Show welcome message */ #ifdef UNICODE printf ("iODBC Unicode Demonstration program\n"); #else printf ("iODBC Demonstration program\n"); #endif printf ("This program shows an interactive SQL processor\n"); /* * Show a usage string when the user asks for this */ if (argc > 2 || (argc == 2 && argv[1][0] == '-')) { fprintf (stderr, "\nUsage:\n iodbctest [\"DSN=xxxx;UID=xxxx;PWD=xxxx\"]\n"); exit (0); } /* * If we can connect to this datasource, run the test program */ if (ODBC_Connect (argv[1]) != 0) { ODBC_Errors ("ODBC_Connect"); } else if (ODBC_Test () != 0) { ODBC_Errors ("ODBC_Test"); } /* * End the connection */ ODBC_Disconnect (); printf ("\nHave a nice day."); return 0; } libiodbc-3.52.16/samples/Makefile.in0000664000175000017500000006434614424171020014103 00000000000000# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 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@ # # Makefile.am # # The iODBC driver manager. # # Copyright (C) 1996-2023 OpenLink Software # All Rights Reserved. # # This software is released under the terms of either of the following # licenses: # # - GNU Library General Public License (see LICENSE.LGPL) # - The BSD License (see LICENSE.BSD). # # Note that the only valid version of the LGPL license as far as this # project is concerned is the original GNU Library General Public License # Version 2, dated June 1991. # # While not mandated by the BSD license, any patches you make to the # iODBC source code may be contributed back into the iODBC project # at your discretion. Contributions will benefit the Open Source and # Data Access community as a whole. Submissions may be made at: # # http://www.iodbc.org # # # GNU Library Generic Public License Version 2 # ============================================ # 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; only # Version 2 of the License dated June 1991. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # The BSD License # =============== # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. Neither the name of OpenLink Software Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = iodbctest$(EXEEXT) iodbctestw$(EXEEXT) subdir = samples ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/admin/gtk-2.0.m4 \ $(top_srcdir)/admin/gtk.m4 $(top_srcdir)/admin/libtool.m4 \ $(top_srcdir)/admin/ltoptions.m4 \ $(top_srcdir)/admin/ltsugar.m4 \ $(top_srcdir)/admin/ltversion.m4 \ $(top_srcdir)/admin/lt~obsolete.m4 \ $(top_srcdir)/admin/openlink.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_iodbctest_OBJECTS = iodbctest.$(OBJEXT) iodbctest_OBJECTS = $(am_iodbctest_OBJECTS) iodbctest_DEPENDENCIES = ../iodbc/libiodbc.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = iodbctest_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(iodbctest_LDFLAGS) $(LDFLAGS) -o $@ am_iodbctestw_OBJECTS = iodbctestw-iodbctest.$(OBJEXT) iodbctestw_OBJECTS = $(am_iodbctestw_OBJECTS) iodbctestw_DEPENDENCIES = ../iodbc/libiodbc.la iodbctestw_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(iodbctestw_CFLAGS) \ $(CFLAGS) $(iodbctestw_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/admin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(iodbctest_SOURCES) $(iodbctestw_SOURCES) DIST_SOURCES = $(iodbctest_SOURCES) $(iodbctestw_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/admin/depcomp \ $(top_srcdir)/admin/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_CONFIG = @GTK_CONFIG@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBADD_DL = @LIBADD_DL@ LIBADD_OS = @LIBADD_OS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ filedsnpath = @filedsnpath@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ inidir = @inidir@ install_sh = @install_sh@ lib_version = @lib_version@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ odbcmode = @odbcmode@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I$(top_srcdir)/include -DNO_FRAMEWORKS # # Build odbctest program # iodbctest_SOURCES = iodbctest.c iodbctest_LDADD = ../iodbc/libiodbc.la iodbctest_LDFLAGS = -static iodbctestw_CFLAGS = -DUNICODE iodbctestw_SOURCES = iodbctest.c iodbctestw_LDADD = ../iodbc/libiodbc.la iodbctestw_LDFLAGS = -static EXTRA_DIST = $(srcdir)/Makefile.sample all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu samples/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu samples/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list iodbctest$(EXEEXT): $(iodbctest_OBJECTS) $(iodbctest_DEPENDENCIES) $(EXTRA_iodbctest_DEPENDENCIES) @rm -f iodbctest$(EXEEXT) $(AM_V_CCLD)$(iodbctest_LINK) $(iodbctest_OBJECTS) $(iodbctest_LDADD) $(LIBS) iodbctestw$(EXEEXT): $(iodbctestw_OBJECTS) $(iodbctestw_DEPENDENCIES) $(EXTRA_iodbctestw_DEPENDENCIES) @rm -f iodbctestw$(EXEEXT) $(AM_V_CCLD)$(iodbctestw_LINK) $(iodbctestw_OBJECTS) $(iodbctestw_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iodbctest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iodbctestw-iodbctest.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< iodbctestw-iodbctest.o: iodbctest.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(iodbctestw_CFLAGS) $(CFLAGS) -MT iodbctestw-iodbctest.o -MD -MP -MF $(DEPDIR)/iodbctestw-iodbctest.Tpo -c -o iodbctestw-iodbctest.o `test -f 'iodbctest.c' || echo '$(srcdir)/'`iodbctest.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/iodbctestw-iodbctest.Tpo $(DEPDIR)/iodbctestw-iodbctest.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='iodbctest.c' object='iodbctestw-iodbctest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(iodbctestw_CFLAGS) $(CFLAGS) -c -o iodbctestw-iodbctest.o `test -f 'iodbctest.c' || echo '$(srcdir)/'`iodbctest.c iodbctestw-iodbctest.obj: iodbctest.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(iodbctestw_CFLAGS) $(CFLAGS) -MT iodbctestw-iodbctest.obj -MD -MP -MF $(DEPDIR)/iodbctestw-iodbctest.Tpo -c -o iodbctestw-iodbctest.obj `if test -f 'iodbctest.c'; then $(CYGPATH_W) 'iodbctest.c'; else $(CYGPATH_W) '$(srcdir)/iodbctest.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/iodbctestw-iodbctest.Tpo $(DEPDIR)/iodbctestw-iodbctest.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='iodbctest.c' object='iodbctestw-iodbctest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(iodbctestw_CFLAGS) $(CFLAGS) -c -o iodbctestw-iodbctest.obj `if test -f 'iodbctest.c'; then $(CYGPATH_W) 'iodbctest.c'; else $(CYGPATH_W) '$(srcdir)/iodbctest.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -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 @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook .MAKE: install-am install-exec-am install-strip uninstall-am .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ ctags ctags-am 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-dvi install-dvi-am \ install-exec install-exec-am install-exec-hook install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-hook .PRECIOUS: Makefile install-exec-hook: $(mkinstalldirs) ${DESTDIR}${pkgdatadir}/samples cp $(srcdir)/iodbctest.c ${DESTDIR}${pkgdatadir}/samples/iodbctest.c cp $(srcdir)/Makefile.sample ${DESTDIR}${pkgdatadir}/samples/Makefile @DARWIN_TRUE@ -/usr/bin/lipo ${DESTDIR}${bindir}/iodbctest -remove ppc64 -output ${DESTDIR}${bindir}/iodbctest @DARWIN_TRUE@ -/usr/bin/lipo ${DESTDIR}${bindir}/iodbctestw -remove ppc64 -output ${DESTDIR}${bindir}/iodbctestw uninstall-hook: rm -f ${DESTDIR}${pkgdatadir}/samples/iodbctest.c rm -f ${DESTDIR}${pkgdatadir}/samples/Makefile rmdir ${DESTDIR}${pkgdatadir}/samples # 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: libiodbc-3.52.16/samples/Makefile.sample0000664000175000017500000000654414424170750014763 00000000000000# # Makefile.sample # # The iODBC driver manager. # # Copyright (C) 1996-2023 OpenLink Software # All Rights Reserved. # # This software is released under the terms of either of the following # licenses: # # - GNU Library General Public License (see LICENSE.LGPL) # - The BSD License (see LICENSE.BSD). # # Note that the only valid version of the LGPL license as far as this # project is concerned is the original GNU Library General Public License # Version 2, dated June 1991. # # While not mandated by the BSD license, any patches you make to the # iODBC source code may be contributed back into the iODBC project # at your discretion. Contributions will benefit the Open Source and # Data Access community as a whole. Submissions may be made at: # # http://www.iodbc.org # # # GNU Library Generic Public License Version 2 # ============================================ # 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; only # Version 2 of the License dated June 1991. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # The BSD License # =============== # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. Neither the name of OpenLink Software Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # all: iodbctest iodbctestw iodbctest: iodbctest.c cc `iodbc-config --cflags` -o iodbctest iodbctest.c `iodbc-config --static-libs` iodbctestw: iodbctest.c cc `iodbc-config --cflags` -DUNICODE -o iodbctestw iodbctest.c `iodbc-config --static-libs` libiodbc-3.52.16/README_MACOSX0000664000175000017500000001373614424170750012332 00000000000000# How to build iODBC for macOS (formerly known as _OS X_ and _Mac OS X_) Copyright © 1996-2023 OpenLink Software ## Method 1: Using Project builder This build method only works for Xcode 8.0 or newer. This version of Xcode was first supported on macOS El Capitan (10.11), however the resulting binaries are backward-compatible with OS X Mavericks (10.9) and newer. OpenLink uses build environments on macOS Mojave (10.14) and macOS Big Sur (11.x) to produce suitable notarized installers with graphical components. To build iODBC components yourself, you will first need to install the latest Mac OS X Developer Packages, which you can download from . Then, execute the following commands in a terminal session, to build all the frameworks and demo applications: ```shell $ cd mac $ make ``` After building the iODBC libraries and applications, you have to install them on your system with the command: ```shell $ sudo make install ``` This installs the `iODBCinst` and `iODBC` frameworks into — ```shell /Library/Frameworks/iODBC.framework /Library/Frameworks/iODBCinst.framework ``` — and the test applications `iodbctest` and `iodbctestw` into — ```shell /Library/Application Support/iODBC/bin ``` — and the iODBC Administrator and iODBC Demo applications in — ```shell /Applications/iODBC ``` ### `iODBC Administrator.app` Now that you have installed the iODBC frameworks on your system, you will be able to use ODBC applications or build your own applications using the iODBC API. Once you have installed an ODBC Driver, you can configure and test a new ODBC DSN, using either the 32-bit Cocoa UI, which can configure and test any ODBC driver that is built in Universal mode — ```shell /Applications/iODBC/iODBC Administrator.app ``` — or the 64-bit version, which can configure drivers that only support a 64-bit Cocoa UI — ```shell /Applications/iODBC/iODBC Administrator64.app ``` ### Test DSN connection Once you have configured a DSN, you will be able to make a connection using the `iodbctest` tool which is located at — ```shell /Library/Application Support/iODBC/bin/iodbctest ``` ## Method 2: Using `configure` and `make` The iODBC package can also be built like any other Open Source package not using any frameworks. This build method still works with older versions of Xcode. On OS X Yosemite (10.10) and newer, Apple removed a number of programs from their **`Xcode.app`** commandline installation, including `autoconf`, `automake`, `libtool`, and some other tools needed to build iODBC from a newly checked out GIT tree. We suggest using the [HomeBrew package manager](http://brew.sh/) to install these tools, according to their documentation. To build the libraries, open up a terminal session in **`Terminal.app`** or similar, and execute the following commands: ```shell $ sh autogen.sh $ ./configure $ make ``` To install the header files and libraries in `/usr/local`, execute the following command as an administrator, and provide that user's password when prompted: ```shell $ sudo make install ``` Note that, by default, this will build components that only run on the CPU type you are building on, so `ppc` on very old machines, `x86` on early CoreDuo machines, `x86_64` on recent Intel models, and `arm64` on current Apple Silicon models. You can also build iODBC components that support multiple CPU architectures — either **Universal** components that support `ppc`, `x86`, and/or `x86_64`; or **Universal2** components that support `x86_64` (including as emulated by Rosetta2) and `arm64`. ### Mac OS X Leopard (10.5) and Mac OS X Snow Leopard (10.6) The following commands will build a release of iODBC that supports Mac OS X Leopard (10.5) as well as Mac OS X Snow Leopard (10.6), on `ppc` (including as emulated by Rosetta), `x86`, and `x86_64`: ```shell $ CFLAGS="-O -arch ppc -arch i386 -arch x86_64" $ CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX10.5.sdk" $ CFLAGS="$CFLAGS -mmacosx-version-min=10.5" $ export CFLAGS $ sh autogen.sh $ ./configure \ --disable-dependency-tracking \ --prefix=/usr/local/iODBC.universal $ make $ sudo make install ``` ### Mac OS X Lion (10.7) and OS X Mountain Lion (10.8) The following commands will build a release of iODBC that works on Mac OS X Lion (10.7) and OS X Mountain Lion (10.8): ```shell $ CFLAGS="-O -arch i386 -arch x86_64" $ CFLAGS="$CFLAGS -mmacosx-version-min=10.7" $ export CFLAGS $ sh autogen.sh $ ./configure \ --disable-dependency-tracking \ --prefix=/usr/local/iODBC.universal $ make $ sudo make install ``` ### OS X Mavericks (10.9) through macOS Big Sur (11.x) on `x86` or `x86_64` (including Rosetta2 emulation) The following commands will build a release of iODBC that works on OS X Mavericks (10.9) through macOS Ventura (13.x), supporting other components built for `x86` (through macOS Mojave (10.14), where Apple dropped support for 32-bit components) or `x86_64` (including Rosetta2 emulation): ```shell $ CFLAGS="-O -arch i386 -arch x86_64" $ CFLAGS="$CFLAGS -mmacosx-version-min=10.9" $ export CFLAGS $ sh autogen.sh $ ./configure \ --disable-dependency-tracking \ --prefix=/usr/local/iODBC.universal $ make $ sudo make install ``` ### macOS Big Sur (11.x) through macOS Ventura (13.x) on `x86_64` (including Rosetta2 emulation) or `arm64` (Apple Silicon a/k/a M1 or M2) The following commands will build a release of iODBC that works on macOS Big Sur (11.x) through macOS Ventura (13.x), running on Intel (`x86_64`) or Apple Silicon (`arm64` a/k/a `M1` or `M2`): ```shell $ CFLAGS="-O -arch arm64 -arch x86_64" $ CFLAGS="$CFLAGS -mmacosx-version-min=10.9" $ export CFLAGS $ sh autogen.sh $ ./configure \ --disable-dependency-tracking \ --prefix=/usr/local/iODBC.universal $ make $ sudo make install ``` ### Test DSN connection Once you have installed an ODBC driver and configured a DSN, you will be able to make a connection using the `iodbctest` tool which is located at — /usr/local/iODBC.universal/bin/iodbctest libiodbc-3.52.16/AUTHORS0000664000175000017500000000173714013216212011432 00000000000000# # $Id$ # # List of Authors/Contributers # # The iODBC driver manager # Original Author: ---------------- Ke Jin (kj) Current Maintainer: ------------------- Patrick van Kleef (pvk) Contributors: ------------- Per Schroder (ps) - Added VMS port George Kodinov (gk) - Added ODBC 3.x support Emmanuel Poitier (ep) - Added iodbcinst support - Added iodbcadm-gtk Christian Hammers (ch) - Maintainer of iODBC packaging for the Debian project Sergei Malinin (sm) - Added Unicode support Tim Haynes (th) - Maintainer iODBC.org web site Max Khon (mk) - iODBC fixes and extentions This list is not complete. If you have contributed to this project and want to appear on this list, please email the current maintainer.