style improvements; fixes #11774
This commit is contained in:
parent
313cc337f2
commit
5a020d641d
6 changed files with 9 additions and 9 deletions
|
|
@ -120,10 +120,10 @@
|
||||||
# - state in static libs gets duplicated
|
# - state in static libs gets duplicated
|
||||||
# - linking is slow and therefore iteration time suffers
|
# - linking is slow and therefore iteration time suffers
|
||||||
# - have just a single .dll for all .nim files and bulk reload?
|
# - have just a single .dll for all .nim files and bulk reload?
|
||||||
# - think about the compile/link/passC/passL/emit/injectStmt pragmas
|
# - think about the compile/link/passc/passl/emit/injectStmt pragmas
|
||||||
# - if a passC pragma is introduced (either written or dragged in by a new
|
# - if a passc pragma is introduced (either written or dragged in by a new
|
||||||
# import) the whole command line for compilation changes - for example:
|
# import) the whole command line for compilation changes - for example:
|
||||||
# winlean.nim: {.passC: "-DWIN32_LEAN_AND_MEAN".}
|
# winlean.nim: {.passc: "-DWIN32_LEAN_AND_MEAN".}
|
||||||
# - play with plugins/dlls/lfIndirect/lfDynamicLib/lfExportLib - shouldn't add an extra '*'
|
# - play with plugins/dlls/lfIndirect/lfDynamicLib/lfExportLib - shouldn't add an extra '*'
|
||||||
# - everything thread-local related
|
# - everything thread-local related
|
||||||
# - tests
|
# - tests
|
||||||
|
|
|
||||||
|
|
@ -122,7 +122,7 @@ when defined(unix):
|
||||||
const extra = " -D_XOPEN_SOURCE"
|
const extra = " -D_XOPEN_SOURCE"
|
||||||
else:
|
else:
|
||||||
const extra = ""
|
const extra = ""
|
||||||
{.passC: "-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0" & extra.}
|
{.passc: "-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0" & extra.}
|
||||||
|
|
||||||
const
|
const
|
||||||
CORO_CREATED = 0
|
CORO_CREATED = 0
|
||||||
|
|
|
||||||
|
|
@ -1110,7 +1110,7 @@ proc waitFor(socket: Socket, waited: var Duration, timeout, size: int,
|
||||||
if selRet < 0: raiseOSError(osLastError())
|
if selRet < 0: raiseOSError(osLastError())
|
||||||
if selRet != 1:
|
if selRet != 1:
|
||||||
raise newException(TimeoutError, "Call to '" & funcName & "' timed out.")
|
raise newException(TimeoutError, "Call to '" & funcName & "' timed out.")
|
||||||
waited += (getMonoTIme() - startTime)
|
waited += (getMonoTime() - startTime)
|
||||||
|
|
||||||
proc recv*(socket: Socket, data: pointer, size: int, timeout: int): int {.
|
proc recv*(socket: Socket, data: pointer, size: int, timeout: int): int {.
|
||||||
tags: [ReadIOEffect, TimeEffect].} =
|
tags: [ReadIOEffect, TimeEffect].} =
|
||||||
|
|
|
||||||
|
|
@ -4060,7 +4060,7 @@ proc staticExec*(command: string, input = "", cache = ""): string {.
|
||||||
## `gorge <#gorge,string,string,string>`_ is an alias for ``staticExec``.
|
## `gorge <#gorge,string,string,string>`_ is an alias for ``staticExec``.
|
||||||
##
|
##
|
||||||
## Note that you can use this proc inside a pragma like
|
## Note that you can use this proc inside a pragma like
|
||||||
## `passC <nimc.html#passc-pragma>`_ or `passL <nimc.html#passl-pragma>`_.
|
## `passc <nimc.html#passc-pragma>`_ or `passl <nimc.html#passl-pragma>`_.
|
||||||
##
|
##
|
||||||
## If ``cache`` is not empty, the results of ``staticExec`` are cached within
|
## If ``cache`` is not empty, the results of ``staticExec`` are cached within
|
||||||
## the ``nimcache`` directory. Use ``--forceBuild`` to get rid of this caching
|
## the ``nimcache`` directory. Use ``--forceBuild`` to get rid of this caching
|
||||||
|
|
|
||||||
|
|
@ -108,10 +108,10 @@ elif defined(genode):
|
||||||
|
|
||||||
else:
|
else:
|
||||||
when not (defined(macosx) or defined(haiku)):
|
when not (defined(macosx) or defined(haiku)):
|
||||||
{.passL: "-pthread".}
|
{.passl: "-pthread".}
|
||||||
|
|
||||||
when not defined(haiku):
|
when not defined(haiku):
|
||||||
{.passC: "-pthread".}
|
{.passc: "-pthread".}
|
||||||
|
|
||||||
const
|
const
|
||||||
schedh = "#define _GNU_SOURCE\n#include <sched.h>"
|
schedh = "#define _GNU_SOURCE\n#include <sched.h>"
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
##
|
##
|
||||||
## .. code-block::
|
## .. code-block::
|
||||||
## ./bin/nim c -d:ssl -p:. -r tests/untestable/tssl.nim
|
## ./bin/nim c -d:ssl -p:. -r tests/untestable/tssl.nim
|
||||||
## ./bin/nim c -d:ssl -p:. --dynlibOverride:ssl --passL:-lcrypto --passL:-lssl -r tests/untestable/tssl.nim
|
## ./bin/nim c -d:ssl -p:. --dynlibOverride:ssl --passl:-lcrypto --passl:-lssl -r tests/untestable/tssl.nim
|
||||||
|
|
||||||
{.deadCodeElim: on.} # dce option deprecated
|
{.deadCodeElim: on.} # dce option deprecated
|
||||||
when defined(nimHasStyleChecks):
|
when defined(nimHasStyleChecks):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue