diff options
author | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2014-01-26 12:56:32 +0000 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2014-01-26 12:56:32 +0000 |
commit | c6022b3b85dedeae9465e5bb2fe38fdb35f21ee9 (patch) | |
tree | ea4721d3fe3f1cb11b424f5cfe2c5b2f9d301572 /epan/to_str.c | |
parent | 47f50d13ceff8f560b3fe02ed0084e4bd205e576 (diff) |
Drop support of Visual Studio 2005
* Remove _MSC_VER < 1500 check
* Cleanup config.nmake
See http://www.wireshark.org/lists/wireshark-dev/201305/msg00159.html
svn path=/trunk/; revision=54965
Diffstat (limited to 'epan/to_str.c')
-rw-r--r-- | epan/to_str.c | 69 |
1 files changed, 27 insertions, 42 deletions
diff --git a/epan/to_str.c b/epan/to_str.c index 5315020a90..7b56aeca39 100644 --- a/epan/to_str.c +++ b/epan/to_str.c @@ -582,29 +582,22 @@ abs_time_to_ep_str(const nstime_t *abs_time, const absolute_time_display_e fmt, const char *zonename = "???"; gchar *buf = NULL; -#if (defined _WIN32) && (_MSC_VER < 1500) - /* calling localtime() on MSVC 2005 with huge values causes it to crash */ - /* XXX - find the exact value that still does work */ - /* XXX - using _USE_32BIT_TIME_T might be another way to circumvent this problem */ - if(abs_time->secs > 2000000000) { - tmp = NULL; - } else -#endif - switch (fmt) { - case ABSOLUTE_TIME_UTC: - case ABSOLUTE_TIME_DOY_UTC: - tmp = gmtime(&abs_time->secs); - zonename = "UTC"; - break; + switch (fmt) { - case ABSOLUTE_TIME_LOCAL: - tmp = localtime(&abs_time->secs); - if (tmp) { - zonename = get_zonename(tmp); - } - break; - } + case ABSOLUTE_TIME_UTC: + case ABSOLUTE_TIME_DOY_UTC: + tmp = gmtime(&abs_time->secs); + zonename = "UTC"; + break; + + case ABSOLUTE_TIME_LOCAL: + tmp = localtime(&abs_time->secs); + if (tmp) { + zonename = get_zonename(tmp); + } + break; + } if (tmp) { switch (fmt) { @@ -666,29 +659,21 @@ abs_time_secs_to_ep_str(const time_t abs_time, const absolute_time_display_e fmt const char *zonename = "???"; gchar *buf = NULL; -#if (defined _WIN32) && (_MSC_VER < 1500) - /* calling localtime() on MSVC 2005 with huge values causes it to crash */ - /* XXX - find the exact value that still does work */ - /* XXX - using _USE_32BIT_TIME_T might be another way to circumvent this problem */ - if(abs_time > 2000000000) { - tmp = NULL; - } else -#endif - switch (fmt) { + switch (fmt) { - case ABSOLUTE_TIME_UTC: - case ABSOLUTE_TIME_DOY_UTC: - tmp = gmtime(&abs_time); - zonename = "UTC"; - break; + case ABSOLUTE_TIME_UTC: + case ABSOLUTE_TIME_DOY_UTC: + tmp = gmtime(&abs_time); + zonename = "UTC"; + break; - case ABSOLUTE_TIME_LOCAL: - tmp = localtime(&abs_time); - if (tmp) { - zonename = get_zonename(tmp); - } - break; - } + case ABSOLUTE_TIME_LOCAL: + tmp = localtime(&abs_time); + if (tmp) { + zonename = get_zonename(tmp); + } + break; + } if (tmp) { switch (fmt) { |