Il 23/08/2012 04:27, rbmj ha scritto: >> >> sed '/if test -s .{MACRO_LIST}/s/$/ && false/' \ >> ${srcdir}/fixinc.in > ${target} >> >> for vxworks rather than all that configury rigmarole. >> That would eliminate changes to gcc/configure.ac and gcc/Makefile.in. > > I didn't even think of that. I was probably doing all my fixes in the > Makefile because that was where I was looking with the original > problem. However, I'm looking at the result of that sed command, and I > don't think that the && is going to work, as when I run that sed command > I just get whitespace there. IIRC, sed handles '&' differently so it > probably needs to be escaped. I'll see if I get a chance to test that > later on.
Yes, & is equivalent to \0. You need \&\& instead. Some comments on the patches: > + c_fix_arg = "%0\n" > + "#define ioctl(fd, func, arg) ((ioctl)((fd), (func), > ((int)(arg))))\n"; This can be simply #define ioctl(fd, func, arg) ioctl(fd, func, (int)arg) thanks to C and cpp precedence rules. > > + c_fix_arg = "%0\n" > + "#ifdef IN_GCC\n" > + "#define mkdir(dir, mode) ((mode), (mkdir)(dir))\n" > + "#endif\n"; Are you sure about the #ifdef/#endif? In fact, you definitely do not want a _global_ include to have a dependency on a user symbol. > Add fix to make write() const correct on VxWorks > > VxWorks' write() takes its second argument as non-const, so the > compiler complains if one tries to pass a const pointer to it. I think this does not need to be VxWorks-specific, but I'm not sure of the standards for fixincludes. Bruce? > Subject: [PATCH 10/10] Make open() call more compatible in gcc/gcov-io.c > > In gcc/gcov-io.c, the call to open() only has two arguments. This > is fine, as long as the system open() is standards compliant. So you have to add another fixincludes hack, adding a macro indirection like the one you have for ioctl: #define open(a, b, ...) __open(a, b , ##__VA_ARGS__, 0660) #define __open(a, b, c, ...) (open)(a, b, c) Please make these adjustments and resubmit. Thanks! Paolo