From 8b3f42700d094e8fd0708eff23b6c153390e2922 Mon Sep 17 00:00:00 2001 From: Erwin Janssen Date: Wed, 21 Dec 2016 14:18:25 +0100 Subject: [PATCH] Replace remaining "ast_common.h" includes Added a typedef for `ssize_t` to the Windows config.h, which is the location were Autotools would define it if it isn't found. Removed the remaining includes of "ast_common.h", instead include "config.h" and add a check to include "sys/typesh" (were ssize_t is located on Linux) --- lib/sfio/sfio.h | 6 +++++- lib/sfio/vthread.h | 7 ++++++- lib/vmalloc/vmalloc.h | 6 +++++- lib/vmalloc/vmhdr.h | 7 ++++++- windows/include/config.h | 2 +- 5 files changed, 23 insertions(+), 5 deletions(-) diff --git a/lib/sfio/sfio.h b/lib/sfio/sfio.h index acd512f00..a332bbacf 100644 --- a/lib/sfio/sfio.h +++ b/lib/sfio/sfio.h @@ -25,7 +25,11 @@ extern "C" { ** Written by Kiem-Phong Vo */ -#include +#include "config.h" + +#ifdef HAVE_SYS_TYPES_H +# include +#endif // HAVE_SYS_TYPES_H #include diff --git a/lib/sfio/vthread.h b/lib/sfio/vthread.h index 1d105ff03..72d170249 100644 --- a/lib/sfio/vthread.h +++ b/lib/sfio/vthread.h @@ -27,9 +27,14 @@ extern "C" { ** Written by Kiem-Phong Vo */ -#include #include +#include "config.h" + +#ifdef HAVE_SYS_TYPES_H +# include +#endif // HAVE_SYS_TYPES_H + #undef vt_threaded #ifndef vt_threaded diff --git a/lib/vmalloc/vmalloc.h b/lib/vmalloc/vmalloc.h index 9424ae39d..0864da960 100644 --- a/lib/vmalloc/vmalloc.h +++ b/lib/vmalloc/vmalloc.h @@ -25,7 +25,11 @@ extern "C" { #define VMALLOC_VERSION 19990805L -#include +#include "config.h" + +#ifdef HAVE_SYS_TYPES_H +# include +#endif // HAVE_SYS_TYPES_H typedef struct _vmalloc_s Vmalloc_t; typedef struct _vmstat_s Vmstat_t; diff --git a/lib/vmalloc/vmhdr.h b/lib/vmalloc/vmhdr.h index 22fefc384..a44793fe2 100644 --- a/lib/vmalloc/vmhdr.h +++ b/lib/vmalloc/vmhdr.h @@ -31,7 +31,12 @@ extern "C" { ** Written by Kiem-Phong Vo, kpv@research.att.com, 01/16/94. */ -#include +#include "config.h" + +#ifdef HAVE_SYS_TYPES_H +# include +#endif // HAVE_SYS_TYPES_H + #include "FEATURE/vmalloc" #undef free diff --git a/windows/include/config.h b/windows/include/config.h index 8e08becbc..d52938720 100644 --- a/windows/include/config.h +++ b/windows/include/config.h @@ -380,7 +380,7 @@ /* #undef pid_t */ /* Define to `int' if does not define. */ -//#define ssize_t int +typedef int ssize_t; /* Define to `int' if doesn't define. */ #define uid_t int -- 2.40.0