public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "Alejandro Colomar (man-pages)" <alx.manpages@gmail.com>
To: наб <nabijaczleweli@nabijaczleweli.xyz>
Cc: libc-alpha@sourceware.org, Jakub Wilk <jwilk@jwilk.net>,
	Zack Weinberg <zackw@panix.com>,
	Stefan Puiu <stefan.puiu@gmail.com>,
	Michael Kerrisk <mtk.manpages@gmail.com>
Subject: Re: [PATCH] sys/types.h: Define new types: [s]nseconds_t
Date: Tue, 7 Dec 2021 19:20:07 +0100	[thread overview]
Message-ID: <114d5ecb-d64e-0b62-4aea-88cc31da80ea@gmail.com> (raw)
In-Reply-To: <20211207131750.h2quh3di6ml3psbz@tarta.nabijaczleweli.xyz>

Hi наб,

On 12/7/21 14:17, наб wrote:
> On Tue, Dec 07, 2021 at 12:19:58PM +0100, Alejandro Colomar wrote:
>> For symmetry with the existing [s]useconds_t types.
> If you'd hold on to your horses, like, until the next WG14 meeting,
> turns out I know a guy who knows a guy, but my guy is the WG14 project
> editor, and I'm like, a day's away from getting an N number and turns
> out getting your "C defect" paper through is pretty easy if you don't
> have to sit in an NB meeting yourself.
> (Granted, this wouldn't have to be a paper at all if this were C++,
>   but this is pretty good as-is.)

Sounds great! :)

I'll continue with my glibc patch as a draft, to learn how glibc types 
are defined (there's a lot of magic I still need to learn), but will 
wait for the results of your C2X proposal before merging this to glibc.

As Zack suggested, an unsigned version is probably unnecessary, so I'll 
use nsec_t for the patches, as you used in your draft.  I like short 
names, and also signed types.

> 
> You can find my current draft:
>    https://srhtcdn.githack.com/~nabijaczleweli/wg14/blob/868d3e096db0fe4378d77cd67215bed56045196d/N%3F%3F%3F%3F.pdf

It looks good.

Would you mind sharing the source code of your pdf?  I'm curious to 
learn to write those papers.

Also, please CC me when you have any news on that :)

> accepting this would mean just a
>    typedef decltype(struct timespec::tv_nsec) nsec_t;
> to make the implementation C2X conformant again.

Hmm, not sure if it would be better for glibc to define nsec_t in terms 
of timespec, or the other way around.  I had in mind something like the 
following:

Here would go many ifdefs:
typedef /* probably */ long nsec_t;


And this would be clean:
struct timespec {
     ...
     nsec_t tv_nsec;
};


Thanks,
Alex

-- 
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/

  reply	other threads:[~2021-12-07 18:20 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-07 11:19 Alejandro Colomar
2021-12-07 12:36 ` Andreas Schwab
2021-12-07 13:17 ` наб
2021-12-07 18:20   ` Alejandro Colomar (man-pages) [this message]
2021-12-07 21:48     ` наб
2021-12-07 19:10   ` Joseph Myers
2021-12-07 15:50 ` Zack Weinberg
2021-12-07 18:24   ` Alejandro Colomar (man-pages)
2021-12-07 21:48 ` [RFC v2 1/2] sys/types.h: Define new type: snseconds_t Alejandro Colomar
2021-12-07 23:56   ` Joseph Myers
2021-12-08  0:17     ` Paul Eggert
2021-12-08  0:29   ` Rich Felker
2021-12-08  2:26     ` Zack Weinberg
2021-12-08  3:05       ` Rich Felker
2021-12-08 14:34         ` Zack Weinberg
2021-12-08 17:38           ` Rich Felker
2021-12-08 19:52             ` Zack Weinberg
2021-12-08 18:15           ` Adhemerval Zanella
2021-12-08 21:41           ` Joseph Myers
2021-12-07 22:05 ` [RFC v2 2/2] sys/types.h: struct timespec: Use snseconds_t for tv_nsec Alejandro Colomar
2021-12-08 14:47 ` [RFC v3 1/3] bits/types[izes].h: Define new internal type: __snseconds_t Alejandro Colomar
2021-12-08 14:47 ` [RFC v3 2/3] sys/types.h: struct timespec: Use __snseconds_t for tv_nsec Alejandro Colomar
2021-12-08 14:53   ` Zack Weinberg
2021-12-08 15:17     ` Alejandro Colomar (man-pages)
2021-12-08 15:24     ` Joseph Myers
2021-12-08 15:47       ` Alejandro Colomar (man-pages)
2021-12-08 15:59       ` Zack Weinberg
2021-12-08 17:44         ` Rich Felker
2021-12-08 14:48 ` [RFC v3 3/3] sys/types.h: Make snseconds_t user visible Alejandro Colomar
2021-12-08 14:55   ` Zack Weinberg
2021-12-08 15:15     ` Alejandro Colomar (man-pages)
2021-12-08 18:12   ` Paul Eggert
2021-12-08 18:25     ` Rich Felker
2021-12-08 20:10       ` Zack Weinberg
2021-12-08 20:34         ` Rich Felker
2021-12-08 21:12         ` Adhemerval Zanella
2021-12-08 21:53           ` Alejandro Colomar (man-pages)
2021-12-09 19:20             ` Adhemerval Zanella
2021-12-09 19:42           ` Paul Eggert
2021-12-09 19:52             ` Adhemerval Zanella
2021-12-09 20:13             ` Joseph Myers
2021-12-09 20:17               ` Rich Felker
2021-12-09 20:23             ` Alejandro Colomar (man-pages)
2021-12-09 20:29               ` Joseph Myers
2021-12-09 20:34                 ` Alejandro Colomar (man-pages)
2021-12-09 20:40                   ` Joseph Myers

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=114d5ecb-d64e-0b62-4aea-88cc31da80ea@gmail.com \
    --to=alx.manpages@gmail.com \
    --cc=jwilk@jwilk.net \
    --cc=libc-alpha@sourceware.org \
    --cc=mtk.manpages@gmail.com \
    --cc=nabijaczleweli@nabijaczleweli.xyz \
    --cc=stefan.puiu@gmail.com \
    --cc=zackw@panix.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 read-only IMAP folder(s) and NNTP newsgroup(s).