1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00

28 Commits

Author SHA1 Message Date
abv
9e4791171c 0029171: Foundation Classes - C signal handler does not work on MinGW
Setting signal handler is enabled in OSD::SetSignal() for MinGW (works only for SEH builds of MinGW, not for SJLJ builds).

Due to absence of function _set_se_translator(), handler is set using C signal() function and thus is called asynchronously.
Macro OCC_CONVERT_SIGNALS is enabled for MinGW build to support converting signals to C++ exceptions using long jumps (the same as on Linux).
Code raising exceptions in OSD::SetSignal() is corrected to use method Jump() instead of C++ throw.
2017-10-11 17:13:32 +03:00
kgv
cda06ac0e3 0029152: Coding Rules - eliminate GCC compiler warnings -Wmisleading-indentation when using MinGW
OSD_File::myFileHandle/myIO pair is now switched within class definition
instead of myFileHandle_is_only_for_Windows/myFileChannel_is_only_for_Linux macros.

OSD_Directory/OSD_Disk/OSD_File methods implementation of WinAPI/non-WinAPI
has been merged within .cxx file and reformatted.
Resolved several inconsistences on handling invalid input
between WinAPI/non-WinAPI implementations.
NCollection_Array1 is now used in several places instead of
raw memory allocation (HeapAlloc()/HeapFree()/new/delete).
TCollection_ExtendedString is used instead of StringCchCopyW.

Unused field OSD_Disk::myQuotaSize and not implemented methods OSD_Disk::*Quota*() have been removed.

Obsolete code fragment "for Visual Age compiler" is removed.
Macro __try is undefined before redefinition on MinGW to avoid warning.
2017-10-06 10:29:10 +03:00
abv
896faa7296 0028417: Using PRECOMPILED HEADER to speed up compilation time
Use of Cotire tool is introduced for acceleration of CMake builds, by usage of precompiled headers.
CMake option BUILD_USE_PCH is added to enable / disable use of precompiled headers

When precompiled headers are used, additional compiler macros are defined globally in the build system to avoid problems due to different order of included files:
- NOMINMAX is defined on Windows to prevent defining "min" and "max" as macros by windows.h
- STRSAFE_NO_DEPRECATE and _SCL_SECURE_NO_WARNINGS are defined on Windows to prevent declaring functions of standard C library as deprecated by #pragma, and other warnings in system headers
- GL_GLEXT_LEGACY and GLX_GLEXT_LEGACY are defined to ensure that only OCCT's own glext.h is used
- __STDC_FORMAT_MACROS is defined to have standard C print format macros always defined

Code is corrected to avoid conflicts with system headers and in case of compiling together as unity builds (partially):
- Some locally defined variables in TKV3d, TKHLR are renamed to be unique
- Duplicated definitions of macros and global functions are eliminated in TKSTEP
- Useless header WNT_UInt.hxx is removed
- Usage of local variables conflicting with X11 macro is avoided in Draw_Viewer.cxx
- Local variables in AIS_ConcentricRelation.cxx are renamed to avoid conflict with macros defined in windows.h
- HXX files containing code are renamed to PXX or merged with corresponding CXX files.

IVtkTools classes are corrected to avoid compiler warnings disabled in non-PCH builds by inclusion of VTK headers.

Useless pragmas disabling warnings on MSVC are removed
2017-07-06 12:41:41 +03:00
abv
66cfcd0f73 0028829: dsetsignal command does not work on Linux properly
OSD::SetSignal() is corrected to unset FPE exceptions on Linux if called with False argument
2017-06-29 14:23:03 +03:00
ski
9775fa6110 0026937: Eliminate NO_CXX_EXCEPTION macro support
Macro NO_CXX_EXCEPTION was removed from code.
Method Raise() was replaced by explicit throw statement.
Method Standard_Failure::Caught() was replaced by normal C++mechanism of exception transfer.
Method Standard_Failure::Caught() is deprecated now.
Eliminated empty constructors.
Updated samples.
Eliminate empty method ChangeValue from NCollection_Map class.
Removed not operable methods from NCollection classes.
2017-02-02 16:35:54 +03:00
abv
c381fda2d6 0027713: Test bugs fclasses bug6143 is not OK for Linux after restoring FPS (26329)
Use standard (POSIX-compliant) macro "__linux__" for identification of Linux system, instead of obsolete "linux"
2016-09-30 11:17:19 +03:00
kgv
1ce0716bb1 0027811: Configuration - allow building TKOpenGl with OpenGL ES on Windows
OpenGl_ShaderManager::prepareStdProgramFboBlit() now tries using extension
GL_EXT_frag_depth within OpenGL ES 2.0 when OpenGL ES 3.0 is not available.
OpenGl_View::blitBuffers() now disables Depth test
when copying depth values is not supported by OpenGL ES 2.0 hardware.

Fixed building for UWP with SDK 10.0.10240.0
Fixed building TKService, TKV3d and TKOpenGl for UWP.

OSD_Environment now defines global environment map
for emulating desktop behavior on UWP.
2016-09-08 10:46:58 +03:00
ski
742cc8b01d 0027350: Support for Universal Windows Platform
- Toolchain file to configure a Visual Studio generator for a Windows 10 Universal Application was added (CMake).
- There is no support for environment variables in UWP.
- SID is not supported (were excluded).
- Windows registry is not supported (were excluded).
- Mess with usage of Unicode/ANSI was corrected.
- Added sample to check UWP functionality.
- Excluded usage of methods with Unicode characters where it is possible.
- Minor corrections to allow building OCAF (except TKVCAF) and DE (except VRML and XDE)
- Building of unsupported modules for UWP platform is off by default .
- Checking of DataExchange functionality was added to XAML (UWP) sample.
- Added information about UWP to the documentation.
- Update of results of merge with issue 27801
2016-08-26 09:43:29 +03:00
kgv
94afca11a0 0027801: Configuration - fix compilation of Standard.cxx when using MinGW-W64 2016-08-25 15:10:49 +03:00
ski
536a3cb80c 0027525: Coding - eliminate warnings on Windows for OCCT with static type of libraries
Useless *.cxx files were removed to eliminate linker warning LNK4221.

Package TopOpeBRepDS was cleaned up from old debugging routines.

Merged OSD_signal_WNT.cxx into OSD_signal.cxx

Class Standard_ErrorHandlerCallback was moved into the Standard_ErrorHandler class as nested class Callback

Eliminated warning about unused variable.
2016-07-14 13:21:33 +03:00
abv
04e9307054 0026852: Coding - compiler warnings issued by GCC 5.2.1
Compiler warnings eliminated:
- BRepAlgo_DSAccess: avoid copying of local list
- IntPatch, IntTools: initialize "possibly used uninitialized" variables by zeros
- Intf: slight refactoring
- OSD_signal: suppress unused argument
- OpenGL: add missing initializers in structures
- STEPConstruct_GDTProperty: correct function signature to pass output parameters by reference
2015-11-09 15:04:54 +03:00
ibs
d8d01f6ed6 0026823: Configuration - use EGL on another platform without GLX 2015-11-05 12:04:05 +03:00
rkv
c85385c0e2 0026784: Coding rules - eliminate GCC warning -Wunused-parameter
OSD_Thread - use pthread_timedjoin_np() instead of pthread_join() when available (glibc extension).
Suppress unused parameter warning in OSD_Signal, NCollection_WinHeapAllocator, OpenGl_Text, OpenGl_View, V3d_View and ViewerTest.
2015-11-05 12:01:07 +03:00
akz
57c28b6122 0022972: Eliminate macro definitions that has compiler-provided analogs (WNT and so on)
1) Macro definition WNT replaced by _WIN32 and _MSC_VER for platform and compiler detection accordingly.
2) Macro definition LIN replaced by __linux__ macro.
3) Macro definition DEB replaced by OCCT_DEBUG macro.
2015-09-24 14:13:06 +03:00
abv
42cf5bc1ca 0024002: Overall code and build procedure refactoring -- automatic
Automatic upgrade of OCCT code by command "occt_upgrade . -nocdl":
- WOK-generated header files from inc and sources from drv are moved to src
- CDL files removed
- All packages are converted to nocdlpack
2015-07-12 07:42:38 +03:00
ibs
7d679df3be 0025750: Coding rules - eliminate GCC warning -Wunused-but-set-variable in OSD_signal.cxx for Android build
Move variable aSigInfo to the proper scope.
2015-05-14 17:43:49 +03:00
abv
0797d9d30a 0025418: Debug output to be limited to OCC development environment
Macros ending on "DEB" are replaced by OCCT_DEBUG across OCCT code; new macros described in documentation.
Macros starting with DEB are changed to start with "OCCT_DEBUG_".
Some code cleaned.
2014-11-05 16:55:24 +03:00
dbv
63c629aa3a 0025266: Debug statements in the source are getting flushed on to the console
Output to cout activated previously in Debug mode by #ifdef DEB is suppressed by using macro <PACKAGE>_DEB instead of DEB
2014-10-16 16:44:56 +04:00
kgv
9bf6baed3c 0025215: Porting to Android - fix minor issues
STEPConstruct_AP203Context = pw_gecos member of passwd struct disabled in android case.
Standard_Atomic - correct usage of __atomic_inc()/__atomic_dec().
Standard_CLocaleSentry - Android doesn't support locales in the C library.
Standard_MMgrOpt - use "/dev/zero" and "/dev/null" for allocation of memory blocks on Android.
OSD_Chronometer - fix compilation on Android.
OSD_Disk, OSD_signal - fix headers inclusion on Android.
2014-09-18 15:45:43 +04:00
apn
03155c18a5 0020716: Eliminate usage of "config.h" header file
All inclusions of "config.h" were removed.

All places where macros defined by config.h were checked and removed

Small corrections for mac os.

Unused code in file OSD_Disk.cxx was removed.

Unused macros and includes were removed from samples and code.

Added necessary includes for MacOS.

Correct new additional compilation warning on Linux platform.

Fix for error in OSD_Chronometer on Debian70/Fedora18
2014-09-05 10:41:05 +04:00
apl
0304f71151 0024444: Compilation issues on some not fully POSIX compliant Unix systems
- Standard package.
- OSD package.
- Aspect package.
- Xw package.
2014-08-15 11:00:07 +04:00
abv
d5f74e42d6 0024624: Lost word in license statement in source files
License statement text corrected; compiler warnings caused by Bison 2.41 disabled for MSVC; a few other compiler warnings on 54-bit Windows eliminated by appropriate type cast
Wrong license statements corrected in several files.
Copyright and license statements added in XSD and GLSL files.
Copyright year updated in some files.
Obsolete documentation files removed from DrawResources.
2014-02-20 16:15:17 +04:00
Roman Lygin
4d9421a970 0024533: Use 0 to check null handle instead of UndefinedHandleAccess
Handle classes now use 0 as invalid value for pointer instead of custom (and platform-dependent) value like 0xfefd0000.
Compiler macros UndefinedHandleAddress and _OCC64 are eliminated.
2014-01-23 13:38:45 +04:00
bugmster
973c2be1e1 0024428: Implementation of LGPL license
The copying permission statements at the beginning of source files updated to refer to LGPL.
Copyright dates extended till 2014 in advance.
2013-12-17 12:42:41 +04:00
ski
89c4bca846 0024304: Eliminate GCC compiler warning about exceeding maximum value for type in case label
Methods OSD::Handler(), OSD::SegvHandler(), OSD::WntHandler() were made static
Type cast were removed when pointer on signal handler function is used
Enumeration OSD_Signal removed
2013-12-06 13:10:36 +04:00
abv
8a262fa13d 0023586: The test execution process should correctly stop on user demand
Possibility to break DRAW commands by user break (Control-C) is implemented as follows:

- Treatment of Control-C (SIGINT signal) on UNIX in OSD::SetSignal() is made coherent with Windows implementation: instead of attempt to raise exception (simulated by longjump, does not work anyway), signal handler just sets a flag which can be later checked by OSD::ControlBreak()

- Call to OSD::ControlBreak() is added to common entry point for OCCT DRAW commands; this causes command interruption if Control-C has been pressed before its start.

- Command "dbreak" added allowing to check Control-Break status from Tcl script (raises Tcl exception if break was signaled)

- Command "dversion" added printing information on OCCT version, used build options, compiler, etc.

- Test system modified to properly handle and report user breaks and add version info in the summary log

Fix compiler error on Linux
2012-12-07 16:12:01 +04:00
bugmaster
b311480ed5 0023024: Update headers of OCCT files
Added appropriate copyright and license information in source files
2012-03-21 19:43:04 +04:00
bugmaster
7fd59977df Integration of OCCT 6.5.0 from SVN 2012-03-05 19:23:40 +04:00