From: Albert ARIBAUD <albert.aribaud@3adev.fr>
To: Florian Weimer <fweimer@redhat.com>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH 2/2] Y2038: make __tz_convert compatible with 64-bit-time
Date: Wed, 13 Jun 2018 10:21:00 -0000 [thread overview]
Message-ID: <20180613122050.511c16e1@athena> (raw)
In-Reply-To: <290446d5-cbe0-c49d-85bf-3416118786d5@redhat.com>
Hi Florian,
On Wed, 13 Jun 2018 11:40:04 +0200, Florian Weimer <fweimer@redhat.com>
wrote :
> On 06/13/2018 11:36 AM, Albert ARIBAUD wrote:
> > Hi Florian,
> >
> > On Wed, 13 Jun 2018 11:10:09 +0200, Florian Weimer <fweimer@redhat.com>
> > wrote :
> >
> >> On 06/13/2018 09:00 AM, Albert ARIBAUD (3ADEV) wrote:
> [...]
> >>
> >> Functions in the private namespace should be exported as GLIBC_PRIVATE.
> >> Except __gmtime64_r, these functions have unwanted side effects and
> >> cannot really be called from other parts of glibc anyway.
> >
> > They're going to be implementations of APIs called from user source code
> > if/when it defines _TIME_BITS equal to 64 (that'll be the last patch in
> > the whole series), so I don't understand how they could be considered
> > GLIBC_PRIVATE.
>
> Why do they use the __ prefix? We generally do not do that.
I believe it stemmed from the fact that source code should not spell
these functions by their explicit name -- that name is to be used by
glibc only. User source code should keep using the historical names
(here, "gmtime_r"); if it has defined _TIME_BITS equal to 64, then the
glibc public headers will alias (or barring that, #define) gmtime_r to
__gmtime64_r (the 64-bit-time implementation); otherwise, "gmtime_r"
will be used as-is (the 32-bit-time implementation).
So to make sure the symbols were considered to not be for (direct)
public use, they have to start with an underscore.
> > As for the side effects, which ones are you thinking of? The ones I am
> > aware of are those already present in the 32-bit-time versions and are
> > "regrettable but established behavior".
>
> The side effects simply mean that we cannot call this functions as an
> internal implementation detail of another function, so there should be
> no reason for an export in the private namespace (with the __prefix and
> GLIBC_PRIVATE).
Actually another function can call these functions -- the 32-bit-time
wrappers do that exactly. I must be missing your point.
> Thanks,
> Florian
Cordialement,
Albert ARIBAUD
3ADEV
next prev parent reply other threads:[~2018-06-13 10:21 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-13 7:00 [PATCH 0/2] Y2038 support batch 1 - __time64_t and __tz_convert Albert ARIBAUD (3ADEV)
2018-06-13 7:00 ` [PATCH 1/2] Y2038: add type __time64_t Albert ARIBAUD (3ADEV)
2018-06-13 8:38 ` Paul Eggert
2018-06-13 12:36 ` Albert ARIBAUD
2018-06-13 14:13 ` Joseph Myers
2018-06-13 16:19 ` Albert ARIBAUD
2018-06-13 16:35 ` Paul Eggert
2018-06-13 16:39 ` Joseph Myers
2018-06-13 18:46 ` Paul Eggert
2018-06-13 7:00 ` [PATCH 2/2] Y2038: make __tz_convert compatible with 64-bit-time Albert ARIBAUD (3ADEV)
2018-06-13 9:10 ` Florian Weimer
2018-06-13 9:37 ` Albert ARIBAUD
2018-06-13 9:40 ` Florian Weimer
2018-06-13 10:21 ` Albert ARIBAUD [this message]
2018-06-13 10:55 ` Albert ARIBAUD
2018-06-13 13:08 ` Florian Weimer
2018-06-13 14:29 ` Joseph Myers
2018-06-13 14:24 ` Joseph Myers
2018-06-18 13:34 ` Florian Weimer
2018-06-13 9:11 ` Paul Eggert
2018-06-13 9:14 ` Florian Weimer
2018-06-13 9:30 ` Albert ARIBAUD
2018-06-13 14:22 ` Joseph Myers
2018-06-13 14:18 ` Joseph Myers
2018-06-13 7:59 ` [PATCH 0/2] Y2038 support batch 1 - __time64_t and __tz_convert Albert ARIBAUD
2018-06-13 14:08 ` Joseph Myers
2018-06-13 15:38 ` Albert ARIBAUD
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=20180613122050.511c16e1@athena \
--to=albert.aribaud@3adev.fr \
--cc=fweimer@redhat.com \
--cc=libc-alpha@sourceware.org \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).