Fix up to correspond to configure.in checks.

Mon Jul  3 17:58:02 2000  Owen Taylor  <otaylor@redhat.com>

	* gutf8.c (g_utf8_get_charset_internal): Fix up
	to correspond to configure.in checks.
This commit is contained in:
Owen Taylor 2000-07-03 22:01:58 +00:00 committed by Owen Taylor
parent 8384a1342e
commit 9608683328
10 changed files with 68 additions and 24 deletions

View File

@ -1,3 +1,8 @@
Mon Jul 3 17:58:02 2000 Owen Taylor <otaylor@redhat.com>
* gutf8.c (g_utf8_get_charset_internal): Fix up
to correspond to configure.in checks.
Mon Jul 3 17:18:19 2000 Owen Taylor <otaylor@redhat.com> Mon Jul 3 17:18:19 2000 Owen Taylor <otaylor@redhat.com>
* glib.h: Comment g_get_codeset() out of the header file * glib.h: Comment g_get_codeset() out of the header file

View File

@ -1,3 +1,8 @@
Mon Jul 3 17:58:02 2000 Owen Taylor <otaylor@redhat.com>
* gutf8.c (g_utf8_get_charset_internal): Fix up
to correspond to configure.in checks.
Mon Jul 3 17:18:19 2000 Owen Taylor <otaylor@redhat.com> Mon Jul 3 17:18:19 2000 Owen Taylor <otaylor@redhat.com>
* glib.h: Comment g_get_codeset() out of the header file * glib.h: Comment g_get_codeset() out of the header file

View File

@ -1,3 +1,8 @@
Mon Jul 3 17:58:02 2000 Owen Taylor <otaylor@redhat.com>
* gutf8.c (g_utf8_get_charset_internal): Fix up
to correspond to configure.in checks.
Mon Jul 3 17:18:19 2000 Owen Taylor <otaylor@redhat.com> Mon Jul 3 17:18:19 2000 Owen Taylor <otaylor@redhat.com>
* glib.h: Comment g_get_codeset() out of the header file * glib.h: Comment g_get_codeset() out of the header file

View File

@ -1,3 +1,8 @@
Mon Jul 3 17:58:02 2000 Owen Taylor <otaylor@redhat.com>
* gutf8.c (g_utf8_get_charset_internal): Fix up
to correspond to configure.in checks.
Mon Jul 3 17:18:19 2000 Owen Taylor <otaylor@redhat.com> Mon Jul 3 17:18:19 2000 Owen Taylor <otaylor@redhat.com>
* glib.h: Comment g_get_codeset() out of the header file * glib.h: Comment g_get_codeset() out of the header file

View File

@ -1,3 +1,8 @@
Mon Jul 3 17:58:02 2000 Owen Taylor <otaylor@redhat.com>
* gutf8.c (g_utf8_get_charset_internal): Fix up
to correspond to configure.in checks.
Mon Jul 3 17:18:19 2000 Owen Taylor <otaylor@redhat.com> Mon Jul 3 17:18:19 2000 Owen Taylor <otaylor@redhat.com>
* glib.h: Comment g_get_codeset() out of the header file * glib.h: Comment g_get_codeset() out of the header file

View File

@ -1,3 +1,8 @@
Mon Jul 3 17:58:02 2000 Owen Taylor <otaylor@redhat.com>
* gutf8.c (g_utf8_get_charset_internal): Fix up
to correspond to configure.in checks.
Mon Jul 3 17:18:19 2000 Owen Taylor <otaylor@redhat.com> Mon Jul 3 17:18:19 2000 Owen Taylor <otaylor@redhat.com>
* glib.h: Comment g_get_codeset() out of the header file * glib.h: Comment g_get_codeset() out of the header file

View File

@ -1,3 +1,8 @@
Mon Jul 3 17:58:02 2000 Owen Taylor <otaylor@redhat.com>
* gutf8.c (g_utf8_get_charset_internal): Fix up
to correspond to configure.in checks.
Mon Jul 3 17:18:19 2000 Owen Taylor <otaylor@redhat.com> Mon Jul 3 17:18:19 2000 Owen Taylor <otaylor@redhat.com>
* glib.h: Comment g_get_codeset() out of the header file * glib.h: Comment g_get_codeset() out of the header file

View File

@ -1,3 +1,8 @@
Mon Jul 3 17:58:02 2000 Owen Taylor <otaylor@redhat.com>
* gutf8.c (g_utf8_get_charset_internal): Fix up
to correspond to configure.in checks.
Mon Jul 3 17:18:19 2000 Owen Taylor <otaylor@redhat.com> Mon Jul 3 17:18:19 2000 Owen Taylor <otaylor@redhat.com>
* glib.h: Comment g_get_codeset() out of the header file * glib.h: Comment g_get_codeset() out of the header file

View File

@ -22,7 +22,7 @@
#include <config.h> #include <config.h>
#include <stdlib.h> #include <stdlib.h>
#ifdef HAVE_LANGINFO_H #ifdef HAVE_CODESET
#include <langinfo.h> #include <langinfo.h>
#endif #endif
#include <string.h> #include <string.h>
@ -297,16 +297,7 @@ g_utf8_get_charset_internal (char **a)
if (charset && strstr (charset, "UTF-8")) if (charset && strstr (charset, "UTF-8"))
return TRUE; return TRUE;
#ifdef _NL_CTYPE_CODESET_NAME #ifdef HAVE_CODESET
charset = nl_langinfo (_NL_CTYPE_CODESET_NAME);
if (charset)
{
if (a && ! *a)
*a = charset;
if (strcmp (charset, "UTF-8") == 0)
return TRUE;
}
#elif CODESET
charset = nl_langinfo(CODESET); charset = nl_langinfo(CODESET);
if (charset) if (charset)
{ {
@ -315,7 +306,18 @@ g_utf8_get_charset_internal (char **a)
if (strcmp (charset, "UTF-8") == 0) if (strcmp (charset, "UTF-8") == 0)
return TRUE; return TRUE;
} }
#endif #endif
#if 0 /* #ifdef _NL_CTYPE_CODESET_NAME */
charset = nl_langinfo (_NL_CTYPE_CODESET_NAME);
if (charset)
{
if (a && ! *a)
*a = charset;
if (strcmp (charset, "UTF-8") == 0)
return TRUE;
}
#endif
if (a && ! *a) if (a && ! *a)
*a = "US-ASCII"; *a = "US-ASCII";

26
gutf8.c
View File

@ -22,7 +22,7 @@
#include <config.h> #include <config.h>
#include <stdlib.h> #include <stdlib.h>
#ifdef HAVE_LANGINFO_H #ifdef HAVE_CODESET
#include <langinfo.h> #include <langinfo.h>
#endif #endif
#include <string.h> #include <string.h>
@ -297,16 +297,7 @@ g_utf8_get_charset_internal (char **a)
if (charset && strstr (charset, "UTF-8")) if (charset && strstr (charset, "UTF-8"))
return TRUE; return TRUE;
#ifdef _NL_CTYPE_CODESET_NAME #ifdef HAVE_CODESET
charset = nl_langinfo (_NL_CTYPE_CODESET_NAME);
if (charset)
{
if (a && ! *a)
*a = charset;
if (strcmp (charset, "UTF-8") == 0)
return TRUE;
}
#elif CODESET
charset = nl_langinfo(CODESET); charset = nl_langinfo(CODESET);
if (charset) if (charset)
{ {
@ -315,7 +306,18 @@ g_utf8_get_charset_internal (char **a)
if (strcmp (charset, "UTF-8") == 0) if (strcmp (charset, "UTF-8") == 0)
return TRUE; return TRUE;
} }
#endif #endif
#if 0 /* #ifdef _NL_CTYPE_CODESET_NAME */
charset = nl_langinfo (_NL_CTYPE_CODESET_NAME);
if (charset)
{
if (a && ! *a)
*a = charset;
if (strcmp (charset, "UTF-8") == 0)
return TRUE;
}
#endif
if (a && ! *a) if (a && ! *a)
*a = "US-ASCII"; *a = "US-ASCII";