From: KO Myung-Hun Date: Thu, 1 Dec 2016 10:52:43 +0000 (+0900) Subject: sys_socket: typedef sa_family_t correctly on OS/2 kLIBC X-Git-Tag: v1.0~6522 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=154912b518c6869ac1513da5acc685ec34723cfb;p=gnulib.git sys_socket: typedef sa_family_t correctly on OS/2 kLIBC On OS/2 kLIBC, sa_family_t is unsigned char unless TCPV40HDRS is defined. * lib/sys_socket.in.h (sa_family_t): Typedef to unsigned char on OS/2 kLIBC unless TCPV40HDRS is defined. --- diff --git a/ChangeLog b/ChangeLog index 3b18083882..6eaaf7f455 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2016-12-01 KO Myung-Hun + + sys_socket: typedef sa_family_t correctly on OS/2 kLIBC + * lib/sys_socket.in.h (sa_family_t): Typedef to unsigned char on + OS/2 kLIBC unless TCPV40HDRS is defined. + 2016-11-29 Jim Meyering dfa: avoid new infinite loop @@ -11,11 +17,11 @@ 2016-11-27 Norihiro Tanaka - dfa: avoid match middle in multibyte character - * lib/dfa.c (transit_state): If fails in matching single byte characters - on a state including period expression in non-UTF8 multibyte locales, - skip trailing bytes. - (dfa_supported): Revert previous change. + dfa: avoid match middle in multibyte character + * lib/dfa.c (transit_state): If fails in matching single byte characters + on a state including period expression in non-UTF8 multibyte locales, + skip trailing bytes. + (dfa_supported): Revert previous change. 2016-11-27 Jim Meyering diff --git a/lib/sys_socket.in.h b/lib/sys_socket.in.h index 79aa14e52e..980a112af0 100644 --- a/lib/sys_socket.in.h +++ b/lib/sys_socket.in.h @@ -79,7 +79,12 @@ _GL_INLINE_HEADER_BEGIN #if !@HAVE_SA_FAMILY_T@ # if !GNULIB_defined_sa_family_t +/* On OS/2 kLIBC, sa_family_t is unsigned char unless TCPV40HDRS is defined. */ +# if !defined __KLIBC__ || defined TCPV40HDRS typedef unsigned short sa_family_t; +# else +typedef unsigned char sa_family_t; +# endif # define GNULIB_defined_sa_family_t 1 # endif #endif