Browse Source

Merge fix for compilation with MSVC < 8.

Jelmer Vernooij 13 năm trước cách đây
mục cha
commit
d93d4893fc
2 tập tin đã thay đổi với 5 bổ sung1 xóa
  1. 4 0
      NEWS
  2. 1 1
      dulwich/_objects.c

+ 4 - 0
NEWS

@@ -19,6 +19,10 @@
   * unittest2 or python >= 2.7 is now required for the testsuite.
     testtools is no longer supported. (Jelmer Vernooij, #830713)
 
+ BUG FIXES
+
+  * Fix compilation with older versions of MSVC.  (Martin gz)
+
 0.8.0	2011-08-07
 
  FEATURES

+ 1 - 1
dulwich/_objects.c

@@ -29,7 +29,7 @@
 typedef int Py_ssize_t;
 #endif
 
-#if defined(__MINGW32_VERSION) || (defined(__APPLE__) && __MAC_OS_X_VERSION_MIN_REQUIRED < 1070)
+#if defined(__MINGW32_VERSION) || (defined(__APPLE__) && __MAC_OS_X_VERSION_MIN_REQUIRED < 1070) || (defined(_MSC_VER) && _MSC_VER < 1400)
 size_t strnlen(char *text, size_t maxlen)
 {
 	const char *last = memchr(text, '\0', maxlen);