public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org>
To: newlib-cvs@sourceware.org
Subject: [newlib-cygwin] Add BSD guard for useconds_t
Date: Fri, 15 Apr 2016 12:55:00 -0000	[thread overview]
Message-ID: <20160415125506.94876.qmail@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=75ab33bd5ed5049c2e7c66cb8f72112698d5adef

commit 75ab33bd5ed5049c2e7c66cb8f72112698d5adef
Author: Sebastian Huber <sebastian.huber@embedded-brains.de>
Date:   Fri Apr 15 13:44:24 2016 +0200

    Add BSD guard for useconds_t
    
    Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>

Diff:
---
 newlib/libc/include/sys/_types.h | 1 +
 newlib/libc/include/sys/types.h  | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/newlib/libc/include/sys/_types.h b/newlib/libc/include/sys/_types.h
index 32e7fef..041ad74 100644
--- a/newlib/libc/include/sys/_types.h
+++ b/newlib/libc/include/sys/_types.h
@@ -175,5 +175,6 @@ typedef	_TIMER_T_	__timer_t;
 
 typedef	unsigned short	__nlink_t;
 typedef	long		__suseconds_t;	/* microseconds (signed) */
+typedef	unsigned long	__useconds_t;	/* microseconds (unsigned) */
 
 #endif	/* _SYS__TYPES_H */
diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h
index 3e803c3..f02f170 100644
--- a/newlib/libc/include/sys/types.h
+++ b/newlib/libc/include/sys/types.h
@@ -222,7 +222,10 @@ typedef	__timer_t	timer_t;
 #define	_TIMER_T_DECLARED
 #endif
 
-typedef unsigned long useconds_t;
+#ifndef _USECONDS_T_DECLARED
+typedef	__useconds_t	useconds_t;	/* microseconds (unsigned) */
+#define	_USECONDS_T_DECLARED
+#endif
 
 #ifndef _SUSECONDS_T_DECLARED
 typedef	__suseconds_t	suseconds_t;


                 reply	other threads:[~2016-04-15 12:55 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=20160415125506.94876.qmail@sourceware.org \
    --to=corinna@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: link
Be 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).