aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2005-04-01 17:25:37 +0000
committerWayne Davison <wayned@samba.org>2005-04-01 17:25:37 +0000
commitd94015149671edfe80f8545024c6667f992abcaa (patch)
treea24496ed4589694b3d2b9c9bd15e4f8bf78f4bd1 /main.c
parentf5c7f4abe7d58b6573049b2ea9ac3202cee51fe9 (diff)
downloadandroid_external_rsync-d94015149671edfe80f8545024c6667f992abcaa.tar.gz
android_external_rsync-d94015149671edfe80f8545024c6667f992abcaa.tar.bz2
android_external_rsync-d94015149671edfe80f8545024c6667f992abcaa.zip
- Conditionally include <locale.h>.
- Conditionally call setlocale(LC_CTYPE, "").
Diffstat (limited to 'main.c')
-rw-r--r--main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/main.c b/main.c
index b7e6c3a4..0c5fc57d 100644
--- 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