Deal with Microsofts attempt at deprecating C standard runtime functions for proprietary ones in Visual Studio 2005

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8847 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2006-02-19 22:16:56 +00:00
commit 6b6147f03b
11 changed files with 25 additions and 30 deletions

View file

@ -14,6 +14,13 @@
#ifndef _DOH_H #ifndef _DOH_H
#define _DOH_H #define _DOH_H
#ifndef MACSWIG
#include "swigconfig.h"
#endif
#include <stdio.h>
#include <stdarg.h>
/* Set the namespace prefix for DOH API functions. This can be used to control /* Set the namespace prefix for DOH API functions. This can be used to control
visibility of the functions in libraries */ visibility of the functions in libraries */
@ -131,9 +138,6 @@
#define DohNext DOH_NAMESPACE(Next) #define DohNext DOH_NAMESPACE(Next)
#endif #endif
#include <stdio.h>
#include <stdarg.h>
#define DOH_MAJOR_VERSION 0 #define DOH_MAJOR_VERSION 0
#define DOH_MINOR_VERSION 1 #define DOH_MINOR_VERSION 1

View file

@ -15,6 +15,8 @@
#ifndef _DOHINT_H #ifndef _DOHINT_H
#define _DOHINT_H #define _DOHINT_H
#include "doh.h"
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
@ -22,8 +24,6 @@
#include <ctype.h> #include <ctype.h>
#include <stdarg.h> #include <stdarg.h>
#include "doh.h"
/* Hash objects */ /* Hash objects */
typedef struct { typedef struct {
DOH *(*doh_getattr)(DOH *obj, DOH *name); /* Get attribute */ DOH *(*doh_getattr)(DOH *obj, DOH *name); /* Get attribute */

View file

@ -11,9 +11,9 @@
char cvsroot_allegrocl_cxx[] = "$Header$"; char cvsroot_allegrocl_cxx[] = "$Header$";
#include <ctype.h>
#include "swigmod.h" #include "swigmod.h"
#include "cparse.h" #include "cparse.h"
#include <ctype.h>
// #define ALLEGROCL_DEBUG // #define ALLEGROCL_DEBUG
// #define ALLEGROCL_WRAP_DEBUG // #define ALLEGROCL_WRAP_DEBUG

View file

@ -10,9 +10,9 @@
char cvsroot_cffi_cxx[] = "$Header$"; char cvsroot_cffi_cxx[] = "$Header$";
#include <ctype.h>
#include "swigmod.h" #include "swigmod.h"
#include "cparse.h" #include "cparse.h"
#include <ctype.h>
//#define CFFI_DEBUG //#define CFFI_DEBUG
class CFFI : public Language { class CFFI : public Language {

View file

@ -45,9 +45,6 @@
char cvsroot_lua_cxx[] = "$Header$"; char cvsroot_lua_cxx[] = "$Header$";
#include "swigmod.h" #include "swigmod.h"
#ifndef MACSWIG
#include "swigconfig.h"
#endif
/* NEW LANGUAGE NOTE:*********************************************** /* NEW LANGUAGE NOTE:***********************************************
most of the default options are handled by SWIG most of the default options are handled by SWIG

View file

@ -14,6 +14,8 @@
char cvsroot_main_cxx[] = "$Header$"; char cvsroot_main_cxx[] = "$Header$";
#include "swigconfig.h"
#if defined(_WIN32) #if defined(_WIN32)
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#include <windows.h> #include <windows.h>

View file

@ -124,12 +124,9 @@ char cvsroot_modula3_cxx[] =
- no exception can be raised in the body (empty RAISES) list - no exception can be raised in the body (empty RAISES) list
*/ */
#include <limits.h> // for INT_MAX
#include "swigmod.h" #include "swigmod.h"
#ifndef MACSWIG
#include "swigconfig.h" #include <limits.h> // for INT_MAX
#endif
// toupper, tolower, isalpha
#include <ctype.h> #include <ctype.h>
const char usageArgDir[] = const char usageArgDir[] =

View file

@ -22,8 +22,8 @@
char cvsroot_swigmain_cxx[] = "$Header$"; char cvsroot_swigmain_cxx[] = "$Header$";
#include <ctype.h>
#include "swigmod.h" #include "swigmod.h"
#include <ctype.h>
/* Module factories. These functions are used to instantiate /* Module factories. These functions are used to instantiate
the built-in language modules. If adding a new language the built-in language modules. If adding a new language

View file

@ -17,10 +17,6 @@
#ifndef SWIGMOD_H_ #ifndef SWIGMOD_H_
#define SWIGMOD_H_ #define SWIGMOD_H_
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "swig.h" #include "swig.h"
#include "preprocessor.h" #include "preprocessor.h"
#include "swigwarn.h" #include "swigwarn.h"

View file

@ -15,6 +15,10 @@
#ifndef SWIGCORE_H_ #ifndef SWIGCORE_H_
#define SWIGCORE_H_ #define SWIGCORE_H_
#ifndef MACSWIG
#include "swigconfig.h"
#endif
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
@ -22,13 +26,6 @@
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#if 0
} /* cc-mode*/
#endif
#endif
#ifndef MACSWIG
#include "swigconfig.h"
#endif #endif
#include "doh.h" #include "doh.h"
@ -560,9 +557,6 @@ extern void SwigType_template_init();
#ifdef __cplusplus #ifdef __cplusplus
#if 0
{ /* cc-mode*/
#endif
} }
#endif #endif

View file

@ -14,6 +14,11 @@ dnl Some extra defines for the config file
AH_BOTTOM([ AH_BOTTOM([
/* Default language */ /* Default language */
#define SWIG_LANG "-tcl" #define SWIG_LANG "-tcl"
/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
#if defined(_MSC_VER)
# define _CRT_SECURE_NO_DEPRECATE
#endif
]) ])
dnl Checks for programs. dnl Checks for programs.