Merge branch 'wip/smcv/issue3225' into 'main'

gdatetime: Ignore %E modifier on 64-bit big-endian for the moment

Closes #3225

See merge request GNOME/glib!3820
This commit is contained in:
Philip Withnall 2024-01-15 14:18:40 +00:00
commit 528dd834a9
2 changed files with 7 additions and 4 deletions

View File

@ -558,7 +558,10 @@ get_month_name_abbr_with_day (gint month)
#endif /* HAVE_LANGINFO_ABALTMON */
#ifdef HAVE_LANGINFO_ERA
/* FIXME: It doesnt seem to be possible to use ERA on 64-bit big-endian platforms with glibc
* in a POSIX-compliant way right now.
* See https://gitlab.gnome.org/GNOME/glib/-/issues/3225 */
#if defined(HAVE_LANGINFO_ERA) && (G_BYTE_ORDER == G_LITTLE_ENDIAN || GLIB_SIZEOF_VOID_P == 4)
#define PREFERRED_ERA_DATE_TIME_FMT nl_langinfo (ERA_D_T_FMT)
#define PREFERRED_ERA_DATE_FMT nl_langinfo (ERA_D_FMT)

View File

@ -1725,7 +1725,7 @@ test_non_utf8_printf (void)
TEST_PRINTF ("%%", "%");
TEST_PRINTF ("%", "");
TEST_PRINTF ("%9", NULL);
#ifdef HAVE_LANGINFO_ERA
#if defined(HAVE_LANGINFO_ERA) && (G_BYTE_ORDER == G_LITTLE_ENDIAN || GLIB_SIZEOF_VOID_P == 4)
TEST_PRINTF ("%Ec", "平成21年10月24日 00時00分00秒");
TEST_PRINTF ("%EC", "平成");
TEST_PRINTF ("%Ex", "平成21年10月24日");
@ -2272,7 +2272,7 @@ test_all_dates (void)
static void
test_date_time_eras_japan (void)
{
#ifdef HAVE_LANGINFO_ERA
#if defined(HAVE_LANGINFO_ERA) && (G_BYTE_ORDER == G_LITTLE_ENDIAN || GLIB_SIZEOF_VOID_P == 4)
gchar *oldlocale;
oldlocale = g_strdup (setlocale (LC_ALL, NULL));
@ -2319,7 +2319,7 @@ test_date_time_eras_japan (void)
static void
test_date_time_eras_thailand (void)
{
#ifdef HAVE_LANGINFO_ERA
#if defined(HAVE_LANGINFO_ERA) && (G_BYTE_ORDER == G_LITTLE_ENDIAN || GLIB_SIZEOF_VOID_P == 4)
gchar *oldlocale;
oldlocale = g_strdup (setlocale (LC_ALL, NULL));