inotify patch
Peter S. Mazinger
ps.m at gmx.net
Wed Jun 21 00:30:34 UTC 2006
On Tue, 20 Jun 2006, Mike Frysinger wrote:
> On Tuesday 20 June 2006 13:49, Peter S. Mazinger wrote:
> > - uClibc normally does not provide dummies for the case a syscall is not
> > present
>
> i was thinking about this ... it's a good idea to always provide the symbol
> even if it isnt supported, otherwise you have an inconsistent ABI and that's
> bad mmmkay
that would "correct" the issue, that a header has the prototype that
can't be probably guarded (only w/ __NR_x that I do not really like)
>
> glibc does this by just setting errno to -ENOSYS and returning an error
>
> to save on space, what if we do something like:
> - define two internal functions like __uclibc_not_implemented_return_{0,1}
> the functions would set errno to -ENOSYS and return the respective value
> - create some macro's in libc-symbols.h to alias to these stubs
> #define libc_enosys_stub_ret1(name) \
> weak_alias(name, __uclibc_not_implemented_return_1)
probably you mean weak_alias(__uclibc_not_implemented_return_x,name)
should there be maybe a link_warning about the stub too?
>
> > I think it would be good to have a config option that enables/disables new
> > 2.6 related syscalls (in headers as well)
>
> ive been pondering this for a while now but cant come up with a good
> solution ... restricting this to a linux version (2.4 vs 2.6 vs foo) is
> thinking too small ... what about a user_config.h that contains a list of
> defines and they can enable/disable functions as they see fit, and then the
> header gets pulled in via libc-symbols.h (since that is included everywhere
> already)
that header should probably be included by some other later visible one
(features.h/cdefs.h), so that the info can be used for guarding
prototypes as well, for the build system libc-symbols.h is for sure the best.
the file could provide some defaults for 2.4 and 2.6 as well.
Peter
>
> user_config.h:
> /* #define NO_SYSCALL_POSIX_FADVISE */
> posix_fadvise.c:
> #ifndef NO_SYSCALL_POSIX_FADVISE
> ...
> #endif
> -mike
>
--
Peter S. Mazinger <ps dot m at gmx dot net> ID: 0xA5F059F2
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08 BB6E C389 975E A5F0 59F2
More information about the uClibc
mailing list