linux-modules.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Spencer <maillist-kmod@barfooze.de>
To: Lucas De Marchi <lucas.de.marchi@gmail.com>
Cc: John Spencer <maillist-kmod@barfooze.de>,
	linux-modules <linux-modules@vger.kernel.org>
Subject: Re: [PATCH 2/3] check if __GLIBC__ is defined before using _FILE_OFFSET_BITS
Date: Tue, 27 Aug 2013 01:52:37 +0200	[thread overview]
Message-ID: <521BEA45.9070502@barfooze.de> (raw)
In-Reply-To: <CAKi4VALHoH3AYJff-AGNFKctrKX3vS8MFtLqos0ejv_pfaGjWQ@mail.gmail.com>

On 08/27/2013 01:18 AM, Lucas De Marchi wrote:
> On Mon, Aug 26, 2013 at 3:20 PM, John Spencer<maillist-kmod@barfooze.de>  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

  reply	other threads:[~2013-08-26 23:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-26 18:20 [PATCH 1/3] remove non-portable usage of strndupa John Spencer
2013-08-26 18:20 ` [PATCH 2/3] check if __GLIBC__ is defined before using _FILE_OFFSET_BITS John Spencer
2013-08-26 23:18   ` Lucas De Marchi
2013-08-26 23:52     ` John Spencer [this message]
2013-08-26 18:20 ` [PATCH 3/3] testsuite: fix usage of reserved names John Spencer
2013-08-26 23:07   ` Lucas De Marchi
2013-08-26 23:38     ` [PATCH 3/3 v2] " John Spencer
2013-08-26 23:49     ` [PATCH 3/3] " John Spencer
2013-08-29  4:23   ` Lucas De Marchi
2013-08-26 20:42 ` [PATCH 1/3] remove non-portable usage of strndupa Kay Sievers
2013-08-26 23:46 ` Lucas De Marchi
2013-08-27  0:16   ` John Spencer
2013-08-27  0:58     ` Kay Sievers
2013-08-27  3:35     ` Lucas De Marchi
2013-08-27  9:04       ` John Spencer
2013-08-29  3:49         ` Lucas De Marchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=521BEA45.9070502@barfooze.de \
    --to=maillist-kmod@barfooze.de \
    --cc=linux-modules@vger.kernel.org \
    --cc=lucas.de.marchi@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).