Igor Marnat wrote:
Hello Frank,
FH> So you might want to try adding an autoconf check for <features.h>, FH> and changing rts/rts.h to something like:
FH> #ifdef HAVE_FEATURES_H FH> #include <features.h> FH> #endif
FH> #if !defined (__UCLIBC__) || defined (__UCLIBC_HAS_LFS__) FH> [ ... _LARGEFILE64_SOURCE etc. defines ... ] FH> #endif
FH> If this works, send me a patch so I can integrate it.
FH> However, I generally don't like system-specific code (as opposed to FH> feature-specific code). So if you find any macros with more general FH> names, I'd strongly prefer them instead.
So am I. Why don't you want just remove these definitions about [ ... _LARGEFILE64_SOURCE etc. defines ... ]?
Because the library (glibc at least) then uses 32 bit file routines which we don't want (by default) as the limitation is becoming more and more practically relevant.
I think it's a problem of C library, when you include any C headers, they automagically includes in turn system includes and C library inlcudes where system's and librariy's configuration definitions lies. Why should you include just these two system defines here and leave all others on their places?
This is not library configuration (i.e., at library build time), but rather library usage (i.e., program compile time) defines. AFAIUI, the intended usage is for programs (or other libraries, as in our case) to define them (before including system headers) if wanted.
glibc provides both 32 and 64 bit routines, and these variables let a program choose between them.
Frank