Opened 7 years ago

Last modified 7 years ago

#11657 new Patches

Add VxWorks support for program options

Reported by: Brian Kuhl <brian.kuhl@…> Owned by: Vladimir Prus
Milestone: To Be Determined Component: program_options
Version: Boost 1.59.0 Severity: Problem
Keywords: Cc: Mehdi.Hashemian@…

Description

This patch enables program options to be compiled in VxWorks 7.

It should be used with the config patch in #11653

(Alternately we could make the environ in VxWorks more standard, but since older VxWorks versions are being used for decades after there release, a backward compatible approach seemed the better option)

Attachments (1)

vx_program_options.patch (943 bytes ) - added by Brian Kuhl <brian.kuhl@…> 7 years ago.

Download all attachments as: .zip

Change History (6)

by Brian Kuhl <brian.kuhl@…>, 7 years ago

Attachment: vx_program_options.patch added

comment:1 by Brian Kuhl <brian.kuhl@…>, 7 years ago

Type: BugsPatches

comment:2 by Vladimir Prus, 7 years ago

Am I right that this patch can be applied without waiting for the config one?

comment:3 by Brian Kuhl <brian.kuhl@…>, 7 years ago

Yes, no interdependence.

comment:4 by Vladimir Prus, 7 years ago

Good. Why did you need to define environ as const char and then cast to 'char '? At the very least, the cast should be const_cast, not a C-style cast, but I wonder whether it can be declare as non-const in the first place? Or environment on VxWorks is not writable?

comment:5 by Brian Kuhl <brian.kuhl@…>, 7 years ago

It's effectively read only on every platform, you manipulate though setenv() POSIX says make it http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap08.html

But a decade ago when the VxWorks implementation was done, the engineer didn't read the spec. Maybe it's time to change it, our rule of thumb here at Wind is POSIX compatibility before backward compatibility in user space and vise versa in the kernel.

I'll file a defect on my side you can ignor this patch.

Note: See TracTickets for help on using tickets.