/* Compatibility shim for <unistd.h> | |||||
* | |||||
* Copyright (C) 2016 Reece H. Dunn | |||||
* | |||||
* This program is free software; you can redistribute it and/or modify | |||||
* it under the terms of the GNU General Public License as published by | |||||
* the Free Software Foundation; either version 3 of the License, or | |||||
* (at your option) any later version. | |||||
* | |||||
* This program is distributed in the hope that it will be useful, | |||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
* GNU General Public License for more details. | |||||
* | |||||
* You should have received a copy of the GNU General Public License | |||||
* along with this program; if not, see: <http://www.gnu.org/licenses/>. | |||||
*/ | |||||
#ifndef UNISTD_H_COMPAT_SHIM | |||||
#define UNISTD_H_COMPAT_SHIM | |||||
#if defined(HAVE_UNISTD_H) | |||||
#pragma GCC system_header // Silence "warning: #include_next is a GCC extension" | |||||
#include_next <unistd.h> | |||||
#endif | |||||
#endif |
#include "spect.h" | #include "spect.h" | ||||
#include <sys/stat.h> | #include <sys/stat.h> | ||||
#ifdef PLATFORM_POSIX | |||||
#include <unistd.h> | #include <unistd.h> | ||||
#endif | |||||
typedef struct { | typedef struct { | ||||
unsigned int value; | unsigned int value; |
#ifndef ESPEAK_COMMAND_H | #ifndef ESPEAK_COMMAND_H | ||||
#define ESPEAK_COMMAND_H | #define ESPEAK_COMMAND_H | ||||
#ifndef PLATFORM_WINDOWS | |||||
#include <unistd.h> | #include <unistd.h> | ||||
#endif | |||||
#ifdef __cplusplus | #ifdef __cplusplus | ||||
extern "C" | extern "C" |
#include "config.h" | #include "config.h" | ||||
#ifndef PLATFORM_WINDOWS | |||||
#include <unistd.h> | #include <unistd.h> | ||||
#endif | |||||
#include <assert.h> | #include <assert.h> | ||||
#include <string.h> | #include <string.h> | ||||
#include <stdlib.h> | #include <stdlib.h> |
#include "config.h" | #include "config.h" | ||||
#ifndef PLATFORM_WINDOWS | |||||
#include <unistd.h> | #include <unistd.h> | ||||
#endif | |||||
#include <assert.h> | #include <assert.h> | ||||
#include <string.h> | #include <string.h> | ||||
#include <stdlib.h> | #include <stdlib.h> |
#include "voice.h" | #include "voice.h" | ||||
#include "translate.h" | #include "translate.h" | ||||
#ifdef PLATFORM_POSIX | |||||
#include <unistd.h> | #include <unistd.h> | ||||
#endif | |||||
#include <locale.h> | #include <locale.h> | ||||
#define N_XML_BUF 500 | #define N_XML_BUF 500 |
#include "speech.h" | #include "speech.h" | ||||
#include <sys/stat.h> | #include <sys/stat.h> | ||||
#include <unistd.h> | |||||
#ifdef PLATFORM_WINDOWS | #ifdef PLATFORM_WINDOWS | ||||
#include <fcntl.h> | #include <fcntl.h> | ||||
#include <io.h> | #include <io.h> | ||||
#include <windows.h> | #include <windows.h> | ||||
#include <winreg.h> | #include <winreg.h> | ||||
#else /* PLATFORM_POSIX */ | |||||
#include <unistd.h> | |||||
#endif | #endif | ||||
#include "phoneme.h" | #include "phoneme.h" |
#ifdef PLATFORM_WINDOWS | #ifdef PLATFORM_WINDOWS | ||||
#include <windows.h> | #include <windows.h> | ||||
#else | |||||
#include <unistd.h> | |||||
#endif | #endif | ||||
#include <unistd.h> | |||||
#include "wave.h" | #include "wave.h" | ||||
#ifdef NEED_STRUCT_TIMESPEC | #ifdef NEED_STRUCT_TIMESPEC |
#include <time.h> | #include <time.h> | ||||
#include <pulse/pulseaudio.h> | #include <pulse/pulseaudio.h> | ||||
#include <pthread.h> | #include <pthread.h> | ||||
#ifndef PLATFORM_WINDOWS | |||||
#include <unistd.h> | #include <unistd.h> | ||||
#endif | |||||
#include "wave.h" | #include "wave.h" | ||||
enum { | enum { |
#include <io.h> | #include <io.h> | ||||
#include <windows.h> | #include <windows.h> | ||||
#include <winreg.h> | #include <winreg.h> | ||||
#else | |||||
#include <unistd.h> | |||||
#endif | #endif | ||||
#endif | #endif | ||||
#include <unistd.h> | |||||
#include <getopt.h> | #include <getopt.h> | ||||
#include <time.h> | #include <time.h> | ||||
#include <signal.h> | #include <signal.h> |