aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gcc.gnu.org>2019-01-18 00:05:51 +0000
committerIain Buclaw <ibuclaw@gcc.gnu.org>2019-01-18 00:05:51 +0000
commit5996efcd99c2d96eed518074dead68ca6f448a5e (patch)
treebae47308256dcda29d9834a61091738e7e9fd4d8
parenta85f2b9065e6e7c82f390419f5d065ef68e92846 (diff)
downloadgcc-5996efcd99c2d96eed518074dead68ca6f448a5e.zip
gcc-5996efcd99c2d96eed518074dead68ca6f448a5e.tar.gz
gcc-5996efcd99c2d96eed518074dead68ca6f448a5e.tar.bz2
libphobos: Add OSX bindings for core.sys.posix.aio
Backported from upstream druntime 2.084 Reviewed-on: https://github.com/dlang/druntime/pull/2342 From-SVN: r268050
-rw-r--r--libphobos/libdruntime/core/sys/posix/aio.d39
-rw-r--r--libphobos/libdruntime/core/sys/posix/signal.d8
2 files changed, 47 insertions, 0 deletions
diff --git a/libphobos/libdruntime/core/sys/posix/aio.d b/libphobos/libdruntime/core/sys/posix/aio.d
index 99bd0b3..8300d92 100644
--- a/libphobos/libdruntime/core/sys/posix/aio.d
+++ b/libphobos/libdruntime/core/sys/posix/aio.d
@@ -63,6 +63,19 @@ version (CRuntime_Glibc)
}
}
}
+else version (OSX)
+{
+ struct aiocb
+ {
+ int aio_filedes;
+ off_t aio_offset;
+ void* aio_buf; // volatile
+ size_t aio_nbytes;
+ int reqprio;
+ sigevent aio_sigevent;
+ int aio_lio_opcode;
+ }
+}
else version (FreeBSD)
{
struct __aiocb_private
@@ -158,6 +171,15 @@ version (CRuntime_Glibc)
AIO_ALLDONE
}
}
+else version (OSX)
+{
+ enum
+ {
+ AIO_ALLDONE = 0x1,
+ AIO_CANCELED = 0x2,
+ AIO_NOTCANCELED = 0x4,
+ }
+}
else version (Solaris)
{
enum
@@ -187,6 +209,15 @@ version (CRuntime_Glibc)
LIO_NOP
}
}
+else version (OSX)
+{
+ enum
+ {
+ LIO_NOP = 0x0,
+ LIO_READ = 0x1,
+ LIO_WRITE = 0x2,
+ }
+}
else version (Solaris)
{
enum
@@ -215,6 +246,14 @@ version (CRuntime_Glibc)
LIO_NOWAIT
}
}
+else version (OSX)
+{
+ enum
+ {
+ LIO_NOWAIT = 0x1,
+ LIO_WAIT = 0x2,
+ }
+}
else version (Solaris)
{
enum
diff --git a/libphobos/libdruntime/core/sys/posix/signal.d b/libphobos/libdruntime/core/sys/posix/signal.d
index a592f6f..1ddcba9 100644
--- a/libphobos/libdruntime/core/sys/posix/signal.d
+++ b/libphobos/libdruntime/core/sys/posix/signal.d
@@ -3465,6 +3465,14 @@ else version (DragonFlyBSD)
}
else version (Darwin)
{
+ struct sigevent
+ {
+ int sigev_notify;
+ int sigev_signo;
+ sigval sigev_value;
+ void function(sigval) sigev_notify_function;
+ pthread_attr_t* sigev_notify_attributes;
+ }
}
else version (Solaris)
{