Browse Source

Use HAVE_GETOPT_H for the getopt.h checks.

master
Reece H. Dunn 9 years ago
parent
commit
5ebd28e4bc
3 changed files with 8 additions and 8 deletions
  1. 5
    3
      src/espeak-ng.c
  2. 0
    2
      src/libespeak-ng/speech.h
  3. 3
    3
      src/speak-ng.c

+ 5
- 3
src/espeak-ng.c View File

* along with this program; if not, see: <http://www.gnu.org/licenses/>. * along with this program; if not, see: <http://www.gnu.org/licenses/>.
*/ */


#include "config.h"

#include <errno.h> #include <errno.h>
#include <stdbool.h> #include <stdbool.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <ctype.h> #include <ctype.h>
#ifndef NEED_GETOPT
#ifdef HAVE_GETOPT_H
#include <getopt.h> #include <getopt.h>
#endif #endif
#include <time.h> #include <time.h>
printf("eSpeak text-to-speech: %s Data at: %s\n", version, path_data); printf("eSpeak text-to-speech: %s Data at: %s\n", version, path_data);
} }


#ifdef NEED_GETOPT
#ifndef HAVE_GETOPT_H
struct option { struct option {
char *name; char *name;
int has_arg; int has_arg;
devicename[0] = 0; devicename[0] = 0;
option_punctlist[0] = 0; option_punctlist[0] = 0;


#ifdef NEED_GETOPT
#ifndef HAVE_GETOPT_H
optind = 1; optind = 1;
opt_string = ""; opt_string = "";
while (optind < argc) { while (optind < argc) {

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

#endif #endif


#ifdef __QNX__ #ifdef __QNX__
#define NEED_GETOPT
#define NO_VARIADIC_MACROS #define NO_VARIADIC_MACROS
#endif #endif




#define PLATFORM_WINDOWS #define PLATFORM_WINDOWS
#define PATHSEP '\\' #define PATHSEP '\\'
#define NEED_GETOPT
#define NO_VARIADIC_MACROS #define NO_VARIADIC_MACROS


#else #else

+ 3
- 3
src/speak-ng.c View File

#endif #endif
#endif #endif


#ifndef NEED_GETOPT
#ifdef HAVE_GETOPT_H
#include <getopt.h> #include <getopt.h>
#endif #endif
#include <time.h> #include <time.h>
return finished; return finished;
} }


#ifdef NEED_GETOPT
#ifndef HAVE_GETOPT_H
struct option { struct option {
char *name; char *name;
int has_arg; int has_arg;
option_multibyte = espeakCHARS_AUTO; option_multibyte = espeakCHARS_AUTO;
f_trans = stdout; f_trans = stdout;


#ifdef NEED_GETOPT
#ifndef HAVE_GETOPT_H
optind = 1; optind = 1;
opt_string = ""; opt_string = "";
while (optind < argc) { while (optind < argc) {

Loading…
Cancel
Save