From patchwork Fri Jan 18 00:07:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Buclaw X-Patchwork-Id: 1027056 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-494268-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gdcproject.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="dw/ERrkk"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43gh8t6CNNz9sDr for ; Fri, 18 Jan 2019 11:07:41 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; q= dns; s=default; b=dd8MROQTBPr0o1Ezj/VvnGrAtNZpgZt/2tL769I3TXzB4l VyPILFfZWjLPiMTZ0bIdvXN9wBggV4s5QEs9qhJszK0KLD9wEQ0uCEnfKuVmrHxo orEas0ZmCxNx4NsL1kCpFl1dsE+Ft0Z4JE1u490dTPqJ0QFUajfpFHJ9w8LLM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; s= default; bh=SVdccYIWXkkS1eP9gbLNiPQoE68=; b=dw/ERrkkM+VUAs/7bbmG dEbpnKgvl9HJvwETd1NeqdN2JO1wiP6lKY/C+Fx6uUnhlIBJkV4V7BsrtO/OwDRb oZZjYLt0YTVU0L2xyMfFMZFp8eHm4SafjTM/97E6erk6NfZB2HoXqELUZV+s7YkG /7ryFzE1T2DirVU3+B2q6VM= Received: (qmail 10147 invoked by alias); 18 Jan 2019 00:07:34 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 10121 invoked by uid 89); 18 Jan 2019 00:07:32 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=libdruntime, libphobos, Hx-languages-length:1879, Darwin X-HELO: mail-qt1-f175.google.com Received: from mail-qt1-f175.google.com (HELO mail-qt1-f175.google.com) (209.85.160.175) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 18 Jan 2019 00:07:30 +0000 Received: by mail-qt1-f175.google.com with SMTP id t33so13422920qtt.4 for ; Thu, 17 Jan 2019 16:07:30 -0800 (PST) MIME-Version: 1.0 From: Iain Buclaw Date: Fri, 18 Jan 2019 01:07:17 +0100 Message-ID: Subject: [PATCH, libphobos] Commited OSX bindings for core.sys.posix.aio To: gcc-patches X-IsSubscribed: yes 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. 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) {