Add __nl_item to <sys/_types.h> and use it
Add __nl_item to <sys/_types.h> for FreeBSD compatibility. Use it in <langinfo.h> and the Cygwin <nl_types.h>. Make the enum __nl_item in <langinfo.h> anonymous. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
This commit is contained in:
parent
36cb95f602
commit
5d29023c11
|
@ -29,19 +29,18 @@
|
||||||
#ifndef _LANGINFO_H_
|
#ifndef _LANGINFO_H_
|
||||||
#define _LANGINFO_H_
|
#define _LANGINFO_H_
|
||||||
|
|
||||||
#include <newlib.h>
|
|
||||||
#include <sys/config.h>
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
|
#include <sys/_types.h>
|
||||||
#if __POSIX_VISIBLE >= 200809
|
#if __POSIX_VISIBLE >= 200809
|
||||||
#include <xlocale.h>
|
#include <xlocale.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _NL_ITEM_DECLARED
|
#ifndef _NL_ITEM_DECLARED
|
||||||
typedef int nl_item;
|
typedef __nl_item nl_item;
|
||||||
#define _NL_ITEM_DECLARED
|
#define _NL_ITEM_DECLARED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
enum __nl_item
|
enum
|
||||||
{
|
{
|
||||||
/* POSIX and BSD defined items have to stick to the original values
|
/* POSIX and BSD defined items have to stick to the original values
|
||||||
to maintain backward compatibility. */
|
to maintain backward compatibility. */
|
||||||
|
|
|
@ -210,6 +210,7 @@ typedef __uint8_t __sa_family_t;
|
||||||
typedef __uint32_t __socklen_t;
|
typedef __uint32_t __socklen_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
typedef int __nl_item;
|
||||||
typedef unsigned short __nlink_t;
|
typedef unsigned short __nlink_t;
|
||||||
typedef long __suseconds_t; /* microseconds (signed) */
|
typedef long __suseconds_t; /* microseconds (signed) */
|
||||||
typedef unsigned long __useconds_t; /* microseconds (unsigned) */
|
typedef unsigned long __useconds_t; /* microseconds (unsigned) */
|
||||||
|
|
|
@ -87,7 +87,7 @@ typedef struct __nl_cat_d {
|
||||||
|
|
||||||
|
|
||||||
#ifndef _NL_ITEM_DECLARED
|
#ifndef _NL_ITEM_DECLARED
|
||||||
typedef int nl_item;
|
typedef __nl_item nl_item;
|
||||||
#define _NL_ITEM_DECLARED
|
#define _NL_ITEM_DECLARED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue