Menu

#8 --disable-nls compilation problem

open
nobody
None
5
2000-08-28
2000-08-28
Anonymous
No

After running configure with --disable-nls, some compilation problems
appear on Solaris and perhaps other platforms. Below is a patch.

Glib/GTK 1.2.8, Spruce 0.7.4

--- smtpio.h.orig Mon Aug 28 10:53:45 2000
+++ smtpio.h Mon Aug 28 10:56:30 2000
@@ -43,7 +43,9 @@
#include <sys/wait.h>
#include <sys/un.h>
/*#include <sys/param.h>*/
+#ifdef ENABLE_NLS
#include <locale.h>
+#endif
#undef MIN
#undef MAX
#include <glib.h>
--- smtpio.c.orig Mon Aug 28 10:54:45 2000
+++ smtpio.c Mon Aug 28 11:01:58 2000
@@ -110,6 +110,7 @@
{
time_t t;
gint ret;
+#ifdef ENABLE_NLS
gchar save_locale[32], *locale;

locale = setlocale (LC_TIME, "");
@@ -117,6 +118,7 @@
strncpy (save_locale, locale, 31);
}
setlocale (LC_TIME, "POSIX");
+#endif

time (&t);

@@ -124,8 +126,10 @@
/* if (strftime (date, date_size, "%a, %d %b %Y %H:%M:%S GMT", gmtime (&t)) == 0) */
ret = strftime (date, date_size-1, "%a, %d %b %Y %H:%M:%S %z", localtime (&t));

+#ifdef ENABLE_NLS
if (locale != NULL)
setlocale (LC_TIME, save_locale);
+#endif

/* No characters written to date string. */
if (ret == 0)

Discussion


Log in to post a comment.