nim-lang / Nim

Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).
https://nim-lang.org
Other
16.52k stars 1.46k forks source link

codegen error on openindiana; some tools fails to compile #19008

Closed antonl05 closed 2 years ago

antonl05 commented 2 years ago

codegen errors for compiling nimgrep under solaris_amd64/openindiana hipster

working: nimpretty, nimsuggest broken: testament, nimgrep(see below) ...

/root/.cache/nim/nimgrep_r/stdlib_terminal.nim.c:920:35 : In function 'terminalWidthIoctl_pureZterminal_89':
 error: 'TIOCGWINSZ' undeclared (first use in function)
 T6_ = ioctl((int) ((*fd)), TIOCGWINSZ, (&win));

adding #define TIOCGWINSZ 0 fixes the error; in testament:

/root/.cache/nim/testament_r/stdlib_net.nim.c:10
 error: too many arguments to  funtion 'sigwait':

while it only takes argument sigset_t*

# nim -v
Nim Compiler Version 1.5.1 [Solaris: amd64]
git hash: f77dea01fd9807...
Araq commented 2 years ago

Feel free to create a PR but we don't officially support OpenIndiana Jones, even though it's a cool name.