From: Wu Y. <ad...@ne...> - 2002-02-28 09:34:42
|
Danny Smith wrote: > Also, with GCC inlines are not inlined unless > optimization is turned off (although 3.1 has a new "Off"? or "on"? However, I do not expect GCC will inline my gettimeofday, in fact. Most likely it will silently treat it just as static. Maybe in future it will, but currently it seems only MSVC can do that. > BTW, timeval is defined in winsock[2].h, so you may want to protect it in > your header. I thought of this, but did not find how, for MinGW and MSVC (and other compilers) use different macro names (you are writing headers specifically for MinGW and will not have this problem). One way is to include <winsock2.h> in the _WIN32 branch, but it is not satisfactory at all. My last thought is that if I used this timeval.h, I would be writing a cross-platform application and it would be unlikely that I would use winsock[2].h. So I gave it up for the moment. Unless you have a better idea, of course. Best regards, Wu Yongwei |