use of iconv() in main.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jean,

it looks like __UCLIBC__ is what you're looking for.

from my /usr/include/features.h:

[...]

/* This macro indicates that the installed library is uClibc.  Use
 * __UCLIBC_MAJOR__ and __UCLIBC_MINOR__ to test for the features in
 * specific releases.  */
#define __UCLIBC__    1

thanks for your trouble.  Let me know if you'd like to have the
whole features.h file.

cheers,

Rob Urban

You wrote:
> 
> > > Is there a way we could detect the use of uClibc? If there is a known
> > > #define, we could use it to automatically disable the use of iconv.
> > 
> > In the case of cross-compiling, there is probably a way of detecting 
> > it's use. However, I'm using a chroot-environment and then just 
> > running make with the defaults.
> 
> I was thinking of a test like this within the C source code:
> #if defined(__GLIBC__) && __GLIBC__ == 2
> #include <something>
> #endif
> 
> We have this for detecting glibc 2.x. Maybe there is a similar symbol defined
> for uClib? If there is, we could rely on it to automatically disable the use
> of iconv. This would work for both the cross-compilation and the
> chroot-environment cases.
> 
> For glibc 2.3, the symbol is defined in include/features.h. Could you please
> take a look at this file (or any other you see fit) in your uClibc compilation
> environment and search for a similar line? If you find something relevant, let
> us know.



[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux