Browse Source

Create an initial compatibility shim for unistd.h.

master
Reece H. Dunn 9 years ago
parent
commit
9c5820f72a

+ 27
- 0
src/include/compat/unistd.h View File

@@ -0,0 +1,27 @@
/* 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

+ 0
- 2
src/libespeak-ng/compiledata.c View File

@@ -39,9 +39,7 @@
#include "spect.h"

#include <sys/stat.h>
#ifdef PLATFORM_POSIX
#include <unistd.h>
#endif

typedef struct {
unsigned int value;

+ 0
- 2
src/libespeak-ng/espeak_command.h View File

@@ -19,9 +19,7 @@
#ifndef ESPEAK_COMMAND_H
#define ESPEAK_COMMAND_H

#ifndef PLATFORM_WINDOWS
#include <unistd.h>
#endif

#ifdef __cplusplus
extern "C"

+ 0
- 2
src/libespeak-ng/event.c View File

@@ -20,9 +20,7 @@

#include "config.h"

#ifndef PLATFORM_WINDOWS
#include <unistd.h>
#endif
#include <assert.h>
#include <string.h>
#include <stdlib.h>

+ 0
- 2
src/libespeak-ng/fifo.c View File

@@ -20,9 +20,7 @@

#include "config.h"

#ifndef PLATFORM_WINDOWS
#include <unistd.h>
#endif
#include <assert.h>
#include <string.h>
#include <stdlib.h>

+ 0
- 2
src/libespeak-ng/readclause.c View File

@@ -37,9 +37,7 @@
#include "voice.h"
#include "translate.h"

#ifdef PLATFORM_POSIX
#include <unistd.h>
#endif

#include <locale.h>
#define N_XML_BUF 500

+ 1
- 2
src/libespeak-ng/speech.c View File

@@ -35,13 +35,12 @@
#include "speech.h"

#include <sys/stat.h>
#include <unistd.h>
#ifdef PLATFORM_WINDOWS
#include <fcntl.h>
#include <io.h>
#include <windows.h>
#include <winreg.h>
#else /* PLATFORM_POSIX */
#include <unistd.h>
#endif

#include "phoneme.h"

+ 1
- 2
src/libespeak-ng/wave.c View File

@@ -34,9 +34,8 @@

#ifdef PLATFORM_WINDOWS
#include <windows.h>
#else
#include <unistd.h>
#endif
#include <unistd.h>
#include "wave.h"

#ifdef NEED_STRUCT_TIMESPEC

+ 1
- 3
src/libespeak-ng/wave_pulse.c View File

@@ -40,10 +40,8 @@
#include <time.h>
#include <pulse/pulseaudio.h>
#include <pthread.h>

#ifndef PLATFORM_WINDOWS
#include <unistd.h>
#endif

#include "wave.h"

enum {

+ 1
- 2
src/speak-ng.c View File

@@ -35,11 +35,10 @@
#include <io.h>
#include <windows.h>
#include <winreg.h>
#else
#include <unistd.h>
#endif
#endif

#include <unistd.h>
#include <getopt.h>
#include <time.h>
#include <signal.h>

Loading…
Cancel
Save