From: Petr Vorel <pvorel@suse.cz>
To: musl@lists.openwall.com
Cc: Rich Felker <dalias@libc.org>, Leah Neukirchen <leah@vuxu.org>
Subject: Re: [PATCH 1/2] define daddr_t type
Date: Fri, 7 Jun 2019 22:57:28 +0200 [thread overview]
Message-ID: <20190607205728.GA16266@x230> (raw)
In-Reply-To: <874l518snc.fsf@vuxu.org>
> Rich Felker <dalias@libc.org> writes:
> > On Fri, Jun 07, 2019 at 07:53:29AM +0200, Petr Vorel wrote:
> >> Hi Rich,
> >> ....
> >> > > +++ b/include/sys/types.h
> >> > > @@ -29,6 +29,7 @@ extern "C" {
> >> > > #define __NEED_clock_t
> >> > > #define __NEED_suseconds_t
> >> > > #define __NEED_blksize_t
> >> > > +#define __NEED_daddr_t
> >> ....
> >> > daddr_t is not a standard type, so can't be exposed by default here
> >> > (aside from the dubious "*_t is always reserved" rule), and it's only
> >> So should it be wrapped by #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) ?
> >> > proposed to be used in one header, so it doesn't belong in alltypes.h
> >> > either.
> >> Where should it be then? Shell I create bits/types.h for it?
> >> The goal is to be loadable from <sys/types.h>
> > Why? It's not a reasonable type for any application to use -- we've
> > never gotten a report that something failed to build because of its
> > absence, and even if we did, it would almost surely be a case of "fix
> > the application".
> FWIW, Void patches four packages that use daddr_t:
> - gpart
UPSTREAM GIT: some solaris related feature (compiled for linux) [1]
struct solaris_x86_slice {
ushort s_tag; /* ID tag of partition */
ushort s_flag; /* permision flags */
daddr_t s_start; /* start sector no of partition */
long s_size; /* # of blocks in partition */
};
Void: use int [2].
> - kpartx
UPSTREAM GIT: the same thing, but daddr_t out, they decided to use long [3]
//typedef int daddr_t; /* or long - check */
struct solaris_x86_slice {
unsigned short s_tag; /* ID tag of partition */
unsigned short s_flag; /* permission flags */
long s_start; /* start sector no of partition */
long s_size; /* # of blocks in partition */
};
Void: use uint32_t [4].
daddr_t in these two is at least used. In the others it's not:
> - libtirpc
UPSTREAM GIT: daddr_t is defined [5], but I don't see it used anywhere. But caddr_t is used heavily. Unfortunately libtirpc upstream is not responding much, if anyone wants to remove daddr_t in upstream.
Void: enables it, but IMHO could be removed.
> - sleuthkit
UPSTREAM GIT: Again, defined [7], but not used.
Void: use uint32_t [8].
Kind regards,
Petr
[1] https://github.com/baruch/gpart/blob/master/src/gm_s86dl.h#L43
[2] https://github.com/void-linux/void-packages/blob/master/srcpkgs/gpart/patches/musl_loff_t.patch
[3] https://git.opensvc.com/gitweb.cgi?p=multipath-tools/.git;a=blob;f=kpartx/solaris.c;h=8c1a971be698675d3c99ef83a5958bc27099c73a;hb=HEAD
[4] https://github.com/void-linux/void-packages/blob/master/srcpkgs/kpartx/template#L20
[5] http://git.linux-nfs.org/?p=steved/libtirpc.git;a=blob;f=tirpc/rpc/types.h;h=f069efa77d1da598eba99d637107f971036ca535;hb=HEAD#l85
[6] https://github.com/void-linux/void-packages/blob/master/srcpkgs/libtirpc/patches/musl.patch
[7] https://github.com/sleuthkit/sleuthkit/blob/develop/tsk/base/tsk_os.h#L55
[8] https://github.com/void-linux/void-packages/blob/master/srcpkgs/sleuthkit/template
prev parent reply other threads:[~2019-06-07 20:57 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-07 5:14 Petr Vorel
2019-06-07 5:14 ` [PATCH 2/2] define mt_fileno and mt_fileno struct mtget members as mt_blkno Petr Vorel
2019-06-07 5:31 ` Rich Felker
2019-06-07 5:42 ` Petr Vorel
2019-06-07 5:50 ` Rich Felker
2019-06-07 5:58 ` Petr Vorel
2019-06-07 6:01 ` Rich Felker
2019-06-07 5:28 ` [PATCH 1/2] define daddr_t type Rich Felker
2019-06-07 5:53 ` Petr Vorel
2019-06-07 5:58 ` Rich Felker
2019-06-07 6:06 ` Petr Vorel
2019-06-07 6:18 ` Rich Felker
2019-06-07 6:28 ` Petr Vorel
2019-06-07 7:22 ` Florian Weimer
2019-06-07 7:48 ` Petr Vorel
2019-06-07 9:21 ` Petr Vorel
2019-06-07 12:52 ` Leah Neukirchen
2019-06-07 15:25 ` Rich Felker
2019-06-10 20:30 ` Rich Felker
2019-06-07 20:57 ` Petr Vorel [this message]
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=20190607205728.GA16266@x230 \
--to=pvorel@suse.cz \
--cc=dalias@libc.org \
--cc=leah@vuxu.org \
--cc=musl@lists.openwall.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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
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).