From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by sourceware.org (Postfix) with ESMTP id 2E2633857C67 for ; Tue, 5 Jan 2021 18:46:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 2E2633857C67 Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-280-xywN3wZcP1Kyya93rjIQbw-1; Tue, 05 Jan 2021 13:46:39 -0500 X-MC-Unique: xywN3wZcP1Kyya93rjIQbw-1 Received: by mail-pj1-f69.google.com with SMTP id my8so477900pjb.3 for ; Tue, 05 Jan 2021 10:46:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=AeSCXkcEKJeBarvGsc7MXJLK2h/LPWxwmS1U0KgxPbo=; b=YIv+fjjzHXsEZjbMryYZWHeD7nTb/X9sRkBWMn6FB6dRrXOH5oL0fHaBriJVjN6U+g 89z/fFBjfSu3nwubseEZ6aqt29Nn/DbPh82cf7yeXMWwO9BQVh6g7K49zt9n0tkH7KJS ruiVcpqIYIcuj+VbBVLmyUYcH7rfJ6Kpl9DdEtQ9tqklre5QCYXn72K+1BPWzN//Zur2 +FGcKPKusrRMIPFAtQvaORMZWt7OLovsMguxsABK6W1uPDgZvXrZmAAJ466QttNt3R/d Z4O1N0gWEQShWgJFHA9EfFZkpjxYqmwQAIvif51ifvZr6ycboB1Txqk/qR0M74nlGlyJ 4xSA== X-Gm-Message-State: AOAM5304Ol0ORdKZ6BPiopnHH0OuB5D6/mM3e2STnkETlCZyJePWi3kx OpIhvtOFKSqq2Z7wbFCdp13EnVPPlQ4ajvA6rOY0BvzEzakuXrF1T63w3W+T74yxMx1m28v8nsP PNSYdFuwL3mhews81K4ZZ0nzziniVVvE= X-Received: by 2002:a62:145:0:b029:19e:a395:bd3d with SMTP id 66-20020a6201450000b029019ea395bd3dmr702316pfb.13.1609872398544; Tue, 05 Jan 2021 10:46:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJz9yACM76JTVvBiHIgb8KJo6VI0HvIx4ou6Q1dBWLtU4AhwfSNv4Kf375Ky0wAXtoNy5fN7r3k1WcvZEZtn9W0= X-Received: by 2002:a62:145:0:b029:19e:a395:bd3d with SMTP id 66-20020a6201450000b029019ea395bd3dmr702304pfb.13.1609872398278; Tue, 05 Jan 2021 10:46:38 -0800 (PST) MIME-Version: 1.0 References: <20210104184143.40179-1-sebastian.huber@embedded-brains.de> In-Reply-To: <20210104184143.40179-1-sebastian.huber@embedded-brains.de> From: Jeff Johnston Date: Tue, 5 Jan 2021 13:46:26 -0500 Message-ID: Subject: Re: [PATCH] RTEMS: Add and To: Sebastian Huber Cc: Newlib X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, HTML_MESSAGE, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2021 18:46:44 -0000 Patch applied. -- Jeff J. On Mon, Jan 4, 2021 at 1:42 PM Sebastian Huber < sebastian.huber@embedded-brains.de> wrote: > Add the POSIX header file which is used by the GCC 11 Ada > runtime support. > > Signed-off-by: Sebastian Huber > --- > newlib/libc/sys/rtems/include/poll.h | 1 + > newlib/libc/sys/rtems/include/sys/poll.h | 106 +++++++++++++++++++++++ > 2 files changed, 107 insertions(+) > create mode 100644 newlib/libc/sys/rtems/include/poll.h > create mode 100644 newlib/libc/sys/rtems/include/sys/poll.h > > diff --git a/newlib/libc/sys/rtems/include/poll.h > b/newlib/libc/sys/rtems/include/poll.h > new file mode 100644 > index 000000000..06fb41ab8 > --- /dev/null > +++ b/newlib/libc/sys/rtems/include/poll.h > @@ -0,0 +1 @@ > +#include > diff --git a/newlib/libc/sys/rtems/include/sys/poll.h > b/newlib/libc/sys/rtems/include/sys/poll.h > new file mode 100644 > index 000000000..7cdbbbb59 > --- /dev/null > +++ b/newlib/libc/sys/rtems/include/sys/poll.h > @@ -0,0 +1,106 @@ > +/*- > + * SPDX-License-Identifier: BSD-3-Clause > + * > + * Copyright (c) 1997 Peter Wemm > + * All rights reserved. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distribution. > + * 3. The name of the author may not be used to endorse or promote > products > + * derived from this software without specific prior written > permission. > + * > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR > PURPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR > CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, > STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY > WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + * > + * $FreeBSD$ > + */ > + > +#ifndef _SYS_POLL_H_ > +#define _SYS_POLL_H_ > + > +#include > + > +/* > + * This file is intended to be compatible with the traditional poll.h. > + */ > + > +typedef unsigned int nfds_t; > + > +/* > + * This structure is passed as an array to poll(2). > + */ > +struct pollfd { > + int fd; /* which file descriptor to poll */ > + short events; /* events we are interested in */ > + short revents; /* events found on return */ > +}; > + > +/* > + * Requestable events. If poll(2) finds any of these set, they are > + * copied to revents on return. > + * XXX Note that FreeBSD doesn't make much distinction between POLLPRI > + * and POLLRDBAND since none of the file types have distinct priority > + * bands - and only some have an urgent "mode". > + * XXX Note POLLIN isn't really supported in true SVSV terms. Under SYSV > + * POLLIN includes all of normal, band and urgent data. Most poll > handlers > + * on FreeBSD only treat it as "normal" data. > + */ > +#define POLLIN 0x0001 /* any readable data > available */ > +#define POLLPRI 0x0002 /* OOB/Urgent readable > data */ > +#define POLLOUT 0x0004 /* file descriptor is > writeable */ > +#define POLLRDNORM 0x0040 /* non-OOB/URG data > available */ > +#define POLLWRNORM POLLOUT /* no write type > differentiation */ > +#define POLLRDBAND 0x0080 /* OOB/Urgent readable > data */ > +#define POLLWRBAND 0x0100 /* OOB/Urgent data can be > written */ > + > +#if __BSD_VISIBLE > +/* General FreeBSD extension (currently only supported for sockets): */ > +#define POLLINIGNEOF 0x2000 /* like POLLIN, except > ignore EOF */ > +#endif > + > +/* > + * These events are set if they occur regardless of whether they were > + * requested. > + */ > +#define POLLERR 0x0008 /* some poll error > occurred */ > +#define POLLHUP 0x0010 /* file descriptor was > "hung up" */ > +#define POLLNVAL 0x0020 /* requested events > "invalid" */ > + > +#if __BSD_VISIBLE > + > +#define POLLSTANDARD > (POLLIN|POLLPRI|POLLOUT|POLLRDNORM|POLLRDBAND|\ > + POLLWRBAND|POLLERR|POLLHUP|POLLNVAL) > + > +/* > + * Request that poll() wait forever. > + * XXX in SYSV, this is defined in stropts.h, which is not included > + * by poll.h. > + */ > +#define INFTIM (-1) > + > +#endif > + > +#ifndef _KERNEL > + > +__BEGIN_DECLS > +int poll(struct pollfd _pfd[], nfds_t _nfds, int _timeout); > +__END_DECLS > + > +#endif /* !_KERNEL */ > + > +#endif /* !_SYS_POLL_H_ */ > -- > 2.26.2 > >