diff options
-rw-r--r-- | capinfos.c | 10 | ||||
-rw-r--r-- | config.nmake | 14 | ||||
-rw-r--r-- | editcap.c | 10 | ||||
-rw-r--r-- | epan/except.c | 4 | ||||
-rw-r--r-- | epan/to_str.c | 69 | ||||
-rw-r--r-- | ui/gtk/main.c | 5 | ||||
-rw-r--r-- | ui/gtk/summary_dlg.c | 8 | ||||
-rw-r--r-- | ui/win32/console_win32.c | 4 | ||||
-rw-r--r-- | wiretap/k12text.l | 8 | ||||
-rw-r--r-- | wiretap/ngsniffer.c | 8 |
10 files changed, 29 insertions, 111 deletions
diff --git a/capinfos.c b/capinfos.c index 1e6b5fece1..c3de1f7416 100644 --- a/capinfos.c +++ b/capinfos.c @@ -410,15 +410,7 @@ time_string(time_t timer, capture_info *cf_info, gboolean want_lf) g_snprintf(time_string_buf, 20, "%lu%s", (unsigned long)timer, lf); return time_string_buf; } else { -#if (defined _WIN32) && (_MSC_VER < 1500) - /* calling localtime(), and thus ctime(), 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 (timer > 2000000000) { - time_string_ctime = NULL; - } else -#endif - time_string_ctime = ctime(&timer); + time_string_ctime = ctime(&timer); if (time_string_ctime == NULL) { g_snprintf(time_string_buf, 20, "Not representable%s", lf); return time_string_buf; diff --git a/config.nmake b/config.nmake index 46bc9c57ef..156c8de380 100644 --- a/config.nmake +++ b/config.nmake @@ -100,20 +100,6 @@ PROCESSOR_ARCHITECTURE=amd64 # For the different Studios, see: http://en.wikipedia.org/wiki/Microsoft_Visual_Studio # Only one of the following MSVC_VARIANT settings should be used -# "Microsoft Visual Studio 2005" -# Visual C++ 8.0, _MSC_VER 1400, msvcr80.dll -#MSVC_VARIANT=MSVC2005 - -# "Microsoft Visual C++ 2005 Express Edition" -# needs additional Platform SDK installation -# Visual C++ 8.0, _MSC_VER 1400, msvcr80.dll -#MSVC_VARIANT=MSVC2005EE - -# "Microsoft .Net Framework 2.0 SDK" -# needs additional Platform SDK installation -# Visual C++ 8.0, _MSC_VER 1400, msvcr80.dll -#MSVC_VARIANT=DOTNET20 - # "Microsoft Visual Studio 2008" # Visual C++ 9.0, _MSC_VER 1500, msvcr90.dll #MSVC_VARIANT=MSVC2008 @@ -176,15 +176,7 @@ abs_time_to_str_with_sec_resolution(const nstime_t *abs_time) struct tm *tmp; gchar *buf = (gchar *)g_malloc(16); -#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 - tmp = localtime(&abs_time->secs); + tmp = localtime(&abs_time->secs); if (tmp) { g_snprintf(buf, 16, "%d%02d%02d%02d%02d%02d", diff --git a/epan/except.c b/epan/except.c index 719f2af1ee..6695294666 100644 --- a/epan/except.c +++ b/epan/except.c @@ -39,10 +39,6 @@ #include "except.h" #ifdef _WIN32 -#if _MSC_VER < 1500 -/* IsDebuggerPresent() needs this #define! */ -#define _WIN32_WINNT 0x0400 -#endif #include <windows.h> #include "exceptions.h" #endif 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) { diff --git a/ui/gtk/main.c b/ui/gtk/main.c index 6613145b9b..c6bd7318b5 100644 --- a/ui/gtk/main.c +++ b/ui/gtk/main.c @@ -48,11 +48,6 @@ #endif #ifdef _WIN32 /* Needed for console I/O */ -#if _MSC_VER < 1500 -/* AttachConsole() needs this #define! */ -/* But we're not calling it from here any more; do we need this? */ -#define _WIN32_WINNT 0x0501 -#endif #include <fcntl.h> #include <conio.h> diff --git a/ui/gtk/summary_dlg.c b/ui/gtk/summary_dlg.c index a64bcc15e4..67a0878b9e 100644 --- a/ui/gtk/summary_dlg.c +++ b/ui/gtk/summary_dlg.c @@ -117,14 +117,6 @@ time_to_string(char *string_buff, gulong string_buff_size, time_t ti_time) { struct tm *ti_tm; -#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 (ti_time > 2000000000) { - ti_tm = NULL; - } else -#endif ti_tm = localtime(&ti_time); if (ti_tm == NULL) { g_snprintf(string_buff, string_buff_size, "Not representable"); diff --git a/ui/win32/console_win32.c b/ui/win32/console_win32.c index 9b35669e39..a3affeb3d3 100644 --- a/ui/win32/console_win32.c +++ b/ui/win32/console_win32.c @@ -35,10 +35,6 @@ #include "console_win32.h" -#if _MSC_VER < 1500 -/* AttachConsole() needs this #define! */ -#define _WIN32_WINNT 0x0501 -#endif #include <fcntl.h> #include <conio.h> #include <windows.h> diff --git a/wiretap/k12text.l b/wiretap/k12text.l index afdc267cba..584c43cfdb 100644 --- a/wiretap/k12text.l +++ b/wiretap/k12text.l @@ -402,14 +402,6 @@ k12text_dump(wtap_dumper *wdh _U_, const struct wtap_pkthdr *phdr, ms = phdr->ts.nsecs / 1000000; ns = (phdr->ts.nsecs - (1000000*ms))/1000; -#if (defined _WIN32) && (_MSC_VER < 1500) - /* calling gmtime() 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 (phdr->ts.secs > 2000000000) - tmp = NULL; - else -#endif tmp = gmtime(&phdr->ts.secs); if (tmp == NULL) g_snprintf(p, 90, "+---------+---------------+----------+\r\nXX:XX:XX,"); diff --git a/wiretap/ngsniffer.c b/wiretap/ngsniffer.c index 58031ff38e..1ac1860140 100644 --- a/wiretap/ngsniffer.c +++ b/wiretap/ngsniffer.c @@ -2088,14 +2088,6 @@ ngsniffer_dump(wtap_dumper *wdh, const struct wtap_pkthdr *phdr, date. */ if (ngsniffer->first_frame) { ngsniffer->first_frame=FALSE; -#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 (phdr->ts.secs > 2000000000) - tm = NULL; - else -#endif tm = localtime(&phdr->ts.secs); if (tm != NULL && tm->tm_year >= DOS_YEAR_OFFSET) { start_date = (tm->tm_year - DOS_YEAR_OFFSET) << DOS_YEAR_SHIFT; |