diff --git a/src/fgt/io_x3d/vrml/Scanner.frame b/src/fgt/io_x3d/vrml/Scanner.frame index 194a12ecd..d69c77933 100644 --- a/src/fgt/io_x3d/vrml/Scanner.frame +++ b/src/fgt/io_x3d/vrml/Scanner.frame @@ -51,6 +51,9 @@ Coco/R itself) does not fall under the GNU General Public License. /**************************************************************************** History $Log$ + Revision 1.2 2008/02/22 17:58:42 cignoni + New version of coco_swprintf that supports also mingw compiler + Revision 1.1 2008/02/20 22:02:00 gianpaolopalma First working version of Vrml to X3D translator @@ -70,15 +73,32 @@ Coco/R itself) does not fall under the GNU General Public License. #include #endif -#if _MSC_VER >= 1400 -#define coco_swprintf swprintf_s -#elif _MSC_VER >= 1300 -#define coco_swprintf _snwprintf -#elif defined __GNUC__ -#define coco_swprintf swprintf -#else -#error unknown compiler! -#endif +//#if _MSC_VER >= 1400 +//#define coco_swprintf swprintf_s +//#elif _MSC_VER >= 1300 +//#define coco_swprintf _snwprintf +//#elif defined __GNUC__ +//#define coco_swprintf swprintf +//#else +//#error unknown compiler! +//#endif + +#ifdef WIN32 + #ifndef __MINGW32__ + #if _MSC_VER >= 1400 + #define coco_swprintf swprintf_s + #elif _MSC_VER >= 1300 + #define coco_swprintf _snwprintf + #else + #error unknown compiler! + #endif + #else + #define coco_swprintf _snwprintf + #endif +#elif defined __GNUC__ // Linux + #define coco_swprintf swprintf +#endif + #define COCO_WCHAR_MAX 65535 #define MIN_BUFFER_LENGTH 1024 @@ -362,6 +382,9 @@ Coco/R itself) does not fall under the GNU General Public License. /**************************************************************************** History $Log$ + Revision 1.2 2008/02/22 17:58:42 cignoni + New version of coco_swprintf that supports also mingw compiler + Revision 1.1 2008/02/20 22:02:00 gianpaolopalma First working version of Vrml to X3D translator diff --git a/src/fgt/io_x3d/vrml/Scanner.h b/src/fgt/io_x3d/vrml/Scanner.h index 60502321a..1f643be94 100644 --- a/src/fgt/io_x3d/vrml/Scanner.h +++ b/src/fgt/io_x3d/vrml/Scanner.h @@ -24,6 +24,9 @@ /**************************************************************************** History $Log$ + Revision 1.3 2008/02/22 17:58:42 cignoni + New version of coco_swprintf that supports also mingw compiler + Revision 1.2 2008/02/21 13:04:10 gianpaolopalma Fixed compile error @@ -46,15 +49,21 @@ #include #endif -#if _MSC_VER >= 1400 -#define coco_swprintf swprintf_s -#elif _MSC_VER >= 1300 -#define coco_swprintf _snwprintf -#elif defined __GNUC__ -#define coco_swprintf swprintf -#else -#error unknown compiler! -#endif +#ifdef WIN32 + #ifndef __MINGW32__ + #if _MSC_VER >= 1400 + #define coco_swprintf swprintf_s + #elif _MSC_VER >= 1300 + #define coco_swprintf _snwprintf + #else + #error unknown compiler! + #endif + #else + #define coco_swprintf _snwprintf + #endif +#elif defined __GNUC__ // Linux + #define coco_swprintf swprintf +#endif #define COCO_WCHAR_MAX 65535 #define MIN_BUFFER_LENGTH 1024