Project

General

Profile

Actions

Feature #5346

open

locale independant strto* missing (as well as their wchar variants)

Added by Richard PALO over 7 years ago. Updated almost 6 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2014-11-15
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

The following seem to be "missing" :

strtod_l
strtol_l
strtoul_l
wcstod_l
wcstol_l
wcstoul_l

Apparently they are gNUlib functions as opposed to POSIX.

NetBSD defines these (plus some additions) as

#if (_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE)
#  ifndef __LOCALE_T_DECLARED
typedef struct _locale      *locale_t;
#  define __LOCALE_T_DECLARED
#  endif
double      strtod_l(const char * __restrict, char ** __restrict, locale_t);
float       strtof_l(const char * __restrict, char ** __restrict, locale_t);
long double strtold_l(const char * __restrict, char ** __restrict,
              locale_t);
long     strtol_l(const char * __restrict, char ** __restrict, int, locale_t);
unsigned long
     strtoul_l(const char * __restrict, char ** __restrict, int, locale_t);
/* LONGLONG */
long long int
    strtoll_l(const char * __restrict, char ** __restrict, int, locale_t);
/* LONGLONG */
unsigned long long int
    strtoull_l(const char * __restrict, char ** __restrict, int, locale_t);
...

and

#if (_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE)
#  ifndef __LOCALE_T_DECLARED
typedef struct _locale      *locale_t;
#  define __LOCALE_T_DECLARED
#  endif
__BEGIN_DECLS
size_t  mbsnrtowcs(wchar_t * __restrict, const char ** __restrict, size_t,
        size_t, mbstate_t * __restrict);
size_t  wcsnrtombs(char * __restrict, const wchar_t ** __restrict, size_t,
        size_t, mbstate_t * __restrict);

int wcscoll_l(const wchar_t *, const wchar_t *, locale_t);
size_t  wcsxfrm_l(wchar_t *, const wchar_t *, size_t, locale_t);
int wcsncasecmp_l(const wchar_t *, const wchar_t *, size_t, locale_t);
int wcscasecmp_l(const wchar_t *, const wchar_t *, locale_t);

size_t  wcsftime_l(wchar_t * __restrict, size_t, const wchar_t * __restrict,
        const struct tm * __restrict, locale_t);

float wcstof_l(const wchar_t * __restrict, wchar_t ** __restrict, locale_t);
double wcstod_l(const wchar_t * __restrict, wchar_t ** __restrict, locale_t);
long double wcstold_l(const wchar_t * __restrict, wchar_t ** __restrict,
    locale_t);
long int wcstol_l(const wchar_t * __restrict, wchar_t ** __restrict, int,
          locale_t);
unsigned long int wcstoul_l(const wchar_t * __restrict,
    wchar_t ** __restrict, int, locale_t);
/* LONGLONG */
long long int wcstoll_l(const wchar_t * __restrict, wchar_t ** __restrict, int,
            locale_t);
/* LONGLONG */
unsigned long long int wcstoull_l(const wchar_t * __restrict,
                  wchar_t ** __restrict, int, locale_t);
int wcwidth_l(wchar_t, locale_t);
int wcswidth_l(const wchar_t *, size_t, locale_t);
__END_DECLS
#endif /* _POSIX_C_SOURCE || _NETBSD_SOURCE */

Actions

Also available in: Atom PDF