diff --git a/compiler/evalffi.nim b/compiler/evalffi.nim index 0aa8dd331fc7..58c505a5bc1e 100644 --- a/compiler/evalffi.nim +++ b/compiler/evalffi.nim @@ -17,7 +17,7 @@ when defined(windows): const libcDll = "msvcrt.dll" elif defined(linux): const libcDll = "libc.so(.6|.5|)" -elif defined(freebsd): +elif defined(bsd): const libcDll = "/lib/libc.so.7" elif defined(osx): const libcDll = "/usr/lib/libSystem.dylib" diff --git a/lib/system/ansi_c.nim b/lib/system/ansi_c.nim index 0adcd67f7806..1ff15611c387 100644 --- a/lib/system/ansi_c.nim +++ b/lib/system/ansi_c.nim @@ -117,7 +117,7 @@ type CFilePtr* = ptr CFile ## The type representing a file handle. # duplicated between io and ansi_c -const stdioUsesMacros = (defined(osx) or defined(freebsd)) and not defined(emscripten) +const stdioUsesMacros = (defined(osx) or defined(bsd)) and not defined(emscripten) const stderrName = when stdioUsesMacros: "__stderrp" else: "stderr" const stdoutName = when stdioUsesMacros: "__stdoutp" else: "stdout" const stdinName = when stdioUsesMacros: "__stdinp" else: "stdin" diff --git a/lib/system/io.nim b/lib/system/io.nim index bfc90997918f..5f4c7d6d712e 100644 --- a/lib/system/io.nim +++ b/lib/system/io.nim @@ -36,7 +36,7 @@ type # text file handling: when not defined(nimscript) and not defined(js): # duplicated between io and ansi_c - const stdioUsesMacros = (defined(osx) or defined(freebsd)) and not defined(emscripten) + const stdioUsesMacros = (defined(osx) or defined(bsd)) and not defined(emscripten) const stderrName = when stdioUsesMacros: "__stderrp" else: "stderr" const stdoutName = when stdioUsesMacros: "__stdoutp" else: "stdout" const stdinName = when stdioUsesMacros: "__stdinp" else: "stdin" diff --git a/tests/vm/mevalffi.nim b/tests/vm/mevalffi.nim index 3603488eb7ef..e15ed8f74dd0 100644 --- a/tests/vm/mevalffi.nim +++ b/tests/vm/mevalffi.nim @@ -1,7 +1,7 @@ # re-enable for windows once libffi can be installed in koch.nim # With win32 (not yet win64), libffi on windows works and this test passes. -when defined(linux) or defined(freebsd): +when defined(linux) or defined(bsd): {.passL: "-lm".} # for exp proc c_exp(a: float64): float64 {.importc: "exp", header: "".}