Add sys/_locale.h header and fix up headers
Signed-off by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
91ebe04042
commit
7156bf842e
@ -4,9 +4,8 @@
|
|||||||
#include "_ansi.h"
|
#include "_ansi.h"
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
|
|
||||||
#if __MISC_VISIBLE || __POSIX_VISIBLE >= 200809 || defined (_COMPILING_NEWLIB)
|
#if __POSIX_VISIBLE >= 200809 || __MISC_VISIBLE || defined (_COMPILING_NEWLIB)
|
||||||
struct __locale_t;
|
#include <sys/_locale.h>
|
||||||
typedef struct __locale_t *locale_t;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_BEGIN_STD_C
|
_BEGIN_STD_C
|
||||||
|
@ -21,7 +21,9 @@
|
|||||||
#define LC_TIME 5
|
#define LC_TIME 5
|
||||||
#define LC_MESSAGES 6
|
#define LC_MESSAGES 6
|
||||||
|
|
||||||
#if __POSIX_VISIBLE >= 200809
|
#if __POSIX_VISIBLE >= 200809 || defined (_COMPILING_NEWLIB)
|
||||||
|
|
||||||
|
#include <sys/_locale.h>
|
||||||
|
|
||||||
#define LC_ALL_MASK (1 << LC_ALL)
|
#define LC_ALL_MASK (1 << LC_ALL)
|
||||||
#define LC_COLLATE_MASK (1 << LC_COLLATE)
|
#define LC_COLLATE_MASK (1 << LC_COLLATE)
|
||||||
@ -33,9 +35,6 @@
|
|||||||
|
|
||||||
#define LC_GLOBAL_LOCALE ((struct __locale_t *) -1)
|
#define LC_GLOBAL_LOCALE ((struct __locale_t *) -1)
|
||||||
|
|
||||||
struct __locale_t;
|
|
||||||
typedef struct __locale_t *locale_t;
|
|
||||||
|
|
||||||
#endif /* __POSIX_VISIBLE >= 200809 */
|
#endif /* __POSIX_VISIBLE >= 200809 */
|
||||||
|
|
||||||
_BEGIN_STD_C
|
_BEGIN_STD_C
|
||||||
|
@ -16,9 +16,8 @@
|
|||||||
#define __need_NULL
|
#define __need_NULL
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
#if __POSIX_VISIBLE >= 200809 || defined (_COMPILING_NEWLIB)
|
#if __POSIX_VISIBLE >= 200809
|
||||||
struct __locale_t;
|
#include <sys/_locale.h>
|
||||||
typedef struct __locale_t *locale_t;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_BEGIN_STD_C
|
_BEGIN_STD_C
|
||||||
|
12
newlib/libc/include/sys/_locale.h
Normal file
12
newlib/libc/include/sys/_locale.h
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
/* Definition of opaque POSIX-1.2008 type locale_t for userspace. */
|
||||||
|
|
||||||
|
#ifndef _SYS__LOCALE_H
|
||||||
|
#define _SYS__LOCALE_H
|
||||||
|
|
||||||
|
#include <newlib.h>
|
||||||
|
#include <sys/config.h>
|
||||||
|
|
||||||
|
struct __locale_t;
|
||||||
|
typedef struct __locale_t *locale_t;
|
||||||
|
|
||||||
|
#endif /* _SYS__LOCALE_H */
|
@ -37,9 +37,6 @@ typedef __uint32_t __ULong;
|
|||||||
|
|
||||||
struct _reent;
|
struct _reent;
|
||||||
|
|
||||||
/* TODO: This structure type isn't defined yet. It's supposed to be used
|
|
||||||
by locale-specific functions in case a per-thread locale per SUSv4 has
|
|
||||||
been specified. */
|
|
||||||
struct __locale_t;
|
struct __locale_t;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -28,6 +28,10 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/timespec.h>
|
#include <sys/timespec.h>
|
||||||
|
|
||||||
|
#if __POSIX_VISIBLE >= 200809
|
||||||
|
#include <sys/_locale.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
_BEGIN_STD_C
|
_BEGIN_STD_C
|
||||||
|
|
||||||
struct tm
|
struct tm
|
||||||
@ -63,6 +67,12 @@ size_t _EXFUN(strftime, (char *__restrict _s,
|
|||||||
size_t _maxsize, const char *__restrict _fmt,
|
size_t _maxsize, const char *__restrict _fmt,
|
||||||
const struct tm *__restrict _t));
|
const struct tm *__restrict _t));
|
||||||
|
|
||||||
|
#if __POSIX_VISIBLE >= 200809
|
||||||
|
extern size_t strftime_l (char *__restrict _s, size_t _maxsize,
|
||||||
|
const char *__restrict _fmt,
|
||||||
|
const struct tm *__restrict _t, locale_t _l);
|
||||||
|
#endif
|
||||||
|
|
||||||
char *_EXFUN(asctime_r, (const struct tm *__restrict,
|
char *_EXFUN(asctime_r, (const struct tm *__restrict,
|
||||||
char *__restrict));
|
char *__restrict));
|
||||||
char *_EXFUN(ctime_r, (const time_t *, char *));
|
char *_EXFUN(ctime_r, (const time_t *, char *));
|
||||||
|
@ -63,9 +63,8 @@ typedef __gnuc_va_list va_list;
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __POSIX_VISIBLE >= 200809 || defined (_COMPILING_NEWLIB)
|
#if __POSIX_VISIBLE >= 200809
|
||||||
struct __locale_t;
|
#include <sys/_locale.h>
|
||||||
typedef struct __locale_t *locale_t;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_BEGIN_STD_C
|
_BEGIN_STD_C
|
||||||
|
@ -7,6 +7,10 @@
|
|||||||
#define __need_wint_t
|
#define __need_wint_t
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
|
#if __POSIX_VISIBLE >= 200809
|
||||||
|
#include <sys/_locale.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef WEOF
|
#ifndef WEOF
|
||||||
# define WEOF ((wint_t)-1)
|
# define WEOF ((wint_t)-1)
|
||||||
#endif
|
#endif
|
||||||
@ -44,11 +48,6 @@ wint_t _EXFUN(towlower, (wint_t));
|
|||||||
wctrans_t _EXFUN(wctrans, (const char *));
|
wctrans_t _EXFUN(wctrans, (const char *));
|
||||||
wctype_t _EXFUN(wctype, (const char *));
|
wctype_t _EXFUN(wctype, (const char *));
|
||||||
|
|
||||||
#if __POSIX_VISIBLE >= 200809 || defined (_COMPILING_NEWLIB)
|
|
||||||
struct __locale_t;
|
|
||||||
typedef struct __locale_t *locale_t;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if __POSIX_VISIBLE >= 200809
|
#if __POSIX_VISIBLE >= 200809
|
||||||
extern int iswalpha_l (wint_t, locale_t);
|
extern int iswalpha_l (wint_t, locale_t);
|
||||||
extern int iswalnum_l (wint_t, locale_t);
|
extern int iswalnum_l (wint_t, locale_t);
|
||||||
|
@ -31,9 +31,20 @@
|
|||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#if __POSIX_VISIBLE >= 200809
|
||||||
|
#include <sys/_locale.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
ssize_t strfmon(char * __restrict, size_t, const char * __restrict, ...);
|
|
||||||
|
extern ssize_t strfmon (char * __restrict, size_t, const char * __restrict,
|
||||||
|
...);
|
||||||
|
|
||||||
|
#if __POSIX_VISIBLE >= 200809
|
||||||
|
extern ssize_t strfmon_l (char * __restrict, size_t, locale_t,
|
||||||
|
const char * __restrict, ...);
|
||||||
|
#endif
|
||||||
|
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
||||||
#endif /* !_MONETARY_H_ */
|
#endif /* !_MONETARY_H_ */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user