Commit Graph

123 Commits

Author SHA1 Message Date
Ryan Gonzalez
244bf68fb0 Fix #5550 (#5553) 2017-03-18 21:05:12 +01:00
Eugene Kabanov
336a7c9b3f Fixes to support Dragonfly BSD. (#5552)
* Fix kqueue.nim and ansi_c.nim to support dragonfly.
* Fix ioselectors.nim, threads.nim to support dragonfly.
* Fix deprecated dealloc call in tioselectors.nim.
* Fix tfsmonitor.nim test to run only on Linux.
* Fix osproc.nim return wrong exit codes.
* Fix getAppFilename() for dragonfly.
* Fix proper exit code handling.
2017-03-17 08:22:11 +01:00
Charles Blake
3680cbaf25 Use old approach for Mac OSX which, as of 2016, does not yet support POSIX
high-resolution file times.
2017-02-07 09:39:41 -05:00
Charles Blake
53dfb21d6c Move Timespec up, use in Stat for st_?tim and define accessors for the seconds
portion of the Timespec.
2017-02-07 09:00:19 -05:00
Andreas Rumpf
e22c36dfc2 posix.nim: make new sigaction wrapper compatible with C++ 2017-01-20 12:40:54 +01:00
Andreas Rumpf
ecf1802568 posix.nim add 'sigaction' with 3rd nil parameter 2017-01-19 20:00:31 +01:00
John Novak
a245514146 Use imported symbols & remove non-POSIX stuff
* All symbols were hardcoded using Linux specific values, using
  imports now (because of this, the module was broken on OS X, for example)
* There were many non-POSIX (Linux specific) symbols and
  functions included, these have been removed
2016-12-01 16:46:35 +10:00
Federico Ceratto
7d24656b0a Fix few typos 2016-10-17 13:12:15 +01:00
Simon Ruderich
1cee3eb011 posix: add INADDR_LOOPBACK 2016-09-17 18:11:12 +02:00
Simon Ruderich
8ed241a1f0 posix: add mkstemp 2016-09-17 16:57:51 +02:00
Charles Blake
7b39545eb3 Evidently Travis build termios.h does not pull in sys/ioctl.h
but my initial test system did.
2016-09-01 14:08:40 -04:00
Charles Blake
8df2078f08 Change type name to be more NEP-1-ish as per Araq request. 2016-09-01 08:33:39 -04:00
Charles Blake
19f83ccd0b Add terminal.terminalWidth and supporting types/calls. 2016-09-01 07:34:42 -04:00
Andreas Rumpf
8876ed23f1 expr and stmt are now deprecated 2016-07-30 16:34:42 +02:00
Andreas Rumpf
0834cd63d9 prepare Nim codebase for upcoming parser changes 2016-07-15 12:56:03 +02:00
Ruslan Mustakov
45f76738ee Added 'android4' define support that declares a different gethostbyaddr. Fixes #4376 2016-06-22 20:50:18 +06:00
tormund
ac4201132d Fix android compile time error 2016-06-07 19:24:23 +03:00
Dominik Picheta
a484e3f8c2 Merge branch 'unix-sockets' of https://github.com/girvo/Nim into girvo-unix-sockets 2016-05-30 09:38:37 +01:00
Andreas Rumpf
d727581430 make SO_REUSEPORT independent of Linux header 2016-05-29 22:31:31 +02:00
Andreas Rumpf
7bf7c4d49e Merge pull request #4235 from cheatfate/nosignal
Solaris dont have MSG_NOSIGNAL
2016-05-29 22:22:05 +02:00
Andreas Rumpf
380524caa8 Merge pull request #3648 from FedericoCeratto/reuse_port
Add SO_REUSEPORT support
2016-05-29 22:21:56 +02:00
cheatfate
afc922942d Solaris dont have MSG_NOSIGNAL 2016-05-29 23:01:46 +03:00
Federico Ceratto
6d256ba76e Update posix.nim 2016-04-11 12:07:45 +01:00
Federico Ceratto
8b1faad5a7 Add signal handler
A signal handler to run some code when Unix signals are received
2016-04-10 17:14:38 +01:00
cheatfate
0337bdc821 Add missed library dependencies on Linux and Solaris. 2016-04-03 15:37:45 +03:00
cheatfate
0a5a593682 Patch timer_create and timer_delete to have proper declaration. 2016-04-02 02:17:32 +03:00
Josep Sanjuas
5a582a0d9c Define ports as uint16s to fix #3484 2016-03-27 22:56:44 +02:00
cheatfate
e91e53401e Modified and more reliable kqueue.nim, made according to openbsd/netbsd/freebsd and macosx headers. 2016-03-18 22:19:01 +02:00
def
c398bdc534 Fix KEvent header includes 2016-03-06 22:25:37 +01:00
xyz
2befe48e4d Moved ioctl to posix.nim 2016-01-17 15:12:48 -05:00
Federico Ceratto
e174aa1dbc Add SO_REUSEPORT support 2015-12-16 00:42:22 +00:00
Michał Zieliński
da308be2d7 net.nim: add support for Unix sockets 2015-10-28 20:01:48 +01:00
Aman Gupta
2f7802bea3 fix rawsockets test
FAIL: trawsockets.nim
Test "tests/cpp/trawsockets.nim" in category "cpp"
Failure: reNimcCrash
Expected:

Gotten:
Hint: system [Processing]
Hint: trawsockets [Processing]
Hint: rawsockets [Processing]
Hint: unsigned [Processing]
lib/pure/rawsockets.nim(15, 8) Warning: unsigned is deprecated [Deprecated]
Hint: os [Processing]
Hint: strutils [Processing]
Hint: parseutils [Processing]
Hint: times [Processing]
Hint: posix [Processing]
CC: compiler_trawsockets
CC: stdlib_system
CC: stdlib_rawsockets
CC: stdlib_unsigned
CC: stdlib_os
CC: stdlib_strutils
Error: execution of an external compiler program 'clang++ -c  -w  -I/Users/tmm1/code/nim/lib -o tests/cpp/nimcache/stdlib_rawsockets.o tests/cpp/nimcache/stdlib_rawsockets.cpp' failed with exit code: 256

tests/cpp/nimcache/stdlib_rawsockets.cpp:355:8: error: assigning to 'NCSTRING' (aka 'char *') from incompatible type 'const char *'
                LOC6 = gai_strerror(gairesult);
                     ^ ~~~~~~~~~~~~~~~~~~~~~~~
tests/cpp/nimcache/stdlib_rawsockets.cpp:499:8: error: assigning to 'NCSTRING' (aka 'char *') from incompatible type 'const char *'
                LOC5 = hstrerror(h_errno);
                     ^ ~~~~~~~~~~~~~~~~~~
tests/cpp/nimcache/stdlib_rawsockets.cpp:650:8: error: assigning to 'NCSTRING' (aka 'char *') from incompatible type 'const char *'
                LOC9 = inet_ntop(AF_INET6, ((void*) (addr6)), result->data, ((NI32)chckRange((result ? result->len : 0), ((NI32) (-2147483647 -1)), ((NI32) 2147483647))));
                     ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/cpp/nimcache/stdlib_rawsockets.cpp:771:10: error: assigning to 'NCSTRING' (aka 'char *') from incompatible type 'const char *'
                        LOC17 = inet_ntop(name.sin6_family, ((void*) ((&name))), ((NCSTRING) (buf)), ((NI32)chckRange(((NI)sizeof(TY143006)), ((NI32) (-2147483647 -1)), ((NI32) 2147483647))));
                              ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/cpp/nimcache/stdlib_rawsockets.cpp:859:10: error: assigning to 'NCSTRING' (aka 'char *') from incompatible type 'const char *'
                        LOC17 = inet_ntop(name.sin6_family, ((void*) ((&name))), ((NCSTRING) (buf)), ((NI32)chckRange(((NI)sizeof(TY143006)), ((NI32) (-2147483647 -1)), ((NI32) 2147483647))));
                              ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 errors generated.
2015-10-02 16:00:33 -07:00
Adam Strzelecki
900ea81030 lib/posix: OS X & Free/Open/NetBSD kqueue API 2015-09-29 19:27:10 +02:00
Bruce Doan
2ffb385611 wait's input is nullable, and it is discardable 2015-09-16 17:39:14 +07:00
Adam Strzelecki
43bddf62dd lib: Trim .nim files trailing whitespace
via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +
2015-09-04 23:03:56 +02:00
Yuriy Glukhov
c42b05adb4 Fixed --debugger:on option. Removed c_line from termios. 2015-08-12 12:04:26 +03:00
Reimer Behrends
b3455d281b Add popen()/pclose() support to posix.nim 2015-07-01 02:39:45 +02:00
Andrew Yourtchenko
61336b2404 Expose INET6_ADDRSTRLEN. 2015-06-24 01:36:09 +02:00
Andrew Yourtchenko
ec33471aee Update posix.Sockaddr_in6 and posix.Sockaddr_storage, deprecate old T* types. 2015-06-24 01:23:09 +02:00
pdw
1c426c613c lib/posix - Dropped 'T' from types 2015-06-04 13:17:11 +02:00
def
e5a186a419 Fix Termios wrapper 2015-04-24 19:41:12 +02:00
Araq
c2d79a6383 fixes #2466 2015-04-24 12:40:59 +02:00
yglukhov
c2a52a9849 Fixed SIGPIPE on MacOS 2015-04-08 11:24:53 +03:00
Jakob Oesterling
ff75cf5c2c fixes https://github.com/Araq/Nim/issues/2116 2015-04-01 00:12:55 +02:00
Reimer Behrends
f5f89f388d Fixed Tdirent definition for OS X and BSD.
Entries d_type etc. were disabled on architectures other than Linux,
but also used for OS X and BSD in os.nim.
2015-03-22 03:54:19 +01:00
Araq
1681800d3c fixes #2116 2015-03-22 01:38:13 +01:00
def
18dd5e1965 Add some posix dirent documentation 2015-02-24 16:52:01 +01:00
def
1adebdc767 Speed up walkDir significantly
We only know that this works on Linux and Mac OS X, so other systems use
the POSIX conforming version still. This removed the lstat call, which
is especially expensive on NFS filesystems for me.
2015-02-24 16:37:54 +01:00
def
c62b204960 Always use 0x40 for POSIX_SPAWN_USEVFORK 2015-02-17 02:33:54 +01:00