summary refs log tree commit diff stats
path: root/lib/posix/posix.nim
Commit message (Collapse)AuthorAgeFilesLines
* Deprecate 'c', 'C' prefix for octal literals, fixes #8082 (#8178)Vindaar2018-07-031-20/+20
| | | | | | | | | | | | | | | * deprecate `0c`, `0C` prefix for octal literals Deprecates the previously allowed syntax of `0c` and `0C` as a prefix for octal literals to bring the literals in line with the behavior of `parseOct` from parseutils. * add `msgKind` arg to `lexMessageLitNum` for deprecation messages * change literal tests to check all valid integer literals Also adds the `tinvaligintegerlit3` test to test for the (still) invalid `0O` prefix.
* Nintendo switch support (#8069)Joey2018-06-271-32/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | * Add config section for Nintendo Switch * Add compiler configuration for Nintendo Switch and it's CPU * Add specific lib code for Nintendo Switch * Add GC support for Nintendo Switch * Update changelog for Nintendo Switch * Update changelog with more info about fixed paths * Cleaned up GC memory management a bit * Relocate docs for Switch * Rename aarch64NoneElfGcc to nintendoSwitchGCC * Remove armv8a57 * Fix installer.ini * Reuse code in linux and amd64 * Add posix defs for nintendo switch * Add more defined sections for nintendo switch * Remove old comment * Add what's not supported for Nintendo Switch docs * Make nintendoswitch == posix * Remove DEVKITPRO references from nim.cfg * Make PR extccomp changes * Remove Result type alias * Add separate switch consts file * Update docs for nintendo switch * Fix travis errors with undefined consts and add correct wait.h procs
* Use higher time resolution when available in os.nim (#7709)Oscar Nihlgård2018-06-041-2/+20
|
* remove dead code elimination option (#7669)Jacek Sieka2018-04-231-4/+4
|
* Move RLimit and getrlimit to posix.nim and add setrlimit to easily limit FD ↵aguspiza2018-04-121-0/+16
| | | | allocation (#7564)
* Better times module (#6552)GULPF2017-12-181-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * First work on better timezones * Update tests to new api. Removed tests for checking that `isDst` was included when formatting, since `isDst` no longer affects utc offset (the entire utc offset is stored directly in `utcOffset` instead). * Deprecate getLocaltime & getGmTime * Add `now()` as a shorthand for GetTIme().inZone(Local) * Add FedericoCeratto's timezone tests (#6548) * Run more tests in all timezones * Make month enum start at 1 instead of 0 * Deprecate getDayOfWeekJulian * Fix issues with gc safety * Rename TimeInfo => DateTime * Fixes #6465 * Improve isLeapYear * FIx handling negative adjTime * Cleanup: - deprecated toSeconds and fromSeconds, added fromUnix and toUnix instead (that returns int64 instead of float) - added missing doc comments - removed some unnecessary JS specific implementations * Fix misstake in JS `-` for Time * Update usage of TimeEffect * Removed unecessary use of `difftime` * JS fix for local tz * Fix subtraction of months * Fix `days` field in `toTimeInterval` * Style and docs * Fix getDayOfYear for real this time... * Fix handling of adding/subtracting time across dst transitions * Fix some bad usage of the times module in the stdlib * Revert to use proper time resoultion for seeding in random.nim * Move deprecated procs to bottom of file * Always use `epochTime` in `randomize` * Remove TimeInterval normalization * Fixes #6905 * Fix getDayOfWeek for year < 1 * Export toEpochDay/fromEpochDay and change year/month/monthday order * Add asserts for checking that the monthday is valid * Fix some remaining ambiguous references to `Time` * Fix ambiguous reference to Time
* Introduce first class support for Android (#5772)Fredrik Høisæther Rasch2017-08-061-1/+1
|
* add back SIG_IGN, SIG_DFL and friends to posix.nim (#5820)Jacek Sieka2017-05-161-1/+7
| | | | | | | | * add back SIG_IGN, SIG_DFL and friends to posix.nim accidentally wiped by ce86b4ad78aae11f62c50e4f46e8ab2a124356b4 * move deprecated sig_hold after consts include
* WIFSIGNALED means process has exited too (with a bang!) (#5678)Jacek Sieka2017-04-271-9/+0
|
* Posix from detect (#5697)Jacek Sieka2017-04-121-1760/+19
| | | | | | | | | | * refactor posix.nim * types move to separate files for platform-specifc and generic ("other') * consts move to separate files that get autogenerated by detect.nim * proc's stay where they are for now, though in a second stage might move as well * fix missing when
* Proper fix for osproc.nim on Android (#5646)Eugene Kabanov2017-04-021-3/+7
|
* Fix wrong value range of ntohs ... (#5390)wt2017-03-311-4/+4
|
* Fix posix.nim `dirent` structure to be more compatible with OSes. (#5623)Eugene Kabanov2017-03-291-2/+7
|
* Fix #5550 (#5553)Ryan Gonzalez2017-03-181-1/+1
|
* Use old approach for Mac OSX which, as of 2016, does not yet support POSIXCharles Blake2017-02-071-12/+18
| | | | high-resolution file times.
* Move Timespec up, use in Stat for st_?tim and define accessors for the secondsCharles Blake2017-02-071-7/+18
| | | | portion of the Timespec.
* posix.nim: make new sigaction wrapper compatible with C++Andreas Rumpf2017-01-201-1/+1
|
* posix.nim add 'sigaction' with 3rd nil parameterAndreas Rumpf2017-01-191-0/+4
|
* posix: add INADDR_LOOPBACKSimon Ruderich2016-09-171-0/+2
|
* posix: add mkstempSimon Ruderich2016-09-171-0/+6
|
* expr and stmt are now deprecatedAndreas Rumpf2016-07-301-1/+1
|
* prepare Nim codebase for upcoming parser changesAndreas Rumpf2016-07-151-6/+6
|
* Added 'android4' define support that declares a different gethostbyaddr. ↵Ruslan Mustakov2016-06-221-2/+6
| | | | Fixes #4376
* Fix android compile time errortormund2016-06-071-1/+7
|
* Merge branch 'unix-sockets' of https://github.com/girvo/Nim into ↵Dominik Picheta2016-05-301-0/+13
|\ | | | | | | girvo-unix-sockets
| * net.nim: add support for Unix socketsMichał Zieliński2015-10-281-0/+13
| |
* | make SO_REUSEPORT independent of Linux headerAndreas Rumpf2016-05-291-14/+22
| |
* | Merge pull request #4235 from cheatfate/nosignalAndreas Rumpf2016-05-291-0/+4
|\ \ | | | | | | Solaris dont have MSG_NOSIGNAL
| * | Solaris dont have MSG_NOSIGNALcheatfate2016-05-291-0/+4
| | |
* | | Merge pull request #3648 from FedericoCeratto/reuse_portAndreas Rumpf2016-05-291-0/+2
|\ \ \ | |/ / |/| | Add SO_REUSEPORT support
| * | Add SO_REUSEPORT supportFederico Ceratto2015-12-161-0/+2
| |/
* | Update posix.nimFederico Ceratto2016-04-111-2/+2
| |
* | Add signal handlerFederico Ceratto2016-04-101-0/+14
| | | | | | A signal handler to run some code when Unix signals are received
* | Add missed library dependencies on Linux and Solaris.cheatfate2016-04-031-0/+9
| |
* | Patch timer_create and timer_delete to have proper declaration.cheatfate2016-04-021-2/+2
| |
* | Define ports as uint16s to fix #3484Josep Sanjuas2016-03-271-3/+3
| |
* | Moved ioctl to posix.nimxyz2016-01-171-0/+4
|/
* fix rawsockets testAman Gupta2015-10-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* wait's input is nullable, and it is discardableBruce Doan2015-09-161-1/+1
|
* Add popen()/pclose() support to posix.nimReimer Behrends2015-07-011-0/+2
|
* Expose INET6_ADDRSTRLEN.Andrew Yourtchenko2015-06-241-0/+2
|
* Update posix.Sockaddr_in6 and posix.Sockaddr_storage, deprecate old T* types.Andrew Yourtchenko2015-06-241-2/+3
|
* lib/posix - Dropped 'T' from typespdw2015-06-041-456/+482
|
* Fixed SIGPIPE on MacOSyglukhov2015-04-081-1/+4
|
* fixes https://github.com/Araq/Nim/issues/2116Jakob Oesterling2015-04-011-1/+2
|
* Fixed Tdirent definition for OS X and BSD.Reimer Behrends2015-03-221-1/+1
| | | | | Entries d_type etc. were disabled on architectures other than Linux, but also used for OS X and BSD in os.nim.
* fixes #2116Araq2015-03-221-4/+5
|
* Add some posix dirent documentationdef2015-02-241-11/+12
|
* Speed up walkDir significantlydef2015-02-241-0/+13
| | | | | | 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.
* Always use 0x40 for POSIX_SPAWN_USEVFORKdef2015-02-171-6/+4
|