public inbox for newlib-cvs@sourceware.org help / color / mirror / Atom feed
From: Sebastian Huber <sh@sourceware.org> To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] Reduce namespace pollution from <sys/_types.h> Date: Fri, 8 Jul 2022 04:59:04 +0000 (GMT) [thread overview] Message-ID: <20220708045904.039843857B95@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=282d57d2a8462c56ceeafcc10095cab35343eb09 commit 282d57d2a8462c56ceeafcc10095cab35343eb09 Author: Sebastian Huber <sebastian.huber@embedded-brains.de> Date: Thu Jul 7 11:20:35 2022 +0200 Reduce namespace pollution from <sys/_types.h> Provide only __daddr_t through <sys/_types.h>. Diff: --- newlib/libc/include/sys/_types.h | 4 ++++ newlib/libc/include/sys/types.h | 6 ++---- newlib/libc/sys/rtems/include/machine/_types.h | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/newlib/libc/include/sys/_types.h b/newlib/libc/include/sys/_types.h index 017a0aaf6..d1112d5d1 100644 --- a/newlib/libc/include/sys/_types.h +++ b/newlib/libc/include/sys/_types.h @@ -194,6 +194,10 @@ typedef _TIME_T_ __time_t; typedef _CLOCKID_T_ __clockid_t; +#ifndef __machine_daddr_t_defined +typedef long __daddr_t; +#endif + #define _TIMER_T_ unsigned long typedef _TIMER_T_ __timer_t; diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h index 4613ac81f..5035d540d 100644 --- a/newlib/libc/include/sys/types.h +++ b/newlib/libc/include/sys/types.h @@ -115,10 +115,8 @@ typedef _TIME_T_ time_t; #define _TIME_T_DECLARED #endif -#ifndef __daddr_t_defined -typedef long daddr_t; -#define __daddr_t_defined -#endif +typedef __daddr_t daddr_t; + #ifndef __caddr_t_defined typedef char * caddr_t; #define __caddr_t_defined diff --git a/newlib/libc/sys/rtems/include/machine/_types.h b/newlib/libc/sys/rtems/include/machine/_types.h index 5bbe5a5a6..48a320624 100644 --- a/newlib/libc/sys/rtems/include/machine/_types.h +++ b/newlib/libc/sys/rtems/include/machine/_types.h @@ -30,8 +30,8 @@ typedef __uint64_t _CLOCK_T_; typedef int _CLOCKID_T_; #define __machine_clockid_t_defined -typedef __int64_t daddr_t; -#define __daddr_t_defined +typedef __int64_t __daddr_t; +#define __machine_daddr_t_defined typedef int __accmode_t; /* access permissions */ typedef __uint32_t __fixpt_t; /* fixed point number */
reply other threads:[~2022-07-08 4:59 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220708045904.039843857B95@sourceware.org \ --to=sh@sourceware.org \ --cc=newlib-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).