git-svn: trunk@3124
Nigel Horne authored on 2007/07/01 04:18:02... | ... |
@@ -1,7 +1,11 @@ |
1 |
+Sat Jun 30 19:18:58 BST 2007 (njh) |
|
2 |
+---------------------------------- |
|
3 |
+ * clamav-milter: Linux: Only complain about LANG being set when in internal mode |
|
4 |
+ |
|
1 | 5 |
Sat Jun 30 13:55:00 CEST 2007 (edwin) |
2 | 6 |
---------------------------------- |
3 | 7 |
* libclamav/phish*,[ch], rtf.[ch], entconv.[ch], |
4 |
- regex_list.[ch], hashtab.[ch], encoding_aliases.h: stick to GPLv2 |
|
8 |
+ regex_list.[ch], hashtab.[ch], encoding_aliases.h: stick to GPLv2 |
|
5 | 9 |
|
6 | 10 |
Thu Jun 28 14:36:00 CEST 2007 (edwin) |
7 | 11 |
---------------------------------- |
... | ... |
@@ -33,7 +33,7 @@ |
33 | 33 |
*/ |
34 | 34 |
static char const rcsid[] = "$Id: clamav-milter.c,v 1.312 2007/02/12 22:24:21 njh Exp $"; |
35 | 35 |
|
36 |
-#define CM_VERSION "devel-070627" |
|
36 |
+#define CM_VERSION "devel-070630" |
|
37 | 37 |
|
38 | 38 |
#if HAVE_CONFIG_H |
39 | 39 |
#include "clamav-config.h" |
... | ... |
@@ -633,9 +633,6 @@ main(int argc, char **argv) |
633 | 633 |
int i, Bflag = 0, server = 0; |
634 | 634 |
char *cfgfile = NULL; |
635 | 635 |
const char *wont_blacklist = NULL; |
636 |
-#ifdef C_LINUX |
|
637 |
- const char *lang; |
|
638 |
-#endif |
|
639 | 636 |
const struct cfgstruct *cpt; |
640 | 637 |
char version[VERSION_LENGTH + 1]; |
641 | 638 |
pthread_t tid; |
... | ... |
@@ -703,13 +700,6 @@ main(int argc, char **argv) |
703 | 703 |
setlocale(LC_ALL, ""); |
704 | 704 |
bindtextdomain(progname, DATADIR"/clamav-milter/locale"); |
705 | 705 |
textdomain(progname); |
706 |
- lang = getenv("LANG"); |
|
707 |
- |
|
708 |
- if(lang && (strstr(lang, "UTF-8") != NULL)) { |
|
709 |
- fprintf(stderr, "Your LANG environment variable is set to '%s\n", lang); |
|
710 |
- fprintf(stderr, "This is known to cause problems for some %s installations.\n", argv[0]); |
|
711 |
- fputs("If you get failures with temporary files, please try again with LANG unset.\n", stderr); |
|
712 |
- } |
|
713 | 706 |
#endif |
714 | 707 |
|
715 | 708 |
for(;;) { |
... | ... |
@@ -1345,6 +1335,10 @@ main(int argc, char **argv) |
1345 | 1345 |
* we're doing the scanning internally |
1346 | 1346 |
*/ |
1347 | 1347 |
if(!external) { |
1348 |
+#ifdef C_LINUX |
|
1349 |
+ const char *lang; |
|
1350 |
+#endif |
|
1351 |
+ |
|
1348 | 1352 |
if(max_children == 0) { |
1349 | 1353 |
fprintf(stderr, _("%s: --max-children must be given if --external is not given\n"), argv[0]); |
1350 | 1354 |
return EX_CONFIG; |
... | ... |
@@ -1353,6 +1347,15 @@ main(int argc, char **argv) |
1353 | 1353 |
fprintf(stderr, _("%s: --freshclam_monitor must be at least one second\n"), argv[0]); |
1354 | 1354 |
return EX_CONFIG; |
1355 | 1355 |
} |
1356 |
+#if C_LINUX |
|
1357 |
+ lang = getenv("LANG"); |
|
1358 |
+ |
|
1359 |
+ if(lang && (strstr(lang, "UTF-8") != NULL)) { |
|
1360 |
+ fprintf(stderr, "Your LANG environment variable is set to '%s\n", lang); |
|
1361 |
+ fprintf(stderr, "This is known to cause problems for some %s installations.\n", argv[0]); |
|
1362 |
+ fputs("If you get failures with temporary files, please try again with LANG unset.\n", stderr); |
|
1363 |
+ } |
|
1364 |
+#endif |
|
1356 | 1365 |
#if 0 |
1357 | 1366 |
if(child_timeout) { |
1358 | 1367 |
fprintf(stderr, _("%s: --timeout must not be given if --external is not given\n"), argv[0]); |