1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-30 01:15:52 +00:00

Fix LC_NUMERIC locale bug.

Submitted by:	Alexander N. Kabaev <ak03@gte.com>
This commit is contained in:
Christian Weisgerber 2001-12-04 21:31:54 +00:00
parent 379aa5ef1f
commit f54d549681
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=51032
3 changed files with 17 additions and 5 deletions

View File

@ -6,6 +6,7 @@
PORTNAME= ksh93 PORTNAME= ksh93
PORTVERSION= ${VERSION:S/-//g} PORTVERSION= ${VERSION:S/-//g}
PORTREVISION= 1
VERSION= 2001-10-31 VERSION= 2001-10-31
CATEGORIES= shells CATEGORIES= shells
MASTER_SITES= http://www.research.att.com/~gsf/download/tgz/ MASTER_SITES= http://www.research.att.com/~gsf/download/tgz/

View File

@ -0,0 +1,16 @@
$FreeBSD$
--- src/lib/libast/sfio/sfhdr.h.orig Tue Dec 4 21:58:08 2001
+++ src/lib/libast/sfio/sfhdr.h Tue Dec 4 21:58:52 2001
@@ -521,8 +521,8 @@
#define SFSETLOCALE(dp,tp) \
do if (*(dp) == 0) { \
Lc_numeric_t* lv = (Lc_numeric_t*)LCINFO(AST_LC_NUMERIC)->data; \
- *(dp) = lv->decimal; \
- *(tp) = lv->thousand; \
+ *(dp) = lv ? lv->decimal : '.'; \
+ *(tp) = lv ? lv->thousand: '\0'; \
} while (0)
#else
#if _lib_locale

View File

@ -11,8 +11,3 @@ in performance. In addition, "sh" scripts can be run on KSH-93
without modification. without modification.
WWW: http://www.kornshell.com/ WWW: http://www.kornshell.com/
Known problem: Defining the LC_NUMERIC environment variable, or
any locale setting by which it is implied (LANG, LC_ALL), will cause
ksh93 to crash. LC_COLLATE, LC_CTYPE, LC_MESSAGES, LC_MONETARY,
and LC_TIME are safe.