public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Bruno Haible <bruno@clisp.org>
To: bug-gnulib@gnu.org
Cc: Albert ARIBAUD <albert.aribaud@3adev.fr>,
	Paul Eggert <eggert@cs.ucla.edu>,
	libc-alpha@sourceware.org
Subject: Re: [PATCH 1/1] Y2038: add function __difftime64
Date: Thu, 05 Jul 2018 21:17:00 -0000	[thread overview]
Message-ID: <5612380.WK46iGFktE@omega> (raw)
In-Reply-To: <20180705223801.6e19c637@athena>

Albert ARIBAUD wrote:
> I was under the impression that you wanted the
> 64-bit-time stuff to go in gnulib before it went in glibc, so I don't
> get what the "once glibc has such a macro" means. Can you elaborate on
> what you had in mind?

I can't speak for Paul, but for me the sequence of steps that produces the
desired result with the least effort would be:

  1) glibc implements the 'time_t' type that depends on the value _TIME_BITS
     defined at preprocessor level, like you described. Including support for
     'gettimeofday', 'stat', 'fstat' and the like.
     While doing so, pay attention that the implementation of mktime, strftime,
     strptime, etc. can be compiled with a 32-bit time_t or a 64-bit time_t.

  2) gnulib modifies its year2038 module to define _TIME_BITS to 64 at configure
     time, on platforms where glibc supports it.

  3) During the next source-code sync from glibc to gnulib, involving mktime.c
     etc., the gnulib people (likely Paul) make sure that this source code can
     still be used on non-glibc platforms with either 32-bit time_t or 64-bit
     time_t. Usually this involves a couple of #ifs and conditional #includes.
     These changes can then flow back into glibc. They won't have a functional
     effect in glibc, therefore won't break the atomicity of step 1.

AFAICS, steps 3 could also be executed before step 2.

Bruno

  reply	other threads:[~2018-07-05 21:17 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-20 12:14 [PATCH 0/1] Y2038 support batch 3 - difftime Albert ARIBAUD (3ADEV)
2018-06-20 12:14 ` [PATCH 1/1] Y2038: add function __difftime64 Albert ARIBAUD (3ADEV)
2018-06-20 19:29   ` Paul Eggert
2018-06-20 20:55     ` Albert ARIBAUD
2018-06-21 21:17       ` Paul Eggert
2018-06-25 22:32         ` Albert ARIBAUD
2018-06-25 23:56           ` Paul Eggert
2018-06-27 11:03             ` Albert ARIBAUD
2018-07-05 18:36               ` Albert ARIBAUD
2018-07-05 19:13                 ` Zack Weinberg
2018-07-05 19:40                 ` Paul Eggert
2018-07-05 20:38                   ` Albert ARIBAUD
2018-07-05 21:17                     ` Bruno Haible [this message]
2018-07-06  5:06                       ` Albert ARIBAUD
2018-07-06 22:54                         ` Paul Eggert
2018-07-06 22:40                       ` Paul Eggert
2018-07-06 22:37                     ` Paul Eggert
2018-07-17 20:40                   ` Joseph Myers
2018-07-05 20:50                 ` time_t in gnulib Bruno Haible

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=5612380.WK46iGFktE@omega \
    --to=bruno@clisp.org \
    --cc=albert.aribaud@3adev.fr \
    --cc=bug-gnulib@gnu.org \
    --cc=eggert@cs.ucla.edu \
    --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).