changeset 3106:7decb8c01c2a

* include/time.h: Add suseconds_t and useconds_t here for now. * include/sys/time.h: Use suseconds_t when defining struct timeval.
author jlarmour
date Fri, 09 Mar 2012 15:08:45 +0000
parents 087a81b7ea16
children 9c050c918d4a
files packages/isoinfra/current/ChangeLog packages/isoinfra/current/include/sys/time.h packages/isoinfra/current/include/time.h
diffstat 3 files changed, 17 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/packages/isoinfra/current/ChangeLog
+++ b/packages/isoinfra/current/ChangeLog
@@ -1,3 +1,8 @@
+2012-03-09  Jonathan Larmour  <jifl@eCosCentric.com>
+
+	* include/time.h: Add suseconds_t and useconds_t here for now.
+	* include/sys/time.h: Use suseconds_t when defining struct timeval.
+
 2009-06-03  Ross Younger  <wry@ecoscentric.com>
 
 	* include/sys/stat.h: Include cyg_type.h for __externC
--- a/packages/isoinfra/current/include/sys/time.h
+++ b/packages/isoinfra/current/include/sys/time.h
@@ -78,8 +78,8 @@
  * and used in other calls such as select(2).
  */
 struct timeval {
-	time_t	tv_sec;		/* seconds */
-	time_t	tv_usec;	/* and microseconds */
+       time_t      tv_sec;      /* seconds */
+       suseconds_t tv_usec;     /* and microseconds */
 };
 
 #endif
--- a/packages/isoinfra/current/include/time.h
+++ b/packages/isoinfra/current/include/time.h
@@ -77,7 +77,16 @@
  * Epoch (00:00:00 GMT, 1970-01-01), but don't rely on this - always use
  * the type opaquely
  */
-typedef int time_t;
+typedef long time_t;
+
+/* Additional POSIX-derived types. Not the ideal place as these should
+ * also be defined in <sys/types.h>, along with time_t but that will
+ * require major upheaval to resolve these sorts of minor strict
+ * compliance issues properly.
+ */
+typedef long suseconds_t;
+typedef long useconds_t;
+
 # define __time_t_defined
 
 #endif