From: abv Date: Thu, 6 Sep 2018 15:59:19 +0000 (+0300) Subject: 0030091: Configuration - allow cross-compilation from Linux (case sensitive filesyste... X-Git-Tag: OCCT_VC2017_73~7 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=5fecc4953beebb3b4e5902f9d3085a060dbf1e3f;p=occt-copy.git 0030091: Configuration - allow cross-compilation from Linux (case sensitive filesystem) to x86_64-w64-mingw32 Names of Windows header files are corrected to be lower case to match their actual names on Windows (except Windows.h) and MinGW. Files COMMANDWINDOW.h and MAINWINDOW.h in Draw package are renamed to CamelCase according to names of corresponding CXX files. --- diff --git a/adm/cmake/occt_csf.cmake b/adm/cmake/occt_csf.cmake index 272fb9fdd6..ec05ffc76a 100644 --- a/adm/cmake/occt_csf.cmake +++ b/adm/cmake/occt_csf.cmake @@ -63,7 +63,7 @@ if (WIN32) set (CSF_gdi32 "gdi32.lib") set (CSF_user32 "user32.lib") set (CSF_wsock32 "wsock32.lib") - set (CSF_psapi "Psapi.lib") + set (CSF_psapi "psapi.lib") set (CSF_d3d9 "D3D9.lib") if ("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore" OR USE_GLES2) set (CSF_OpenGlLibs "libEGL libGLESv2") diff --git a/src/Draw/COMMANDWINDOW.h b/src/Draw/COMMANDWINDOW.h deleted file mode 100644 index 01304f33f7..0000000000 --- a/src/Draw/COMMANDWINDOW.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - Copyright (c) 1998-1999 Matra Datavision - Copyright (c) 1999-2014 OPEN CASCADE SAS - - This file is part of Open CASCADE Technology software library. - - This library is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License version 2.1 as published - by the Free Software Foundation, with special exception defined in the file - OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT - distribution for complete text of the license and disclaimer of any warranty. - - Alternatively, this file may be used under the terms of Open CASCADE - commercial license or contractual agreement. -*/ - -#ifdef _WIN32 - - -#define COMMANDCLASS L"COMMANDWINDOW" -#define COMMANDTITLE L"Command Window" - - -HWND CreateCommandWindow(HWND, int); -LRESULT APIENTRY CommandProc(HWND, UINT, WPARAM, LPARAM); -BOOL CommandCreateProc(HWND); -VOID CommandDestroyProc(HWND); -BOOL CommandHandler(HWND, WPARAM, LPARAM); - - -#include -#include -#include -#include -//#include -#include - - - -#endif diff --git a/src/Draw/CommandWindow.cxx b/src/Draw/CommandWindow.cxx index e7bf906535..5e9909dd5a 100644 --- a/src/Draw/CommandWindow.cxx +++ b/src/Draw/CommandWindow.cxx @@ -17,9 +17,9 @@ #ifdef _WIN32 #include -#include +#include #include -#include +#include #include #include diff --git a/src/Draw/CommandWindow.h b/src/Draw/CommandWindow.h new file mode 100644 index 0000000000..01304f33f7 --- /dev/null +++ b/src/Draw/CommandWindow.h @@ -0,0 +1,40 @@ +/* + Copyright (c) 1998-1999 Matra Datavision + Copyright (c) 1999-2014 OPEN CASCADE SAS + + This file is part of Open CASCADE Technology software library. + + This library is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License version 2.1 as published + by the Free Software Foundation, with special exception defined in the file + OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT + distribution for complete text of the license and disclaimer of any warranty. + + Alternatively, this file may be used under the terms of Open CASCADE + commercial license or contractual agreement. +*/ + +#ifdef _WIN32 + + +#define COMMANDCLASS L"COMMANDWINDOW" +#define COMMANDTITLE L"Command Window" + + +HWND CreateCommandWindow(HWND, int); +LRESULT APIENTRY CommandProc(HWND, UINT, WPARAM, LPARAM); +BOOL CommandCreateProc(HWND); +VOID CommandDestroyProc(HWND); +BOOL CommandHandler(HWND, WPARAM, LPARAM); + + +#include +#include +#include +#include +//#include +#include + + + +#endif diff --git a/src/Draw/FILES b/src/Draw/FILES index b4eb578743..c43b33613f 100755 --- a/src/Draw/FILES +++ b/src/Draw/FILES @@ -1,5 +1,5 @@ CommandWindow.cxx -COMMANDWINDOW.h +CommandWindow.h Draw.cxx Draw.hxx Draw_Appli.hxx @@ -75,4 +75,4 @@ DrawRessource.h init.cxx init.h MainWindow.cxx -MAINWINDOW.h +MainWindow.h diff --git a/src/Draw/MAINWINDOW.h b/src/Draw/MAINWINDOW.h deleted file mode 100644 index db092a750c..0000000000 --- a/src/Draw/MAINWINDOW.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - Copyright (c) 1998-1999 Matra Datavision - Copyright (c) 1999-2014 OPEN CASCADE SAS - - This file is part of Open CASCADE Technology software library. - - This library is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License version 2.1 as published - by the Free Software Foundation, with special exception defined in the file - OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT - distribution for complete text of the license and disclaimer of any warranty. - - Alternatively, this file may be used under the terms of Open CASCADE - commercial license or contractual agreement. -*/ - -/****************************************************\ -*/ -/** MainWindow.h -*/ -/*\****************************************************/ -#ifdef _WIN32 - -#define CLIENTWND 0 - -/* -** PROCEDURES DE MAIN WINDOW -*/ -#include - -LRESULT APIENTRY WndProc(HWND, UINT, WPARAM, LPARAM); -BOOL CreateProc(HWND); -VOID DestroyProc(HWND); -LRESULT APIENTRY CmdProc(HWND, UINT, WPARAM, LPARAM); - - -#endif diff --git a/src/Draw/MainWindow.h b/src/Draw/MainWindow.h new file mode 100644 index 0000000000..6957cd29a9 --- /dev/null +++ b/src/Draw/MainWindow.h @@ -0,0 +1,37 @@ +/* + Copyright (c) 1998-1999 Matra Datavision + Copyright (c) 1999-2014 OPEN CASCADE SAS + + This file is part of Open CASCADE Technology software library. + + This library is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License version 2.1 as published + by the Free Software Foundation, with special exception defined in the file + OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT + distribution for complete text of the license and disclaimer of any warranty. + + Alternatively, this file may be used under the terms of Open CASCADE + commercial license or contractual agreement. +*/ + +/****************************************************\ +*/ +/** MainWindow.h +*/ +/*\****************************************************/ +#ifdef _WIN32 + +#define CLIENTWND 0 + +/* +** PROCEDURES DE MAIN WINDOW +*/ +#include + +LRESULT APIENTRY WndProc(HWND, UINT, WPARAM, LPARAM); +BOOL CreateProc(HWND); +VOID DestroyProc(HWND); +LRESULT APIENTRY CmdProc(HWND, UINT, WPARAM, LPARAM); + + +#endif diff --git a/src/OSD/OSD.cxx b/src/OSD/OSD.cxx index 38a28e6c28..b8c975744c 100644 --- a/src/OSD/OSD.cxx +++ b/src/OSD/OSD.cxx @@ -61,7 +61,7 @@ Standard_Boolean OSD::CStringToReal(const Standard_CString aString, //======================================================================= #ifdef _WIN32 -# include +# include # define SLEEP(NSEC) Sleep(1000*(NSEC)) #else #include diff --git a/src/OSD/OSD_Error.cxx b/src/OSD/OSD_Error.cxx index 0be6517c95..89c1b35108 100755 --- a/src/OSD/OSD_Error.cxx +++ b/src/OSD/OSD_Error.cxx @@ -448,7 +448,7 @@ void OSD_Error::Perror() { #include #include -#include +#include typedef struct _error_table { diff --git a/src/OSD/OSD_File.cxx b/src/OSD/OSD_File.cxx index 43ef8a2370..4b759ed147 100644 --- a/src/OSD/OSD_File.cxx +++ b/src/OSD/OSD_File.cxx @@ -34,7 +34,7 @@ #include #include - #include + #include #define ACE_HEADER_SIZE (sizeof(ACCESS_ALLOWED_ACE) - sizeof (DWORD)) diff --git a/src/OSD/OSD_FileNode.cxx b/src/OSD/OSD_FileNode.cxx index 2ffcd5fe42..5155543808 100644 --- a/src/OSD/OSD_FileNode.cxx +++ b/src/OSD/OSD_FileNode.cxx @@ -379,7 +379,7 @@ Standard_Integer OSD_FileNode::Error()const{ # include #endif // _INC_TCHAR -#include +#include #define TEST_RAISE( arg ) _test_raise ( fName, ( arg ) ) #define RAISE( arg ) throw Standard_ProgramError ( ( arg ) ) diff --git a/src/OSD/OSD_MemInfo.cxx b/src/OSD/OSD_MemInfo.cxx index 2d578d8bd4..d5eda9ee26 100644 --- a/src/OSD/OSD_MemInfo.cxx +++ b/src/OSD/OSD_MemInfo.cxx @@ -18,7 +18,7 @@ #include #include #include - #include + #include #ifdef _MSC_VER #pragma comment(lib, "Psapi.lib") #endif diff --git a/src/OSD/OSD_Process.cxx b/src/OSD/OSD_Process.cxx index 8742261465..47178c9708 100644 --- a/src/OSD/OSD_Process.cxx +++ b/src/OSD/OSD_Process.cxx @@ -182,7 +182,7 @@ Standard_Integer OSD_Process::Error()const{ #include #include -#include // for UNLEN - maximum user name length GetUserName() +#include // for UNLEN - maximum user name length GetUserName() void _osd_wnt_set_error ( OSD_Error&, OSD_WhoAmI, ... ); diff --git a/src/OSD/OSD_WNT.cxx b/src/OSD/OSD_WNT.cxx index 8bc78152e9..ef38d808fa 100644 --- a/src/OSD/OSD_WNT.cxx +++ b/src/OSD/OSD_WNT.cxx @@ -23,7 +23,7 @@ /***/ #include -#include +#include #include #include diff --git a/src/OSD/OSD_signal.cxx b/src/OSD/OSD_signal.cxx index 06b6394039..79031e6287 100644 --- a/src/OSD/OSD_signal.cxx +++ b/src/OSD/OSD_signal.cxx @@ -39,7 +39,7 @@ Standard_Boolean OSD::ToCatchFloatingSignals() #endif #include -#include +#include #ifndef STATUS_FLOAT_MULTIPLE_FAULTS // diff --git a/src/Standard/Standard_MMgrOpt.cxx b/src/Standard/Standard_MMgrOpt.cxx index b75854a308..81889b4b26 100644 --- a/src/Standard/Standard_MMgrOpt.cxx +++ b/src/Standard/Standard_MMgrOpt.cxx @@ -35,7 +35,7 @@ extern "C" int getpagesize() ; #endif #ifdef _WIN32 -#include +#include #endif //====================================================================== // Assumptions