From 66aa52e485a081cd5df9001f610ffe8f3e92c0b3 Mon Sep 17 00:00:00 2001 From: "Reece H. Dunn" Date: Thu, 10 Dec 2015 22:26:35 +0000 Subject: [PATCH] Define a compatibility macro for platforms that don't have S_ISDIR. --- src/espeak.c | 4 ++++ src/libespeak-ng/speak_lib.c | 4 ++++ src/speak.c | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/src/espeak.c b/src/espeak.c index c371d42e..54f0b226 100644 --- a/src/espeak.c +++ b/src/espeak.c @@ -31,6 +31,10 @@ #include "speak_lib.h" +#ifndef S_ISDIR +#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR) +#endif + // This version of the command-line speak program uses the // libespeak.so.1 library diff --git a/src/libespeak-ng/speak_lib.c b/src/libespeak-ng/speak_lib.c index 01d3f1bf..33f6686f 100644 --- a/src/libespeak-ng/speak_lib.c +++ b/src/libespeak-ng/speak_lib.c @@ -50,6 +50,10 @@ #include "event.h" #include "wave.h" +#ifndef S_ISDIR +#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR) +#endif + unsigned char *outbuf=NULL; espeak_EVENT *event_list=NULL; diff --git a/src/speak.c b/src/speak.c index 55667ca3..501b4365 100644 --- a/src/speak.c +++ b/src/speak.c @@ -51,6 +51,10 @@ #include "voice.h" #include "translate.h" +#ifndef S_ISDIR +#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR) +#endif + extern void Write4Bytes(FILE *f, int value);