From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 105743 invoked by alias); 3 Jun 2019 08:40:17 -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 105727 invoked by uid 9078); 3 Jun 2019 08:40:17 -0000 Date: Mon, 03 Jun 2019 08:40:00 -0000 Message-ID: <20190603084017.105726.qmail@sourceware.org> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Corinna Vinschen To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] Avoid cyclic header dependencies X-Act-Checkin: newlib-cygwin X-Git-Author: Sebastian Huber X-Git-Refname: refs/heads/master X-Git-Oldrev: d79aa0f5939be2640b90971d022b98054b86d249 X-Git-Newrev: 66e75b696133e889f514415a259d8d8d56f35d16 X-SW-Source: 2019-q2/txt/msg00015.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=66e75b696133e889f514415a259d8d8d56f35d16 commit 66e75b696133e889f514415a259d8d8d56f35d16 Author: Sebastian Huber Date: Thu May 16 14:40:32 2019 +0200 Avoid cyclic header dependencies RTEMS uses a considerable part of FreeBSD kernel and user space sources. These sources are compiled with a __FreeBSD__ define. On 2018-06-26 Gerald Pfeifer changed the GCC provided so that it includes if __FreeBSD__ is defined. The Newlib included which includes on RTEMS which includes . To get rid of this cyclic dependency move the optional _flock_t definition to . Signed-off-by: Sebastian Huber Diff: --- newlib/libc/include/sys/_types.h | 5 ----- newlib/libc/include/sys/reent.h | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/newlib/libc/include/sys/_types.h b/newlib/libc/include/sys/_types.h index fc10531..90383b0 100644 --- a/newlib/libc/include/sys/_types.h +++ b/newlib/libc/include/sys/_types.h @@ -22,7 +22,6 @@ #include #include #include -#include #ifndef __machine_blkcnt_t_defined typedef long __blkcnt_t; @@ -171,10 +170,6 @@ typedef struct } _mbstate_t; #endif -#ifndef __machine_flock_t_defined -typedef _LOCK_RECURSIVE_T _flock_t; -#endif - #ifndef __machine_iconv_t_defined /* Iconv descriptor type */ typedef void *_iconv_t; diff --git a/newlib/libc/include/sys/reent.h b/newlib/libc/include/sys/reent.h index 6e55e1c..7f8124d 100644 --- a/newlib/libc/include/sys/reent.h +++ b/newlib/libc/include/sys/reent.h @@ -30,6 +30,11 @@ typedef unsigned __Long __ULong; #include #endif +#ifndef __machine_flock_t_defined +#include +typedef _LOCK_RECURSIVE_T _flock_t; +#endif + #ifndef __Long #define __Long __int32_t typedef __uint32_t __ULong;