public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <colomar.6.4.3@gmail.com>
To: Florian Weimer <fweimer@redhat.com>,
	Alejandro Colomar via Libc-alpha <libc-alpha@sourceware.org>
Cc: mtk.manpages@gmail.com, linux-man@vger.kernel.org
Subject: Re: [PATCH 1/2] system_data_types.7: Document size_t
Date: Fri, 18 Sep 2020 17:53:15 +0200	[thread overview]
Message-ID: <3d88ecab-1c36-9081-4195-4e1fd054fadf@gmail.com> (raw)
In-Reply-To: <87tuvv5f24.fsf@oldenburg2.str.redhat.com>

Hello Florian,

On 2020-09-18 16:34, Florian Weimer wrote:
 > * Alejandro Colomar via Libc-alpha:
 >
 >> +Used for a count of bytes.  It is the result of the
 >> +.I sizeof
 >> +operator.
 >> +According to the C language standard,
 >> +it shall be an unsigned integer type
 >> +capable of storing values in the range [0,
 >> +.BR SIZE_MAX ].
 >
 > Thanks for working on this.

:-)

 > Maybe add that this commonly maps to unsigned int or unsigned long, and

I thought the same in the beginning,
but then Michael convinced me to not do it.

On 2020-09-13 22:20, Michael Kerrisk (man-pages) wrote:
 >>>> Is it a 32-bit or 64-bit or may vary? Is it signed or unsigned?
 >>> POSIX doesn't specify, I think.>
 >>> One other thing the page should show of course is definition of the
 >>> structure types.
 >> Yes.
 >>
 >>
 >>      timer_t     <time.h> or <sys/types.h>
 >>          POSIX timer ID.
 >>
 >>          typedef void *timer_t;
 > Here I would *not* show these kinds of typedefs. The point is
 > that these types should be treated as being somewhat unknown
 > (e.g., for casts in printf()). Here, I think instead maybe we
 > just have a statement that POSIX makes no specific requirements
 > for the representation of this type.

I think I prefer to leave it opaque, showing only the requirements
that POSIX and C make.

There's really not much gain (basically uint and ulong cover most of the
possibilities; and still it's not a guarantee).
And readers might write non-portable code because of reading that.

On 2020-09-18 16:34, Florian Weimer wrote:
 > that the length modifier for printf and scanf is z, commently used as
 > %zu or %zx (%zd is for ssize_t).

Good idea.

Would you prefer that, or just refer to printf(3) in See also?.

 >
 > Florian
 >

Thanks,

Alex

  reply	other threads:[~2020-09-18 15:53 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-18 11:27 [PATCH 0/2] Document size_t Alejandro Colomar
2020-09-18 11:27 ` [PATCH 1/2] system_data_types.7: " Alejandro Colomar
2020-09-18 14:34   ` Florian Weimer
2020-09-18 15:53     ` Alejandro Colomar [this message]
2020-09-18 17:27       ` Florian Weimer
2020-09-18 17:42     ` Paul Eggert
2020-09-18 17:53       ` Florian Weimer
2020-09-30 15:50       ` Joseph Myers
2020-09-18 20:13   ` Michael Kerrisk (man-pages)
2020-09-28 13:41   ` Dave Martin
2020-09-28 13:48     ` Alejandro Colomar
2020-09-28 13:55       ` G. Branden Robinson
2020-09-28 14:15         ` Dave Martin
2020-09-28 14:51           ` Alejandro Colomar
2020-09-28 15:16             ` [RFC] system_data_types.7: wfix + ffix Alejandro Colomar
2020-09-29 10:37               ` Dave Martin
2020-09-29 11:34                 ` Michael Kerrisk (man-pages)
2020-09-29 12:10                   ` Alejandro Colomar
2020-09-29 14:22                     ` [PATCH v2] system_data_types.7: Improve "Include" wording and format, and explain it in NOTES Alejandro Colomar
2020-09-29 14:43                       ` Dave Martin
2020-09-29 14:52                         ` Alejandro Colomar
2020-09-29 15:06                           ` Michael Kerrisk (man-pages)
2020-09-29 15:13                             ` Dave Martin
2020-09-29 15:21                               ` Alejandro Colomar
2020-09-29 15:10                           ` Dave Martin
2020-09-29 11:57                 ` [RFC] system_data_types.7: wfix + ffix Alejandro Colomar
2020-09-30 17:16             ` [PATCH 1/2] system_data_types.7: Document size_t Joseph Myers
2020-09-29 11:11           ` Michael Kerrisk (man-pages)
2020-09-28 14:47         ` Alejandro Colomar
2020-09-18 11:27 ` [PATCH 2/2] size_t.3: New link to new documented type in system_data_types(7) Alejandro Colomar
2020-09-18 20:14   ` Michael Kerrisk (man-pages)
2020-09-18 20:13 ` [PATCH 0/2] Document size_t Michael Kerrisk (man-pages)
2020-09-18 21:28   ` Alejandro Colomar
2020-09-18 21:32     ` Florian Weimer

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=3d88ecab-1c36-9081-4195-4e1fd054fadf@gmail.com \
    --to=colomar.6.4.3@gmail.com \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-man@vger.kernel.org \
    --cc=mtk.manpages@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