aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--optimize.c5
-rw-r--r--pcap-int.h19
-rw-r--r--pcap/funcattrs.h2
-rw-r--r--sockutils.h2
4 files changed, 5 insertions, 23 deletions
diff --git a/optimize.c b/optimize.c
index 2360ad30..4ea910e3 100644
--- a/optimize.c
+++ b/optimize.c
@@ -65,9 +65,10 @@ int pcap_optimizer_debug;
* GCC 3.4 and later; we have __builtin_ctz().
*/
#define lowest_set_bit(mask) __builtin_ctz(mask)
-#elif defined(_MSC_VER) && (_MSC_VER >= 1400)
+#elif defined(_MSC_VER)
/*
- * Visual Studio 2005 and later; use _BitScanForward().
+ * Visual Studio; we support only 2005 and later, so use
+ * _BitScanForward().
*/
#include <intrin.h>
#pragma intrinsic(_BitScanForward)
diff --git a/pcap-int.h b/pcap-int.h
index fa683b88..6406aa65 100644
--- a/pcap-int.h
+++ b/pcap-int.h
@@ -45,23 +45,6 @@ extern "C" {
#include <io.h>
#endif
-#if (defined(_MSC_VER) && (_MSC_VER <= 1200)) /* we are compiling with Visual Studio 6, that doesn't support the LL suffix*/
-
-/*
- * Swap byte ordering of unsigned long long timestamp on a big endian
- * machine.
- */
-#define SWAPLL(ull) ((ull & 0xff00000000000000) >> 56) | \
- ((ull & 0x00ff000000000000) >> 40) | \
- ((ull & 0x0000ff0000000000) >> 24) | \
- ((ull & 0x000000ff00000000) >> 8) | \
- ((ull & 0x00000000ff000000) << 8) | \
- ((ull & 0x0000000000ff0000) << 24) | \
- ((ull & 0x000000000000ff00) << 40) | \
- ((ull & 0x00000000000000ff) << 56)
-
-#else /* A recent Visual studio compiler or not VC */
-
/*
* Swap byte ordering of unsigned long long timestamp on a big endian
* machine.
@@ -75,8 +58,6 @@ extern "C" {
((ull & 0x000000000000ff00ULL) << 40) | \
((ull & 0x00000000000000ffULL) << 56)
-#endif /* _MSC_VER */
-
/*
* Maximum snapshot length.
*
diff --git a/pcap/funcattrs.h b/pcap/funcattrs.h
index a12576c5..a89f788d 100644
--- a/pcap/funcattrs.h
+++ b/pcap/funcattrs.h
@@ -196,7 +196,7 @@
/*
* For flagging arguments as format strings in MSVC.
*/
-#if _MSC_VER >= 1400
+#ifdef _MSC_VER
#include <sal.h>
#if _MSC_VER > 1400
#define PCAP_FORMAT_STRING(p) _Printf_format_string_ p
diff --git a/sockutils.h b/sockutils.h
index 6ffadf6c..13b6d6d9 100644
--- a/sockutils.h
+++ b/sockutils.h
@@ -33,7 +33,7 @@
#ifndef __SOCKUTILS_H__
#define __SOCKUTILS_H__
-#if _MSC_VER > 1000
+#ifdef _MSC_VER
#pragma once
#endif