From patchwork Thu Nov 30 06:00:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yaakov Selkowitz X-Patchwork-Id: 120074 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp274757qgn; Wed, 29 Nov 2017 22:01:02 -0800 (PST) X-Google-Smtp-Source: AGs4zMZnEH0nOzH35nzBet1ZTOt7NTg7XWsg9d0APC9WiRJORgxbiG1R3hms2PHfnom8n6Y+8oBd X-Received: by 10.101.80.197 with SMTP id s5mr1314443pgp.399.1512021662419; Wed, 29 Nov 2017 22:01:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512021662; cv=none; d=google.com; s=arc-20160816; b=q2oY8CI2rvJvtI9obC0ksVTefEx7QkBi/j0qkiBfgzzXkT7v9j1KO1K/LjGWTVJlLH gqOxQimLR4QtDd3zUU5l6MLJVo/lQHTw674WzzdYWVJ+LoG8lGEvgxvPwRTlEu7z9GUI 2Q2OGonDRWPdHdwKHSeCjchqlhtTrcHGRlV4cjSCUyBrmDeElaGBbfaqIx3VJ+BdiGOz USQ5i0RaseXz0aeF99wGuJ/I5XI2ax7IkynVWqCY6cVZ3TgWIAUtcdanU8Mu9P8FjJD5 z0BkYAAc5iXtsg0Anp9iOZ+5O+02fff3xXnfQUFj27fTMldq9ZXQ8dcnHAJi/9qDwiDt CSjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:to:from:delivered-to:sender:list-help :list-post:list-archive:list-subscribe:list-unsubscribe:list-id :precedence:mailing-list:dkim-signature:domainkey-signature :arc-authentication-results; bh=sEUBYPwwgTP+wtLvi3rCeRgjBCJMEXu4oOabibKCRwg=; b=CPYaEV+kRTT1VSgHwVaLPZHltIgixgQsXU/sF2zR/0psiYu7FFy2DZ7sb7bPoQX34X lGZFNfWZ0z2L+ThNFmN87EifdRT37CD8s0zxbidqHMiNXQ1zWzgMGNX+bYfe1ptmTQWi yAPe88p7V12iFRBVZoSvFokBBKp8Jr9bKfBFsjonnW52dPG72udaEKAA07/SsC6C82tx h5euljLY4wPJ/B3yakpm6aK1XTktyPi2umodlTfGCP6SWfxPG0sBIgr8QTKFSo+utxdI sv/ddpoGJp1LGAB+byXMoa1p01fw7A+cdr1L66hF96tlbbnlmQCx7wlPFNO/1ob7GBwB rYSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=Z/wgkQfk; spf=pass (google.com: domain of newlib-return-15412-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=newlib-return-15412-patch=linaro.org@sourceware.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id b2si2664512pfm.309.2017.11.29.22.01.02 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Nov 2017 22:01:02 -0800 (PST) Received-SPF: pass (google.com: domain of newlib-return-15412-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=Z/wgkQfk; spf=pass (google.com: domain of newlib-return-15412-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=newlib-return-15412-patch=linaro.org@sourceware.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id; q=dns; s= default; b=fulcl1C+/GYQU2vXpNeMhbh05NgX7JsC6l7TmIqKxmrb2wzJlBZKl WpArp+6Z5Ue+f2LR03+I6JG4falwZGNqpkSRc755m25kMSW1+9wf84Y7+NrV7JTi Lj1R8ljNOcd9rF/RoOEcpqJduEnuQVvVziIpBT5UTRlLRCotYODEP8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id; s=default; bh=w+Q6+HHGC8NJ9c9cCVtHH95JiiI=; b=Z/wgkQfkPGpqNP1md+0MjN9Wu7wd VUDFGVwpTtl2m+gM+A4Rky9HUhniu7BhH0AIHUTNwWR4TXpWnghlU+AlLqC1CR38 PSp+wVfJLjQj19964MqS1OVkvPEN/XA2LQ6sfJ2puAOv4R980cj6ymlbm5e2TXSt sdC4AWQL0ItYcGI= Received: (qmail 2899 invoked by alias); 30 Nov 2017 06:00:50 -0000 Mailing-List: contact newlib-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-owner@sourceware.org Delivered-To: mailing list newlib@sourceware.org Received: (qmail 2815 invoked by uid 89); 30 Nov 2017 06:00:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_NUMSUBJECT, KB_WAM_FROM_NAME_SINGLEWORD, SPF_HELO_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=1959 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 30 Nov 2017 06:00:38 +0000 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7F37280476 for ; Thu, 30 Nov 2017 06:00:36 +0000 (UTC) Received: from localhost.localdomain (ovpn-116-45.phx2.redhat.com [10.3.116.45]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2B8B260BE5 for ; Thu, 30 Nov 2017 06:00:36 +0000 (UTC) From: Yaakov Selkowitz To: newlib@sourceware.org Subject: [PATCH] Feature test macros overhaul: unistd.h, part 3 Date: Thu, 30 Nov 2017 00:00:26 -0600 Message-Id: <20171130060026.6292-1-yselkowi@redhat.com> Signed-off-by: Yaakov Selkowitz --- newlib/libc/include/sys/unistd.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) -- 2.15.0 diff --git a/newlib/libc/include/sys/unistd.h b/newlib/libc/include/sys/unistd.h index 0df4dc374..05962219a 100644 --- a/newlib/libc/include/sys/unistd.h +++ b/newlib/libc/include/sys/unistd.h @@ -73,13 +73,17 @@ int _EXFUN(execvpe, (const char *__file, char * const __argv[], char * const #if __ATFILE_VISIBLE int _EXFUN(faccessat, (int __dirfd, const char *__path, int __mode, int __flags)); #endif -#if __BSD_VISIBLE || __XSI_VISIBLE >= 4 +#if __BSD_VISIBLE || __XSI_VISIBLE >= 4 || __POSIX_VISIBLE >= 200809 int _EXFUN(fchdir, (int __fildes)); #endif +#if __POSIX_VISIBLE >= 199309 int _EXFUN(fchmod, (int __fildes, mode_t __mode )); +#endif #if !defined(__INSIDE_CYGWIN__) +#if __BSD_VISIBLE || __XSI_VISIBLE >= 4 || __POSIX_VISIBLE >= 200809 int _EXFUN(fchown, (int __fildes, uid_t __owner, gid_t __group )); #endif +#endif #if __ATFILE_VISIBLE int _EXFUN(fchownat, (int __dirfd, const char *__path, uid_t __owner, gid_t __group, int __flags)); #endif @@ -89,7 +93,9 @@ int _EXFUN(fexecve, (int __fd, char * const __argv[], char * const __envp[] )); pid_t _EXFUN(fork, (void )); long _EXFUN(fpathconf, (int __fd, int __name )); int _EXFUN(fsync, (int __fd)); +#if __POSIX_VISIBLE >= 199309 int _EXFUN(fdatasync, (int __fd)); +#endif #if __GNU_VISIBLE char * _EXFUN(get_current_dir_name, (void)); #endif @@ -113,12 +119,16 @@ char * _EXFUN(getlogin, (void )); #if defined(_POSIX_THREAD_SAFE_FUNCTIONS) int _EXFUN(getlogin_r, (char *name, size_t namesize) ); #endif +#if __BSD_VISIBLE || (__XSI_VISIBLE && __POSIX_VISIBLE < 200112) char * _EXFUN(getpass, (const char *__prompt)); int _EXFUN(getpagesize, (void)); +#endif #if __BSD_VISIBLE int _EXFUN(getpeereid, (int, uid_t *, gid_t *)); #endif +#if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >= 4 pid_t _EXFUN(getpgid, (pid_t)); +#endif pid_t _EXFUN(getpgrp, (void )); pid_t _EXFUN(getpid, (void )); pid_t _EXFUN(getppid, (void )); @@ -142,13 +152,17 @@ int _EXFUN(isatty, (int __fildes )); int _EXFUN(issetugid, (void)); #endif #if !defined(__INSIDE_CYGWIN__) +#if __BSD_VISIBLE || __XSI_VISIBLE >= 4 || __POSIX_VISIBLE >= 200809 int _EXFUN(lchown, (const char *__path, uid_t __owner, gid_t __group )); #endif +#endif int _EXFUN(link, (const char *__path1, const char *__path2 )); #if __ATFILE_VISIBLE int _EXFUN(linkat, (int __dirfd1, const char *__path1, int __dirfd2, const char *__path2, int __flags )); #endif +#if __MISC_VISIBLE || __XSI_VISIBLE int _EXFUN(nice, (int __nice_value )); +#endif #if !defined(__INSIDE_CYGWIN__) off_t _EXFUN(lseek, (int __fildes, off_t __offset, int __whence )); #endif @@ -168,8 +182,10 @@ int _EXFUN(pipe, (int __fildes[2] )); #if __GNU_VISIBLE int _EXFUN(pipe2, (int __fildes[2], int flags)); #endif +#if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >= 500 ssize_t _EXFUN(pread, (int __fd, void *__buf, size_t __nbytes, off_t __offset)); ssize_t _EXFUN(pwrite, (int __fd, const void *__buf, size_t __nbytes, off_t __offset)); +#endif _READ_WRITE_RETURN_TYPE _EXFUN(read, (int __fd, void *__buf, size_t __nbyte )); #if __BSD_VISIBLE int _EXFUN(rresvport, (int *__alport)); @@ -179,7 +195,9 @@ int _EXFUN(rmdir, (const char *__path )); #if __BSD_VISIBLE int _EXFUN(ruserok, (const char *rhost, int superuser, const char *ruser, const char *luser)); #endif +#if __BSD_VISIBLE || (__XSI_VISIBLE >= 4 && __POSIX_VISIBLE < 200112) void * _EXFUN(sbrk, (ptrdiff_t __incr)); +#endif #if !defined(__INSIDE_CYGWIN__) #if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 int _EXFUN(setegid, (gid_t __gid )); @@ -194,7 +212,9 @@ int _EXFUN(setgroups, (int ngroups, const gid_t *grouplist )); int _EXFUN(sethostname, (const char *, size_t)); #endif int _EXFUN(setpgid, (pid_t __pid, pid_t __pgid )); +#if __SVID_VISIBLE || __XSI_VISIBLE >= 500 int _EXFUN(setpgrp, (void )); +#endif #if (__BSD_VISIBLE || __XSI_VISIBLE >= 4) && !defined(__INSIDE_CYGWIN__) int _EXFUN(setregid, (gid_t __rgid, gid_t __egid)); int _EXFUN(setreuid, (uid_t __ruid, uid_t __euid));