Re: [PATCH 11/12] MINGW: do not fail at redefining pid_t on MinGW-W64
On Mon, Apr 28, 2014 at 3:51 PM, Marat Radchenko <marat@slonopotamus.org> wrote:
Show 33 quoted lines
> pid_t is available in sys/types.h on both MinGW and MinGW-W64
>
> Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
> ---
> compat/mingw.h | 1 -
> compat/msvc.h | 2 ++
> 2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/compat/mingw.h b/compat/mingw.h
> index c502a22..8850109 100644
> --- a/compat/mingw.h
> +++ b/compat/mingw.h
> @@ -5,7 +5,6 @@
> * things that are not available in header files
> */
>
> -typedef int pid_t;
> typedef int uid_t;
> typedef int socklen_t;
> #define hstrerror strerror
> diff --git a/compat/msvc.h b/compat/msvc.h
> index cb41ce3..e2fda48 100644
> --- a/compat/msvc.h
> +++ b/compat/msvc.h
> @@ -18,6 +18,8 @@
> #define PRIuMAX "I64u"
> #define PRId64 "I64d"
>
> +typedef int pid_t;
> +
> static __inline int strcasecmp (const char *s1, const char *s2)
> {
> int size1 = strlen(s1);Looks good!
Acked-by: Erik Faye-Lund <kusmabite@gmail.com>