aboutsummaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2006-02-19 22:16:56 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2006-02-19 22:16:56 +0000
commit6b6147f03beaa9bf3968ea6b5dabceb7ec0b7cff (patch)
tree1f661fd6fcfcf4e5bcf13cd52f01b610e35db921 /Source
parentf4428ffab0f1b88c3f9f230edf46554039a657f3 (diff)
downloadswig-6b6147f03beaa9bf3968ea6b5dabceb7ec0b7cff.tar.gz
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
Diffstat (limited to 'Source')
-rw-r--r--Source/DOH/doh.h10
-rw-r--r--Source/DOH/dohint.h4
-rw-r--r--Source/Modules/allegrocl.cxx2
-rw-r--r--Source/Modules/cffi.cxx2
-rw-r--r--Source/Modules/lua.cxx3
-rw-r--r--Source/Modules/main.cxx2
-rw-r--r--Source/Modules/modula3.cxx7
-rw-r--r--Source/Modules/swigmain.cxx2
-rw-r--r--Source/Modules/swigmod.h4
-rw-r--r--Source/Swig/swig.h14
10 files changed, 20 insertions, 30 deletions
diff --git a/Source/DOH/doh.h b/Source/DOH/doh.h
index af33933be..8a8c918f1 100644
--- a/Source/DOH/doh.h
+++ b/Source/DOH/doh.h
@@ -14,6 +14,13 @@
#ifndef _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
visibility of the functions in libraries */
@@ -131,9 +138,6 @@
#define DohNext DOH_NAMESPACE(Next)
#endif
-#include <stdio.h>
-#include <stdarg.h>
-
#define DOH_MAJOR_VERSION 0
#define DOH_MINOR_VERSION 1
diff --git a/Source/DOH/dohint.h b/Source/DOH/dohint.h
index 87cee1259..609491615 100644
--- a/Source/DOH/dohint.h
+++ b/Source/DOH/dohint.h
@@ -15,6 +15,8 @@
#ifndef _DOHINT_H
#define _DOHINT_H
+#include "doh.h"
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -22,8 +24,6 @@
#include <ctype.h>
#include <stdarg.h>
-#include "doh.h"
-
/* Hash objects */
typedef struct {
DOH *(*doh_getattr)(DOH *obj, DOH *name); /* Get attribute */
diff --git a/Source/Modules/allegrocl.cxx b/Source/Modules/allegrocl.cxx
index 818416b6b..61db4406f 100644
--- a/Source/Modules/allegrocl.cxx
+++ b/Source/Modules/allegrocl.cxx
@@ -11,9 +11,9 @@
char cvsroot_allegrocl_cxx[] = "$Header$";
-#include <ctype.h>
#include "swigmod.h"
#include "cparse.h"
+#include <ctype.h>
// #define ALLEGROCL_DEBUG
// #define ALLEGROCL_WRAP_DEBUG
diff --git a/Source/Modules/cffi.cxx b/Source/Modules/cffi.cxx
index c1a6b12b2..7c91f27de 100644
--- a/Source/Modules/cffi.cxx
+++ b/Source/Modules/cffi.cxx
@@ -10,9 +10,9 @@
char cvsroot_cffi_cxx[] = "$Header$";
-#include <ctype.h>
#include "swigmod.h"
#include "cparse.h"
+#include <ctype.h>
//#define CFFI_DEBUG
class CFFI : public Language {
diff --git a/Source/Modules/lua.cxx b/Source/Modules/lua.cxx
index 471865f91..b1c219139 100644
--- a/Source/Modules/lua.cxx
+++ b/Source/Modules/lua.cxx
@@ -45,9 +45,6 @@
char cvsroot_lua_cxx[] = "$Header$";
#include "swigmod.h"
-#ifndef MACSWIG
-#include "swigconfig.h"
-#endif
/* NEW LANGUAGE NOTE:***********************************************
most of the default options are handled by SWIG
diff --git a/Source/Modules/main.cxx b/Source/Modules/main.cxx
index 71ce29036..2b70444c9 100644
--- a/Source/Modules/main.cxx
+++ b/Source/Modules/main.cxx
@@ -14,6 +14,8 @@
char cvsroot_main_cxx[] = "$Header$";
+#include "swigconfig.h"
+
#if defined(_WIN32)
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
diff --git a/Source/Modules/modula3.cxx b/Source/Modules/modula3.cxx
index 10c1d197b..bdfb4ad4f 100644
--- a/Source/Modules/modula3.cxx
+++ b/Source/Modules/modula3.cxx
@@ -124,12 +124,9 @@ char cvsroot_modula3_cxx[] =
- no exception can be raised in the body (empty RAISES) list
*/
-#include <limits.h> // for INT_MAX
#include "swigmod.h"
-#ifndef MACSWIG
-#include "swigconfig.h"
-#endif
-// toupper, tolower, isalpha
+
+#include <limits.h> // for INT_MAX
#include <ctype.h>
const char usageArgDir[] =
diff --git a/Source/Modules/swigmain.cxx b/Source/Modules/swigmain.cxx
index f9ea4177c..f8d8ae865 100644
--- a/Source/Modules/swigmain.cxx
+++ b/Source/Modules/swigmain.cxx
@@ -22,8 +22,8 @@
char cvsroot_swigmain_cxx[] = "$Header$";
-#include <ctype.h>
#include "swigmod.h"
+#include <ctype.h>
/* Module factories. These functions are used to instantiate
the built-in language modules. If adding a new language
diff --git a/Source/Modules/swigmod.h b/Source/Modules/swigmod.h
index 182aa01e6..3bacc1c34 100644
--- a/Source/Modules/swigmod.h
+++ b/Source/Modules/swigmod.h
@@ -17,10 +17,6 @@
#ifndef SWIGMOD_H_
#define SWIGMOD_H_
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-
#include "swig.h"
#include "preprocessor.h"
#include "swigwarn.h"
diff --git a/Source/Swig/swig.h b/Source/Swig/swig.h
index f7b44c678..c63f424d2 100644
--- a/Source/Swig/swig.h
+++ b/Source/Swig/swig.h
@@ -15,6 +15,10 @@
#ifndef SWIGCORE_H_
#define SWIGCORE_H_
+#ifndef MACSWIG
+#include "swigconfig.h"
+#endif
+
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -22,13 +26,6 @@
#ifdef __cplusplus
extern "C" {
-#if 0
-} /* cc-mode*/
-#endif
-#endif
-
-#ifndef MACSWIG
-#include "swigconfig.h"
#endif
#include "doh.h"
@@ -560,9 +557,6 @@ extern void SwigType_template_init();
#ifdef __cplusplus
-#if 0
-{ /* cc-mode*/
-#endif
}
#endif