This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/53457] New: Accommodate non-compliant ioctl() on VxWorks
- From: "rbmj at verizon dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 22 May 2012 20:07:49 +0000
- Subject: [Bug libstdc++/53457] New: Accommodate non-compliant ioctl() on VxWorks
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53457
Bug #: 53457
Summary: Accommodate non-compliant ioctl() on VxWorks
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: rbmj@verizon.net
CC: rbmj@verizon.net
Host: x86_64-linux-gnu
Target: powerpc-wrs-vxworks
Build: x86_64-linux-gnu
Created attachment 27480
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27480
Patch
On VxWorks, ioctl()'s third argument is of type int, so this added
macro wraps over ioctl to cast the third argument to an integer.
This *cannot* be in config/os/vxworks/os_defines.h as otherwise
the function prototype will trigger the macro and it will be ugly.
Alternate solution is to #ifdef at the call site.
Attached patch is against trunk. Without it the compile fails because VxWorks
ioctl() requires third argument to be of type int, and C++ doesn't allow
implicit conversion from pointer to integer.