View Issue Details

IDProjectCategoryView StatusLast Update
00010491003.1(2013)/Issue7+TC1Base Definitions and Headerspublic2016-04-29 06:16
Reporterdaurnimator Assigned To 
PrioritynormalSeverityEditorialTypeEnhancement Request
Status ClosedResolutionDuplicate 
NameDaurnimator
Organization
User Reference
Sectionstrtod_l
Page Number0
Line Number0
Interp Status---
Final Accepted Text
Summary0001049: Standardise strtod_l and friends
DescriptionMost string to number parsing functions are locale dependant. Many libcs already have variants to the existing functions (such as strtod) that in addition to the usual arguments, take a locale.


Existing implementations:

  - musl
  - glibc
  - darwin (Mac OSX)
  - freebsd
  - netbsd
  - Microsoft (since MSVC2005) (with prefix)


Infact, often `strtod` is **already** implemented in terms of a strtod_l function.
Desired ActionThe following definitions should be added in stdlib.h:

  - atof_l
  - atoi_l
  - atol_l
  - atoll_l
  - mblen_l
  - mbstowcs_l
  - mbtowc_l
  - strtod_l
  - strtof_l
  - strtol_l
  - strtold_l
  - strtoll_l
  - strtoq_l
  - strtoul_l
  - strtoull_l
  - strtouq_l
  - wcstombs_l
  - wctomb_l

Each with the same signatures as their non '-l' suffixed equivalents, except for an added final `locale_t` argument.
TagsNo tags attached.

Relationships

duplicate of 0001004 Closedajosey 1003.1(2008)/Issue 7 Make *_l() complete? 

Activities

EdSchouten

2016-04-29 05:44

updater   bugnote:0003184

Last edited: 2016-04-29 05:55

This bug would be a duplicate of http://austingroupbugs.net/view.php?id=1004 , right?

daurnimator

2016-04-29 06:05

reporter   bugnote:0003185

> This bug would be a duplicate of http://austingroupbugs.net/view.php?id=1004 [^] , right?

Yes. I believe so (search didn't manage to find it/I was using the wrong terms.)

Issue History

Date Modified Username Field Change
2016-04-29 05:39 daurnimator New Issue
2016-04-29 05:39 daurnimator Name => Daurnimator
2016-04-29 05:39 daurnimator Section => strtod_l
2016-04-29 05:39 daurnimator Page Number => 0
2016-04-29 05:39 daurnimator Line Number => 0
2016-04-29 05:44 EdSchouten Note Added: 0003184
2016-04-29 05:55 EdSchouten Note Edited: 0003184
2016-04-29 06:05 daurnimator Note Added: 0003185
2016-04-29 06:09 EdSchouten Relationship added duplicate of 0001004
2016-04-29 06:16 Don Cragun Interp Status => ---
2016-04-29 06:16 Don Cragun Status New => Closed
2016-04-29 06:16 Don Cragun Resolution Open => Duplicate