aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2001-03-14 23:37:17 +0000
committerEric S. Raymond <esr@thyrsus.com>2001-03-14 23:37:17 +0000
commit0f79b186d9f742ed263ed8e9223f752779b271c0 (patch)
tree347f64bdd3892a777344f9d63c64ad6aace2d663
parent2bdce789186e00a610b5fc874e800da21af9c842 (diff)
downloadfetchmail-0f79b186d9f742ed263ed8e9223f752779b271c0.tar.gz
fetchmail-0f79b186d9f742ed263ed8e9223f752779b271c0.tar.bz2
fetchmail-0f79b186d9f742ed263ed8e9223f752779b271c0.zip
Corrected patch.
svn path=/trunk/; revision=3258
-rw-r--r--env.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/env.c b/env.c
index da1bfefe..0c174009 100644
--- a/env.c
+++ b/env.c
@@ -27,6 +27,10 @@
#include "fetchmail.h"
#include "i18n.h"
+#if defined(HAVE_SETLOCALE) && defined(ENABLE_NLS) && defined(HAVE_STRFTIME)
+#include <time.h>
+#include <locale.h>
+#endif
extern char *getenv(); /* needed on sysV68 R3V7.1. */
@@ -181,10 +185,14 @@ char *rfc822timestamp(void)
* weird multibyte i18n characters (such as kanji) for showing up
* in your Received headers.
*/
+#if defined(HAVE_SETLOCALE) && defined(ENABLE_NLS) && defined(HAVE_STRFTIME)
setlocale (LC_TIME, "C");
+#endif
strftime(buf, sizeof(buf)-1,
"%a, %d %b %Y %H:%M:%S XXXXX (%Z)", localtime(&now));
+#if defined(HAVE_SETLOCALE) && defined(ENABLE_NLS) && defined(HAVE_STRFTIME)
setlocale (LC_TIME, "");
+#endif
strncpy(strstr(buf, "XXXXX"), tzoffset(&now), 5);
#else
/*