Remove checks for visual C 6.

This commit is contained in:
Nick Mathewson 2015-06-29 12:55:03 -04:00
parent 66c73abe03
commit d9052c629b
11 changed files with 17 additions and 84 deletions

View File

@ -2,6 +2,6 @@
- Define WINVER and _WIN32_WINNT centrally, in orconfig.h, in order
to ensure they remain consistent and visible everywhere.
- Remove vestigial workarounds for some ancient versions of the MSVC
compiler.
- Remove some vestigial workarounds for the MSVC6 compiler. We haven't
supported that in ages.

View File

@ -335,6 +335,12 @@ bwin32=true; AC_MSG_RESULT([yes]),
bwin32=false; AC_MSG_RESULT([no]))
fi
if test "$bwin32" = yes; then
AC_DEFINE(WIN32_LEAN_AND_MEAN, 1, [Defined to avoid including some windows headers])
AC_DEFINE(WINVER, 0x0501, [Defined to access windows functions and definitions for >=WinXP])
AC_DEFINE(_WIN32_WINNT, 0x0501, [Defined to access windows functions and definitions for >=WinXP])
fi
AM_CONDITIONAL(BUILD_NT_SERVICES, test x$bwin32 = xtrue)
dnl Enable C99 when compiling with MIPSpro
@ -1122,13 +1128,9 @@ AC_CHECK_TYPES([struct in6_addr, struct sockaddr_in6, sa_family_t], , ,
#ifdef _WIN32
#define _WIN32_WINNT 0x0501
#define WIN32_LEAN_AND_MEAN
#if defined(_MSC_VER) && (_MSC_VER < 1300)
#include <winsock.h>
#else
#include <winsock2.h>
#include <ws2tcpip.h>
#endif
#endif
])
AC_CHECK_MEMBERS([struct in6_addr.s6_addr32, struct in6_addr.s6_addr16, struct sockaddr_in.sin_len, struct sockaddr_in6.sin6_len], , ,
[#ifdef HAVE_SYS_TYPES_H
@ -1146,9 +1148,6 @@ AC_CHECK_MEMBERS([struct in6_addr.s6_addr32, struct in6_addr.s6_addr16, struct s
#ifdef _WIN32
#define _WIN32_WINNT 0x0501
#define WIN32_LEAN_AND_MEAN
#if defined(_MSC_VER) && (_MSC_VER < 1300)
#include <winsock.h>
#else
#include <winsock2.h>
#include <ws2tcpip.h>
#endif

View File

@ -10,17 +10,16 @@
#define ADDRESS_PRIVATE
#include "orconfig.h"
#ifdef _WIN32
/* For access to structs needed by GetAdaptersAddresses */
#undef _WIN32_WINNT
#define _WIN32_WINNT 0x0501
#include <process.h>
#include <winsock2.h>
#include <windows.h>
#include <iphlpapi.h>
#endif
#include "orconfig.h"
#include "compat.h"
#include "util.h"
#include "address.h"

View File

@ -12,16 +12,8 @@
#include "orconfig.h"
#ifdef _WIN32 /*wrkard for dtls1.h >= 0.9.8m of "#include <winsock.h>"*/
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0501
#endif
#define WIN32_LEAN_AND_MEAN
#if defined(_MSC_VER) && (_MSC_VER < 1300)
#include <winsock.h>
#else
#include <winsock2.h>
#include <ws2tcpip.h>
#endif
#include <winsock2.h>
#include <ws2tcpip.h>
#endif
#include <openssl/opensslv.h>

View File

@ -10,17 +10,9 @@
#include "torint.h"
#include "testsupport.h"
#ifdef _WIN32
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0501
#endif
#define WIN32_LEAN_AND_MEAN
#if defined(_MSC_VER) && (_MSC_VER < 1300)
#include <winsock.h>
#else
#include <winsock2.h>
#include <ws2tcpip.h>
#endif
#endif
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
@ -90,13 +82,8 @@
/* Try to get a reasonable __func__ substitute in place. */
#if defined(_MSC_VER)
/* MSVC compilers before VC7 don't have __func__ at all; later ones call it
* __FUNCTION__. */
#if _MSC_VER < 1300
#define __func__ "???"
#else
#define __func__ __FUNCTION__
#endif
#else
/* For platforms where autoconf works, make sure __func__ is defined
@ -112,18 +99,8 @@
#endif /* ifndef MAVE_MACRO__func__ */
#endif /* if not windows */
#if defined(_MSC_VER) && (_MSC_VER < 1300)
/* MSVC versions before 7 apparently don't believe that you can cast uint64_t
* to double and really mean it. */
extern INLINE double U64_TO_DBL(uint64_t x) {
int64_t i = (int64_t) x;
return (i < 0) ? ((double) INT64_MAX) : (double) i;
}
#define DBL_TO_U64(x) ((uint64_t)(int64_t) (x))
#else
#define U64_TO_DBL(x) ((double) (x))
#define DBL_TO_U64(x) ((uint64_t) (x))
#endif
#ifdef ENUM_VALS_ARE_SIGNED
#define ENUM_BF(t) unsigned

View File

@ -13,10 +13,6 @@
#include "orconfig.h"
#ifdef _WIN32
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0501
#endif
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <wincrypt.h>
/* Windows defines this; so does OpenSSL 0.9.8h and later. We don't actually

View File

@ -210,16 +210,6 @@ void log_notice_(log_domain_mask_t domain, const char *format, ...);
void log_warn_(log_domain_mask_t domain, const char *format, ...);
void log_err_(log_domain_mask_t domain, const char *format, ...);
#if defined(_MSC_VER) && _MSC_VER < 1300
/* MSVC 6 and earlier don't have __func__, or even __LINE__. */
#define log_fn log_fn_
#define log_fn_ratelim log_fn_ratelim_
#define log_debug log_debug_
#define log_info log_info_
#define log_notice log_notice_
#define log_warn log_warn_
#define log_err log_err_
#else
/* We don't have GCC's varargs macros, so use a global variable to pass the
* function name to log_fn */
extern const char *log_fn_function_name_;
@ -233,7 +223,6 @@ extern const char *log_fn_function_name_;
#define log_notice (log_fn_function_name_=__func__),log_notice_
#define log_warn (log_fn_function_name_=__func__),log_warn_
#define log_err (log_fn_function_name_=__func__),log_err_
#endif
#endif /* !GNUC */

View File

@ -18,16 +18,8 @@
#include <assert.h>
#ifdef _WIN32 /*wrkard for dtls1.h >= 0.9.8m of "#include <winsock.h>"*/
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0501
#endif
#define WIN32_LEAN_AND_MEAN
#if defined(_MSC_VER) && (_MSC_VER < 1300)
#include <winsock.h>
#else
#include <winsock2.h>
#include <ws2tcpip.h>
#endif
#include <winsock2.h>
#include <ws2tcpip.h>
#endif
#ifdef __GNUC__

View File

@ -22,13 +22,6 @@
#endif
#endif
#ifdef _WIN32
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0501
#endif
#define WIN32_LEAN_AND_MEAN
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

View File

@ -3,11 +3,11 @@
#define ADDRESS_PRIVATE
#include "orconfig.h"
#ifdef _WIN32
#include <winsock2.h>
/* For access to structs needed by GetAdaptersAddresses */
#undef _WIN32_WINNT
#define _WIN32_WINNT 0x0501
#include <iphlpapi.h>
#endif

View File

@ -33,13 +33,9 @@
#endif
#ifdef _WIN32
#if defined(_MSC_VER) && (_MSC_VER <= 1300)
#include <winsock.h>
#else
#include <winsock2.h>
#include <ws2tcpip.h>
#endif
#endif
#define RESPONSE_LEN_4 8
#define log_sock_error(act, _s) \