useconds_t and RTEMS
Aaron J. Grier
aaron@frye.com
Fri Nov 30 15:01:00 GMT 2001
On Fri, Nov 30, 2001 at 05:22:23PM -0500, Christopher Faylor wrote:
> On Fri, Nov 30, 2001 at 02:09:12PM -0800, Aaron J. Grier wrote:
> >this seems an obvious fix, since unistd.h shows:
> >
> >#if defined(__CYGWIN__) || defined(__rtems__)
> >[...]
> >useconds_t _EXFUN(ualarm, (useconds_t __useconds));
>
> Do you know for a fact that rtems has ualarm? If so, why wasn't this
> defined already?
it doesn't look like it exists in RTEMS 4.5.0, which is what I'm
bringing this toolchain up for... I figured the prototype had been
added to an __rtems__ section on purpose. ;)
> I just added this call for cygwin on Tuesday. If anything it seems
> like the ualarm declaration should be protected with an ifdef
> __CYGWIN__ .
yeah. something like this?
Index: newlib/libc/include/sys/unistd.h
===================================================================
RCS file: /cvs/src/src/newlib/libc/include/sys/unistd.h,v
retrieving revision 1.28
diff -u -r1.28 unistd.h
--- unistd.h 2001/11/28 00:16:58 1.28
+++ unistd.h 2001/11/30 22:54:37
@@ -133,10 +133,12 @@
#if defined(__CYGWIN__) || defined(__rtems__)
int _EXFUN(getdtablesize, (void));
int _EXFUN(setdtablesize, (int));
-useconds_t _EXFUN(ualarm, (useconds_t __useconds));
unsigned _EXFUN(usleep, (unsigned int __useconds));
int _EXFUN(ftruncate, (int __fd, off_t __length));
int _EXFUN(truncate, (const char *, off_t __length));
+#ifdef __CYGWIN__
+useconds_t _EXFUN(ualarm, (useconds_t __useconds));
+#endif
#if !(defined (_WINSOCK_H) || defined (__USE_W32_SOCKETS))
/* winsock[2].h defines as __stdcall, and with int as 2nd arg */
int _EXFUN(gethostname, (char *__name, size_t __len));
--
Aaron J. Grier | Frye Electronics, Tigard, OR | aaron@frye.com
"In a few thousand years people will be scratching their heads
wondering how on earth the first computer was invented and
bootstrapped without a prior computer to do it with."
-- Chris Malcolm, on comp.arch
More information about the Newlib
mailing list