|
Message-ID: <20190607052850.GO1506@brightrain.aerifal.cx> Date: Fri, 7 Jun 2019 01:28:51 -0400 From: Rich Felker <dalias@...c.org> To: musl@...ts.openwall.com Subject: Re: [PATCH 1/2] define daddr_t type On Fri, Jun 07, 2019 at 07:14:43AM +0200, Petr Vorel wrote: > According to kernel sources only mips (and sparc which we don't support) > defines daddr_t as long, other define int. > > Signed-off-by: Petr Vorel <petr.vorel@...il.com> > --- > arch/mips/bits/alltypes.h.in | 2 ++ > arch/mipsn32/bits/alltypes.h.in | 2 ++ > include/alltypes.h.in | 1 + > include/sys/types.h | 1 + > 4 files changed, 6 insertions(+) > > diff --git a/arch/mips/bits/alltypes.h.in b/arch/mips/bits/alltypes.h.in > index 66ca18ad..bd062a85 100644 > --- a/arch/mips/bits/alltypes.h.in > +++ b/arch/mips/bits/alltypes.h.in > @@ -17,6 +17,8 @@ TYPEDEF struct { long long __ll; long double __ld; } max_align_t; > TYPEDEF long time_t; > TYPEDEF long suseconds_t; > > +TYPEDEF long daddr_t; > + > TYPEDEF struct { union { int __i[9]; volatile int __vi[9]; unsigned __s[9]; } __u; } pthread_attr_t; > TYPEDEF struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } pthread_mutex_t; > TYPEDEF struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } mtx_t; > diff --git a/arch/mipsn32/bits/alltypes.h.in b/arch/mipsn32/bits/alltypes.h.in > index 66ca18ad..bd062a85 100644 > --- a/arch/mipsn32/bits/alltypes.h.in > +++ b/arch/mipsn32/bits/alltypes.h.in > @@ -17,6 +17,8 @@ TYPEDEF struct { long long __ll; long double __ld; } max_align_t; > TYPEDEF long time_t; > TYPEDEF long suseconds_t; > > +TYPEDEF long daddr_t; > + > TYPEDEF struct { union { int __i[9]; volatile int __vi[9]; unsigned __s[9]; } __u; } pthread_attr_t; > TYPEDEF struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } pthread_mutex_t; > TYPEDEF struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } mtx_t; > diff --git a/include/alltypes.h.in b/include/alltypes.h.in > index 4cc879b1..6ef6ebd4 100644 > --- a/include/alltypes.h.in > +++ b/include/alltypes.h.in > @@ -18,6 +18,7 @@ TYPEDEF unsigned _Int64 uint64_t; > TYPEDEF unsigned _Int64 u_int64_t; > TYPEDEF unsigned _Int64 uintmax_t; > > +TYPEDEF int daddr_t; > TYPEDEF unsigned mode_t; > TYPEDEF unsigned _Reg nlink_t; > TYPEDEF _Int64 off_t; > diff --git a/include/sys/types.h b/include/sys/types.h > index 75e489c5..c50d21c9 100644 > --- a/include/sys/types.h > +++ b/include/sys/types.h > @@ -29,6 +29,7 @@ extern "C" { > #define __NEED_clock_t > #define __NEED_suseconds_t > #define __NEED_blksize_t > +#define __NEED_daddr_t > > #define __NEED_pthread_t > #define __NEED_pthread_attr_t > -- > 2.21.0 daddr_t is not a standard type, so can't be exposed by default here (aside from the dubious "*_t is always reserved" rule), and it's only proposed to be used in one header, so it doesn't belong in alltypes.h either. Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.