Opened 7 years ago

Closed 7 years ago

#4475 closed Patches (fixed)

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



Attachments (1)

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

Download all attachments as: .zip

Change History (5)

Changed 7 years ago by artyomtnk@…

Attachment: date_time.patch added

comment:1 Changed 7 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 7 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 7 years ago by Marshall Clow

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

comment:4 Changed 7 years ago by Marshall Clow

Resolution: fixed
Status: newclosed

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

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain az_sw_dude.
The resolution will be deleted.

Add Comment

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

Note: See TracTickets for help on using tickets.