diff options
author | Eugene Kabanov <ka@hardcore.kiev.ua> | 2017-03-17 09:22:11 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-03-17 08:22:11 +0100 |
commit | 336a7c9b3f65d323bb6ba9b0a7336678f235a257 (patch) | |
tree | f83d6d4a85cb0a515246d707415cc0614d9f377c /lib/posix/kqueue.nim | |
parent | b938a5b884a9f32649a8e02968b980096fd7353d (diff) | |
download | Nim-336a7c9b3f65d323bb6ba9b0a7336678f235a257.tar.gz |
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.
Diffstat (limited to 'lib/posix/kqueue.nim')
-rw-r--r-- | lib/posix/kqueue.nim | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/posix/kqueue.nim b/lib/posix/kqueue.nim index 19d661490..730491a53 100644 --- a/lib/posix/kqueue.nim +++ b/lib/posix/kqueue.nim @@ -11,7 +11,8 @@ from posix import Timespec -when defined(macosx) or defined(freebsd) or defined(openbsd): +when defined(macosx) or defined(freebsd) or defined(openbsd) or + defined(dragonfly): const EVFILT_READ* = -1 EVFILT_WRITE* = -2 @@ -40,6 +41,11 @@ elif defined(freebsd): EVFILT_FS* = -9 ## filesystem events EVFILT_LIO* = -10 ## attached to lio requests EVFILT_USER* = -11 ## user events +elif defined(dragonfly): + const + EVFILT_EXCEPT* = -8 ## exceptional conditions + EVFILT_USER* = -9 ## user events + EVFILT_FS* = -10 ## filesystem events # Actions: const @@ -64,9 +70,9 @@ const const EV_EOF* = 0x8000 ## EOF detected EV_ERROR* = 0x4000 ## Error, data contains errno + EV_NODATA* = 0x1000 ## EOF and no more data - -when defined(macosx) or defined(freebsd): +when defined(macosx) or defined(freebsd) or defined(dragonfly): # EVFILT_USER is not supported by OpenBSD and NetBSD # # data/hint flags/masks for EVFILT_USER, shared with userspace |