Add specific lib code for Nintendo Switch
This commit is contained in:
parent
c40ececccb
commit
8a0bff973f
7 changed files with 40 additions and 8 deletions
|
|
@ -819,7 +819,8 @@ iterator walkDir*(dir: string; relative=false): tuple[kind: PathComponent, path:
|
|||
y = dir / y
|
||||
var k = pcFile
|
||||
|
||||
when defined(linux) or defined(macosx) or defined(bsd) or defined(genode):
|
||||
when defined(linux) or defined(macosx) or
|
||||
defined(bsd) or defined(genode) or defined(nintendoswitch):
|
||||
if x.d_type != DT_UNKNOWN:
|
||||
if x.d_type == DT_DIR: k = pcDir
|
||||
if x.d_type == DT_LNK:
|
||||
|
|
@ -1285,7 +1286,7 @@ elif defined(windows):
|
|||
|
||||
elif not defined(createNimRtl) and
|
||||
not(defined(posix) and appType == "lib") and
|
||||
not defined(genode):
|
||||
not defined(genode) and not defined(nintendoswitch):
|
||||
# On Posix, there is no portable way to get the command line from a DLL.
|
||||
var
|
||||
cmdCount {.importc: "cmdCount".}: cint
|
||||
|
|
@ -1439,7 +1440,7 @@ proc getAppFilename*(): string {.rtl, extern: "nos$1", tags: [ReadIOEffect].} =
|
|||
result = getApplAux("/proc/self/exe")
|
||||
elif defined(solaris):
|
||||
result = getApplAux("/proc/" & $getpid() & "/path/a.out")
|
||||
elif defined(genode):
|
||||
elif defined(genode) or defined(nintendoswitch):
|
||||
raiseOSError(OSErrorCode(-1), "POSIX command line not supported")
|
||||
elif defined(freebsd) or defined(dragonfly):
|
||||
result = getApplFreebsd()
|
||||
|
|
|
|||
|
|
@ -312,6 +312,8 @@ else:
|
|||
include ioselects/ioselectors_poll # need to replace it with event ports
|
||||
elif defined(genode):
|
||||
include ioselects/ioselectors_select # TODO: use the native VFS layer
|
||||
elif defined(nintendoswitch):
|
||||
include ioselects/ioselectors_select
|
||||
else:
|
||||
include ioselects/ioselectors_poll
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue