From: <dan...@ya...> - 2002-02-28 09:05:59
|
--- Wu Yongwei <ad...@ne...> wrote: > Danny Smith wrote: > > > 5) a home for other POSIXisms. First on the list is gettimeofday. > > For just the fifth point. Why not implement gettimeofday as an inline as > I > did on > > http://www.geocities.com/yongweiwu/time.htm > I've found it is a good idea to include library version as well as inline, since configure scripts often provide there own prototypes and just test to see if link succeeds. Also, with GCC inlines are not inlined unless optimization is turned off (although 3.1 has a new __attribute__((inline_always)) that will override that on a function-by-function basis) BTW, timeval is defined in winsock[2].h, so you may want to protect it in your header. Danny http://movies.yahoo.com.au - Yahoo! Movies - Vote for your nominees in our online Oscars pool. |