Opened 14 years ago

Last modified 9 years ago

#2956 new Patches

vxWorks POSIX quirks for date_time

Reported by: Dustin Spicuzza <dustin@…> Owned by: az_sw_dude
Milestone: Boost 1.39.0 Component: date_time
Version: Boost 1.38.0 Severity: Problem
Keywords: Cc:

Description

vxWorks is almost a unix-like platform, that supports the POSIX realtime extensions and a lot of POSIX stuff.. but its weird.

It apparently doesn't support gettimeofday. I modified microsec_time_clock to support a situation where gettimeofday isn't available but clock_gettime is.

vxWorks has localtime_r, but it is defined as "extern int localtime_r (const time_t *_tod, struct tm *_result);"... so it needs some hand holding to work correctly. same with gmtime_r

Of course, this patch also requires the user to setup a config that defines BOOST_HAS_CLOCK_GETTIME, but I'm going to submit a separate patch for vxWorks platform config

Attachments (1)

boost_1_38_0.date_time.vxworks.patch (3.0 KB ) - added by Dustin Spicuzza <dustin@…> 14 years ago.

Download all attachments as: .zip

Change History (5)

by Dustin Spicuzza <dustin@…>, 14 years ago

comment:1 by Dustin Spicuzza <dustin@…>, 14 years ago

Type: BugsPatches

comment:2 by Dustin Spicuzza <dustin@…>, 13 years ago

This is a pretty trivial patch, do you think you could take a look at it at some point?

comment:3 by viboes, 12 years ago

I see a possible problem with this patch.

Adding a new config macro need to provide a test also. I gues we can change

        result = localtime_r(t, result); 

by

        (void)localtime_r(t, result); 

without too much trouble

comment:4 by viboes, 9 years ago

Severity: ShowstopperProblem
Note: See TracTickets for help on using tickets.