bugfix: openssl import for macosx

This commit is contained in:
Araq 2012-12-19 21:45:18 +01:00
commit b6c8e16b0f
4 changed files with 11 additions and 7 deletions

View file

@ -61,8 +61,6 @@ proc InitDefines*() =
DefineSymbol("nimmixin") DefineSymbol("nimmixin")
DefineSymbol("nimeffects") DefineSymbol("nimeffects")
DefineSymbol("nimbabel") DefineSymbol("nimbabel")
when defined(useFFI):
DefineSymbol("nimffi")
# add platform specific symbols: # add platform specific symbols:
case targetCPU case targetCPU

View file

@ -33,6 +33,9 @@ proc getDll(cache: var TDllCache; dll: string): pointer =
InternalError("cannot load: " & dll) InternalError("cannot load: " & dll)
cache[dll] = result cache[dll] = result
const
nkPtrLit = nkIntLit # hopefully we can get rid of this hack soon
proc importcSymbol*(sym: PSym): PNode = proc importcSymbol*(sym: PSym): PNode =
let name = ropeToStr(sym.loc.r) let name = ropeToStr(sym.loc.r)

View file

@ -157,6 +157,9 @@ proc CommandInteractive =
#setTarget(osNimrodVM, cpuNimrodVM) #setTarget(osNimrodVM, cpuNimrodVM)
initDefines() initDefines()
DefineSymbol("nimrodvm") DefineSymbol("nimrodvm")
when hasFFI:
DefineSymbol("nimffi")
registerPass(verbosePass()) registerPass(verbosePass())
registerPass(sem.semPass()) registerPass(sem.semPass())
registerPass(evals.evalPass()) # load system module: registerPass(evals.evalPass()) # load system module:

View file

@ -48,14 +48,14 @@ when defined(WINDOWS):
else: else:
const const
versions = "(|.1.0.0|.0.9.9|.0.9.8|.0.9.7|.0.9.6|.0.9.5|.0.9.4)" versions = "(|.1.0.0|.0.9.9|.0.9.8|.0.9.7|.0.9.6|.0.9.5|.0.9.4)"
when defined(posix): when defined(macosx):
const
DLLSSLName = "libssl.so" & versions
DLLUtilName = "libcrypto.so" & versions
else:
const const
DLLSSLName = "libssl.dylib" & versions DLLSSLName = "libssl.dylib" & versions
DLLUtilName = "libcrypto.dylib" & versions DLLUtilName = "libcrypto.dylib" & versions
else:
const
DLLSSLName = "libssl.so" & versions
DLLUtilName = "libcrypto.so" & versions
type type
SslStruct {.final, pure.} = object SslStruct {.final, pure.} = object