Skip to content

Commit

Permalink
odbc_dm should be const (#207)
Browse files Browse the repository at this point in the history
  • Loading branch information
cnliao authored and quinnj committed Oct 27, 2018
1 parent f779b91 commit c614991
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/types.jl
@@ -1,14 +1,12 @@
using Libdl, Dates, Printf, DecFP, WeakRefStrings

# Link to ODBC Driver Manager (system-dependent)
let
global odbc_dm
const odbc_dm = let
if !isdefined(@__MODULE__, :odbc_dm)
Sys.islinux() && (lib_choices = ["libodbc", "libodbc.so", "libodbc.so.1", "libodbc.so.2", "libodbc.so.3"])
Sys.iswindows() && (lib_choices = ["odbc32"])
Sys.isapple() && (lib_choices = ["libodbc.2.dylib","libodbc.dylib","libiodbc","libiodbc.dylib","libiodbc.1.dylib","libiodbc.2.dylib","libiodbc.3.dylib"])
lib = Libdl.find_library(lib_choices)
odbc_dm = lib
Libdl.find_library(lib_choices)
end
end

Expand Down

0 comments on commit c614991

Please sign in to comment.