mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
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.
This commit is contained in:
@@ -25,9 +25,9 @@
|
||||
#include <TCollection_ExtendedString.hxx>
|
||||
#include <UTL.hxx>
|
||||
|
||||
#ifdef WNT
|
||||
#ifdef _MSC_VER
|
||||
#include <tchar.h>
|
||||
#endif // WNT
|
||||
#endif // _MSC_VER
|
||||
|
||||
|
||||
//==============================================================================
|
||||
@@ -35,11 +35,11 @@
|
||||
//purpose :
|
||||
//==============================================================================
|
||||
static void PutSlash (TCollection_ExtendedString& anXSTRING) {
|
||||
#ifdef WNT
|
||||
#ifdef _WIN32
|
||||
anXSTRING+="\\";
|
||||
#else
|
||||
anXSTRING+="/";
|
||||
#endif // WNT
|
||||
#endif // _WIN32
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
@@ -169,7 +169,7 @@ TCollection_ExtendedString CDF_FWOSDriver::DefaultFolder()
|
||||
TCollection_ExtendedString theDefaultFolder;
|
||||
if (theDefaultFolder.Length() == 0) {
|
||||
|
||||
#ifdef WNT
|
||||
#ifdef _WIN32
|
||||
TCollection_ExtendedString hd=UTL::xgetenv("HOMEDRIVE");
|
||||
if(hd.Length() != NULL) {
|
||||
theDefaultFolder=hd;
|
||||
@@ -218,7 +218,7 @@ TCollection_ExtendedString CDF_FWOSDriver::SetName(const Handle(CDM_Document)& a
|
||||
|
||||
TCollection_ExtendedString xn(aName), n(aName);
|
||||
|
||||
#ifdef WNT
|
||||
#ifdef _WIN32
|
||||
//windows is not case sensitive
|
||||
//make the extension lower case
|
||||
for(int i = 1; i <= xn.Length(); i++)
|
||||
@@ -232,7 +232,7 @@ TCollection_ExtendedString CDF_FWOSDriver::SetName(const Handle(CDM_Document)& a
|
||||
TCollection_ExtendedString e (aDocument->FileExtension());
|
||||
TCollection_ExtendedString xe(e);
|
||||
if (e.Length() > 0) {
|
||||
#ifdef WNT
|
||||
#ifdef _WIN32
|
||||
//windows is not case sensitive
|
||||
//make the extension lower case
|
||||
for(int i = 1; i <= xe.Length(); i++)
|
||||
|
@@ -122,7 +122,7 @@ Standard_Boolean CDF_Store::SetFolder(const TCollection_ExtendedString& aFolder
|
||||
// it is removed.
|
||||
// This is correct for Unix systems but not for Windows! VMS and MAC? Thomas Haller, 23.11.01
|
||||
if(l > 1) {
|
||||
#ifndef WNT
|
||||
#ifndef _WIN32
|
||||
if(theFolder.Value(l) == theFolder.Value(1)) theFolder.Trunc(l-1);
|
||||
#else
|
||||
if (theFolder.Value(l) == '/' || theFolder.Value(l) == '\\')
|
||||
|
Reference in New Issue
Block a user