Browse Source

windows: Visual Studio 2013 compatibility.

master
Reece H. Dunn 8 years ago
parent
commit
5118891f20
2 changed files with 51 additions and 1 deletions
  1. 10
    1
      README.md
  2. 41
    0
      src/include/compat/stdio.h

+ 10
- 1
README.md View File

@@ -56,7 +56,7 @@ support for this feature.

To build eSpeak NG on Windows, you will need:

1. a copy of Visual Studio 2015, such as the Community Edition;
1. a copy of Visual Studio 2013 or later, such as the Community Edition;
2. the Windows 8.1 SDK;
3. the [WiX installer](http://wixtoolset.org) plugin;
4. the [pcaudiolib](http://github.com/rhdunn/pcaudiolib) project checked out to
@@ -65,6 +65,15 @@ To build eSpeak NG on Windows, you will need:
You can then open and build the `src/windows/espeak-ng.sln` solution in Visual
Studio.

You can also use the Visual Studio tools to build espeak-ng with `msbuild` from
the `src/windows` directory:

msbuild espeak-ng.sln

If building with Visual Studio 2003, you need to use:

msbuild /p:PlatformToolset=v120 espeak-ng.sln

## Linux, Mac, BSD

### Dependencies

+ 41
- 0
src/include/compat/stdio.h View File

@@ -0,0 +1,41 @@
/* Compatibility shim for <stdio.h>
*
* Copyright (C) 2017 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 STDIO_H_COMPAT_SHIM
#define STDIO_H_COMPAT_SHIM

#ifdef _MSC_VER
#if _MSC_VER >= 1900 // Visual C++ 14 (Visual Studio 2015) and above...
#include <../ucrt/stdio.h>
#else
#include <../include/stdio.h>
#endif
#else
#pragma GCC system_header // Silence "warning: #include_next is a GCC extension"
#include_next <stdio.h>
#endif

#ifdef _MSC_VER

#ifndef snprintf
#define snprintf _snprintf
#endif

#endif

#endif

Loading…
Cancel
Save