Opened 10 years ago

Closed 10 years ago

#7982 closed Bugs (fixed)

pthread_delay_np() parm compile error on AIX

Reported by: Kevin Burge <kevin.burge@…> Owned by: viboes
Milestone: Boost 1.54.0 Component: thread
Version: Boost 1.53.0 Severity: Regression
Keywords: aix xlc Cc:

Description

On AIX 7, pthread_delay_np is declared as:

extern int pthread_delay_np ((struct timespec *));

Compilation fails with: === vacpp.compile.c++ bin.v2/libs/thread/build/vacpp/release/address-model-32/threading-multi/pthread/thread.o "libs/thread/src/pthread/thread.cpp", line 439.48: 1540-0256 (S) A parameter of type "timespec *" cannot be initialized with an expression of type "const timespec *". "libs/thread/src/pthread/thread.cpp", line 439.48: 1540-1205 (I) The error occurred while converting to parameter 1 of "pthread_delay_np(timespec *)". ===

It appears that there is a bug related to this, #78.

Compiled fine with 1.52.0.

Change History (5)

comment:1 by viboes, 10 years ago

Owner: changed from Anthony Williams to viboes
Status: newassigned

comment:2 by viboes, 10 years ago

Would the following patch solve the issue?

+  #     if defined(__IBMCPP__)
+                BOOST_VERIFY(!pthread_delay_np(const_cast<timespec*>(&ts)));
+  #     else
                 BOOST_VERIFY(!pthread_delay_np(&ts));
+  #     endif

comment:3 by Kevin Burge <kevin.burge@…>, 10 years ago

The patch resolves the compilation error. I did not test the behavior, though. Thank you!

comment:4 by viboes, 10 years ago

Milestone: To Be DeterminedBoost 1.54.0

comment:5 by viboes, 10 years ago

Resolution: fixed
Status: assignedclosed

Merged [82838]

Note: See TracTickets for help on using tickets.