public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Iain Buclaw <ibuclaw@gdcproject.org>
To: gcc-patches <gcc-patches@gcc.gnu.org>
Subject: [PATCH, libphobos] Commited OSX bindings for core.sys.posix.aio
Date: Fri, 18 Jan 2019 00:07:00 -0000	[thread overview]
Message-ID: <CABOHX+ch091YJ4J2zfCThLBNQVC2LL4yeb+GufTqtDbAS3feOQ@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 195 bytes --]

Hi,

This patch fixes build failure found when testing on OSX.

Bootstrapped and tested on x86_64-linux-gnu, though have verified is
correct on OSX.

Committed to trunk as r268050.

-- 
Iain
---

[-- Attachment #2: druntime2342.patch --]
[-- Type: text/x-patch, Size: 1900 bytes --]

diff --git a/libphobos/libdruntime/core/sys/posix/aio.d b/libphobos/libdruntime/core/sys/posix/aio.d
index 99bd0b3475b..8300d920ca9 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 a592f6f1eb0..1ddcba91049 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)
 {

                 reply	other threads:[~2019-01-18  0:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CABOHX+ch091YJ4J2zfCThLBNQVC2LL4yeb+GufTqtDbAS3feOQ@mail.gmail.com \
    --to=ibuclaw@gdcproject.org \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).