On Fri, Apr 06, 2007 at 06:27:11PM +0200, Pawel Jakub Dawidek wrote: > > Feel free to invent any other __*_VISIBLE tag to exclude this addition > > from namespace for programs which may define their own SEEK_DATA etc > > which is allowed f.e. in POSIX namespace. Look like other __*_VISIBLE tags > > are implemented and what they does. Default is turn all on. > > Ok, can someone help me with this?
The very basics are: application request particular namespace at compile time using -D_*_SOURCE define. According to choosed _*_SOURCE some of __*_VISIBLE macros are defined and some not (if no namespace choosed, all __*_VISIBLE are defined, default case). According to __*_VISIBLE macros defined some functions or definitions becomes hidden or visible. See the very end of /sys/sys/cdefs.h for live examples. __*_VISIBLE macros are in form __<standard or platform>_VISIBLE For example can be __CDDL_VISIBLE or __ZFS_VISIBLE (depends on exactly where those extensions was introduced). Lets take __ZFS_VISIBLE for the rest of explanation. You need to directly hide those extensions for every particular _*_SOURCE namespace, i.e. add #define __ZFS_VISIBLE 0 to all of them and enable extensions #define __ZFS_VISIBLE 1 only for the last (default) case (at the very end of /sys/sys/cdefs.h) Then use (for unistd.h) #if __ZFS_VISIBLE #define SEEK_DATA ... #endif Try to asking more help at standards@ or bde@ who notice it first and knows this thing apparenly better than me. > > In any case adding them to stdio.h is premature action - I not see yet > > corresponding fseek() code. > > I'm looking at removing it from stdio.h. Good. -- http://ache.pp.ru/
pgpDmlc9vgrsW.pgp
Description: PGP signature
