Index: build/win32/make_dist.py
===================================================================
--- build/win32/make_dist.py	(revision 1481742)
+++ build/win32/make_dist.py	(working copy)
@@ -213,20 +213,24 @@
                      File('%(blddir)s/svnrdump/svnrdump.pdb'),
                      File('%(blddir)s/svnmucc/svnmucc.exe'),
                      File('%(blddir)s/svnmucc/svnmucc.pdb'),
-                     File('%(blddir)s/../contrib/client-side/svn-push/svn-push.exe'),
-                     File('%(blddir)s/../contrib/client-side/svn-push/svn-push.pdb'),
+#                     File('%(blddir)s/../contrib/client-side/svn-push/svn-push.exe'),
+#                     File('%(blddir)s/../contrib/client-side/svn-push/svn-push.pdb'),
                      File('%(blddir)s/../tools/server-side/svnauthz.exe'),
                      File('%(blddir)s/../tools/server-side/svnauthz.pdb'),
                      File('%(blddir)s/../tools/server-side/svnauthz-validate.exe'),
                      File('%(blddir)s/../tools/server-side/svnauthz-validate.pdb'),
-                     File('%(blddir)s/../tools/server-side/svn-populate-node-origins-index.exe'),
-                     File('%(blddir)s/../tools/server-side/svn-populate-node-origins-index.pdb'),
+#                     File('%(blddir)s/../tools/server-side/svn-populate-node-origins-index.exe'),
+#                     File('%(blddir)s/../tools/server-side/svn-populate-node-origins-index.pdb'),
+#                     File('%(blddir)s/../tools/server-side/svn-rep-sharing-stats.exe'),
+#                     File('%(blddir)s/../tools/server-side/svn-rep-sharing-stats.pdb'),
                      File('%(blddir)s/../tools/dev/svnraisetreeconflict/svnraisetreeconflict.exe'),
                      File('%(blddir)s/../tools/dev/svnraisetreeconflict/svnraisetreeconflict.pdb'),
                      File('%(blddir)s/mod_dav_svn/mod_dav_svn.so'),
                      File('%(blddir)s/mod_dav_svn/mod_dav_svn.pdb'),
                      File('%(blddir)s/mod_authz_svn/mod_authz_svn.so'),
                      File('%(blddir)s/mod_authz_svn/mod_authz_svn.pdb'),
+                     File('%(blddir)s/../tools/server-side/mod_dontdothat/mod_dontdothat.so'),
+                     File('%(blddir)s/../tools/server-side/mod_dontdothat/mod_dontdothat.pdb'),
                      FileGlob('%(blddir)s/libsvn_*/libsvn_*.dll'),
                      FileGlob('%(blddir)s/libsvn_*/libsvn_*.pdb'),
                      File('%(@apr)s/%(aprrel)s/libapr-1.dll'),
@@ -276,7 +280,7 @@
                               File('%(@apr-util)s/%(aprxml)s/xml.pdb'),
                               ),
 
-             'lib/serf': (File('%(@serf)s/Release/serf.lib'),
+             'lib/serf': (File('%(@serf)s/Release/serf-1.lib'),
                           ),
 
              'lib/sasl': (File('%(@sasl)s/lib/libsasl.lib'),
@@ -297,7 +301,7 @@
                               File('%(@apr)s/NOTICE'),
                               ),
              'licenses/openssl': File('%(@openssl)s/LICENSE'),
-             'licenses/svn' : File('%(srcdir)s/COPYING'),
+             'licenses/svn' : File('%(srcdir)s/LICENSE'),
              'licenses/cyrus-sasl' : File('%(@sasl)s/COPYING'),
 
              'perl': None,
@@ -313,6 +317,7 @@
                                FileGlob('%(binddir)s/swig/python/libsvn_swig_py/*.pdb'),
                                FileGlob('%(bindsrc)s/swig/python/*.py'),
                                FileGlob('%(binddir)s/swig/python/*.dll'),
+                               FileGlob('%(binddir)s/swig/python/*.pyd'),
                                FileGlob('%(binddir)s/swig/python/*.pdb'),
                                ),
              'python/svn': FileGlob('%(bindsrc)s/swig/python/svn/*.py'),
@@ -398,8 +403,8 @@
       continue
     optdir = os.path.abspath(os.path.join(_srcdir, optcfg.get('options', opt)))
     if not os.path.isdir(optdir):
-      print('make_dist: %s = %s' % (opt, optdir))
-      print('make_dist: Target is not a directory')
+      _stdout.write('make_dist: %s = %s\n' % (opt, optdir))
+      _stdout.write('make_dist: Target is not a directory\n')
       _exit(1)
     cfg.set('DEFAULT', '@' + opt[7:], optdir)
 
Index: subversion/bindings/javahl/native/DiffOptions.cpp
===================================================================
--- subversion/bindings/javahl/native/DiffOptions.cpp	(revision 1481742)
+++ subversion/bindings/javahl/native/DiffOptions.cpp	(working copy)
@@ -26,6 +26,12 @@
 
 #include "DiffOptions.h"
 
+const jint DiffOptions::IGNORE_ALL_SPACE    = 0x01;
+const jint DiffOptions::IGNORE_SPACE_CHANGE = 0x02;
+const jint DiffOptions::IGNORE_EOL_STYLE    = 0x04;
+const jint DiffOptions::SHOW_C_FUNCTION     = 0x08;
+const jint DiffOptions::USE_GIT_DIFF_FORMAT = 0x10;
+
 namespace {
 static jint get_diff_options_flags(jobject joptions)
 {
Index: subversion/bindings/javahl/native/DiffOptions.h
===================================================================
--- subversion/bindings/javahl/native/DiffOptions.h	(revision 1481742)
+++ subversion/bindings/javahl/native/DiffOptions.h	(working copy)
@@ -45,11 +45,11 @@
   }
 
  private:
-  static const jint IGNORE_ALL_SPACE    = 0x01;
-  static const jint IGNORE_SPACE_CHANGE = 0x02;
-  static const jint IGNORE_EOL_STYLE    = 0x04;
-  static const jint SHOW_C_FUNCTION     = 0x08;
-  static const jint USE_GIT_DIFF_FORMAT = 0x10;
+  static const jint IGNORE_ALL_SPACE;//    = 0x01;
+  static const jint IGNORE_SPACE_CHANGE;// = 0x02;
+  static const jint IGNORE_EOL_STYLE;//    = 0x04;
+  static const jint SHOW_C_FUNCTION;//     = 0x08;
+  static const jint USE_GIT_DIFF_FORMAT;// = 0x10;
 
   const jint flags;
 };
Index: subversion/bindings/swig/include/apr.swg
===================================================================
--- subversion/bindings/swig/include/apr.swg	(revision 1481742)
+++ subversion/bindings/swig/include/apr.swg	(working copy)
@@ -24,37 +24,37 @@
  */
 
 /* -----------------------------------------------------------------------
-   Create perl5 typemaps for long long datatypes
-   PERL-FIXME: These typemaps are decidedly odd.  They convert long long
+   Create perl5 typemaps for __int64 datatypes
+   PERL-FIXME: These typemaps are decidedly odd.  They convert __int64
      values to strings before returning them.  This behaviour is either
      wrong, or needful of a comment explaining it.
 */
 #ifdef SWIGPERL
-%typemap(out) long long {
+%typemap(out) __int64 {
     char temp[256];
     sprintf(temp, "%" APR_INT64_T_FMT, (apr_int64_t) $1);
     ST(argvi) = sv_newmortal();
     sv_setpv((SV*)ST(argvi++), temp);
 }
 
-%typemap(out) unsigned long long {
+%typemap(out) __uint64{
     char temp[256];
     sprintf(temp, "%" APR_UINT64_T_FMT, (apr_uint64_t) $1);
     ST(argvi) = sv_newmortal();
     sv_setpv((SV*)ST(argvi++), temp);
 }
 
-%typemap(in, numinputs=0) long long *OUTPUT (apr_int64_t temp)
+%typemap(in, numinputs=0) __int64 *OUTPUT (apr_int64_t temp)
     "$1 = &temp;";
-%typemap(argout) long long *OUTPUT {
+%typemap(argout) __int64 *OUTPUT {
   char temp[256];
   sprintf(temp, "%" APR_INT64_T_FMT, (apr_int64_t)*($1));
   %append_output(sv_2mortal(newSVpv(temp, 0)));
 }
 
-%typemap(in, numinputs=0) unsigned long long *OUTPUT (apr_uint64_t temp)
+%typemap(in, numinputs=0) __uint64 *OUTPUT (apr_uint64_t temp)
     "$1 = &temp;";
-%typemap(argout) unsigned long long *OUTPUT {
+%typemap(argout) __uint64 *OUTPUT {
   char temp[256];
   sprintf(temp, "%" APR_UINT64_T_FMT, (apr_uint64_t)*($1));
   %append_output(sv_2mortal(newSVpv(temp, 0)));
@@ -72,9 +72,15 @@
 
 /* If sizeof(apr_off_t) > sizeof(apr_int64_t), apr_off_t will get truncated
  * to a 64-bit integer */
+#ifdef SWIGPERL
+%apply __int64 { apr_off_t, apr_int64_t }
+%apply __int64 *OUTPUT { apr_int64_t * };
+%apply __uint64 { apr_uint64_t }
+#else
 %apply long long { apr_off_t, apr_int64_t }
 %apply long long *OUTPUT { apr_int64_t * };
 %apply unsigned long long { apr_uint64_t }
+#endif
 
 /* -----------------------------------------------------------------------
    apr_time_t
Index: subversion/bindings/swig/include/svn_types.swg
===================================================================
--- subversion/bindings/swig/include/svn_types.swg	(revision 1481742)
+++ subversion/bindings/swig/include/svn_types.swg	(working copy)
@@ -252,7 +252,11 @@
   enum svn_wc_merge_outcome_t *
 };
 %apply long *OUTPUT { svn_revnum_t *, svn_node_kind_t * };
+#ifdef SWIGPERL
+%apply __int64 *OUTPUT { svn_filesize_t * }
+#else
 %apply long long *OUTPUT { svn_filesize_t * }
+#endif
 
 /* -----------------------------------------------------------------------
    Generic macros for callback typemaps
Index: subversion/libsvn_subr/cache.c
===================================================================
--- subversion/libsvn_subr/cache.c	(revision 1481742)
+++ subversion/libsvn_subr/cache.c	(working copy)
@@ -226,14 +226,14 @@
   enum { _1MB = 1024 * 1024 };
 
   apr_uint64_t misses = info->gets - info->hits;
-  double hit_rate = (100.0 * (double)info->hits)
-                  / (double)(info->gets ? info->gets : 1);
-  double write_rate = (100.0 * (double)info->sets)
-                    / (double)(misses ? misses : 1);
-  double data_usage_rate = (100.0 * (double)info->used_size)
-                         / (double)(info->data_size ? info->data_size : 1);
-  double data_entry_rate = (100.0 * (double)info->used_entries)
-                 / (double)(info->total_entries ? info->total_entries : 1);
+  double hit_rate = (100.0 * (double)(apr_int64_t)info->hits)
+                  / (double)(info->gets ? (apr_int64_t)info->gets : 1);
+  double write_rate = (100.0 * (double)(apr_int64_t)info->sets)
+                    / (double)(misses ? (apr_int64_t)misses : 1);
+  double data_usage_rate = (100.0 * (double)(apr_int64_t)info->used_size)
+                         / (double)(info->data_size ? (apr_int64_t)info->data_size : 1);
+  double data_entry_rate = (100.0 * (double)(apr_int64_t)info->used_entries)
+                 / (double)(info->total_entries ? (apr_int64_t)info->total_entries : 1);
 
   return svn_string_createf(result_pool,
 
Index: subversion/libsvn_subr/sysinfo.c
===================================================================
--- subversion/libsvn_subr/sysinfo.c	(revision 1481742)
+++ subversion/libsvn_subr/sysinfo.c	(working copy)
@@ -28,6 +28,7 @@
 #define PSAPI_VERSION 1
 #include <windows.h>
 #include <psapi.h>
+#include <Winsock2.h>
 #include <Ws2tcpip.h>
 #endif
 
Index: subversion/tests/libsvn_fs/fs-test.c
===================================================================
--- subversion/tests/libsvn_fs/fs-test.c	(revision 1481742)
+++ subversion/tests/libsvn_fs/fs-test.c	(working copy)
@@ -3545,7 +3545,7 @@
   apr_uint32_t r = svn_test_rand(seed);
   return (int)(((double)r
                 / ((double)TEST_RAND_MAX+1.0))
-               * (double)scalar);
+               * (double)(apr_int64_t)scalar);
 }
 
 
Index: subversion/tests/libsvn_subr/named_atomic-test-common.h
===================================================================
--- subversion/tests/libsvn_subr/named_atomic-test-common.h	(revision 1481742)
+++ subversion/tests/libsvn_subr/named_atomic-test-common.h	(working copy)
@@ -34,7 +34,8 @@
 #define ATOMIC_NAME "MyTestAtomic"
 
 /* Factor used to create non-trivial 64 bit numbers */
-#define HUGE_VALUE 1234567890123456ll
+//#define HUGE_VALUE 1234567890123456ll
+#define HUGE_VALUE 1234567890123456
 
 /* to separate this code from any production environment */
 const char *name_namespace = NULL;
Index: subversion/tests/libsvn_subr/string-test.c
===================================================================
--- subversion/tests/libsvn_subr/string-test.c	(revision 1481742)
+++ subversion/tests/libsvn_subr/string-test.c	(working copy)
@@ -521,19 +521,19 @@
   SVN_TEST_ASSERT(length == 1);
   SVN_TEST_STRING_ASSERT(buffer, "0");
 
-  length = svn__i64toa(buffer, 0x8000000000000000ll);
+  length = svn__i64toa(buffer, 0x8000000000000000);
   SVN_TEST_ASSERT(length == 20);
   SVN_TEST_STRING_ASSERT(buffer, "-9223372036854775808");
 
-  length = svn__i64toa(buffer, 0x7fffffffffffffffll);
+  length = svn__i64toa(buffer, 0x7fffffffffffffff);
   SVN_TEST_ASSERT(length == 19);
   SVN_TEST_STRING_ASSERT(buffer, "9223372036854775807");
 
-  length = svn__ui64toa(buffer, 0ull);
+  length = svn__ui64toa(buffer, 0);
   SVN_TEST_ASSERT(length == 1);
   SVN_TEST_STRING_ASSERT(buffer, "0");
 
-  length = svn__ui64toa(buffer, 0xffffffffffffffffull);
+  length = svn__ui64toa(buffer, 0xffffffffffffffff);
   SVN_TEST_ASSERT(length == 20);
   SVN_TEST_STRING_ASSERT(buffer, "18446744073709551615");
 
