Re: [PATCH 2/3] check if __GLIBC__ is defined before using _FILE_OFFSET_BITS

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

 



On 08/27/2013 01:18 AM, Lucas De Marchi wrote:
On Mon, Aug 26, 2013 at 3:20 PM, John Spencer<maillist-kmod@xxxxxxxxxxx>  wrote:
_FILE_OFFSET_BITS is a glibc internal macro.
musl provides 64bit off_t by default, but
defines stat64 etc as macros to make glibc-centric
programs happy. however the expansion causes
problems with the hack used here to work around
glibc's 32bit past...

AFAIK this define comes from AC_SYS_LARGEFILE in autoconf and ends up
in our config.h. Checking for the libc in source code is not much
future proof and I'd like to avoid it.  If this is not the right
define to pick, is there any other one?

Maybe it would be better to do like this:

#ifndef _FILE_OFFSET_BITS
#ifndef stat64
WRAP_2ARGS(int, -1, stat64, struct stat64*);
#endif
...

Because if it's a macro, there's no need to wrap the call.

Yes, that would work as well.


Lucas De Marchi


Thanks,
--JS

--
To unsubscribe from this list: send the line "unsubscribe linux-modules" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux