FreeTDS Source Code Modifications v1.0 August 2018 - Omnis Software Ltd. ========================================== These notes are in compliance with the terms of the GNU Lesser General Public License and are intended to allow developers to compile their own libct dynamic library from the source bundle obtained directly from the FreeTDS website: www.freetds.org, whilst maintaining compatibility with the pre-compiled libct library that we provide. We recommend making the following changes to the default source code prior to executing the makefile: 1. Change to src/tds/locale.c: tds_get_locale(), line 67 #if HAVE_LOCALE_H changed to #if 0 Forces the code to read the LANG environment variable 2. Change to src/tds/data.c: tds_generic_put(), line 964 Combined default: with case 8: and removed existing default: section. So that tds_put_int8() occurs in the default instance. Existing default code has only partial implementation. 3. Change to src/ctlib/ct.c: ct_describe(), line 2357 Changed if (item < 1 || item > resinfo->num_cols) to if (!resinfo || item < 1 || item > resinfo->num_cols) To avoid a crash when resinfo is null. ct_describe() will fail gracefully instead when there is no result info. 4. Change to src/ctlib/ct.c: ct_setparam, line 3309 Removed/commented-out line starting tdsdump_log(TDS_DBG_FUNC, "ct_setparam() command type = ..." Inexplicably, this was causing the "indicator" parameter to be cleared. 5. Change to src/ctlib/cs.c: cs_locale(), line 939 Added the following section to satisfy case CS_LC_ALL: /* what to do here of there is locale data? */ if (!buffer && locale) { locale->language = strdup(ctx->tds_ctx->locale->language? ctx->tds_ctx->locale->language : (char *)"us_english"); locale->charset = strdup(ctx->tds_ctx->locale->server_charset? ctx->tds_ctx->locale->server_charset : (char *)"iso_1"); locale->time = strdup(ctx->tds_ctx->locale->date_fmt); code = CS_SUCCEED; } break; (Copies info from ctx->tds_ctx->locale into locale). Also commented-out the tdsdump_log() statement on line 933 which was causing the buffer to be cleared.