Index: subversion/bindings/swig/svn_types.i
===================================================================
--- subversion/bindings/swig/svn_types.i	(revision 8847)
+++ subversion/bindings/swig/svn_types.i	(working copy)
@@ -172,9 +172,16 @@
 
 /* We have to use APR_INT64_T_FMT because SWIG won't convert the
    SVN_FILESIZE_T_FMT to the actual value only APR_INT64_T_FMT */
-#if APR_INT64_T_FMT == "lld"
+#if APR_INT64_T_FMT == "ld"
 
 %typemap(python,argout,fragment="t_output_helper") svn_filesize_t *
+    "$result = t_output_helper($result,PyLong_FromLong((long) (*$1)));";
+
+%apply long *OUTPUT { svn_filesize_t * };
+
+#else
+
+%typemap(python,argout,fragment="t_output_helper") svn_filesize_t *
     "$result = t_output_helper($result,
                                PyLong_FromLongLong((long long) (*$1)));";
 
@@ -186,13 +193,6 @@
     sv_setpv((SV*)ST(argvi++), temp);
 };
 
-#elif APR_INT64_T_FMT == "ld"
-
-%typemap(python,argout,fragment="t_output_helper") svn_filesize_t *
-    "$result = t_output_helper($result,PyLong_FromLong((long) (*$1)));";
-
-%apply long *OUTPUT { svn_filesize_t * };
-
 #endif 
 
 /* -----------------------------------------------------------------------
Index: subversion/bindings/swig/apr.i
===================================================================
--- subversion/bindings/swig/apr.i	(revision 8847)
+++ subversion/bindings/swig/apr.i	(working copy)
@@ -72,19 +72,19 @@
    to handle that.
 */
 
-#if APR_INT64_T_FMT == "lld"
+#if APR_INT64_T_FMT == "ld"
 
-    %apply long long { apr_time_t };
+    %apply long { apr_time_t };
 
     %typemap(python,argout,fragment="t_output_helper") apr_time_t *
-        "$result = t_output_helper($result, PyLong_FromLongLong(*$1));";
+        "$result = t_output_helper($result, PyLong_FromLong(*$1));";
 
-#elif APR_INT64_T_FMT = "ld"
+#else
 
-    %apply long { apr_time_t };
+    %apply long long { apr_time_t };
 
     %typemap(python,argout,fragment="t_output_helper") apr_time_t *
-        "$result = t_output_helper($result, PyLong_FromLong(*$1));";
+        "$result = t_output_helper($result, PyLong_FromLongLong(*$1));";
 
 #endif
 


