Re: [HelenOS-devel] POSIX functions defines conflicts with properties of same name

2012-08-10 Thread Vojtech Horky
Hello. 2012/7/27 Jiří Zárevúcky : > Every function that is shadowed by something in libposix would > actually have to be implemented under a different name (e.g. > __libc_memcpy()). I would like to vote against this. It would horribly pollute the namespace, it looks ugly and I am not sure how well

Re: [HelenOS-devel] POSIX functions defines conflicts with properties of same name

2012-07-29 Thread Zdenek Bouska
#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 macr

Re: [HelenOS-devel] POSIX functions defines conflicts with properties of same name

2012-07-27 Thread Jiří Zárevúcky
On 27 July 2012 22:36, Martin Sucha wrote: >> > According to ELF specification, an undefined weak symbol does not >> > generate an error message, but is instead set to zero. This could make >> > debugging harder if you forget about it (a run-time error instead of >> > link-time error). >> >> I don

Re: [HelenOS-devel] POSIX functions defines conflicts with properties of same name

2012-07-27 Thread Martin Sucha
On Friday 27 July 2012 22:08:02 Jiří Zárevúcky wrote: > On 27 July 2012 21:26, Martin Sucha wrote: > > On Friday 27 July 2012 19:38:01 Jiří Zárevúcky wrote: > >> On 27 July 2012 18:46, Martin Sucha wrote: > >> > [...] > >> > > >> > Anyway, I think the proper solution is to correctly replace func

Re: [HelenOS-devel] POSIX functions defines conflicts with properties of same name

2012-07-27 Thread Jiří Zárevúcky
On 27 July 2012 21:26, Martin Sucha wrote: > On Friday 27 July 2012 19:38:01 Jiří Zárevúcky wrote: >> On 27 July 2012 18:46, Martin Sucha wrote: >> > [...] >> > >> > Anyway, I think the proper solution is to correctly replace function >> > names in the sources that need the substitution to occur,

Re: [HelenOS-devel] POSIX functions defines conflicts with properties of same name

2012-07-27 Thread Martin Sucha
On Friday 27 July 2012 19:38:01 Jiří Zárevúcky wrote: > On 27 July 2012 18:46, Martin Sucha wrote: > > [...] > > > > Anyway, I think the proper solution is to correctly replace function > > names in the sources that need the substitution to occur, but I can't > > think of a way to achieve this us

Re: [HelenOS-devel] POSIX functions defines conflicts with properties of same name

2012-07-27 Thread Jiří Zárevúcky
On 27 July 2012 18:46, Martin Sucha wrote: > [...] > > Anyway, I think the proper solution is to correctly replace function names in > the sources that need the substitution to occur, but I can't think of a way to > achieve this using the C preprocessor. Maybe we could use a wrapper around the > C

Re: [HelenOS-devel] POSIX functions defines conflicts with properties of same name

2012-07-27 Thread Martin Sucha
Hi Zdenek, On Friday 27 July 2012 16:48:23 Zdenek Bouska wrote: > POSIX functions defines at the end of uspace/lib/posix/unistd.h > conflicts with properties with same name. > > I have modified it [1] to avoid this by changing > #define truncate posix_truncate > to > #define truncate(...) posix_t

[HelenOS-devel] POSIX functions defines conflicts with properties of same name

2012-07-27 Thread Zdenek Bouska
Hi all, POSIX functions defines at the end of uspace/lib/posix/unistd.h conflicts with properties with same name. I have modified it [1] to avoid this by changing #define truncate posix_truncate to #define truncate(...) posix_truncate(##__VA_ARGS__) Problem is now only with function pointer p