This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 02/18] Provide POSIX defined id_t in <sys/types.h>


Hi Sebastian,

On Apr 14 13:54, Sebastian Huber wrote:
> Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
> ---
>  newlib/libc/include/sys/_types.h       | 4 ++++
>  newlib/libc/include/sys/types.h        | 5 +++++
>  winsup/cygwin/include/cygwin/types.h   | 6 ------
>  winsup/cygwin/include/machine/_types.h | 3 +++
>  4 files changed, 12 insertions(+), 6 deletions(-)
> 
> diff --git a/newlib/libc/include/sys/_types.h b/newlib/libc/include/sys/_types.h
> index 762dfed..ebd4943 100644
> --- a/newlib/libc/include/sys/_types.h
> +++ b/newlib/libc/include/sys/_types.h
> @@ -43,6 +43,10 @@ typedef unsigned short __uid_t;
>  typedef unsigned short __gid_t;
>  #endif
>  
> +#ifndef __machine_id_t_defined
> +typedef __pid_t __id_t;
> +#endif

Glibc defines id_t as unsigned 32 bit type.  __pid_t is int, therefore a
signed type.

That's why Cygwin defined id_t as __uint32_t.  Wouldn't it makes sense
to follow glibc for compatibility here, too?  This would also allow to
get rid of the Cygwin-specific definition.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

Attachment: signature.asc
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]