1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-19 02:00:26 +02:00

Handle newlib C library's langinfo constant names

The newlib C library (used in Cygwin) has alternative names for
nl_langinfo GNU extensions

* configure.ac (_NL_NUMERIC_GROUPING): new test
* libguile/i18n.c (INT_CURR_SYMBOL, MON_DECIMAL_POINT, MON_THOUSANDS_SEP)
   (MON_GROUPING, POSITIVE_SIGN, NEGATIVE_SIGN, GROUPING, INT_FRAC_DIGITS)
   (FRAC_DIGITS, P_CS_PRECEDES, P_SEP_BY_SPACE, N_CS_PRECEDES, N_SEP_BY_SPACE)
   (P_SIGN_POSN, N_SIGN_POSN, INT_P_CS_PRECEDES, INT_P_SEP_BY_SPACE)
   (INT_N_CS_PRECEDES, INT_N_SEP_BY_SPACE, INT_P_SIGN_POSN, INT_N_SIGN_POSN)
   [HAVE_DECL__NL_NUMERIC_GROUPING]: map to newlib C constants, when present
This commit is contained in:
Michael Gran 2019-02-23 16:33:50 -08:00
parent 9ba449643d
commit 92105d13ad
2 changed files with 30 additions and 2 deletions

View file

@ -6,7 +6,7 @@ define(GUILE_CONFIGURE_COPYRIGHT,[[
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
2018 Free Software Foundation, Inc.
2018, 2019 Free Software Foundation, Inc.
This file is part of GUILE
@ -796,6 +796,9 @@ AC_CHECK_FUNCS([DINFINITY DQNAN cexp chsize clog clog10 ctermid \
strcoll strcoll_l strtod_l strtol_l newlocale uselocale utimensat \
sched_getaffinity sched_setaffinity sendfile])
# The newlib C library uses _NL_ prefixed locale langinfo constants.
AC_CHECK_DECLS([_NL_NUMERIC_GROUPING], [], [], [[#include <langinfo.h>]])
# Reasons for testing:
# netdb.h - not in mingw
# sys/param.h - not in mingw