This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/53457] 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: Thu, 24 May 2012 20:39:20 +0000
- Subject: [Bug libstdc++/53457] Accommodate non-compliant ioctl() on VxWorks
- Auto-submitted: auto-generated
- References: <bug-53457-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53457
--- Comment #5 from rbmj at verizon dot net 2012-05-24 20:39:20 UTC ---
Would something like the following fixincludes hacks work?
/*
* Wrap VxWorks ioctl to keep everything pretty
*/
fix = {
hackname = vxworks_ioctl_macro;
files = ioLib.h;
test = " -r vxWorks.h ";
c_fix = format;
c_fix_arg = "%0\n"
"#define ioctl(fd, func, arg) ((ioctl)((fd), (func), ((int)(arg))))\n";
c_fix_arg = "extern[\t ]+int[\t ]+ioctl[\t ]*\([\t ,[:alnum:]]\);";
test_text = "`touch vxWorks.h`"
"extern int ioctl ( int asdf1234, int jkl, int qwerty ) ;";
};
/*
* This hack makes makes unistd.h more POSIX-compliant on VxWorks
*/
fix = {
hackname = vxworks_unistd;
files = unistd.h;
test = " -r vxWorks.h ";
select = "#[\t ]*include[\t ]+<vxWorks.h>";
c_fix = format;
c_fix_arg = "%0\n#include <ioLib.h>\n"
"#ifndef STDIN_FILENO\n"
"#define STDIN_FILENO 0\n"
"#endif\n"
"#ifndef STDOUT_FILENO\n"
"#define STDOUT_FILENO 1\n"
"#endif\n"
"#ifndef STDERR_FILENO\n"
"#define STDERR_FILENO 2\n"
"#endif\n";
test_text = "`touch vxWorks.h`"
"#include <vxWorks.h>\n";
};
For some reason fixincludes doesn't seem to be doing *anything* when I build
though - I'm confused as to how I run it. Though looking at fixincludes/README
and the make check tests, everything *looks* correct.
I'm not sure why fixincludes doesn't appear to be applying any fixes. I can't
find any headers in GCC's build tree that it's applying to, and it's not
applying them to the system headers either.