Subject: posix time.h and adding restrict keyword
To: None <tech-kern@netbsd.org>
From: Murray Armfield <murray@river-styx.org>
List: tech-kern
Date: 04/18/2004 12:55:02
Hi Folks,
	Just a quick one. The posix standard specifies having the restrict keyword=
 in=20
the following functions definitions in sys/time.h. Should NetBSD be doing=20
this?

=46rom sys/time.h...

int    gettimeofday __P((struct timeval *, struct timezone *));
should it become...
int    gettimeofday __P((struct timeval * __restrict, void * __restrict));

int    setitimer __P((int, const struct itimerval *, struct itimerval *));
should it become...
int    setitimer __P((int, const struct itimerval * __restrict, struct=20
itimerval * __restrict));

Also, the struct timeval is making use of the long type while posix specifi=
es=20
a couple of other data types for the timeval structure. Should this be=20
changed?

i.e.
struct timeval {
=2D       long    tv_sec;         /* seconds */
=2D       long    tv_usec;        /* and microseconds */
+       time_t          tv_sec;         /* seconds */
+       suseconds_t     tv_usec;        /* and microseconds */
 };

Please cc me in any replies as I am no longer on any of the NetBSD mailing=
=20
lists.

Take care,
	Murray Armfield