settimeofday and adjtime prototypes

Joel Sherrill joel.sherrill@oarcorp.com
Tue Jul 22 17:17:00 GMT 2014


The patch is small.  How does it look? OK to commit?

2014-07-22  Joel Sherrill <joel.sherrill@oarcorp.com>

    * libc/include/sys/time.h: Add prototype for adjtime() and
    wrap it and settimeofday() prototype with __BSD_VISIBLE.

--joel

On 7/21/2014 1:33 PM, Corinna Vinschen wrote:
> On Jul 21 10:08, Joel Sherrill wrote:
>> Hi
>>
>> I was looking at adding adjtime() to sys/time.h. It and settimeofday()
>> are protected by _BSD_SOURCE per the Linux man page.
>>
>> settimeofday() is currently not protected by a BSD feature macro,
>> should it be?
>>
>> And it is OK to add adjtime() protected by a BSD feature macro?
> Yes in both cases.
>
>
> Thanks,
> Corinna
>

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill@OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985

-------------- next part --------------
Index: libc/include/sys/time.h
===================================================================
RCS file: /cvs/src/src/newlib/libc/include/sys/time.h,v
retrieving revision 1.18
diff -u -r1.18 time.h
--- libc/include/sys/time.h	23 Nov 2013 01:25:47 -0000	1.18
+++ libc/include/sys/time.h	22 Jul 2014 17:15:48 -0000
@@ -76,7 +76,10 @@
 
 int _EXFUN(gettimeofday, (struct timeval *__restrict __p,
 			  void *__restrict __tz));
+#if __BSD_VISIBLE
 int _EXFUN(settimeofday, (const struct timeval *, const struct timezone *));
+int _EXFUN(adjtime, (const struct timeval *, struct timeval *));
+#endif
 int _EXFUN(utimes, (const char *__path, const struct timeval *__tvp));
 int _EXFUN(getitimer, (int __which, struct itimerval *__value));
 int _EXFUN(setitimer, (int __which, const struct itimerval *__restrict __value,


More information about the Newlib mailing list