public inbox for newlib-cvs@sourceware.org help / color / mirror / Atom feed
From: Sebastian Huber <sh@sourceware.org> To: cygwin-cvs@sourceware.org, newlib-cvs@sourceware.org Subject: [newlib-cygwin] Add __nl_item to <sys/_types.h> and use it Date: Fri, 24 Aug 2018 13:08:00 -0000 [thread overview] Message-ID: <20180824130829.1245.qmail@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=5d29023c110473e13beff16607d85a49673f2b7b commit 5d29023c110473e13beff16607d85a49673f2b7b Author: Sebastian Huber <sebastian.huber@embedded-brains.de> Date: Thu Aug 23 12:13:02 2018 +0200 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> Diff: --- newlib/libc/include/langinfo.h | 7 +++---- newlib/libc/include/sys/_types.h | 1 + winsup/cygwin/include/nl_types.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/newlib/libc/include/langinfo.h b/newlib/libc/include/langinfo.h index 458b925..d2b7a03 100644 --- a/newlib/libc/include/langinfo.h +++ b/newlib/libc/include/langinfo.h @@ -29,19 +29,18 @@ #ifndef _LANGINFO_H_ #define _LANGINFO_H_ -#include <newlib.h> -#include <sys/config.h> #include <sys/cdefs.h> +#include <sys/_types.h> #if __POSIX_VISIBLE >= 200809 #include <xlocale.h> #endif #ifndef _NL_ITEM_DECLARED -typedef int nl_item; +typedef __nl_item nl_item; #define _NL_ITEM_DECLARED #endif -enum __nl_item +enum { /* POSIX and BSD defined items have to stick to the original values to maintain backward compatibility. */ diff --git a/newlib/libc/include/sys/_types.h b/newlib/libc/include/sys/_types.h index d8e8c0b..fc10531 100644 --- a/newlib/libc/include/sys/_types.h +++ b/newlib/libc/include/sys/_types.h @@ -210,6 +210,7 @@ typedef __uint8_t __sa_family_t; typedef __uint32_t __socklen_t; #endif +typedef int __nl_item; typedef unsigned short __nlink_t; typedef long __suseconds_t; /* microseconds (signed) */ typedef unsigned long __useconds_t; /* microseconds (unsigned) */ diff --git a/winsup/cygwin/include/nl_types.h b/winsup/cygwin/include/nl_types.h index b9c06f6..c57cfef 100644 --- a/winsup/cygwin/include/nl_types.h +++ b/winsup/cygwin/include/nl_types.h @@ -87,7 +87,7 @@ typedef struct __nl_cat_d { #ifndef _NL_ITEM_DECLARED -typedef int nl_item; +typedef __nl_item nl_item; #define _NL_ITEM_DECLARED #endif
reply other threads:[~2018-08-24 13:08 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20180824130829.1245.qmail@sourceware.org \ --to=sh@sourceware.org \ --cc=cygwin-cvs@sourceware.org \ --cc=newlib-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).