Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

locale: monetary: international currency formatting (POSIX.1-2008) #13975

Closed
p5pRT opened this issue Jul 9, 2014 · 17 comments
Closed

locale: monetary: international currency formatting (POSIX.1-2008) #13975

p5pRT opened this issue Jul 9, 2014 · 17 comments

Comments

@p5pRT
Copy link

p5pRT commented Jul 9, 2014

Migrated from rt.perl.org#122252 (status was 'resolved')

Searchable as RT122252$

@p5pRT
Copy link
Author

p5pRT commented Jul 9, 2014

From afresh1@openbsd.org

Created by afresh1@openbsd.org

This is a bug report for perl from afresh1@​openbsd.org,
generated with the help of perlbug 1.39 running under perl 5.18.2.

-----------------------------------------------------------------
OpenBSD is adding support for additional monetary locale formatting
values and pelikan@​ has asked me to forward this patch upstream and ask
how to handle operating systems who have a libc that does not have these
new values.

cc'd patch@​cpan as his YAPC​::NA talk made me think he might be
interested and have an opinion.

Perl Info

Flags:
    category=library
    severity=medium
    module=POSIX

Site configuration information for perl 5.18.2:

Configured by root at Thu Jan  1  0:00:00 UTC 1970.

Summary of my perl5 (revision 5 version 18 subversion 2) configuration:
   
  Platform:
    osname=openbsd, osvers=5.5, archname=amd64-openbsd
    uname='openbsd'
    config_args='-dsE -Dopenbsd_distribution=defined -Dccflags=-DNO_LOCALE_NUMERIC -DNO_LOCALE_COLLATE -Dmksymlinks'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=undef, usemultiplicity=undef
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-DNO_LOCALE_NUMERIC -DNO_LOCALE_COLLATE -fno-strict-aliasing -fno-delete-null-pointer-checks -pipe -fstack-protector -I/usr/local/include',
    optimize='-O2',
    cppflags='-DNO_LOCALE_NUMERIC -DNO_LOCALE_COLLATE -fno-strict-aliasing -fno-delete-null-pointer-checks -pipe -fstack-protector -I/usr/local/include'
    ccversion='', gccversion='4.2.1 20070719 ', gccosandvers='openbsd5.5'
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='cc', ldflags ='-Wl,-E  -fstack-protector'
    libpth=/usr/lib
    libs=-lm -lutil -lc
    perllibs=-lm -lutil -lc
    libc=/usr/lib/libc.so.76.0, so=so, useshrplib=true, libperl=libperl.so.15.0
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-R/usr/libdata/perl5/amd64-openbsd/5.18.2/CORE'
    cccdlflags='-DPIC -fPIC ', lddlflags='-shared -fPIC  -fstack-protector'

Locally applied patches:
    


@INC for perl 5.18.2:
    /usr/local/libdata/perl5/site_perl/amd64-openbsd
    /usr/libdata/perl5/site_perl/amd64-openbsd
    /usr/local/libdata/perl5/site_perl
    /usr/libdata/perl5/site_perl
    /usr/libdata/perl5/amd64-openbsd/5.18.2
    /usr/local/libdata/perl5/amd64-openbsd/5.18.2
    /usr/libdata/perl5
    /usr/local/libdata/perl5
    .


Environment for perl 5.18.2:
    HOME=/home/afresh1
    LANG (unset)
    LANGUAGE (unset)
    LC_CTYPE=en_US.UTF-8
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home/afresh1/.plenv/bin:/home/afresh1/bin:/home/afresh1/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/usr/games:/home/afresh1/.plenv/bin:.
    PERL_BADLANG (unset)
    SHELL=/bin/ksh

@p5pRT
Copy link
Author

p5pRT commented Jul 9, 2014

From afresh1@openbsd.org

0001-locale-monetary-international-currency-formatting-PO.patch
From 30202bd55db05716dc9b23bdf616a85548a85a75 Mon Sep 17 00:00:00 2001
From: Martin Pelikan <pelikan@openbsd.org>
Date: Wed, 9 Jul 2014 03:30:00 -0700
Subject: [PATCH] locale: monetary: international currency formatting (POSIX.1-2008)

---
 ext/POSIX/POSIX.xs      | 22 ++++++++++++++--------
 ext/POSIX/lib/POSIX.pod |  6 ++++++
 ext/POSIX/t/posix.t     |  4 +++-
 3 files changed, 23 insertions(+), 9 deletions(-)

diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs
index 371db1d..7deb5d8 100644
--- a/ext/POSIX/POSIX.xs
+++ b/ext/POSIX/POSIX.xs
@@ -331,14 +331,20 @@ const struct lconv_offset lconv_strings[] = {
 
 const struct lconv_offset lconv_integers[] = {
 #ifdef USE_LOCALE_MONETARY
-    {"int_frac_digits",   STRUCT_OFFSET(struct lconv, int_frac_digits)},
-    {"frac_digits",       STRUCT_OFFSET(struct lconv, frac_digits)},
-    {"p_cs_precedes",     STRUCT_OFFSET(struct lconv, p_cs_precedes)},
-    {"p_sep_by_space",    STRUCT_OFFSET(struct lconv, p_sep_by_space)},
-    {"n_cs_precedes",     STRUCT_OFFSET(struct lconv, n_cs_precedes)},
-    {"n_sep_by_space",    STRUCT_OFFSET(struct lconv, n_sep_by_space)},
-    {"p_sign_posn",       STRUCT_OFFSET(struct lconv, p_sign_posn)},
-    {"n_sign_posn",       STRUCT_OFFSET(struct lconv, n_sign_posn)},
+    {"int_frac_digits",    STRUCT_OFFSET(struct lconv, int_frac_digits)},
+    {"frac_digits",        STRUCT_OFFSET(struct lconv, frac_digits)},
+    {"p_cs_precedes",      STRUCT_OFFSET(struct lconv, p_cs_precedes)},
+    {"p_sep_by_space",     STRUCT_OFFSET(struct lconv, p_sep_by_space)},
+    {"n_cs_precedes",      STRUCT_OFFSET(struct lconv, n_cs_precedes)},
+    {"n_sep_by_space",     STRUCT_OFFSET(struct lconv, n_sep_by_space)},
+    {"p_sign_posn",        STRUCT_OFFSET(struct lconv, p_sign_posn)},
+    {"n_sign_posn",        STRUCT_OFFSET(struct lconv, n_sign_posn)},
+    {"int_p_cs_precedes",  STRUCT_OFFSET(struct lconv, int_p_cs_precedes)},
+    {"int_p_sep_by_space", STRUCT_OFFSET(struct lconv, int_p_sep_by_space)},
+    {"int_n_cs_precedes",  STRUCT_OFFSET(struct lconv, int_n_cs_precedes)},
+    {"int_n_sep_by_space", STRUCT_OFFSET(struct lconv, int_n_sep_by_space)},
+    {"int_p_sign_posn",    STRUCT_OFFSET(struct lconv, int_p_sign_posn)},
+    {"int_n_sign_posn",    STRUCT_OFFSET(struct lconv, int_n_sign_posn)},
 #endif
     {NULL, 0}
 };
diff --git a/ext/POSIX/lib/POSIX.pod b/ext/POSIX/lib/POSIX.pod
index 61b0f71..39d3222 100644
--- a/ext/POSIX/lib/POSIX.pod
+++ b/ext/POSIX/lib/POSIX.pod
@@ -848,6 +848,12 @@ Here is how to query the database for the B<de> (Deutsch or German) locale.
 		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
 	))
 	{
 		printf qq(%s: "%s",\n),
diff --git a/ext/POSIX/t/posix.t b/ext/POSIX/t/posix.t
index c2e4abe..d60dd70 100644
--- a/ext/POSIX/t/posix.t
+++ b/ext/POSIX/t/posix.t
@@ -344,7 +344,9 @@ SKIP: {
     }
 
     foreach (qw(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)) {
+		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)) {
     SKIP: {
 	    skip("localeconv has no result for $_", 1)
 		unless exists $conv->{$_};
-- 
1.9.3

@p5pRT
Copy link
Author

p5pRT commented Jul 9, 2014

From @khwilliamson

On 07/09/2014 04​:47 AM, (via RT) wrote​:

# New Ticket Created by
# Please include the string​: [perl #122252]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl5/Ticket/Display.html?id=122252 >

This is a bug report for perl from afresh1@​openbsd.org,
generated with the help of perlbug 1.39 running under perl 5.18.2.

-----------------------------------------------------------------
OpenBSD is adding support for additional monetary locale formatting
values and pelikan@​ has asked me to forward this patch upstream and ask
how to handle operating systems who have a libc that does not have these
new values.

cc'd patch@​cpan as his YAPC​::NA talk made me think he might be
interested and have an opinion.

I think we need a Configure probe to see if the platform supports these
additional fields, and then use an #ifdef inside POSIX.xs and some
revised text in the pod that says something like "on systems that
support this"

@p5pRT
Copy link
Author

p5pRT commented Jul 9, 2014

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Jul 10, 2014

From andrew@afresh1.com

On Wed, Jul 09, 2014 at 06​:27​:14AM -0700, karl williamson via RT wrote​:

I think we need a Configure probe to see if the platform supports these
additional fields, and then use an #ifdef inside POSIX.xs and some
revised text in the pod that says something like "on systems that
support this"

How does this look?

@p5pRT
Copy link
Author

p5pRT commented Jul 10, 2014

From andrew@afresh1.com

0001-locale-monetary-international-currency-formatting-PO.patch
From bcae077cb912e777be66e348a59661e67fba376e Mon Sep 17 00:00:00 2001
From: Andrew Fresh <afresh1@openbsd.org>
Date: Wed, 9 Jul 2014 03:30:00 -0700
Subject: [PATCH] locale: monetary: international currency formatting
 (POSIX.1-2008)

---
 Configure                 | 23 +++++++++++++++++++++++
 Cross/config.sh-arm-linux |  1 +
 NetWare/config.wc         |  1 +
 Porting/config.sh         |  1 +
 config_h.SH               |  6 ++++++
 configure.com             |  2 ++
 ext/POSIX/POSIX.xs        |  8 ++++++++
 ext/POSIX/lib/POSIX.pod   |  9 +++++++++
 ext/POSIX/t/posix.t       | 22 +++++++++++++++++++---
 plan9/config_sh.sample    |  1 +
 symbian/config.sh         |  1 +
 uconfig.h                 | 10 ++++++++--
 uconfig.sh                |  1 +
 uconfig64.sh              |  1 +
 win32/config.ce           |  1 +
 win32/config.gc           |  1 +
 win32/config.vc           |  1 +
 17 files changed, 85 insertions(+), 5 deletions(-)

diff --git a/Configure b/Configure
index 620b7b5..1e31d4a 100755
--- a/Configure
+++ b/Configure
@@ -591,6 +591,7 @@ d_localtime_r=''
 d_localtime_r_needs_tzset=''
 localtime_r_proto=''
 d_locconv=''
+d_lc_monetary_2008=''
 d_lockf=''
 d_longdbl=''
 longdblsize=''
@@ -15578,6 +15579,27 @@ $rm_try
 set localeconv d_locconv
 eval $inlibc
 
+: see if localtime_r calls tzset
+case "$d_locconv:$d_lc_monetary_2008" in
+define:)
+	$cat >try.c <<EOCP
+#include <locale.h>
+int main() {
+	struct lconv *lc = localeconv();
+	char int_p_cs_precedes = lc->int_p_cs_precedes;
+	return 0;
+}
+EOCP
+	set try
+	if eval $compile; then
+		d_lc_monetary_2008="$define"
+	else
+		d_lc_monetary_2008="$undef"
+	fi;
+	$rm_try
+	;;
+esac
+
 : see if lockf exists
 set lockf d_lockf
 eval $inlibc
@@ -23226,6 +23248,7 @@ d_localtime64='$d_localtime64'
 d_localtime_r='$d_localtime_r'
 d_localtime_r_needs_tzset='$d_localtime_r_needs_tzset'
 d_locconv='$d_locconv'
+d_lc_monetary_2008='$d_lc_monetary_2008'
 d_lockf='$d_lockf'
 d_longdbl='$d_longdbl'
 d_longlong='$d_longlong'
diff --git a/Cross/config.sh-arm-linux b/Cross/config.sh-arm-linux
index a5f612e..6409c01 100644
--- a/Cross/config.sh-arm-linux
+++ b/Cross/config.sh-arm-linux
@@ -298,6 +298,7 @@ d_isinf='define'
 d_isnan='define'
 d_isnanl='define'
 d_killpg='define'
+d_lc_monetary_2008='undef'
 d_lchown='define'
 d_ldbl_dig='define'
 d_libm_lib_version='define'
diff --git a/NetWare/config.wc b/NetWare/config.wc
index 9dcb1e4..eb124ab 100644
--- a/NetWare/config.wc
+++ b/NetWare/config.wc
@@ -287,6 +287,7 @@ d_isinf='undef'
 d_isnan='undef'
 d_isnanl='undef'
 d_killpg='undef'
+d_lc_monetary_2008='undef'
 d_lchown='undef'
 d_ldbl_dig='define'
 d_libm_lib_version='undef'
diff --git a/Porting/config.sh b/Porting/config.sh
index e66cab1..ce0a7d8 100644
--- a/Porting/config.sh
+++ b/Porting/config.sh
@@ -307,6 +307,7 @@ d_isinf='define'
 d_isnan='define'
 d_isnanl='define'
 d_killpg='define'
+d_lc_monetary_2008='undef'
 d_lchown='define'
 d_ldbl_dig='define'
 d_libm_lib_version='define'
diff --git a/config_h.SH b/config_h.SH
index db150a6..d649ebd 100755
--- a/config_h.SH
+++ b/config_h.SH
@@ -261,6 +261,12 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
  */
 #$d_locconv HAS_LOCALECONV	/**/
 
+/* HAS_LC_MONETARY_2008:
+ *	This symbol, if defined, indicates that the localeconv routine is
+ *	available and has the additional members added in POSIX 1003.1-2008.
+ */
+#$d_lc_monetary_2008 HAS_LC_MONETARY_2008	/**/
+
 /* HAS_LOCKF:
  *	This symbol, if defined, indicates that the lockf routine is
  *	available to do file locking.
diff --git a/configure.com b/configure.com
index abea303..3a6d3bf 100644
--- a/configure.com
+++ b/configure.com
@@ -5386,6 +5386,7 @@ $   vms_cc_type="decc"
 $ ENDIF
 $ d_faststdio="define"
 $ d_locconv="define"
+$ d_lc_monetary_2008="define"
 $ d_mblen="define"
 $ d_mbstowcs="define"
 $ d_mbtowc="define"
@@ -6066,6 +6067,7 @@ $ WC "d_link='" + d_link + "'"
 $ WC "d_llseek='undef'"
 $ WC "d_localtime64='undef'"
 $ WC "d_locconv='" + d_locconv + "'"
+$ WC "d_lc_monetary_2008='" + d_lc_monetary_2008 + "'"
 $ WC "d_lockf='undef'"
 $ WC "d_longdbl='" + d_longdbl + "'"
 $ WC "d_longlong='" + d_longlong + "'"
diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs
index 371db1d..1071311 100644
--- a/ext/POSIX/POSIX.xs
+++ b/ext/POSIX/POSIX.xs
@@ -339,6 +339,14 @@ const struct lconv_offset lconv_integers[] = {
     {"n_sep_by_space",    STRUCT_OFFSET(struct lconv, n_sep_by_space)},
     {"p_sign_posn",       STRUCT_OFFSET(struct lconv, p_sign_posn)},
     {"n_sign_posn",       STRUCT_OFFSET(struct lconv, n_sign_posn)},
+#ifdef HAS_LC_MONETARY_2008
+    {"int_p_cs_precedes",  STRUCT_OFFSET(struct lconv, int_p_cs_precedes)},
+    {"int_p_sep_by_space", STRUCT_OFFSET(struct lconv, int_p_sep_by_space)},
+    {"int_n_cs_precedes",  STRUCT_OFFSET(struct lconv, int_n_cs_precedes)},
+    {"int_n_sep_by_space", STRUCT_OFFSET(struct lconv, int_n_sep_by_space)},
+    {"int_p_sign_posn",    STRUCT_OFFSET(struct lconv, int_p_sign_posn)},
+    {"int_n_sign_posn",    STRUCT_OFFSET(struct lconv, int_n_sign_posn)},
+#endif
 #endif
     {NULL, 0}
 };
diff --git a/ext/POSIX/lib/POSIX.pod b/ext/POSIX/lib/POSIX.pod
index 61b0f71..9780206 100644
--- a/ext/POSIX/lib/POSIX.pod
+++ b/ext/POSIX/lib/POSIX.pod
@@ -848,12 +848,21 @@ Here is how to query the database for the B<de> (Deutsch or German) locale.
 		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
 	))
 	{
 		printf qq(%s: "%s",\n),
 			$property, $lconv->{$property};
 	}
 
+int_p_* and int_n_* members added by POSIX.1-2008 are only available on
+systems that support them.
+
 =item C<localtime>
 
 This is identical to Perl's builtin C<localtime()> function for
diff --git a/ext/POSIX/t/posix.t b/ext/POSIX/t/posix.t
index c2e4abe..abd5a61 100644
--- a/ext/POSIX/t/posix.t
+++ b/ext/POSIX/t/posix.t
@@ -8,7 +8,7 @@ BEGIN {
     }
 }
 
-use Test::More tests => 109;
+use Test::More tests => 115;
 
 use POSIX qw(fcntl_h signal_h limits_h _exit getcwd open read strftime write
 	     errno localeconv dup dup2 lseek access);
@@ -343,8 +343,24 @@ SKIP: {
 	}
     }
 
-    foreach (qw(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)) {
+    my @lconv = qw(
+        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
+    );
+
+    SKIP: {
+        skip('No HAS_LC_MONETARY_2008', 6) unless $Config{d_lc_monetary_2008};
+
+        push @lconv, qw(
+            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
+        );
+    }
+
+    foreach (@lconv) {
     SKIP: {
 	    skip("localeconv has no result for $_", 1)
 		unless exists $conv->{$_};
diff --git a/plan9/config_sh.sample b/plan9/config_sh.sample
index 9608ceb..8fbf61c 100644
--- a/plan9/config_sh.sample
+++ b/plan9/config_sh.sample
@@ -298,6 +298,7 @@ d_isinf='undef'
 d_isnan='undef'
 d_isnanl='undef'
 d_killpg='undef'
+d_lc_monetary_2008='undef'
 d_lchown='undef'
 d_ldbl_dig='define'
 d_libm_lib_version='0'
diff --git a/symbian/config.sh b/symbian/config.sh
index d86c71e..23b965e 100644
--- a/symbian/config.sh
+++ b/symbian/config.sh
@@ -244,6 +244,7 @@ d_isinf='undef'
 d_isnan='undef'
 d_isnanl='undef'
 d_killpg='undef'
+d_lc_monetary_2008='undef'
 d_lchown='undef'
 d_ldbl_dig='undef'
 d_libm_lib_version='undef'
diff --git a/uconfig.h b/uconfig.h
index eb1839a..c7d66fa 100644
--- a/uconfig.h
+++ b/uconfig.h
@@ -226,6 +226,12 @@
  */
 /*#define HAS_LOCALECONV	/ **/
 
+/* HAS_LC_MONETARY_2008:
+ *	This symbol, if defined, indicates that the localeconv routine is
+ *	available and has the additional members added in POSIX 1003.1-2008.
+ */
+/*#define HAS_LC_MONETARY_2008	/ **/
+
 /* HAS_LOCKF:
  *	This symbol, if defined, indicates that the lockf routine is
  *	available to do file locking.
@@ -4742,6 +4748,6 @@
 #endif
 
 /* Generated from:
- * a37f46da5285428077feb313bcbe68661740bac16d76fa658d723d9fcc91c2c4 config_h.SH
- * 4b709c0b049c660c04c0932eaa8481f9ca6fdc697ec4ffaa86b7bef21ee886a8 uconfig.sh
+ * e29569c7c69ff9327a6b7476c0fbaf7ac89c787b90da92f46aada24f4855b2ac config_h.SH
+ * 1bf67494263a7ee3b689780d9c29dfd69cdfe4f51444da1347de27087150f380 uconfig.sh
  * ex: set ro: */
diff --git a/uconfig.sh b/uconfig.sh
index e8df3c2..beadd3e 100644
--- a/uconfig.sh
+++ b/uconfig.sh
@@ -237,6 +237,7 @@ d_isinf='undef'
 d_isnan='undef'
 d_isnanl='undef'
 d_killpg='undef'
+d_lc_monetary_2008='undef'
 d_lchown='undef'
 d_ldbl_dig='undef'
 d_libm_lib_version='undef'
diff --git a/uconfig64.sh b/uconfig64.sh
index a4adccb..f6f066c 100644
--- a/uconfig64.sh
+++ b/uconfig64.sh
@@ -238,6 +238,7 @@ d_isinf='undef'
 d_isnan='undef'
 d_isnanl='undef'
 d_killpg='undef'
+d_lc_monetary_2008='undef'
 d_lchown='undef'
 d_ldbl_dig='undef'
 d_libm_lib_version='undef'
diff --git a/win32/config.ce b/win32/config.ce
index 0601162..754561a 100644
--- a/win32/config.ce
+++ b/win32/config.ce
@@ -285,6 +285,7 @@ d_isinf='undef'
 d_isnan='define'
 d_isnanl='undef'
 d_killpg='undef'
+d_lc_monetary_2008='undef'
 d_lchown='undef'
 d_ldbl_dig='define'
 d_libm_lib_version='undef'
diff --git a/win32/config.gc b/win32/config.gc
index 11b490e..d7f197f 100644
--- a/win32/config.gc
+++ b/win32/config.gc
@@ -285,6 +285,7 @@ d_isinf='undef'
 d_isnan='define'
 d_isnanl='undef'
 d_killpg='define'
+d_lc_monetary_2008='undef'
 d_lchown='undef'
 d_ldbl_dig='define'
 d_libm_lib_version='undef'
diff --git a/win32/config.vc b/win32/config.vc
index d4b0b83..a48c0ec 100644
--- a/win32/config.vc
+++ b/win32/config.vc
@@ -285,6 +285,7 @@ d_isinf='undef'
 d_isnan='define'
 d_isnanl='undef'
 d_killpg='define'
+d_lc_monetary_2008='undef'
 d_lchown='undef'
 d_ldbl_dig='define'
 d_libm_lib_version='undef'
-- 
1.9.3

@p5pRT
Copy link
Author

p5pRT commented Jul 14, 2014

From @khwilliamson

On 07/10/2014 03​:48 AM, Andrew Fresh wrote​:

On Wed, Jul 09, 2014 at 06​:27​:14AM -0700, karl williamson via RT wrote​:

I think we need a Configure probe to see if the platform supports these
additional fields, and then use an #ifdef inside POSIX.xs and some
revised text in the pod that says something like "on systems that
support this"

How does this look?

It looks pretty good to me. However, the person who does most of the
Configure changes is AFK, apparently on holiday, and I'm not confident
to push the patch until I get buy-in from someone who knows about
Configure. In the meantime, I have pushed a smoke-me branch to try
this patch out on several platforms. Results can be seen at
http​://perl.develop-help.com/?b=smoke-me%2Fkhw-monetary

@p5pRT
Copy link
Author

p5pRT commented Jul 14, 2014

From @Tux

Karl Williamson schreef op 2014-07-14 06​:06​:

On 07/10/2014 03​:48 AM, Andrew Fresh wrote​:

On Wed, Jul 09, 2014 at 06​:27​:14AM -0700, karl williamson via RT
wrote​:

I think we need a Configure probe to see if the platform supports
these
additional fields, and then use an #ifdef inside POSIX.xs and some
revised text in the pod that says something like "on systems that
support this"

How does this look?

The initial comment looks bad​:
+​: see if localtime_r calls tzset

That is not what this is testing for

And it is also missing a Glossary entry
otherwise looks OK

It looks pretty good to me. However, the person who does most of the
Configure changes is AFK, apparently on holiday, and I'm not confident
to push the patch until I get buy-in from someone who knows about
Configure. In the meantime, I have pushed a smoke-me branch to try
this patch out on several platforms. Results can be seen at
http​://perl.develop-help.com/?b=smoke-me%2Fkhw-monetary

@p5pRT
Copy link
Author

p5pRT commented Jul 29, 2014

From andrew@afresh1.com

On Mon, Jul 14, 2014 at 01​:11​:00AM -0700, H. Merijn Brand via RT wrote​:

Karl Williamson schreef op 2014-07-14 06​:06​:

On 07/10/2014 03​:48 AM, Andrew Fresh wrote​:

On Wed, Jul 09, 2014 at 06​:27​:14AM -0700, karl williamson via RT
wrote​:

I think we need a Configure probe to see if the platform supports
these
additional fields, and then use an #ifdef inside POSIX.xs and some
revised text in the pod that says something like "on systems that
support this"

How does this look?

The initial comment looks bad​:
+​: see if localtime_r calls tzset

Will fix, copy/pasto. Doh!

And it is also missing a Glossary entry
otherwise looks OK

How do I create that? The glossary claimed to be generated by
"metaconfig" but I couldn't figure out how I was supposed to actually
use metaconfig to generate it.

l8rZ,
--
andrew - http​://afresh1.com

I wish life had an UNDO function.

@p5pRT
Copy link
Author

p5pRT commented Jul 29, 2014

From @Tux

On Tue, 29 Jul 2014 11​:15​:36 -0700, Andrew Fresh <andrew@​afresh1.com>
wrote​:

On Mon, Jul 14, 2014 at 01​:11​:00AM -0700, H. Merijn Brand via RT wrote​:

Karl Williamson schreef op 2014-07-14 06​:06​:

On 07/10/2014 03​:48 AM, Andrew Fresh wrote​:

On Wed, Jul 09, 2014 at 06​:27​:14AM -0700, karl williamson via RT
wrote​:

I think we need a Configure probe to see if the platform supports
these
additional fields, and then use an #ifdef inside POSIX.xs and some
revised text in the pod that says something like "on systems that
support this"

How does this look?

The initial comment looks bad​:
+​: see if localtime_r calls tzset

Will fix, copy/pasto. Doh!

And it is also missing a Glossary entry
otherwise looks OK

How do I create that? The glossary claimed to be generated by
"metaconfig" but I couldn't figure out how I was supposed to actually
use metaconfig to generate it.

l8rZ,

Suggest a patch as you did before, but now also suggest the patch for
the Glossary, and - if applicable - the text in config_h.SH

I'll rework the into the files that generate Configure and the Glossary

--
H.Merijn Brand http​://tux.nl Perl Monger http​://amsterdam.pm.org/
using perl5.00307 .. 5.19 porting perl5 on HP-UX, AIX, and openSUSE
http​://mirrors.develooper.com/hpux/ http​://www.test-smoke.org/
http​://qa.perl.org http​://www.goldmark.org/jeff/stupid-disclaimers/

@p5pRT
Copy link
Author

p5pRT commented Sep 11, 2014

From @khwilliamson

On 09/10/2014 09​:47 PM, Andrew Fresh wrote​:

I sent this once before, but somehow it seems it got lost and didn't
make it to RT. So, trying again.

On Tue, Jul 29, 2014 at 01​:05​:52PM -0700, H. Merijn Brand via RT wrote​:

Suggest a patch as you did before, but now also suggest the patch for
the Glossary, and - if applicable - the text in config_h.SH

I'll rework the into the files that generate Configure and the Glossary

I finally had time to get back to this. I apologize for the delay. I
*think* I got it right, did spend a bit of time trying figure out how
metaconfig worked but failed, so a direct patch of Glossary it is.

Let me know.

p5p will deal with metaconfig. Sorry you wasted time on that.

I haven't the time right now to look at your patch in detail. But I did
(with very minor revisions to get it to pass tests) start a smoke-me
running. You can see the results here​:
http​://perl.develop-help.com/?b=smoke-me%2Fkhw-locale

@p5pRT
Copy link
Author

p5pRT commented Sep 15, 2014

From @khwilliamson

On 09/11/2014 11​:14 AM, Karl Williamson wrote​:

On 09/10/2014 09​:47 PM, Andrew Fresh wrote​:

I sent this once before, but somehow it seems it got lost and didn't
make it to RT. So, trying again.

On Tue, Jul 29, 2014 at 01​:05​:52PM -0700, H. Merijn Brand via RT wrote​:

Suggest a patch as you did before, but now also suggest the patch for
the Glossary, and - if applicable - the text in config_h.SH

I'll rework the into the files that generate Configure and the Glossary

I finally had time to get back to this. I apologize for the delay. I
*think* I got it right, did spend a bit of time trying figure out how
metaconfig worked but failed, so a direct patch of Glossary it is.

Let me know.

p5p will deal with metaconfig. Sorry you wasted time on that.

I haven't the time right now to look at your patch in detail. But I did
(with very minor revisions to get it to pass tests) start a smoke-me
running. You can see the results here​:
http​://perl.develop-help.com/?b=smoke-me%2Fkhw-locale

This looks good to me. Tux, please see if the config part is ok with you?

@p5pRT
Copy link
Author

p5pRT commented Sep 19, 2014

From @Tux

On Mon, 15 Sep 2014 13​:34​:29 -0600, Karl Williamson
<public@​khwilliamson.com> wrote​:

On 09/11/2014 11​:14 AM, Karl Williamson wrote​:

On 09/10/2014 09​:47 PM, Andrew Fresh wrote​:

I sent this once before, but somehow it seems it got lost and didn't
make it to RT. So, trying again.

On Tue, Jul 29, 2014 at 01​:05​:52PM -0700, H. Merijn Brand via RT wrote​:

Suggest a patch as you did before, but now also suggest the patch for
the Glossary, and - if applicable - the text in config_h.SH

I'll rework the into the files that generate Configure and the Glossary

I finally had time to get back to this. I apologize for the delay. I
*think* I got it right, did spend a bit of time trying figure out how
metaconfig worked but failed, so a direct patch of Glossary it is.

Let me know.

p5p will deal with metaconfig. Sorry you wasted time on that.

I haven't the time right now to look at your patch in detail. But I did
(with very minor revisions to get it to pass tests) start a smoke-me
running. You can see the results here​:
http​://perl.develop-help.com/?b=smoke-me%2Fkhw-locale

This looks good to me. Tux, please see if the config part is ok with you?

It still needs some amendments

It looks complete, which can be interpreted as a compliment!

* the indentation in Glossary is wrong

* minor nit

  case "$d_locconv​:$d_lc_monetary_2008" in
  define​:)

  should be

  case "$d_locconv​:$d_lc_monetary_2008" in
  $define​:)

Feel free to pick, I'll backport later (and make the fixes)

--
H.Merijn Brand http​://tux.nl Perl Monger http​://amsterdam.pm.org/
using perl5.00307 .. 5.19 porting perl5 on HP-UX, AIX, and openSUSE
http​://mirrors.develooper.com/hpux/ http​://www.test-smoke.org/
http​://qa.perl.org http​://www.goldmark.org/jeff/stupid-disclaimers/

@p5pRT
Copy link
Author

p5pRT commented Sep 22, 2014

From @khwilliamson

Thanks, now in blead as
b15c1b5

--
Karl Williamson

@p5pRT
Copy link
Author

p5pRT commented Sep 22, 2014

@khwilliamson - Status changed from 'open' to 'pending release'

@p5pRT
Copy link
Author

p5pRT commented Jun 2, 2015

From @khwilliamson

Thanks for submitting this ticket

The issue should be resolved with the release today of Perl v5.22. If you find that the problem persists, feel free to reopen this ticket

--
Karl Williamson for the Perl 5 porters team

@p5pRT
Copy link
Author

p5pRT commented Jun 2, 2015

@khwilliamson - Status changed from 'pending release' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant