bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH gnumach] Include stddef.h in sys/types.h to get size_t and NU


From: Samuel Thibault
Subject: Re: [PATCH gnumach] Include stddef.h in sys/types.h to get size_t and NULL.
Date: Wed, 10 Jul 2024 22:36:02 +0200
User-agent: NeoMutt/20170609 (1.8.3)

Applied, thanks!

Flavio Cruz, le mer. 10 juil. 2024 17:05:02 +0100, a ecrit:
> Remove unnecessary definitions from sys/types.h.
> ---
>  include/sys/types.h | 23 +----------------------
>  1 file changed, 1 insertion(+), 22 deletions(-)
> 
> diff --git a/include/sys/types.h b/include/sys/types.h
> index 8d5af37..82b2e4d 100644
> --- a/include/sys/types.h
> +++ b/include/sys/types.h
> @@ -28,16 +28,7 @@
>  
>  #include <mach/machine/vm_types.h>
>  #include <stdint.h>
> -
> -#ifndef _SIZE_T
> -#define _SIZE_T
> -typedef unsigned long size_t;
> -#endif
> -
> -#ifndef _SSIZE_T
> -#define _SSIZE_T
> -typedef integer_t ssize_t;
> -#endif
> +#include <stddef.h> /* for size_t and NULL */
>  
>  typedef      unsigned short  dev_t;          /* device id */
>  typedef      unsigned long   gid_t;          /* group id */
> @@ -50,15 +41,11 @@ typedef   unsigned long   uid_t;          /* user id */
>  
>  /* Symbols allowed but not required by POSIX */
>  
> -typedef      char *          caddr_t;        /* address of a (signed) char */
> -
>  #ifndef _TIME_T
>  #define      _TIME_T
>  typedef      unsigned long long      time_t;
>  #endif
>  
> -#define RAND_MAX     0x7fffffff
> -
>  /* Symbols not allowed by POSIX */
>  #ifndef _POSIX_SOURCE
>  
> @@ -71,18 +58,10 @@ typedef   unsigned short  u_short;        /* unsigned 
> short */
>  typedef      unsigned int    u_int;          /* unsigned int */
>  typedef unsigned long        u_long;         /* unsigned long */
>  
> -typedef unsigned int daddr_t;        /* disk address */
> -
>  #define      major(i)        (((i) >> 8) & 0xFF)
>  #define      minor(i)        ((i) & 0xFF)
>  #define      makedev(i,j)    ((((i) & 0xFF) << 8) | ((j) & 0xFF))
>  
> -#define      NBBY            8
> -
> -#ifndef      NULL
> -#define      NULL            ((void *) 0)    /* the null pointer */
> -#endif
> -
>  #endif /* _POSIX_SOURCE */
>  
>  #endif       /* _MACH_SA_SYS_TYPES_H_ */
> -- 
> 2.45.2
> 
> 

-- 
Samuel
<studdud> what the fuck is wtf



reply via email to

[Prev in Thread] Current Thread [Next in Thread]