Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | TEA upgrade. Remove some usages of functions implemented through macro's, just do the calls directly. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
6c85958e390feb539b533079b79e97ea |
User & Date: | jan.nijtmans 2019-02-26 20:23:49.643 |
Context
2019-08-29
| ||
11:08 | Updated to latest Tcl nmake files. Bug fix [d6c4db25560b1a8c3a26f9369e57cf00327cb9b4]. check-in: c98b08b629 user: apnadkarni tags: trunk | |
2019-02-26
| ||
20:23 | TEA upgrade. Remove some usages of functions implemented through macro's, just do the calls directly. check-in: 6c85958e39 user: jan.nijtmans tags: trunk | |
2018-11-01
| ||
16:09 | TEA update check-in: 05df62777a user: dgp tags: trunk, tdbcodbc-1-1-0 | |
Changes
Changes to configure.
︙ | ︙ | |||
636 637 638 639 640 641 642 | SHLIB_LD_LIBS SHLIB_LD STLIB_LD CFLAGS_WARNING CFLAGS_OPTIMIZE CFLAGS_DEBUG RC | < | 636 637 638 639 640 641 642 643 644 645 646 647 648 649 | SHLIB_LD_LIBS SHLIB_LD STLIB_LD CFLAGS_WARNING CFLAGS_OPTIMIZE CFLAGS_DEBUG RC AR STUBS_BUILD SHARED_BUILD TCL_THREADS TCL_INCLUDES PKG_OBJECTS PKG_SOURCES |
︙ | ︙ | |||
719 720 721 722 723 724 725 726 727 728 729 730 731 732 | pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir | > | 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 | pdfdir dvidir htmldir infodir docdir oldincludedir includedir runstatedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir |
︙ | ︙ | |||
750 751 752 753 754 755 756 | with_tclinclude enable_threads enable_shared enable_stubs enable_64bit enable_64bit_vis enable_rpath | < < | 750 751 752 753 754 755 756 757 758 759 760 761 762 763 | with_tclinclude enable_threads enable_shared enable_stubs enable_64bit enable_64bit_vis enable_rpath enable_symbols ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS |
︙ | ︙ | |||
801 802 803 804 805 806 807 808 809 810 811 812 813 814 | sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' | > | 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 | 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}' |
︙ | ︙ | |||
1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 | ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; | > > > > > > > > > | 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 | 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 ;; |
︙ | ︙ | |||
1190 1191 1192 1193 1194 1195 1196 | 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 \ | | | 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 | 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;; |
︙ | ︙ | |||
1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 | Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | > | 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 | 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] |
︙ | ︙ | |||
1379 1380 1381 1382 1383 1384 1385 | --enable-threads build with threads (default: on) --enable-shared build and link with shared libraries (default: on) --enable-stubs build and link with stub libraries. Always true for shared builds (default: on) --enable-64bit enable 64bit support (default: off) --enable-64bit-vis enable 64bit Sparc VIS support (default: off) --disable-rpath disable rpath support (default: on) | < < | 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 | --enable-threads build with threads (default: on) --enable-shared build and link with shared libraries (default: on) --enable-stubs build and link with stub libraries. Always true for shared builds (default: on) --enable-64bit enable 64bit support (default: off) --enable-64bit-vis enable 64bit Sparc VIS support (default: off) --disable-rpath disable rpath support (default: on) --enable-symbols build with debugging symbols (default: off) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-tcl directory containing tcl configuration (tclConfig.sh) --with-tdbc directory containing tdbc configuration (tdbcConfig.sh) --with-tclinclude directory containing the public Tcl header files Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a nonstandard directory <lib dir> LIBS libraries to pass to the linker, e.g. -l<library> |
︙ | ︙ | |||
3566 3567 3568 3569 3570 3571 3572 | ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : | > | | 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 | ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # first test we've already retrieved platform (cross-compile), fallback to unix otherwise: TEA_PLATFORM="${TEA_PLATFORM-unix}" CYGPATH=echo else TEA_PLATFORM="windows" # Extract the first word of "cygpath", so it can be a program name with args. set dummy cygpath; ac_word=$2 |
︙ | ︙ | |||
6030 6031 6032 6033 6034 6035 6036 | Building ${PACKAGE_NAME} without threads enabled, but building against Tcl that IS thread-enabled. It is recommended to use --enable-threads." >&5 $as_echo "$as_me: WARNING: Building ${PACKAGE_NAME} without threads enabled, but building against Tcl that IS thread-enabled. It is recommended to use --enable-threads." >&2;} fi ;; | < < < < < < < < < < < < | 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 | Building ${PACKAGE_NAME} without threads enabled, but building against Tcl that IS thread-enabled. It is recommended to use --enable-threads." >&5 $as_echo "$as_me: WARNING: Building ${PACKAGE_NAME} without threads enabled, but building against Tcl that IS thread-enabled. It is recommended to use --enable-threads." >&2;} fi ;; esac #-------------------------------------------------------------------- # The statement below defines a collection of symbols related to # building as a shared library instead of a static library. |
︙ | ︙ | |||
6313 6314 6315 6316 6317 6318 6319 | else doRpath=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doRpath" >&5 $as_echo "$doRpath" >&6; } | < < < < < < < < < < < < < < < < < < | 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 | else doRpath=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doRpath" >&5 $as_echo "$doRpath" >&6; } # Set the variable "system" to hold the name and version number # for the system. { $as_echo "$as_me:${as_lineno-$LINENO}: checking system version" >&5 $as_echo_n "checking system version... " >&6; } if ${tcl_cv_sys_version+:} false; then : |
︙ | ︙ | |||
6532 6533 6534 6535 6536 6537 6538 | else { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using 64-bit $MACHINE mode" >&5 $as_echo " Using 64-bit $MACHINE mode" >&6; } do64bit_ok="yes" fi fi | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 | else { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using 64-bit $MACHINE mode" >&5 $as_echo " Using 64-bit $MACHINE mode" >&6; } do64bit_ok="yes" fi fi if test "$GCC" != "yes" ; then if test "${SHARED_BUILD}" = "0" ; then runtime=-MT else runtime=-MD fi case "x`echo \${VisualStudioVersion}`" in |
︙ | ︙ | |||
6697 6698 6699 6700 6701 6702 6703 | # Convert foo.lib to -lfoo for GCC. No-op if not *.lib i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'` fi PKG_LIBS="$PKG_LIBS $i" done | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 | # Convert foo.lib to -lfoo for GCC. No-op if not *.lib i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'` fi PKG_LIBS="$PKG_LIBS $i" done else RC="rc" lflags="${lflags} -nologo" LINKBIN="link" CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d" CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}" fi |
︙ | ︙ | |||
6907 6908 6909 6910 6911 6912 6913 | # For information on what debugtype is most useful, see: # http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp # and also # http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx # This essentially turns it all on. LDFLAGS_DEBUG="-debug -debugtype:cv" LDFLAGS_OPTIMIZE="-release" | < < < < | | < | 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 | # For information on what debugtype is most useful, see: # http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp # and also # http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx # This essentially turns it all on. LDFLAGS_DEBUG="-debug -debugtype:cv" LDFLAGS_OPTIMIZE="-release" LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}" LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}" fi SHLIB_SUFFIX=".dll" SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll' TCL_LIB_VERSIONS_OK=nodots ;; |
︙ | ︙ | |||
7597 7598 7599 7600 7601 7602 7603 | SHLIB_LD="${SHLIB_LD} -Wl,-single_module" fi # TEA specific: link shlib with current and compatibility version flags vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([0-9]\{1,5\}\)\(\(\.[0-9]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d` SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}" SHLIB_SUFFIX=".dylib" | < < < < < < | 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 | SHLIB_LD="${SHLIB_LD} -Wl,-single_module" fi # TEA specific: link shlib with current and compatibility version flags vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([0-9]\{1,5\}\)\(\(\.[0-9]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d` SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}" SHLIB_SUFFIX=".dylib" LDFLAGS="$LDFLAGS -headerpad_max_install_names" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -search_paths_first flag" >&5 $as_echo_n "checking if ld accepts -search_paths_first flag... " >&6; } if ${tcl_cv_ld_search_paths_first+:} false; then : $as_echo_n "(cached) " >&6 else |
︙ | ︙ |
Changes to generic/tdbcodbc.c.
︙ | ︙ | |||
52 53 54 55 56 57 58 | static int sizeofSQLWCHAR = sizeof(SQLWCHAR); /* Preset, will be autodetected later */ /* * Objects to create within the literal pool */ | | | 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | static int sizeofSQLWCHAR = sizeof(SQLWCHAR); /* Preset, will be autodetected later */ /* * Objects to create within the literal pool */ const char* const LiteralValues[] = { "0", "1", "-encoding", "-isolation", "-readonly", "-timeout", "id", |
︙ | ︙ | |||
996 997 998 999 1000 1001 1002 | } Tcl_DStringFree(&bufferDS); Tcl_ListObjAppendElement(NULL, codeObj, lineObj); if (i == 1) { Tcl_ListObjAppendElement(NULL, codeObj, Tcl_NewStringObj("ODBC", -1)); } | | | 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 | } Tcl_DStringFree(&bufferDS); Tcl_ListObjAppendElement(NULL, codeObj, lineObj); if (i == 1) { Tcl_ListObjAppendElement(NULL, codeObj, Tcl_NewStringObj("ODBC", -1)); } Tcl_ListObjAppendElement(NULL, codeObj, Tcl_NewWideIntObj(nativeError)); /* Add the error message to the return value */ Tcl_DStringInit(&bufferDS); DStringAppendWChars(&bufferDS, msg, msgLen); Tcl_AppendToObj(resultObj, sep, -1); Tcl_AppendToObj(resultObj, Tcl_DStringValue(&bufferDS), |
︙ | ︙ | |||
1640 1641 1642 1643 1644 1645 1646 | if (!SQL_SUCCEEDED(rc)) { TransferSQLError(interp, SQL_HANDLE_DBC, hDBC, "(getting access mode of connection)"); return TCL_ERROR; } Tcl_ListObjAppendElement(NULL, retval, literals[LIT_READONLY]); Tcl_ListObjAppendElement(NULL, retval, | | | | | | 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 | if (!SQL_SUCCEEDED(rc)) { TransferSQLError(interp, SQL_HANDLE_DBC, hDBC, "(getting access mode of connection)"); return TCL_ERROR; } Tcl_ListObjAppendElement(NULL, retval, literals[LIT_READONLY]); Tcl_ListObjAppendElement(NULL, retval, Tcl_NewWideIntObj(mode == SQL_MODE_READ_ONLY)); /* -timeout */ rc = SQLGetConnectAttr(hDBC, SQL_ATTR_CONNECTION_TIMEOUT, (SQLPOINTER)&seconds, 0, NULL); if (!SQL_SUCCEEDED(rc)) { if (SQLStateIs(SQL_HANDLE_DBC, hDBC, "HYC00")) { seconds = 0; } else { TransferSQLError(interp, SQL_HANDLE_DBC, hDBC, "(getting connection timeout value)"); return TCL_ERROR; } } Tcl_ListObjAppendElement(NULL, retval, literals[LIT_TIMEOUT]); Tcl_ListObjAppendElement(NULL, retval, Tcl_NewWideIntObj(1000 * (Tcl_WideInt)seconds)); /* end of options */ Tcl_SetObjResult(interp, retval); return TCL_OK; } else if (objc == 1) { /* look up a single configuration option */ if (Tcl_GetIndexFromObjStruct(interp, objv[0], options, sizeof(char *), "option", 0, &indx) != TCL_OK) { return TCL_ERROR; } switch (indx) { case COPTION_ENCODING: sysEncoding = Tcl_GetEncoding(interp, NULL); |
︙ | ︙ | |||
1718 1719 1720 1721 1722 1723 1724 | (SQLPOINTER) &mode, 0, NULL); if (!SQL_SUCCEEDED(rc)) { TransferSQLError(interp, SQL_HANDLE_DBC, hDBC, "(getting access mode of connection)"); return TCL_ERROR; } Tcl_SetObjResult(interp, | | | | | | 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 | (SQLPOINTER) &mode, 0, NULL); if (!SQL_SUCCEEDED(rc)) { TransferSQLError(interp, SQL_HANDLE_DBC, hDBC, "(getting access mode of connection)"); return TCL_ERROR; } Tcl_SetObjResult(interp, Tcl_NewWideIntObj(mode == SQL_MODE_READ_ONLY)); break; case COPTION_TIMEOUT: rc = SQLGetConnectAttr(hDBC, SQL_ATTR_CONNECTION_TIMEOUT, (SQLPOINTER)&seconds, 0, NULL); if (SQLStateIs(SQL_HANDLE_DBC, hDBC, "HYC00")) { seconds = 0; } else { if (!SQL_SUCCEEDED(rc)) { TransferSQLError(interp, SQL_HANDLE_DBC, hDBC, "(getting connection timeout value)"); return TCL_ERROR; } } Tcl_SetObjResult(interp, Tcl_NewWideIntObj(1000 * (Tcl_WideInt) seconds)); break; } return TCL_OK; } /* set configuration options */ for (i = 0; i < objc; i+=2) { if (Tcl_GetIndexFromObjStruct(interp, objv[i], options, sizeof(char *), "option", 0, &indx) != TCL_OK) { return TCL_ERROR; } switch (indx) { case COPTION_ENCODING: /* * Encoding - report "not implemented" unless the encoding |
︙ | ︙ | |||
1812 1813 1814 1815 1816 1817 1818 | Tcl_SetErrorCode(interp, "TDBC", "GENERAL_ERROR", "HY010", "ODBC", "-1", NULL); return TCL_ERROR; } /* Make sure that Tk is present. */ | | | | | | 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 | Tcl_SetErrorCode(interp, "TDBC", "GENERAL_ERROR", "HY010", "ODBC", "-1", NULL); return TCL_ERROR; } /* Make sure that Tk is present. */ if (Tcl_PkgPresentEx(interp, "Tk", "8.4", 0, NULL) == NULL) { Tcl_ResetResult(interp); Tcl_SetObjResult(interp, Tcl_NewStringObj("cannot use -parent " "option because Tk is not " "loaded", -1)); Tcl_SetErrorCode(interp, "TDBC", "GENERAL_ERROR", "HY000", "ODBC", "-1", NULL); return TCL_ERROR; } /* Try to obtain the HWND of the parent window. */ command = Tcl_NewObj(); Tcl_ListObjAppendElement(NULL, command, literals[LIT_WINFO]); Tcl_ListObjAppendElement(NULL, command, literals[LIT_ID]); Tcl_ListObjAppendElement(NULL, command, objv[i+1]); Tcl_IncrRefCount(command); status = Tcl_EvalObjEx(interp, command, 0); if (status == TCL_OK) { status = Tcl_GetIntFromObj(interp, Tcl_GetObjResult(interp), &w); } Tcl_DecrRefCount(command); if (status != TCL_OK) { Tcl_AppendObjToErrorInfo(interp, Tcl_NewStringObj( "\n (retrieving ID of parent window)", -1)); return status; } Tcl_ResetResult(interp); *hParentWindowPtr = INT2PTR(w); *connectFlagsPtr = SQL_DRIVER_COMPLETE_REQUIRED; break; |
︙ | ︙ | |||
2789 2790 2791 2792 2793 2794 2795 | retval = Tcl_NewObj(); if (sdata->subVars != NULL) { Tcl_ListObjGetElements(NULL, sdata->subVars, &nParams, ¶mNames); for (i = 0; i < nParams; ++i) { ParamData* pd = sdata->params + i; Tcl_ListObjAppendElement(NULL, retval, paramNames[i]); | | | | | | | 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 | retval = Tcl_NewObj(); if (sdata->subVars != NULL) { Tcl_ListObjGetElements(NULL, sdata->subVars, &nParams, ¶mNames); for (i = 0; i < nParams; ++i) { ParamData* pd = sdata->params + i; Tcl_ListObjAppendElement(NULL, retval, paramNames[i]); Tcl_ListObjAppendElement(NULL, retval, Tcl_NewWideIntObj(pd->flags)); Tcl_ListObjAppendElement(NULL, retval, Tcl_NewWideIntObj(pd->dataType)); Tcl_ListObjAppendElement(NULL, retval, Tcl_NewWideIntObj(pd->precision)); Tcl_ListObjAppendElement(NULL, retval, Tcl_NewWideIntObj(pd->scale)); Tcl_ListObjAppendElement(NULL, retval, Tcl_NewWideIntObj(pd->nullable)); } } Tcl_SetObjResult(interp, retval); return TCL_OK; } /* |
︙ | ︙ | |||
3322 3323 3324 3325 3326 3327 3328 | sdata = NewStatement(cdata, connectionObject); /* Absorb parameters */ have[OPT_FOREIGN] = have[OPT_PRIMARY] = 0; for (i = skip+1; i+1 < objc; i+=2) { | | | | 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 | sdata = NewStatement(cdata, connectionObject); /* Absorb parameters */ have[OPT_FOREIGN] = have[OPT_PRIMARY] = 0; for (i = skip+1; i+1 < objc; i+=2) { if (Tcl_GetIndexFromObjStruct(interp, objv[i], options, sizeof(char *), "option", 0, ¶mIdx) != TCL_OK) { goto freeSData; } if (have[paramIdx]) { resultObj = Tcl_NewStringObj("duplicate option \"", -1); Tcl_AppendObjToObj(resultObj, objv[i]); Tcl_AppendToObj(resultObj, "\"", -1); Tcl_SetErrorCode(interp, "TDBC", "GENERAL_ERROR", "HY001", |
︙ | ︙ | |||
4326 4327 4328 4329 4330 4331 4332 | char info[80]; sprintf(info, "(retrieving result set column #%d)\n", i+1); TransferSQLError(interp, SQL_HANDLE_STMT, rdata->hStmt, info); ckfree(info); return TCL_ERROR; } if (colLen != SQL_NULL_DATA && colLen != SQL_NO_TOTAL) { | | | 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 | char info[80]; sprintf(info, "(retrieving result set column #%d)\n", i+1); TransferSQLError(interp, SQL_HANDLE_STMT, rdata->hStmt, info); ckfree(info); return TCL_ERROR; } if (colLen != SQL_NULL_DATA && colLen != SQL_NO_TOTAL) { colObj = Tcl_NewWideIntObj(colLong); } break; case SQL_FLOAT: /* * A 'float' is converted to a 'double' if it fits; * to a string, otherwise. |
︙ | ︙ | |||
4519 4520 4521 4522 4523 4524 4525 | Tcl_ObjectGetMetadata(thisObject, &resultSetDataType); /* Data pertaining to the current result set */ if (objc != 2) { Tcl_WrongNumArgs(interp, 2, objv, ""); return TCL_ERROR; } | | | 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 | Tcl_ObjectGetMetadata(thisObject, &resultSetDataType); /* Data pertaining to the current result set */ if (objc != 2) { Tcl_WrongNumArgs(interp, 2, objv, ""); return TCL_ERROR; } Tcl_SetObjResult(interp, Tcl_NewWideIntObj(rdata->rowCount)); return TCL_OK; } /* *----------------------------------------------------------------------------- * * DeleteResultSetMetadata, DeleteResultSet -- |
︙ | ︙ | |||
5100 5101 5102 5103 5104 5105 5106 | Tcl_ListObjAppendElement(NULL, errorCodeObj, Tcl_NewStringObj("?", -1)); } else { Tcl_ListObjAppendElement(NULL, errorCodeObj, Tcl_NewStringObj(OdbcErrorCodeNames[j].name, -1)); } Tcl_ListObjAppendElement(NULL, errorCodeObj, | | | 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 | Tcl_ListObjAppendElement(NULL, errorCodeObj, Tcl_NewStringObj("?", -1)); } else { Tcl_ListObjAppendElement(NULL, errorCodeObj, Tcl_NewStringObj(OdbcErrorCodeNames[j].name, -1)); } Tcl_ListObjAppendElement(NULL, errorCodeObj, Tcl_NewWideIntObj(errorCode)); case SQL_NO_DATA: case SQL_ERROR: finished = 1; break; } |
︙ | ︙ | |||
5290 5291 5292 5293 5294 5295 5296 | Tcl_ListObjAppendElement(NULL, errorCodeObj, Tcl_NewStringObj("?", -1)); } else { Tcl_ListObjAppendElement(NULL, errorCodeObj, Tcl_NewStringObj(OdbcErrorCodeNames[j].name, -1)); } Tcl_ListObjAppendElement(NULL, errorCodeObj, | | | 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 | Tcl_ListObjAppendElement(NULL, errorCodeObj, Tcl_NewStringObj("?", -1)); } else { Tcl_ListObjAppendElement(NULL, errorCodeObj, Tcl_NewStringObj(OdbcErrorCodeNames[j].name, -1)); } Tcl_ListObjAppendElement(NULL, errorCodeObj, Tcl_NewWideIntObj(errorCode)); case SQL_NO_DATA: case SQL_ERROR: finished = 1; break; } |
︙ | ︙ | |||
5351 5352 5353 5354 5355 5356 5357 | } if (Tdbc_InitStubs(interp) == NULL) { return TCL_ERROR; } /* Provide the current package */ | | | 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 | } if (Tdbc_InitStubs(interp) == NULL) { return TCL_ERROR; } /* Provide the current package */ if (Tcl_PkgProvideEx(interp, "tdbc::odbc", PACKAGE_VERSION, NULL) == TCL_ERROR) { return TCL_ERROR; } /* Initialize the ODBC environment */ hEnv = GetHEnv(interp); if (hEnv == SQL_NULL_HANDLE) { |
︙ | ︙ |