Preparing for linking with C++ code, from Scott A. Colcord.
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3663 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -79,12 +79,24 @@
|
||||
|
||||
|
||||
#ifndef HAVE_STRUPR
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
char *strupr (char *str);
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined (_MSC_VER) && !defined (HAVE_READDIR_R)
|
||||
# include <dirent.h>
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Directories
|
||||
@@ -161,10 +173,21 @@ typedef unsigned short mode_t;
|
||||
#ifdef _MSC_VER
|
||||
# include <stdarg.h>
|
||||
// Defined in port.c
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
int snprintf(char *str, size_t size, const char *format, ...);
|
||||
int vsnprintf(char *str, size_t size, const char *format, va_list args);
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// setenv()
|
||||
#ifndef HAVE_SETENV
|
||||
int setenv (const char *name, const char *value, int overwrite);
|
||||
@@ -178,6 +201,10 @@ typedef unsigned short wchar_t;
|
||||
typedef unsigned int wint_t;
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined (_MSC_VER) || defined(__MINGW32__)
|
||||
# define USE_WINSOCK
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user