This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Some comments on the patches:
This can be simply+ c_fix_arg = "%0\n" + "#define ioctl(fd, func, arg) ((ioctl)((fd), (func), ((int)(arg))))\n";
#define ioctl(fd, func, arg) ioctl(fd, func, (int)arg)
thanks to C and cpp precedence rules.
The idea is I don't want to break existing code, so I only want this macro to take effect inside of GCC proper, as (AFAIK) anything built with the new compiler gets the fixed includes, and there's lots of VxWorks code that relies on single-argument mkdir.+ 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.
I set it to only vxworks for now as that's the only platform that I 1. know has the issue and 2. know that it's safe to do this change.
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)
-- Robert Mason
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |