use lowercase --define switches (#17283)
This commit is contained in:
parent
b8c04bdb92
commit
0e3ea16554
21 changed files with 45 additions and 45 deletions
|
|
@ -265,7 +265,7 @@ const
|
|||
ENET_PEER_RELIABLE_WINDOW_SIZE = 0x1000
|
||||
ENET_PEER_FREE_RELIABLE_WINDOWS = 8
|
||||
|
||||
when defined(Linux) or true:
|
||||
when defined(linux) or true:
|
||||
import posix
|
||||
const
|
||||
ENET_SOCKET_NULL*: cint = -1
|
||||
|
|
@ -295,7 +295,7 @@ when defined(Linux) or true:
|
|||
template ENET_SOCKETSET_CHECK*(sockset, socket: untyped): untyped =
|
||||
FD_ISSET(socket, addr((sockset)))
|
||||
|
||||
when defined(Windows):
|
||||
when defined(windows):
|
||||
## put the content of win32.h in here
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ const
|
|||
GLUT_NORMAL* = 0
|
||||
GLUT_OVERLAY* = 1
|
||||
|
||||
when defined(Windows):
|
||||
when defined(windows):
|
||||
const # Stroke font constants (use these in GLUT program).
|
||||
GLUT_STROKE_ROMAN* = cast[Pointer](0)
|
||||
GLUT_STROKE_MONO_ROMAN* = cast[Pointer](1) # Bitmap font constants (use these in GLUT program).
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
when defined(Windows):
|
||||
when defined(windows):
|
||||
const libName* = "SDL2.dll"
|
||||
elif defined(Linux) or defined(freebsd) or defined(netbsd):
|
||||
elif defined(linux) or defined(freebsd) or defined(netbsd):
|
||||
const libName* = "libSDL2.so"
|
||||
elif defined(MacOsX):
|
||||
elif defined(macosx):
|
||||
const libName* = "libSDL2.dylib"
|
||||
elif defined(openbsd):
|
||||
const libName* = "libSDL2.so.0.6"
|
||||
|
|
|
|||
|
|
@ -353,7 +353,7 @@ block absolutePath:
|
|||
doAssertRaises(ValueError): discard absolutePath("a", "b")
|
||||
doAssert absolutePath("a") == getCurrentDir() / "a"
|
||||
doAssert absolutePath("a", "/b") == "/b" / "a"
|
||||
when defined(Posix):
|
||||
when defined(posix):
|
||||
doAssert absolutePath("a", "/b/") == "/b" / "a"
|
||||
doAssert absolutePath("a", "/b/c") == "/b/c" / "a"
|
||||
doAssert absolutePath("/a", "b/") == "/a"
|
||||
|
|
@ -610,7 +610,7 @@ block: # normalizePathEnd
|
|||
doAssert "//".normalizePathEnd(false) == "/"
|
||||
doAssert "foo.bar//".normalizePathEnd == "foo.bar"
|
||||
doAssert "bar//".normalizePathEnd(trailingSep = true) == "bar/"
|
||||
when defined(Windows):
|
||||
when defined(windows):
|
||||
doAssert r"C:\foo\\".normalizePathEnd == r"C:\foo"
|
||||
doAssert r"C:\foo".normalizePathEnd(trailingSep = true) == r"C:\foo\"
|
||||
# this one is controversial: we could argue for returning `D:\` instead,
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ discard """
|
|||
|
||||
import os, osproc, times, std / monotimes
|
||||
|
||||
when defined(Windows):
|
||||
when defined(windows):
|
||||
const ProgramWhichDoesNotEnd = "notepad"
|
||||
elif defined(openbsd):
|
||||
const ProgramWhichDoesNotEnd = "/bin/cat"
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ when defined(windows):
|
|||
else:
|
||||
import posix
|
||||
|
||||
when defined(Windows):
|
||||
when defined(windows):
|
||||
template orig: expr =
|
||||
winlean
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue