I need to get the following code working platform independent:
timeval tv;
tv.tv_sec = std::numeric_limits<time_t>::max();
This code works fine under all kinds of Linux OS and Mac OS X.
Unfortunately under windows this would return -1, for tv.tv_sec.
I thought then about redefining time_t like this:
typedef int time_t;
This did not work either as the comiler complains now about:
error C2371: 'time_t' : redefinition; different basic types
How can I get the code this code running on plattform independent?
Alternative without decltype