- Use the MD4_SUM_LENGTH define in place of some hard-wired values.
[rsync/rsync.git] / main.c
diff --git a/main.c b/main.c
index 91f096a..0c5fc57 100644 (file)
--- a/main.c
+++ b/main.c
@@ -20,6 +20,9 @@
 */
 
 #include "rsync.h"
+#if defined CONFIG_LOCALE && defined HAVE_LOCALE_H
+#include <locale.h>
+#endif
 
 extern int verbose;
 extern int dry_run;
@@ -784,8 +787,8 @@ int client_run(int f_in, int f_out, pid_t pid, int argc, char *argv[])
                        io_flush(FULL_FLUSH);
                        wait_process(pid, &status);
                }
-               io_flush(FULL_FLUSH);
                output_summary();
+               io_flush(FULL_FLUSH);
                exit_cleanup(status);
        }
 
@@ -1115,6 +1118,10 @@ int main(int argc,char *argv[])
         * see the EPIPE. */
        signal(SIGPIPE, SIG_IGN);
 
+#if defined CONFIG_LOCALE && defined HAVE_SETLOCALE
+       setlocale(LC_CTYPE, "");
+#endif
+
        /* Initialize push_dir here because on some old systems getcwd
         * (implemented by forking "pwd" and reading its output) doesn't
         * work when there are other child processes.  Also, on all systems