summary refs log tree commit diff stats
path: root/lib/system/ansi_c.nim
Commit message (Collapse)AuthorAgeFilesLines
* system/excpt: let the OS handle termination on signal (#16712)alaviss2021-02-191-2/+7
|
* remove all uses of condsyms symbols defined prior to bootstrap nim 0.20.0 ↵Timothee Cour2021-02-171-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#16918) * nimNoArrayToCstringConversion deadcode * nimbabel deadcode * nimHasalignOf deadcode * nimvarargstyped deadcode * nimhygiene deadcode * nimNewTypedesc deadcode * nimlocks deadcode * nimHasCppDefine deadcode * nimHasRunnableExamples deadcode * nimHasNilChecks deadcode * nimSymKind deadcode * minor macros refactoring * nimVmEqIdent deadcode * nimNoNil deadcode * nimNoZeroTerminator deadcode * nimHasSymOwnerInMacro deadcode * nimVmExportFixed deadcode * nimNewRuntime deadcode * nimAshr deadcode * nimUncheckedArrayTyp deadcode * nimHasTypeof deadcode * nimErrorProcCanHaveBody deadcode * nimHasHotCodeReloading deadcode * nimHasSignatureHashInMacro deadcode * nimHasDefault deadcode * nimMacrosSizealignof deadcode
* fix #13115 (#15930)flywind2020-11-271-0/+5
| | | | | * fix #13115 * fix testament
* __stderrp and friends are only on FreeBSD & DragonFlyBSD. (#13735)Euan2020-03-231-1/+1
|
* enable testing -d:nimHasLibFFI mode (#13091)Timothee Cour2020-02-041-1/+1
|
* fix stdout(etc) for emscriptenTimothee Cour2020-01-281-3/+4
|
* Removed lib/system/allocators.nim. seqs_v2 and strs_v2 now uses ↵Ico Doornekamp2020-01-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | allocShared0. (#13190) * Cleanup, remove lib/system/allocators.nim. seqs_v2 and strs_v2 now use allocShared0 by default. * Fixed -d:useMalloc allocShared / reallocShared / deallocShared. These now use the alloc/dealloc/realloc implementation that also takes care of zeroing memory at realloc. * Removed debug printfs * Removed unpairedEnvAllocs() from tests/destructor/tnewruntime_misc * More mmdisp cleanups. The shared allocators do not need to zero memory or throw since the regular ones already do that * Introduced realloc0 and reallocShared0, these procs are now used by strs_v2 and seqs_v2. This also allowed the -d:useMalloc allocator to drop the extra header with allocation length. * Moved strs_v2/seqs_v2 'allocated' flag into 'cap' field * Added 'getAllocStats()' to get low level alloc/dealloc counters. Enable with -d:allocStats * *allocShared implementations for boehm and go allocators now depend on the proper *allocImpl procs
* VM FFI: write(stderr, msg) and fprintf(cstderr, msg) now work at CT (#13083)Timothee Cour2020-01-121-2/+8
|
* c_fflush() the rawWrite() buffer (#12987)Ștefan Talpalaru2019-12-301-0/+4
| | | | | | Stack traces on an unbuffered stderr get out of sync with line-buffered stdout - usually on Windows terminals or CI logs. This fixes it by calling C's fflush() on the output buffer in the procedure used for printing stack traces.
* introduce csize_t instead of fixing csize (#12497)Arne Döring2019-10-311-10/+10
|
* Revert "Fixes #12187 (#12321)" (#12447)Andreas Rumpf2019-10-181-17/+1
| | | This reverts commit 00c31e87660d9db813871f5aa23661bf6b9bbdcb.
* Fixes #12187 (#12321)Clyybber2019-10-081-1/+17
| | | | | | * Fixes #12187 * Point to fork of compactdict Since the original repo is now archived / read-only
* abort is noreturn (#12061)Jacek Sieka2019-08-271-1/+1
|
* styleCheck: make the compiler and large parts of the stdlib compatible with ↵Araq2019-07-101-2/+2
| | | | --styleCheck:error
* [other] preparations for --styleCheck:error for the Nim compiler (#11478)Andreas Rumpf2019-06-121-4/+2
|
* make -d:nimQuirky work with develAndreas Rumpf2019-04-201-1/+1
|
* make it compile with older nim versionsAraq2019-04-081-0/+2
|
* respect -d:useMalloc everywhere; turn ansi_c and memory into proper Nim modulesAraq2019-04-081-55/+55
|
* make DLLs tests green againAndreas Rumpf2019-03-151-1/+1
|
* --newruntime: progressAndreas Rumpf2019-03-141-0/+7
|
* further system.nim cleanupsAndreas Rumpf2019-02-061-5/+5
|
* system refactorings (#10559)Andreas Rumpf2019-02-061-8/+13
| | | | | | | | * move IO subsystem into its own module; refs #10385 * make standalone test compile again * make C++ examples compile again * make more tests green * make sysAssert and gcAssert work again
* make tests green with a global config.nims fileAraq2018-12-171-1/+1
|
* deprecated ospaths (#9665)Andreas Rumpf2018-11-091-1/+2
|
* Genode fixes (#8501)Emery Hemingway2018-08-161-1/+1
| | | | | | | | | | | | | * Genode fixes - wrap strings in "Genode::Cstring" when logging - define SIGABRT for Genode - disable GCC -fstack-protector - use log RPC for fatal messages - add --os:genode build to appveyor - define paramStr and paramCount * Select fixups for Genode POSIX
* Haiku support for Nim (#8542)alaviss2018-08-141-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * posix_other: Haiku now has spawn.h This is added per https://dev.haiku-os.org/ticket/13446 * posix_other: Add Haiku specific Dirent members * cpuinfo: Add an implementation for Haiku * distros: Add basic Haiku support * encodings: update Haiku support * fenv, math: Haiku now provides libm * times: Add Haiku struct members * ansi_c, osalloc: Add Haiku constants * threads: Add Haiku support * testament: Haiku uses LIBRARY_PATH * nim.cfg: Update Haiku support libnetwork should only be linked if network functions are used * threads: Haiku does not support -pthread switch * tworkingdir: Haiku's env is in /bin * posix_other: add SIGKILLTHR for Haiku * sockets: link with libnetwork on Haiku * coro: correct ucontext.h location http://pubs.opengroup.org/onlinepubs/009696699/basedefs/ucontext.h.html * coro: ucontext backend is not available on Haiku Haiku doesn't provide the <ucontext.h> header, as it was removed from POSIX * coro: fix setjmp backend The compiler does not allow statements after a noreturn function * nativesockets: Haiku doesn't support AI_V4MAPPED * system: hostOS can contains "haiku" * os: add support for Haiku's packagefs packagefs is read-only, but there are writable holes to the underlying file system as well * os: update constant for Haiku
* Added c_abort to ansi_c (#8449)Yuriy Glukhov2018-07-301-0/+3
|
* Don't depend on string.h in codegen (#8299)Yuriy Glukhov2018-07-131-0/+2
|
* Nintendo switch support (#8069)Joey2018-06-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* fixes to allow the usage of clang on windows with the msvc abi and ms ↵Charlie Barto2017-10-091-2/+6
| | | | headers (#6442)
* Linux abi take 3 (#5692)Jacek Sieka2017-04-121-2/+8
| | | | | * avoid generating object fields for imported types * fix some abi/type issues for linux_amd64
* Fixes to support Dragonfly BSD. (#5552)Eugene Kabanov2017-03-171-1/+2
| | | | | | | | | * 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.
* ansi_c.nim: avoid deprecated 'expr' typeAraq2017-01-201-1/+1
|
* Enhance values SIGNALS on more OS.cheatfate2016-06-161-1/+2
| | | | Checked systems OpenBSD, NetBSD, FreeBSD, Solaris.
* prefer consts to importing #defines from headersJacek Sieka2016-06-061-25/+20
| | | | | to be completed - better would be to have a libc wrapper that deals with all pesky C ABI details
* remove system/ansi_c include from osJacek Sieka2016-06-051-26/+0
|
* fix types of ansi_c/sysio to more closely match C ABIJacek Sieka2016-06-051-63/+41
| | | | | also fixes some instances of using C library functions when there are nim alternatives available
* remove strange file types in ansi_cJacek Sieka2016-06-011-30/+17
|
* added 'sig' feature; removed tfShared support in the compilerAndreas Rumpf2016-02-281-2/+2
|
* further progress on --gc:v2Andreas Rumpf2016-02-171-6/+12
|
* lib: Trim .nim files trailing whitespaceAdam Strzelecki2015-09-041-11/+11
| | | | via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +
* fixes #1744Araq2014-12-171-4/+5
|
* Merge branch 'devel' of https://github.com/Araq/Nimrod into bigbreakAraq2014-10-041-4/+17
|\ | | | | | | | | | | | | Conflicts: lib/impure/db_postgres.nim lib/pure/os.nim lib/wrappers/postgres.nim
| * Improve setjmp()/longjmp() performance.Reimer Behrends2014-09-251-4/+17
| | | | | | | | | | | | | | | | | | | | | | Exception handling for the C backend used setjmp()/longjmp() unconditionally. However, on POSIX systems, these functions save and restore the signal mask, adding considerable overhead to exception handling, even where no exceptions are involved. The compiler and library now try to use either _setjmp()/_longjmp() or sigsetjmp()/siglongjmp() where possible, marked by the defines "nimRawSetjmp" and "nimSigSetjmp", respectively. The define "nimStdSetjmp" can be used to revert to setjmp()/longjmp() instead.
* | the big renamefest: first stepsAraq2014-08-221-2/+2
|/
* distinguish between 'defined' and 'declared'Araq2014-08-111-2/+2
|
* parseBiggestFloat is now builtinAraq2014-07-161-4/+1
|
* More human readable `$`(float)katlogic2014-06-151-1/+4
| | | | | The output matches that of Python (eg 1e100, not 1.0e100), but also reflects locale (assuming it was set using setlocale() before).
* Fixes #1168Simon Hafner2014-05-031-0/+3
|
* case consistency part 4Araq2013-12-271-7/+7
|