Ticket #4475 (closed Patches: fixed)

Opened 7 years ago

Last modified 6 years ago

OpenVMS patch for 64 bit support

Reported by: artyomtnk@… Owned by: az_sw_dude
Milestone: Boost 1.44.0 Component: date_time
Version: Boost 1.44.0 Severity: Problem
Keywords: Cc:



This patch provides 64 bit fixes for OpenVMS platform.

It is very important for the organization I work for to submit them to upstream Boost in order to make an upgrade to future Boost versions simpler.

This patch related to ticket: #4473




date_time.patch (1.3 KB) - added by artyomtnk@… 7 years ago.

Change History

Changed 7 years ago by artyomtnk@…

comment:1 Changed 6 years ago by Rob Stewart

You propose the following structure:

#if defined(__VMS) && __INITIAL_POINTER_SIZE == 64 
   std::tm tmp; 
      result = 0; 
      *result = tmp;       
   result = localtime_r(t, result); 

Why not this instead? That is, why is tmp needed?

#if defined(__VMS) && __INITIAL_POINTER_SIZE == 64 
   if (!localtime_r(t, result)) 
      result = 0; 
   result = localtime_r(t, result); 

comment:2 Changed 6 years ago by artyomtnk@…

The problem is that VMS allows mixed 32 and 64 bit pointers (something like DOS's near/far) and some system functions - in this case localetime_r, accept only 32 bit pointers while most accept both type of pointer.

What happens is that I need to pass 32 bit pointer to the function to make sure it works. Result is 64 bit pointer so I can't pass it as is. So I create a local variable tmp that is placed on stack. And it is promised that stack is always placed in 32bit region so I can relate on the fact that the pointer would be 32bit pointer.

And after I get the result I can copy it to the location of 64 bit pointer.

This is quite ugly but that is how OpenVMS works.



comment:3 Changed 6 years ago by marshall

(In [70767]) Applied patch - Refs #4475

comment:4 Changed 6 years ago by marshall

  • Status changed from new to closed
  • Resolution set to fixed

(In [70982]) Merge date/time fixes to release. Fixes #4475


Add a comment

Modify Ticket

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.