Opened 8 years ago

Closed 8 years ago

#10262 closed Bugs (fixed)

[interprocess] AIX 6.1 bug with variable definition hz.

Reported by: Axel Ismirlian <axel.ismirlian@…> Owned by: Ion Gaztañaga
Milestone: To Be Determined Component: interprocess
Version: Boost 1.55.0 Severity: Problem
Keywords: Cc:

Description

The error that pops up in some of the interprocess tests is the following:

../boost/interprocess/detail/os_thread_functions.hpp:289:9: error: expected unqualified-id before numeric constant

long hz =::sysconf(_SC_CLK_TCK); ticks per sec

In file included from ../boost/interprocess/detail/managed_open_or_create_impl.hpp:15:0,

from ../boost/interprocess/managed_shared_memory.hpp:22, from ../libs/interprocess/test/cached_node_allocator_test.cpp:12:

../boost/interprocess/detail/os_thread_functions.hpp:291:10: error: lvalue required as left operand of assignment

hz = 100;

Having a variable named hz conflicts with the definition of an AIX system variable that is in scope with this file. If I undefine the variable hz, hz can be safely defined without any confusion to the compiler.

Please look at the Pull Request created for further details: https://github.com/boostorg/interprocess/pull/7

Change History (1)

comment:1 by Ion Gaztañaga, 8 years ago

Resolution: fixed
Status: newclosed

Thanks for the report. Renamed the variable to "ticks_per_second" in

[develop 3c09cee] Renamed variable "hz" as it conflicts with AIX's system variable

Note: See TracTickets for help on using tickets.