From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2884 invoked by alias); 24 Aug 2018 13:08:29 -0000 Mailing-List: contact newlib-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-cvs-owner@sourceware.org Received: (qmail 1258 invoked by uid 10080); 24 Aug 2018 13:08:29 -0000 Date: Fri, 24 Aug 2018 13:08:00 -0000 Message-ID: <20180824130829.1245.qmail@sourceware.org> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Sebastian Huber To: cygwin-cvs@sourceware.org, newlib-cvs@sourceware.org Subject: [newlib-cygwin] Add __nl_item to and use it X-Act-Checkin: newlib-cygwin X-Git-Author: Sebastian Huber X-Git-Refname: refs/heads/master X-Git-Oldrev: 36cb95f6028d8e0f2c736a66a4189027aecd5566 X-Git-Newrev: 5d29023c110473e13beff16607d85a49673f2b7b X-SW-Source: 2018-q3/txt/msg00050.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=5d29023c110473e13beff16607d85a49673f2b7b commit 5d29023c110473e13beff16607d85a49673f2b7b Author: Sebastian Huber Date: Thu Aug 23 12:13:02 2018 +0200 Add __nl_item to and use it Add __nl_item to for FreeBSD compatibility. Use it in and the Cygwin . Make the enum __nl_item in anonymous. Signed-off-by: Sebastian Huber 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 -#include #include +#include #if __POSIX_VISIBLE >= 200809 #include #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