]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
- Conditionally include <locale.h>.
authorWayne Davison <wayned@samba.org>
Fri, 1 Apr 2005 17:25:37 +0000 (17:25 +0000)
committerWayne Davison <wayned@samba.org>
Fri, 1 Apr 2005 17:25:37 +0000 (17:25 +0000)
- Conditionally call setlocale(LC_CTYPE, "").

main.c

diff --git a/main.c b/main.c
index b7e6c3a4176750d4644428db27d8a34debdee23d..0c5fc57d85df2bdea9805fc89cf1101e90c6cc36 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;
@@ -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