From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 85161 invoked by alias); 13 Sep 2019 12:52:44 -0000 Mailing-List: contact newlib-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-cvs-owner@sourceware.org Received: (qmail 84972 invoked by uid 9172); 13 Sep 2019 12:52:44 -0000 Date: Fri, 13 Sep 2019 12:52:00 -0000 Message-ID: <20190913125244.84968.qmail@sourceware.org> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Joel Sherrill To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] libc/include/devctl.h: Add SOCKCLOSE per FACE Technical Standard, Edition 3.0 X-Act-Checkin: newlib-cygwin X-Git-Author: Joel Sherrill X-Git-Refname: refs/heads/master X-Git-Oldrev: f39a694c463c1a1ea14e60f5d03652d94e6f76ee X-Git-Newrev: 9786b0559565616b1b35282157d9f42f239ed656 X-SW-Source: 2019-q3/txt/msg00034.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=9786b0559565616b1b35282157d9f42f239ed656 commit 9786b0559565616b1b35282157d9f42f239ed656 Author: Joel Sherrill Date: Tue Sep 10 10:49:11 2019 -0500 libc/include/devctl.h: Add SOCKCLOSE per FACE Technical Standard, Edition 3.0 The FACE Technical Standard, Edition 3.0 and later require the definition of the subcommand SOCKCLOSE in . Reference: https://www.opengroup.org/face Diff: --- newlib/libc/include/devctl.h | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/newlib/libc/include/devctl.h b/newlib/libc/include/devctl.h index f6055fb..fd3409f 100644 --- a/newlib/libc/include/devctl.h +++ b/newlib/libc/include/devctl.h @@ -1,5 +1,6 @@ /* - * Copyright (c) 2016 Joel Sherrill . All rights reserved. + * Copyright (c) 2016,2019 Joel Sherrill . + * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -27,6 +28,28 @@ #define _POSIX_DEVCTL_h_ /* + * Nothing in this file should be visible unless _POSIX_26_C_SOURCE is + * defined. + */ +#ifdef _POSIX_26_C_SOURCE + +#include + +#if defined(__rtems__) +/* + * The FACE Technical Standard, Edition 3.0 and later require the + * definition of the subcommand SOCKCLOSE in . + * + * Reference: https://www.opengroup.org/face + * + * Using 'D' should avoid the letters used by other users of + */ +#include + +#define SOCKCLOSE _IO('D', 1) /* socket close */ +#endif + +/* * The posix_devctl() method is defined by POSIX 1003.26-2003. Aside * from the single method, it adds the following requirements: * @@ -35,10 +58,6 @@ * + application must define _POSIX_26_C_SOURCE to use posix_devctl(). * + posix_devctl() is prototyped in */ - -#ifdef _POSIX_26_C_SOURCE -#include - int posix_devctl( int fd, int dcmd,