DiscussionsIssue archiveOCCT:Configuration

Archived issue #0014788

Preprocessor macro is needed to distinguish 64- vs 32-bit compilation mode at compile time

Open CASCADEOCCT:Configurationclosed1 public note

Search issues

Description

Currently OCC build system (at least, WOK) does not provide any preprocessor
macro that would allow to know, at compile time, whether the code is compiled
for 64- or 32-bit platform.

This knowledge is necessary for platform-specific code such as selection of
value of UndefinedHandleAddress in Handle_Standard_Transient.hxx, memory block
allocation granularity in Standard_MMgrOpt.cxx etc.

(Note that sizeof() cannot be used in preprocessor directives.)

As a starting point in solving that problem, the fix on OCC10096 and OCC13258
uses the new macro "_OCC64" which is:

- defined in Standard.hxx (unless defined previously) if either _WIN64 or
DECOSF is defined

- used in Handle_Standard_Transient.hxx and Handle_Standard_Persistent.hxx to
define appropriate value for the UndefinedHandleAddress

The next point is that OCC build procedures should define that macro when
building on any 64-bit platform

Public activity

1 archived note

Participants are labeled by their role within this record.

01Commenter 1
The macro have been implemented long time ago, please check and close the issue with setting relevant OCCT version