Opened 13 years ago

Closed 13 years ago

#3662 closed Patches (duplicate)

Define _SVID_SOURCE and _POSIX_SOURCE for Comeau

Reported by: mloskot <mateusz@…> Owned by: Gennadiy Rozental
Milestone: Boost 1.42.0 Component: test
Version: Boost Development Trunk Severity: Problem
Keywords: como Cc:

Description

According to manual of Comeau C++ 4.3, on Linux

In order to use some POSIX or SVID extension routines/struct's, it may be necessary to define _POSIX_SOURCE or _SVID_SOURCE

The attached patch adds these definitions to Jamfile.v2 for the build. However, I don't know where it would be required else, for example, when Boost.Test is used in included mode, etc.

My environment:

  • Linux 32-bit
  • Comeau C/C++ 4.3.10.1
  • GCC 4.3.3

Attachments (1)

como-posix-svid-defines.patch (815 bytes ) - added by mloskot <mateusz@…> 13 years ago.
Patch adding <define> entries enabling POSIX support from Comeau

Download all attachments as: .zip

Change History (5)

by mloskot <mateusz@…>, 13 years ago

Patch adding <define> entries enabling POSIX support from Comeau

comment:1 by mloskot <mateusz@…>, 13 years ago

Gennadiy,

GI found another workaround which is simpler and seems to solve number of other issues related to C99 and POSIX. It is define of _ GNU_SOURCE in Jamfile:

<toolset>como-linux:<define>_GNU_SOURCE=1

Quick test shows that it enables C99 features like even snprintf and vsnprintf as well as POSIX features like time functions or signals.

I've just discovered this define while trying to enable signal.h definitions, but I'm going to consult it with Comeau team, so in case you'd be up to, please do not apply these patches here neither the patch I added today ago for #3558 . I'm going to confirm all these and run more tests. Sorry for making noise in the tickets, but I think it may be relevant to have some steps documented. Thanks for patience!

comment:2 by Gennadiy Rozental, 13 years ago

Is it fixed already in common Jamfile?

comment:3 by Mateusz Loskot (mloskot) <mateusz@…>, 13 years ago

I have submitted those fixes in separate ticket #3692 for Boost Build. I think this ticket can be closed.

comment:4 by Gennadiy Rozental, 13 years ago

Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.