Only in ros_6.1_patched/adm/make/TKjcas: Makefile
Only in ros_6.1_patched: build_script_for_gmsh.sh
diff -r -u ros_6.1_original/inc/AppCont_ContMatrices.hxx ros_6.1_patched/inc/AppCont_ContMatrices.hxx
--- ros_6.1_original/inc/AppCont_ContMatrices.hxx	2007-01-30 23:27:25.000000000 +0100
+++ ros_6.1_patched/inc/AppCont_ContMatrices.hxx	2007-01-31 00:03:39.000000000 +0100
@@ -4,7 +4,7 @@
 #include <Standard_Real.hxx>
 
 //#ifndef __AppCont_API
-//# ifdef WNT
+//#if defined(WNT) && !defined(HAVE_NO_DLL)
 //#  ifdef __AppCont_DLL
 //#   define __AppCont_API __declspec( dllexport )
 //#  else
diff -r -u ros_6.1_original/inc/ApproxF2var.h ros_6.1_patched/inc/ApproxF2var.h
--- ros_6.1_original/inc/ApproxF2var.h	2007-01-30 23:27:25.000000000 +0100
+++ ros_6.1_patched/inc/ApproxF2var.h	2007-02-02 08:36:27.000000000 +0100
@@ -4,13 +4,16 @@
 |  a utiliser dans AdvApp2Var
 |--------------------------------------------------------------*/
 
-
+#ifndef F2CTYPE_DEFINED
 typedef int integer;
 typedef double doublereal;
+#define  F2CTYPE_DEFINED
+#endif
+
 #define Ma2fnc mma2fnc_
 
 /*#ifndef __ApproxF2var_API
-# ifdef WNT
+#if defined(WNT) && !defined(HAVE_NO_DLL)
 #  ifdef __ApproxF2var_DLL
 #   define __ApproxF2var_API __declspec( dllexport )
 #  else
diff -r -u ros_6.1_original/inc/DBC_BaseArray_objs.hxx ros_6.1_patched/inc/DBC_BaseArray_objs.hxx
--- ros_6.1_original/inc/DBC_BaseArray_objs.hxx	2007-01-30 23:27:32.000000000 +0100
+++ ros_6.1_patched/inc/DBC_BaseArray_objs.hxx	2007-01-31 00:03:16.000000000 +0100
@@ -39,7 +39,7 @@
 
 
 #ifndef Standard_EXPORT
-#ifdef WNT
+#if defined(WNT) && !defined(HAVE_NO_DLL)
 #define Standard_EXPORT __declspec(dllexport)
 #else
 #define Standard_EXPORT
diff -r -u ros_6.1_original/inc/Data_Data.h ros_6.1_patched/inc/Data_Data.h
--- ros_6.1_original/inc/Data_Data.h	2007-01-30 23:27:23.000000000 +0100
+++ ros_6.1_patched/inc/Data_Data.h	2007-01-31 00:04:29.000000000 +0100
@@ -1,7 +1,7 @@
 #ifndef DATA__ISUSED
 #define DATA__ISUSED USED
 #ifndef __Data_API
-# ifdef WNT
+# if defined(WNT) && !defined(HAVE_NO_DLL)
 #  ifdef __Data_DLL
 #   define __Data_API __declspec( dllexport )
 #  else
diff -r -u ros_6.1_original/inc/Draw_Appli.hxx ros_6.1_patched/inc/Draw_Appli.hxx
--- ros_6.1_original/inc/Draw_Appli.hxx	2007-01-30 23:27:39.000000000 +0100
+++ ros_6.1_patched/inc/Draw_Appli.hxx	2007-01-31 00:04:44.000000000 +0100
@@ -30,7 +30,7 @@
 
 
 
-#ifdef WNT
+#if defined(WNT) && !defined(HAVE_NO_DLL)
 #ifndef __Draw_API
 # ifdef __Draw_DLL
 #  define __Draw_API __declspec ( dllexport )
diff -r -u ros_6.1_original/inc/Draw_Viewer.hxx ros_6.1_patched/inc/Draw_Viewer.hxx
--- ros_6.1_original/inc/Draw_Viewer.hxx	2007-01-30 23:27:39.000000000 +0100
+++ ros_6.1_patched/inc/Draw_Viewer.hxx	2007-01-31 00:06:20.000000000 +0100
@@ -21,7 +21,7 @@
 
 #ifdef WNT
 #include <windows.h>
-#ifndef __Draw_API
+#if !defined(__Draw_API) && !defined(HAVE_NO_DLL)
 # ifdef __Draw_DLL
 #  define __Draw_API __declspec( dllexport )
 # else
diff -r -u ros_6.1_original/inc/Draw_Window.hxx ros_6.1_patched/inc/Draw_Window.hxx
--- ros_6.1_original/inc/Draw_Window.hxx	2007-01-30 23:27:39.000000000 +0100
+++ ros_6.1_patched/inc/Draw_Window.hxx	2007-01-31 00:06:37.000000000 +0100
@@ -178,7 +178,7 @@
 #define DRAWTITLE "Draw View"
 #define MAXCOLOR  15
 
-#ifndef __Draw_API
+#if !defined(__Draw_API) && !defined(HAVE_NO_DLL)
 # ifdef __Draw_DLL
 #  define __Draw_API __declspec( dllexport )
 # else
diff -r -u ros_6.1_original/inc/Expr_Operators.hxx ros_6.1_patched/inc/Expr_Operators.hxx
--- ros_6.1_original/inc/Expr_Operators.hxx	2007-01-30 23:27:23.000000000 +0100
+++ ros_6.1_patched/inc/Expr_Operators.hxx	2007-01-31 00:07:07.000000000 +0100
@@ -17,7 +17,7 @@
 #include <Expr_Division.hxx>
 
 #ifndef __Expr_API
-# ifdef WNT
+# if defined(WNT) && !defined(HAVE_NO_DLL)
 #  ifdef __Expr_DLL
 #   define __Expr_API __declspec( dllexport )
 #  else
diff -r -u ros_6.1_original/inc/IncludeLibrary_NTD_interface.h ros_6.1_patched/inc/IncludeLibrary_NTD_interface.h
--- ros_6.1_original/inc/IncludeLibrary_NTD_interface.h	2007-01-30 23:27:23.000000000 +0100
+++ ros_6.1_patched/inc/IncludeLibrary_NTD_interface.h	2007-01-31 00:07:51.000000000 +0100
@@ -5,7 +5,7 @@
 # include <dl.h>
 #endif
 
-#ifdef WNT
+#if defined(WNT) && !defined(HAVE_NO_DLL)
 # ifndef __NTD_API
 #  if defined(__NTD_DLL)
 #   define __NTD_API __declspec( dllexport )
diff -r -u ros_6.1_original/inc/IncludeLibrary_server_interface.h ros_6.1_patched/inc/IncludeLibrary_server_interface.h
--- ros_6.1_original/inc/IncludeLibrary_server_interface.h	2007-01-30 23:27:23.000000000 +0100
+++ ros_6.1_patched/inc/IncludeLibrary_server_interface.h	2007-01-31 00:08:27.000000000 +0100
@@ -9,7 +9,7 @@
 # include <IncludeLibrary_typedef.h>
 # endif
 
-# ifdef WNT
+# if defined(WNT) && !defined(HAVE_NO_DLL)
 #  ifndef __server_API
 #   if defined(__Serpc_DLL) || defined(__Server_DLL)
 #    define __server_API __declspec( dllexport )
diff -r -u ros_6.1_original/inc/MathBase.h ros_6.1_patched/inc/MathBase.h
--- ros_6.1_original/inc/MathBase.h	2007-01-30 23:27:23.000000000 +0100
+++ ros_6.1_patched/inc/MathBase.h	2007-01-31 00:09:27.000000000 +0100
@@ -5,7 +5,7 @@
 #endif
 
 #ifndef __MathBase_API
-# ifdef WNT
+# if defined(WNT) && !defined(HAVE_NO_DLL)
 #  ifdef __MathBase_DLL
 #   define __MathBase_API __declspec( dllexport )
 #  else
diff -r -u ros_6.1_original/inc/OSD_WNT.hxx ros_6.1_patched/inc/OSD_WNT.hxx
--- ros_6.1_original/inc/OSD_WNT.hxx	2007-01-30 23:27:23.000000000 +0100
+++ ros_6.1_patched/inc/OSD_WNT.hxx	2007-01-31 00:12:01.000000000 +0100
@@ -4,11 +4,15 @@
 #include <Standard_Stream.hxx>
 
 # ifndef OSDAPI
-#  ifdef __OSD_DLL
-#   define OSDAPI __declspec( dllexport )
+#  if !defined(HAVE_NO_DLL)
+#   ifdef __OSD_DLL
+#    define OSDAPI __declspec( dllexport )
+#   else
+#    define OSDAPI __declspec( dllimport )
+#   endif  // __OSD_DLL
 #  else
-#   define OSDAPI __declspec( dllimport )
-#  endif  // __OSD_DLL
+#   define OSDAPI
+#  endif
 # endif  // OSDAPI
 
 void     OSDAPI SetErrorStream ( ostream* );
diff -r -u ros_6.1_original/inc/OSD_WNT_1.hxx ros_6.1_patched/inc/OSD_WNT_1.hxx
--- ros_6.1_original/inc/OSD_WNT_1.hxx	2007-01-30 23:27:23.000000000 +0100
+++ ros_6.1_patched/inc/OSD_WNT_1.hxx	2007-02-01 07:37:21.000000000 +0100
@@ -14,13 +14,21 @@
 # endif  /* _INC_TCHAR */
 
 # ifndef OSDAPI
-#  ifdef __OSD_DLL
-#   define OSDAPI __declspec( dllexport )
+#  if !defined(HAVE_NO_DLL)
+#   ifdef __OSD_DLL
+#    define OSDAPI __declspec( dllexport )
+#   else
+#    define OSDAPI __declspec( dllimport )
+#   endif  /* OSD_DLL */
 #  else
-#   define OSDAPI __declspec( dllimport )
-#  endif  /* OSD_DLL */
+#   define OSDAPI
+#  endif
 # endif  /* OSDAPI */
 
+#if defined(__CYGWIN32__) || defined(__MINGW32__)
+#define _TINT int
+#endif
+
 # ifdef __cplusplus
 extern "C" {
 # endif  /* __cplusplus */
diff -r -u ros_6.1_original/inc/OpenGl_Extension.h ros_6.1_patched/inc/OpenGl_Extension.h
--- ros_6.1_original/inc/OpenGl_Extension.h	2007-01-30 23:27:31.000000000 +0100
+++ ros_6.1_patched/inc/OpenGl_Extension.h	2007-01-31 00:12:35.000000000 +0100
@@ -36,7 +36,7 @@
  * Includes
  */
 
-#ifdef WNT
+#if defined(WNT) && !defined(HAVE_NO_DLL)
 # ifdef __OpenGl_DLL
 #  define EXPORT __declspec(dllexport)
 # else
diff -r -u ros_6.1_original/inc/OpenGl_tgl.h ros_6.1_patched/inc/OpenGl_tgl.h
--- ros_6.1_original/inc/OpenGl_tgl.h	2007-01-30 23:27:31.000000000 +0100
+++ ros_6.1_patched/inc/OpenGl_tgl.h	2007-01-31 00:13:01.000000000 +0100
@@ -28,7 +28,7 @@
  */
 
 #ifndef EXPORT
-# ifdef WNT
+# if defined(WNT) && !defined(HAVE_NO_DLL)
 #  ifdef __OpenGl_DLL
 #   define EXPORT __declspec( dllexport )
 #  else
diff -r -u ros_6.1_original/inc/OpenGl_tgl_all.h ros_6.1_patched/inc/OpenGl_tgl_all.h
--- ros_6.1_original/inc/OpenGl_tgl_all.h	2007-01-30 23:27:31.000000000 +0100
+++ ros_6.1_patched/inc/OpenGl_tgl_all.h	2007-01-31 00:13:16.000000000 +0100
@@ -26,7 +26,7 @@
 # undef EXPORT
 #endif  /* EXPORT */
 
-#ifdef WNT
+#if defined(WNT) && !defined(HAVE_NO_DLL)
 # ifdef __OpenGl_DLL
 #  define EXPORT __declspec(dllexport)
 # else
diff -r -u ros_6.1_original/inc/Quantity_Convert.lxx ros_6.1_patched/inc/Quantity_Convert.lxx
--- ros_6.1_original/inc/Quantity_Convert.lxx	2007-01-30 23:27:24.000000000 +0100
+++ ros_6.1_patched/inc/Quantity_Convert.lxx	2007-01-31 00:13:54.000000000 +0100
@@ -8,7 +8,7 @@
 
 
 #ifndef __Quantity_API
-# ifdef WNT
+# if defined(WNT) && !defined(HAVE_NO_DLL)
 #  ifdef __Quantity_DLL
 #   define __Quantity_API __declspec( dllexport )
 #  else
diff -r -u ros_6.1_original/inc/Smoothing.h ros_6.1_patched/inc/Smoothing.h
--- ros_6.1_original/inc/Smoothing.h	2007-01-30 23:27:23.000000000 +0100
+++ ros_6.1_patched/inc/Smoothing.h	2007-01-31 00:14:21.000000000 +0100
@@ -12,7 +12,7 @@
 #endif
 
 #ifndef __Smoothing_API
-# ifdef WNT
+# if defined(WNT) && !defined(HAVE_NO_DLL)
 #  ifdef __Smoothing_DLL
 #   define __Smoothing_API __declspec( dllexport )
 #  else
diff -r -u ros_6.1_original/inc/Standard_Macro.hxx ros_6.1_patched/inc/Standard_Macro.hxx
--- ros_6.1_original/inc/Standard_Macro.hxx	2007-01-30 23:27:24.000000000 +0100
+++ ros_6.1_patched/inc/Standard_Macro.hxx	2007-01-31 00:14:38.000000000 +0100
@@ -6,7 +6,7 @@
 
 # define   STANDARD_TYPE(aType)   aType##_Type_()
 
-# ifdef WNT
+# if defined(WNT) && !defined(HAVE_NO_DLL)
 
 #  ifndef Standard_EXPORT
 #   define Standard_EXPORT __declspec( dllexport )
diff -r -u ros_6.1_original/inc/Standard_Real.hxx ros_6.1_patched/inc/Standard_Real.hxx
--- ros_6.1_original/inc/Standard_Real.hxx	2007-01-30 23:27:24.000000000 +0100
+++ ros_6.1_patched/inc/Standard_Real.hxx	2007-01-31 23:47:29.000000000 +0100
@@ -24,7 +24,7 @@
 #undef PI
 #endif 
 
-#ifdef WNT
+#if defined(WNT) && !defined(__CYGWIN32__) && !defined(__MINGW32__)
 extern "C" __Standard_API Standard_Real PI;
 extern "C" __Standard_API Standard_Real PI180;
 extern "C" __Standard_API Standard_Real Standard_PI;
diff -r -u ros_6.1_original/inc/SysBase.h ros_6.1_patched/inc/SysBase.h
--- ros_6.1_original/inc/SysBase.h	2007-01-30 23:27:23.000000000 +0100
+++ ros_6.1_patched/inc/SysBase.h	2007-01-31 00:14:57.000000000 +0100
@@ -2,7 +2,7 @@
 #define Macinit macinit_
 
 #ifndef __SysBase_API
-# ifdef WNT
+# if defined(WNT) && !defined(HAVE_NO_DLL)
 #  ifdef __SysBase_DLL
 #   define __SysBase_API __declspec( dllexport )
 #  else
diff -r -u ros_6.1_original/inc/WNT.h ros_6.1_patched/inc/WNT.h
--- ros_6.1_original/inc/WNT.h	2007-01-30 23:27:32.000000000 +0100
+++ ros_6.1_patched/inc/WNT.h	2007-01-31 00:16:02.000000000 +0100
@@ -6,11 +6,15 @@
 # endif  /* __cplusplus */
 
 # ifndef __WNT_API
-#  ifdef __WNT_DLL
-#   define __WNT_API __declspec( dllexport )
+#  if !defined(HAVE_NO_DLL)
+#   ifdef __WNT_DLL
+#    define __WNT_API __declspec( dllexport )
+#   else
+#    define __WNT_API __declspec( dllimport )
+#   endif  /* __WNT_DLL */
 #  else
-#   define __WNT_API __declspec( dllimport )
-#  endif  /* __WNT_DLL */
+#   define __WNT_API
+#  endif
 # endif  /* __WNT_API */
 
 __WNT_API int WNT_SysPalInUse ( void );
diff -r -u ros_6.1_original/inc/WOKNT_regexp.h ros_6.1_patched/inc/WOKNT_regexp.h
--- ros_6.1_original/inc/WOKNT_regexp.h	2007-01-30 23:27:41.000000000 +0100
+++ ros_6.1_patched/inc/WOKNT_regexp.h	2007-01-31 00:17:21.000000000 +0100
@@ -28,11 +28,15 @@
 #   include <string.h>
 #  endif  /* _INC_STRING */
 /***/
-#  ifdef __WOKNT_DLL
-#   define REGEXP_API __declspec( dllexport )
+#  if !defined(HAVE_NO_DLL)
+#   ifdef __WOKNT_DLL
+#    define REGEXP_API __declspec( dllexport )
+#   else
+#    define REGEXP_API __declspec( dllimport )
+#   endif  /* __WOKNT_DLL */
 #  else
-#   define REGEXP_API __declspec( dllimport )
-#  endif  /* __OSD_DLL */
+#   define REGEXP_API
+#  endif
 # else
 #  define _TEXT( arg ) arg
 #  define REGEXP_API
diff -r -u ros_6.1_original/inc/WOKTclTools_Messages.hxx ros_6.1_patched/inc/WOKTclTools_Messages.hxx
--- ros_6.1_original/inc/WOKTclTools_Messages.hxx	2007-01-30 23:27:41.000000000 +0100
+++ ros_6.1_patched/inc/WOKTclTools_Messages.hxx	2007-01-31 00:18:00.000000000 +0100
@@ -10,7 +10,7 @@
 #include <WOKTclTools_Interpretor.hxx>
 
 #ifndef __WOKTCLTOOLS_API
-# ifdef WNT
+# if defined(WNT) && !defined(HAVE_NO_DLL)
 #  ifdef __WOKTclTools_DLL
 #   define __WOKTCLTOOLS_API __declspec( dllexport )
 #  else
diff -r -u ros_6.1_original/inc/WOKTools_Messages.hxx ros_6.1_patched/inc/WOKTools_Messages.hxx
--- ros_6.1_original/inc/WOKTools_Messages.hxx	2007-01-30 23:27:41.000000000 +0100
+++ ros_6.1_patched/inc/WOKTools_Messages.hxx	2007-01-31 00:18:17.000000000 +0100
@@ -12,7 +12,7 @@
 #include <WOKTools_Verbose.hxx>
 
 #ifndef __WOKTools_API
-# ifdef WNT
+# if defined(WNT) && !defined(HAVE_NO_DLL)
 #  ifdef __WOKTools_DLL
 #   define __WOKTools_API __declspec( dllexport )
 #  else
diff -r -u ros_6.1_original/inc/WOKUnix_regexp.h ros_6.1_patched/inc/WOKUnix_regexp.h
--- ros_6.1_original/inc/WOKUnix_regexp.h	2007-01-30 23:27:41.000000000 +0100
+++ ros_6.1_patched/inc/WOKUnix_regexp.h	2007-01-31 00:19:27.000000000 +0100
@@ -28,11 +28,15 @@
 #   include <string.h>
 #  endif  /* _INC_STRING */
 /***/
-#  ifdef __WOKUnix_DLL
-#   define REGEXP_API __declspec( dllexport )
+#  if !defined(HAVE_NO_DLL)
+#   ifdef __WOKUnix_DLL
+#    define REGEXP_API __declspec( dllexport )
+#   else
+#    define REGEXP_API __declspec( dllimport )
+#   endif  /* __WOKUnix_DLL */
 #  else
-#   define REGEXP_API __declspec( dllimport )
-#  endif  /* __OSD_DLL */
+#   define REGEXP_API
+#  endif
 # else
 #  define _TEXT( arg ) arg
 #  define REGEXP_API
diff -r -u ros_6.1_original/inc/WOKUtils_Triggers.hxx ros_6.1_patched/inc/WOKUtils_Triggers.hxx
--- ros_6.1_original/inc/WOKUtils_Triggers.hxx	2007-01-30 23:27:41.000000000 +0100
+++ ros_6.1_patched/inc/WOKUtils_Triggers.hxx	2007-01-31 00:19:50.000000000 +0100
@@ -10,7 +10,7 @@
 #include <WOKUtils_Trigger.hxx>
 
 #ifndef __WOKUTILS_API
-# ifdef WNT
+# if defined(WNT) && !defined(HAVE_NO_DLL)
 #  ifdef __WOKUtils_DLL
 #   define __WOKUTILS_API __declspec( dllexport )
 #  else
diff -r -u ros_6.1_original/inc/math_Recipes.hxx ros_6.1_patched/inc/math_Recipes.hxx
--- ros_6.1_original/inc/math_Recipes.hxx	2007-01-30 23:27:25.000000000 +0100
+++ ros_6.1_patched/inc/math_Recipes.hxx	2007-01-31 00:01:02.000000000 +0100
@@ -6,7 +6,7 @@
 #include <Standard_Real.hxx>
 
 #ifndef __math_API
-# ifdef WNT
+# if defined(WNT) && !defined(HAVE_NO_DLL)
 #  ifdef __math_DLL
 #   define __math_API __declspec( dllexport )
 #  else
diff -r -u ros_6.1_original/inc/triangle.h ros_6.1_patched/inc/triangle.h
--- ros_6.1_original/inc/triangle.h	2007-01-30 23:27:26.000000000 +0100
+++ ros_6.1_patched/inc/triangle.h	2007-01-31 00:04:05.000000000 +0100
@@ -274,7 +274,7 @@
   int numberofedges;                                             /* Out only */
 };
 
-#if defined(WNT) && defined(__Triangle_DLL)
+#if defined(WNT) && defined(__Triangle_DLL) && !defined(HAVE_NO_DLL)
 #define TRIANGLE_API __declspec( dllexport )
 #else
 #define TRIANGLE_API
diff -r -u ros_6.1_original/src/AppBlend/AppBlend_Debug.cxx ros_6.1_patched/src/AppBlend/AppBlend_Debug.cxx
--- ros_6.1_original/src/AppBlend/AppBlend_Debug.cxx	2007-01-30 23:28:08.000000000 +0100
+++ ros_6.1_patched/src/AppBlend/AppBlend_Debug.cxx	2007-02-01 07:59:01.000000000 +0100
@@ -7,7 +7,7 @@
 #include <Standard_Boolean.hxx>
 
 #ifndef __AppBlend_API
-# ifdef WNT
+# if defined(WNT) && !defined(HAVE_NO_DLL)
 #  ifdef __AppBlend_DLL
 #   define __AppBlend_API __declspec( dllexport )
 #  else
diff -r -u ros_6.1_original/src/ApproxF2var/MA2DS1.c ros_6.1_patched/src/ApproxF2var/MA2DS1.c
--- ros_6.1_original/src/ApproxF2var/MA2DS1.c	2007-01-30 23:28:06.000000000 +0100
+++ ros_6.1_patched/src/ApproxF2var/MA2DS1.c	2007-02-02 08:46:58.000000000 +0100
@@ -4,7 +4,7 @@
 */
 
 #include "Data_f2c.h"
-#ifdef WNT
+#if defined(WNT) && !defined(__CYGWIN32__) && !defined(__MINGW32__)
 #include <ApproxF2var.h>
 #endif 
 /* Subroutine */ int mma2ds1_(ndimen, uintfn, vintfn, foncnp, nbpntu, nbpntv, 
diff -r -u ros_6.1_original/src/ApproxF2var/MA2FNC.c ros_6.1_patched/src/ApproxF2var/MA2FNC.c
--- ros_6.1_original/src/ApproxF2var/MA2FNC.c	2007-01-30 23:28:06.000000000 +0100
+++ ros_6.1_patched/src/ApproxF2var/MA2FNC.c	2007-02-02 08:49:13.000000000 +0100
@@ -4,7 +4,7 @@
 */
 
 #include "Data_f2c.h"
-#ifdef WNT
+#if defined(WNT) && !defined(__CYGWIN32__) && !defined(__MINGW32__)
 #include <ApproxF2var.h>
 #endif 
 /* Table of constant values */
diff -r -u ros_6.1_original/src/Blend/Blend_Debug.cxx ros_6.1_patched/src/Blend/Blend_Debug.cxx
--- ros_6.1_original/src/Blend/Blend_Debug.cxx	2007-01-30 23:28:09.000000000 +0100
+++ ros_6.1_patched/src/Blend/Blend_Debug.cxx	2007-02-01 07:59:43.000000000 +0100
@@ -7,7 +7,7 @@
 #include <Standard_Boolean.hxx>
 
 #ifndef __Blend_API
-# ifdef WNT
+# if defined(WNT) && !defined(HAVE_NO_DLL)
 #  ifdef __Blend_DLL
 #   define __Blend_API __declspec( dllexport )
 #  else
diff -r -u ros_6.1_original/src/OSD/OSD.cxx ros_6.1_patched/src/OSD/OSD.cxx
--- ros_6.1_original/src/OSD/OSD.cxx	2007-01-30 23:28:05.000000000 +0100
+++ ros_6.1_patched/src/OSD/OSD.cxx	2007-02-01 07:29:49.000000000 +0100
@@ -88,7 +88,9 @@
 
 #ifdef WNT
 # include <Windows.h>
+#if !defined(__CYGWIN32__) && !defined(__MINGW32__)
 # include <Mapiwin.h>
+#endif
 # define _DEXPLEN	             11
 # define _IEEE		              1
 # define DMAXEXP	             ((1 << _DEXPLEN - 1) - 1 + _IEEE)
diff -r -u ros_6.1_original/src/OSD/OSD_Csharedmemory.c ros_6.1_patched/src/OSD/OSD_Csharedmemory.c
--- ros_6.1_original/src/OSD/OSD_Csharedmemory.c	2007-01-30 23:28:05.000000000 +0100
+++ ros_6.1_patched/src/OSD/OSD_Csharedmemory.c	2007-01-31 20:32:34.000000000 +0100
@@ -3,8 +3,10 @@
 #include <sys/types.h>
 #include <sys/ipc.h>
 #include <sys/shm.h>
-#include <malloc.h>
 
+#if defined(HAVE_MALLOC_H)
+#include <malloc.h>
+#endif
 
 /* Modified by Stephan GARNAUD (ARM) 1992 for Matra Datavision */
 
diff -r -u ros_6.1_original/src/OSD/OSD_File.cxx ros_6.1_patched/src/OSD/OSD_File.cxx
--- ros_6.1_original/src/OSD/OSD_File.cxx	2007-01-30 23:28:05.000000000 +0100
+++ ros_6.1_patched/src/OSD/OSD_File.cxx	2007-02-01 17:47:52.000000000 +0100
@@ -828,6 +828,11 @@
 # include <tchar.h>
 #endif  // _INC_TCHAR
 
+#if defined(__CYGWIN32__) || defined(__MINGW32__)
+#define VAC
+#define _int64 int
+#endif
+
 #pragma comment( lib, "WSOCK32.LIB"  )
 #pragma comment( lib, "WINSPOOL.LIB" )
 
@@ -1130,7 +1135,6 @@
       SetFilePointer (  ( HANDLE )myFileChannel, -1, NULL, FILE_CURRENT  );
 
     } else
-         
      myIO |= FLAG_EOF;
 
     NbyteRead = dwBytesRead;
@@ -1735,6 +1739,12 @@
 
 //-------------------------------------------------finpri???980424
 
+#if defined(__CYGWIN32__) || defined(__MINGW32__)
+#define __try
+#define __finally
+#define __leave return
+#endif
+
 void OSD_File :: SetLock ( const OSD_LockType Lock ) {
 
  DWORD      dwFlags;
@@ -1780,6 +1790,12 @@
 #endif
 }  // end OSD_File :: SetLock
 
+#if defined(__CYGWIN32__) || defined(__MINGW32__)
+#undef __try
+#undef __finally
+#undef __leave
+#endif
+
 void OSD_File :: UnLock () {
 
  TEST_RAISE(  TEXT( "Unlock" )  );
@@ -1867,6 +1883,12 @@
 
 }  // end OSD_File :: IsOpen
 
+#if defined(__CYGWIN32__) || defined(__MINGW32__)
+#define __try
+#define __finally
+#define __leave return retVal
+#endif
+
 PSECURITY_DESCRIPTOR __fastcall _osd_wnt_protection_to_sd (
                                  const OSD_Protection& prot, BOOL fDir, char* fName
                                 ) {
@@ -2126,6 +2148,12 @@
  
 }  // end _osd_wnt_protection_to_sd */
 
+#if defined(__CYGWIN32__) || defined(__MINGW32__)
+#undef __try
+#undef __finally
+#undef __leave
+#endif
+
 static void __fastcall _test_raise ( Standard_Integer hFile, Standard_CString str ) {
 
  Standard_Character buff[ 64 ];
@@ -2669,6 +2697,12 @@
 
 }  // end _get_file_type
 
+#if defined(__CYGWIN32__) || defined(__MINGW32__)
+#define __try
+#define __finally
+#define __leave return retVal
+#endif
+
 BOOL __fastcall _osd_wnt_sd_to_protection (
                  PSECURITY_DESCRIPTOR pSD, OSD_Protection& prot, BOOL fDir
                 ) {
@@ -2755,6 +2789,12 @@
 
 }  // end _osd_wnt_sd_to_protection
 
+#if defined(__CYGWIN32__) || defined(__MINGW32__)
+#undef __try
+#undef __finally
+#undef __leave
+#endif
+
 static OSD_SingleProtection __fastcall _get_protection ( DWORD mask ) {
 
  OSD_SingleProtection retVal;
@@ -2971,6 +3011,12 @@
 
 }  // end _get_protection_dir
 
+#if defined(__CYGWIN32__) || defined(__MINGW32__)
+#define __try
+#define __finally
+#define __leave return fOK
+#endif
+
 BOOL __fastcall _osd_print ( Standard_CString pName, Standard_CString fName ) {
 
  BOOL   fOK, fJob;                
@@ -3050,6 +3096,11 @@
                 
 }  // end _osd_print
 
+#if defined(__CYGWIN32__) || defined(__MINGW32__)
+#undef __try
+#undef __finally
+#undef __leave
+#endif
 
 Standard_Boolean OSD_File::IsReadable()
 {
diff -r -u ros_6.1_original/src/OSD/OSD_FileNode.cxx ros_6.1_patched/src/OSD/OSD_FileNode.cxx
--- ros_6.1_original/src/OSD/OSD_FileNode.cxx	2007-01-30 23:28:05.000000000 +0100
+++ ros_6.1_patched/src/OSD/OSD_FileNode.cxx	2007-02-01 07:50:22.000000000 +0100
@@ -923,6 +923,12 @@
 
 }  // end _set_error
 
+#if defined(__CYGWIN32__) || defined(__MINGW32__)
+#define __try
+#define __finally
+#define __leave return retVal
+#endif
+
 static BOOL __fastcall _get_file_time (
                         Standard_CString fName, LPSYSTEMTIME lpSysTime, BOOL fAccess
                        ) {
@@ -967,6 +973,12 @@
 
 }  // end _get_file_time
 
+#if defined(__CYGWIN32__) || defined(__MINGW32__)
+#undef __try
+#undef __finally
+#undef __leave
+#endif
+
 static void __fastcall _test_raise ( TCollection_AsciiString fName, Standard_CString str ) {
 
  Standard_Character buff[ 64 ];
diff -r -u ros_6.1_original/src/OSD/OSD_Path.cxx ros_6.1_patched/src/OSD/OSD_Path.cxx
--- ros_6.1_original/src/OSD/OSD_Path.cxx	2007-01-30 23:28:05.000000000 +0100
+++ ros_6.1_patched/src/OSD/OSD_Path.cxx	2007-01-31 20:22:09.000000000 +0100
@@ -16,7 +16,7 @@
 #endif
 
 static OSD_SysType whereAmI(){
-#if defined(__digital__) || defined(__FreeBSD__) || defined(SUNOS)
+#if defined(__digital__) || defined(__FreeBSD__) || defined(SUNOS) || defined(__APPLE__)
   return OSD_UnixBSD;
 }
 #elif defined(sgi)  || defined(IRIX) || defined(__sun)  || defined(SOLARIS) ||  defined(__sco__) || defined(__hpux) || defined(HPUX)
@@ -31,6 +31,9 @@
 #elif defined(WIN32)
   return OSD_WindowsNT;
 }
+#elif defined(__CYGWIN32_) || defined(__MINGW32__)
+  return OSD_WindowsNT;
+}
 #elif defined(vax) || defined(__vms)
   return OSD_VMS;
 }
diff -r -u ros_6.1_original/src/OSD/OSD_WNT.cxx ros_6.1_patched/src/OSD/OSD_WNT.cxx
--- ros_6.1_original/src/OSD/OSD_WNT.cxx	2007-01-30 23:28:05.000000000 +0100
+++ ros_6.1_patched/src/OSD/OSD_WNT.cxx	2007-02-01 07:56:13.000000000 +0100
@@ -109,6 +109,13 @@
 /*            'FreeTokenInformation' function                               */
 /******************************************************************************/
 /***/
+
+#if defined(__CYGWIN32__) || defined(__MINGW32__)
+#define __try
+#define __finally
+#define __leave return buffer
+#endif
+
 LPVOID GetTokenInformationEx ( HANDLE hToken, TOKEN_INFORMATION_CLASS tic ) {
 
  DWORD  errVal;
@@ -160,6 +167,13 @@
  return buffer;
 
 }  /* end GetTokenInformationEx */
+
+#if defined(__CYGWIN32__) || defined(__MINGW32__)
+#undef __try
+#undef __finally
+#undef __leave
+#endif
+
 /***/
 /******************************************************************************/
 /* Function : FreeTokenInformation                                          */
@@ -417,6 +431,14 @@
 /*            'FreeFileSecurity' function                                   */
 /******************************************************************************/
 /***/
+
+
+#if defined(__CYGWIN32__) || defined(__MINGW32__)
+#define __try
+#define __finally
+#define __leave return retVal
+#endif
+
 PSECURITY_DESCRIPTOR GetFileSecurityEx ( LPCTSTR fileName, SECURITY_INFORMATION si ) {
 
  DWORD                errVal;
@@ -470,6 +492,13 @@
  return retVal;
 
 }  /* end GetFileSecurityEx */
+
+#if defined(__CYGWIN32__) || defined(__MINGW32__)
+#undef __try
+#undef __finally
+#undef __leave
+#endif
+
 /***/
 /******************************************************************************/
 /* Function : FreeFileSecurity                                              */
@@ -495,6 +524,13 @@
 /*            use 'FreeAccountNames' function                               */
 /******************************************************************************/
 /***/
+
+#if defined(__CYGWIN32__) || defined(__MINGW32__)
+#define __try
+#define __finally
+#define __leave return retVal
+#endif
+
 BOOL LookupAccountSidEx ( PSID pSID, LPTSTR* name, LPTSTR* domain ) {
 
  DWORD        errVal;
@@ -546,6 +582,13 @@
  return retVal;
 
 }  /* end LookupAccountSidEx */
+
+#if defined(__CYGWIN32__) || defined(__MINGW32__)
+#undef __try
+#undef __finally
+#undef __leave
+#endif
+
 /***/
 /******************************************************************************/
 /* Function : FreeAccountNames                                              */
diff -r -u ros_6.1_original/src/OSD/OSD_WNT_1.cxx ros_6.1_patched/src/OSD/OSD_WNT_1.cxx
--- ros_6.1_original/src/OSD/OSD_WNT_1.cxx	2007-01-30 23:28:05.000000000 +0100
+++ ros_6.1_patched/src/OSD/OSD_WNT_1.cxx	2007-01-31 20:19:42.000000000 +0100
@@ -269,6 +269,12 @@
   return (short)(aY*8) / HIWORD (baseUnits);
 }
 
+#if defined(__CYGWIN32__) || defined(__MINGW32__)
+#define __try
+#define __finally
+#define __leave return res
+#endif
+
 LONG GetTextParams ( HDC hdc, LPCTSTR lpText ) {
   LONG res = 0;
   SIZE size;
@@ -299,6 +305,12 @@
   return res;
 }
 
+#if defined(__CYGWIN32__) || defined(__MINGW32__)
+#undef __try
+#undef __finally
+#undef __leave
+#endif
+
 /////////////////ON_COMMAND/////////////////////////////////////
 void MsgBox_OnCommand (HWND hwnd, _TINT id, HWND hCtl, UINT codeNotify) {
   EndDialog (hwnd, id);
@@ -333,6 +345,12 @@
 
 /////////////////////////////////////////////////////////////////
 
+#if defined(__CYGWIN32__) || defined(__MINGW32__)
+#define __try
+#define __finally
+#define __leave return -1
+#endif
+
 _TINT MsgBox ( HWND hParent,
                LPTSTR  lpText,
                LPCTSTR lpCaption,
@@ -522,4 +540,11 @@
 #endif
 
 }
+
+#if defined(__CYGWIN32__) || defined(__MINGW32__)
+#undef __try
+#undef __finally
+#undef __leave
+#endif
+
 #endif
diff -r -u ros_6.1_original/src/OSD/OSD_signal_WNT.cxx ros_6.1_patched/src/OSD/OSD_signal_WNT.cxx
--- ros_6.1_original/src/OSD/OSD_signal_WNT.cxx	2007-01-30 23:28:05.000000000 +0100
+++ ros_6.1_patched/src/OSD/OSD_signal_WNT.cxx	2007-02-01 15:51:19.000000000 +0100
@@ -94,7 +94,9 @@
 //==== SIGWntHandler
 //============================================================================
 
-static void SIGWntHandler(int signum , int sub_code ) {
+void SIGWntHandler(int signum , int sub_code ) {
+
+#if !defined(__CYGWIN32__) && !defined(__MINGW32__)
 
 //        cout << "SIGWntHandler " << signum << " subcode " << sub_code << endl ;
 	switch( signum ) {
@@ -144,16 +146,22 @@
 	}
 // cout << "return from SIGWntHandler -> DebugBreak " << endl ;
  DebugBreak ();
+
+#endif
+
 }
 
 //============================================================================
 //==== CallHandler 
 //============================================================================
 
-static LONG CallHandler ( DWORD dwExceptionCode ,
+LONG CallHandler ( DWORD dwExceptionCode ,
                                      int ExceptionInformation1 ,
                                      int ExceptionInformation0 )
 {
+
+#if !defined(__CYGWIN32__) && !defined(__MINGW32__)
+
  static TCHAR         buffer[ 2048 ];
  int                  flterr = 0;
 
@@ -325,6 +333,10 @@
 
  return _osd_raise ( dwExceptionCode, buffer );
 
+#else
+ return 0;
+#endif
+
 }  // end OSD :: WntHandler
 
 //=======================================================================
@@ -362,6 +374,8 @@
 
 void OSD :: SetSignal ( const Standard_Boolean aFloatingSignal ) {
 
+#if !defined(__CYGWIN32__) && !defined(__MINGW32__)
+
  static int first_time = 1 ;
  LPTOP_LEVEL_EXCEPTION_FILTER aPreviousFilter ;
 
@@ -421,6 +435,8 @@
    }
  }
 
+#endif
+
 }  // end OSD :: SetSignal
 
 //============================================================================
@@ -536,6 +552,12 @@
 //==== _osd_debug 
 //============================================================================
 
+#if defined(__CYGWIN32__) || defined(__MINGW32__)
+#define __try
+#define __finally
+#define __leave return 0
+#endif
+
 LONG _osd_debug ( void ) {
 
  LONG action ;
@@ -619,6 +641,12 @@
 
 }  // end _osd_debug
 
+#if defined(__CYGWIN32__) || defined(__MINGW32__)
+#undef __try
+#undef __finally
+#undef __leave
+#endif
+
 //============================================================================
 //==== _debug_break 
 //============================================================================
diff -r -u ros_6.1_original/src/Standard/Standard.cxx ros_6.1_patched/src/Standard/Standard.cxx
--- ros_6.1_original/src/Standard/Standard.cxx	2007-01-30 23:28:06.000000000 +0100
+++ ros_6.1_patched/src/Standard/Standard.cxx	2007-01-31 20:22:57.000000000 +0100
@@ -39,7 +39,11 @@
   //
   bOptAlloc   = atoi((var = getenv("MMGT_OPT"      )) ? var : "1"    ); 
   bClear      = atoi((var = getenv("MMGT_CLEAR"    )) ? var : "1"    );
+#if defined(__APPLE__)
+  bMMap       = atoi("0");
+#else
   bMMap       = atoi((var = getenv("MMGT_MMAP"     )) ? var : "1"    ); 
+#endif
   aCellSize   = atoi((var = getenv("MMGT_CELLSIZE" )) ? var : "200"  ); 
   aNbPages    = atoi((var = getenv("MMGT_NBPAGES"  )) ? var : "10000");
   aThreshold  = atoi((var = getenv("MMGT_THRESHOLD")) ? var : "40000");
diff -r -u ros_6.1_original/src/Standard/Standard_Real.cxx ros_6.1_patched/src/Standard/Standard_Real.cxx
--- ros_6.1_original/src/Standard/Standard_Real.cxx	2007-01-30 23:28:06.000000000 +0100
+++ ros_6.1_patched/src/Standard/Standard_Real.cxx	2007-02-01 16:08:01.000000000 +0100
@@ -11,7 +11,7 @@
 #include <Standard_OStream.hxx>
 #endif
 
-#ifdef WNT
+#if defined(WNT) && !defined(__CYGWIN32__) && !defined(__MINGW32__)
 Standard_Real PI     = 3.14159265358979324;
 Standard_Real PI180  = 0.017453292519943296;
 
diff -r -u ros_6.1_original/src/StepFile/recfile.pc ros_6.1_patched/src/StepFile/recfile.pc
--- ros_6.1_original/src/StepFile/recfile.pc	2007-01-30 23:28:17.000000000 +0100
+++ ros_6.1_patched/src/StepFile/recfile.pc	2007-01-31 21:59:18.000000000 +0100
@@ -1,7 +1,9 @@
 #include "stdio.h"
 #include "string.h"
 #include "stdlib.h"
+#if defined(HAVE_MALLOC_H)
 #include "malloc.h"
+#endif
 #include "recfile.ph" 
 /*  enregistrement d'un fichier d'interface sous forme de records
     gere les scopes

