#define truncate(...) posix_truncate(##__VA_ARGS__)
I think this not good workaround either, as a valid posix program may use a
code similar to your workaround, like this:
Thanks, I didn't think of this case. I have reverted this change in my branch.

Another workaround is to undefine the macro temporarily, but it is probably
even more ugly:
#pragma push_macro("truncate")
#undef truncate
fs->op.truncate(path, size)
#pragma pop_macro("truncate")
I'm currently using this workaround. Yes it is also ugly, but it has the benefit of no code modification and I can use it for the whole file.

Zdenek

_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/cgi-bin/listinfo/helenos-devel

Reply via email to