-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Changed cursor initialization (should fix #88) - Fix for "1.0.17/1.0.18 regression: COMMIT and ROLLBACK delete all cursor definitions -> Status -111" (#119) - Merged pull request #127 (thanks to Simon Sobisch)
- Loading branch information
Showing
90 changed files
with
15,688 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
# Process this file with autoconf to produce a configure script. | ||
|
||
AC_PREREQ([2.69]) | ||
AC_INIT([gixsql], [1.0.18a], [[email protected]]) | ||
AC_INIT([gixsql], [1.0.18b], [[email protected]]) | ||
AC_CONFIG_SRCDIR([config.h.in]) | ||
AC_CONFIG_HEADERS([config.h]) | ||
AM_INIT_AUTOMAKE([1.9.6 -Wall -Werror dist-bzip2 subdir-objects]) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace gixsql_tests | ||
{ | ||
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] | ||
public class CobolSourceAttribute : Attribute | ||
{ | ||
public string Module; | ||
public string[] Dependencies; | ||
|
||
public CobolSourceAttribute(string m, params string[] d) | ||
{ | ||
Module = m; | ||
Dependencies = d; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
//using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
using System; | ||
using System.IO; | ||
using System.Xml; | ||
|
||
namespace gixsql_tests | ||
{ | ||
|
||
internal class CompilerConfig | ||
{ | ||
public string compiler_id { get; private set; } | ||
|
||
public string gix_data_dir { get; private set; } | ||
public string gix_bin_path { get; private set; } | ||
public string gix_lib_path { get; private set; } | ||
public string gix_copy_path { get; private set; } | ||
|
||
public string cobc_homedir { get; private set; } | ||
public string cobc_bin_dir_path { get; private set; } | ||
public string cobc_lib_dir_path { get; private set; } | ||
public string cobc_config_dir_path { get; private set; } | ||
|
||
public string link_lib_dir_path { get; private set; } | ||
public string link_lib_name { get; private set; } | ||
public string link_lib_lname { get; private set; } | ||
|
||
public string gixpp_exe { get; private set; } | ||
public string cobc_exe { get; private set; } | ||
public string cobcrun_exe { get; private set; } | ||
|
||
public static CompilerConfig init(CompilerType ctype, string configuration, string platform, string build_type) | ||
{ | ||
CompilerConfig cc = new CompilerConfig(); | ||
|
||
string gix_base_path = Environment.GetEnvironmentVariable($"GIX_BASE_PATH_{platform}"); | ||
|
||
if (ctype == CompilerType.MSVC) | ||
{ | ||
cc.compiler_id = Environment.GetEnvironmentVariable("VC_COMPILER_ID"); | ||
} | ||
else | ||
{ | ||
cc.compiler_id = platform.ToLower() == "x86" ? Environment.GetEnvironmentVariable("MINGW_COMPILER_X86_ID") : Environment.GetEnvironmentVariable("MINGW_COMPILER_X64_ID"); | ||
} | ||
|
||
string local_app_data = Environment.GetEnvironmentVariable("LOCALAPPDATA"); | ||
cc.gix_data_dir = Path.Combine(local_app_data, "Gix"); | ||
|
||
string cdef_file = Path.Combine(cc.gix_data_dir, "compiler-defs", cc.compiler_id + ".def"); | ||
Assert.IsTrue(File.Exists(cdef_file)); | ||
|
||
XmlDocument xdef = new XmlDocument(); | ||
Assert.IsNotNull(xdef); | ||
xdef.Load(cdef_file); | ||
|
||
XmlElement xh = (XmlElement)xdef.SelectSingleNode($"//homedir"); | ||
Assert.IsNotNull(xh); | ||
cc.cobc_homedir = xh.InnerText; | ||
|
||
XmlElement xp = (XmlElement)xdef.SelectSingleNode($"//platform[@id=\"{platform}\"]"); | ||
Assert.IsNotNull(xp); | ||
|
||
cc.cobc_bin_dir_path = xp.SelectSingleNode("bin_dir_path")?.InnerText; | ||
cc.cobc_bin_dir_path = cc.cobc_bin_dir_path.Replace("${homedir}", cc.cobc_homedir).Replace("${gixdata}", cc.gix_data_dir); | ||
Assert.IsTrue(Directory.Exists(cc.cobc_bin_dir_path)); | ||
|
||
cc.cobc_lib_dir_path = xp.SelectSingleNode("lib_dir_path")?.InnerText; | ||
cc.cobc_lib_dir_path = cc.cobc_lib_dir_path.Replace("${homedir}", cc.cobc_homedir).Replace("${gixdata}", cc.gix_data_dir); | ||
Assert.IsTrue(Directory.Exists(cc.cobc_lib_dir_path)); | ||
|
||
cc.cobc_config_dir_path = xp.SelectSingleNode("config_dir_path")?.InnerText; | ||
cc.cobc_config_dir_path = cc.cobc_config_dir_path.Replace("${homedir}", cc.cobc_homedir).Replace("${gixdata}", cc.gix_data_dir); | ||
Assert.IsTrue(Directory.Exists(cc.cobc_config_dir_path)); | ||
|
||
cc.gix_copy_path = Path.Combine(gix_base_path, "lib", "copy"); | ||
Assert.IsTrue(Directory.Exists(cc.gix_copy_path)); | ||
Assert.IsTrue(File.Exists(Path.Combine(cc.gix_copy_path, "SQLCA.cpy"))); | ||
|
||
cc.gix_bin_path = Path.Combine(gix_base_path, "bin"); | ||
cc.gix_lib_path = Path.Combine(gix_base_path, "lib"); | ||
cc.link_lib_dir_path = Path.Combine(cc.gix_lib_path, platform, (ctype == CompilerType.MSVC ? "msvc" : "gcc")); | ||
cc.link_lib_name = ctype == CompilerType.MSVC ? "libgixsql.lib" : "libgixsql.a"; | ||
Assert.IsTrue(File.Exists(Path.Combine(cc.link_lib_dir_path, cc.link_lib_name))); | ||
|
||
cc.gixpp_exe = Path.Combine(cc.gix_bin_path, "gixpp.exe"); | ||
Assert.IsTrue(File.Exists(cc.gixpp_exe)); | ||
|
||
cc.cobc_exe = Path.Combine(cc.cobc_bin_dir_path, "cobc.exe"); | ||
Assert.IsTrue(File.Exists(cc.cobc_exe)); | ||
|
||
cc.cobcrun_exe = Path.Combine(cc.cobc_bin_dir_path, "cobcrun.exe"); | ||
Assert.IsTrue(File.Exists(cc.cobcrun_exe)); | ||
|
||
cc.link_lib_lname = ctype == CompilerType.MSVC ? "libgixsql" : "gixsql"; | ||
|
||
return cc; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
//using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
using System; | ||
using System.IO; | ||
using System.Xml; | ||
|
||
namespace gixsql_tests | ||
{ | ||
|
||
public class CompilerConfig2 | ||
{ | ||
public string compiler_id { get; set; } | ||
|
||
public string gix_data_dir { get; set; } | ||
public string gix_bin_path { get; set; } | ||
public string gix_lib_path { get; set; } | ||
public string gix_copy_path { get; set; } | ||
|
||
public string cobc_homedir { get; set; } | ||
public string cobc_bin_dir_path { get; set; } | ||
public string cobc_lib_dir_path { get; set; } | ||
public string cobc_config_dir_path { get; set; } | ||
|
||
public string link_lib_dir_path { get; set; } | ||
public string link_lib_name { get; set; } | ||
public string link_lib_lname { get; set; } | ||
|
||
public string gixpp_exe { get; set; } | ||
public string cobc_exe { get; set; } | ||
public string cobcrun_exe { get; set; } | ||
public bool IsVsBased { get; set; } | ||
|
||
public static CompilerConfig2 init(string ctype, string architecture, string c_id) | ||
{ | ||
try | ||
{ | ||
CompilerConfig2 cc = new CompilerConfig2(); | ||
|
||
string gix_base_path = Environment.GetEnvironmentVariable("GIXSQL_INSTALL_BASE"); | ||
|
||
cc.compiler_id = c_id; | ||
|
||
string local_app_data = Environment.GetEnvironmentVariable("LOCALAPPDATA"); | ||
cc.gix_data_dir = Path.Combine(local_app_data, "Gix"); | ||
|
||
string cdef_file = Path.Combine(cc.gix_data_dir, "compiler-defs", cc.compiler_id + ".def"); | ||
if (!File.Exists(cdef_file)) throw new Exception(cdef_file); ; | ||
|
||
XmlDocument xdef = new XmlDocument(); | ||
xdef.Load(cdef_file); | ||
|
||
XmlElement xh = (XmlElement)xdef.SelectSingleNode($"//homedir"); | ||
cc.cobc_homedir = xh.InnerText; | ||
|
||
XmlElement xp = (XmlElement)xdef.SelectSingleNode($"//platform[@id=\"{architecture}\"]"); | ||
|
||
XmlElement xv = (XmlElement)xdef.SelectSingleNode($"//is_vs_based"); | ||
cc.IsVsBased = Boolean.Parse(xv.InnerText); | ||
|
||
cc.cobc_bin_dir_path = xp.SelectSingleNode("bin_dir_path")?.InnerText; | ||
cc.cobc_bin_dir_path = cc.cobc_bin_dir_path.Replace("${homedir}", cc.cobc_homedir).Replace("${gixdata}", cc.gix_data_dir); | ||
if (!Directory.Exists(cc.cobc_bin_dir_path)) throw new Exception(cc.cobc_bin_dir_path); | ||
|
||
cc.cobc_lib_dir_path = xp.SelectSingleNode("lib_dir_path")?.InnerText; | ||
cc.cobc_lib_dir_path = cc.cobc_lib_dir_path.Replace("${homedir}", cc.cobc_homedir).Replace("${gixdata}", cc.gix_data_dir); | ||
if (!Directory.Exists(cc.cobc_lib_dir_path)) throw new Exception(cc.cobc_lib_dir_path); | ||
|
||
cc.cobc_config_dir_path = xp.SelectSingleNode("config_dir_path")?.InnerText; | ||
cc.cobc_config_dir_path = cc.cobc_config_dir_path.Replace("${homedir}", cc.cobc_homedir).Replace("${gixdata}", cc.gix_data_dir); | ||
if (!Directory.Exists(cc.cobc_config_dir_path)) throw new Exception(cc.cobc_config_dir_path); | ||
|
||
cc.gix_copy_path = Path.Combine(gix_base_path, "lib", "copy"); | ||
if (!Directory.Exists(cc.gix_copy_path)) throw new Exception(cc.gix_copy_path); | ||
if (!File.Exists(Path.Combine(cc.gix_copy_path, "SQLCA.cpy"))) throw new Exception(); | ||
|
||
cc.gix_bin_path = Path.Combine(gix_base_path, "bin"); | ||
cc.gix_lib_path = Path.Combine(gix_base_path, "lib"); | ||
cc.link_lib_dir_path = Path.Combine(cc.gix_lib_path, architecture, ctype); | ||
cc.link_lib_name = cc.IsVsBased ? "libgixsql.lib" : "libgixsql.a"; | ||
if (!File.Exists(Path.Combine(cc.link_lib_dir_path, cc.link_lib_name))) throw new Exception(Path.Combine(cc.link_lib_dir_path, cc.link_lib_name)); | ||
|
||
cc.gixpp_exe = Path.Combine(cc.gix_bin_path, "gixpp.exe"); | ||
if (!File.Exists(cc.gixpp_exe)) throw new Exception(cc.gixpp_exe); | ||
|
||
cc.cobc_exe = Path.Combine(cc.cobc_bin_dir_path, "cobc.exe"); | ||
if (!File.Exists(cc.cobc_exe)) throw new Exception(cc.cobc_exe); | ||
|
||
cc.cobcrun_exe = Path.Combine(cc.cobc_bin_dir_path, "cobcrun.exe"); | ||
if (!File.Exists(cc.cobcrun_exe)) throw new Exception(cc.cobcrun_exe); | ||
|
||
cc.link_lib_lname = cc.IsVsBased ? "libgixsql" : "gixsql"; | ||
|
||
return cc; | ||
} | ||
catch (Exception ex) | ||
{ | ||
Console.WriteLine(ex.Message + "\n" + ex.StackTrace); | ||
throw ex; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace gixsql_tests | ||
{ | ||
public enum CompilerType | ||
{ | ||
MSVC, | ||
MinGW | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace gixsql_tests | ||
{ | ||
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] | ||
public class GixSqlDataSourceAttribute : Attribute | ||
{ | ||
public string type; | ||
public int index; | ||
|
||
public GixSqlDataSourceAttribute(string t, int i) | ||
{ | ||
type = t; | ||
index = i; | ||
} | ||
} | ||
} |
Oops, something went wrong.