This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: [PATCH 1/2] Move kernel dependent parts of <sys/time.h>
- From: Sebastian Huber <sebastian dot huber at embedded-brains dot de>
- To: newlib at sourceware dot org
- Date: Fri, 8 Apr 2016 08:55:20 +0200
- Subject: Re: [PATCH 1/2] Move kernel dependent parts of <sys/time.h>
- Authentication-results: sourceware.org; auth=none
- References: <1460026724-14238-1-git-send-email-sebastian dot huber at embedded-brains dot de> <20160407152953 dot GB7666 at calimero dot vinschen dot de>
On 07/04/16 17:29, Corinna Vinschen wrote:
On Apr 7 12:58, Sebastian Huber wrote:
Move the kernel dependent parts of <sys/time.h> to new system-specific
header file <machine/_time.h>. Provide an empty default implementation.
Add a specialized implementation for RTEMS.
Shouldn't the default implementation in machine/_time.h maintain the
generic implementation from sys/time.h for backward compat?
I added the #ifdef _KERNEL parts in <sys/time.h> with
commit bb0159489785d577ad0b8061a1ba7956ee0f89d0
Author: Sebastian Huber <sebastian.huber@embedded-brains.de>
Date: Fri Mar 13 13:17:34 2015 +0100
Merge parts of <sys/time.h> from FreeBSD
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index 0de2ee2..95c1057 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,3 +1,29 @@
+2015-03-13 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/include/machine/_types.h (__suseconds_t): Define.
+ * libc/include/sys/_timeval.h: Import from FreeBSD and add
+ MinGW-w64 compatibility.
+ (timerclear): Copy from FreeBSD <sys/time.h>.
+ (timerisset): Likewise.
+ (timercmp): Likewise.
+ (timeradd): Likewise.
+ (timersub): Likewise.
+ * libc/include/sys/time.h: (bintime, ...) Import from FreeBSD.
+ (timespecclear, ...): Likewise.
+ (inittodr, ...): Likewise.
+ (timerclear): Delete.
+ (timerisset): Likewise.
+ (timercmp): Likewise.
+ (timeradd): Likewise.
+ (timersub): Likewise.
+ (futimes): Declare if __BSD_VISIBLE.
+ (futimesat): Likewise.
+ (lutimes): Likewise.
+ (setitimer): Declare unconditionally.
+ (gettimeofday): Declare if __XSI_VISIBLE.
+ * libc/include/sys/types.h (sbintime_t): Define.
+ (suseconds_t): Define conditionally via __suseconds_t.
It was a bad idea to add _KERNEL specific parts to the general Newlib
header files. User space programs are not supposed to define _KERNEL.
So, I don't think there is a backward compatibility problem.
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber@embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschÃftliche Mitteilung im Sinne des EHUG.