This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH glibc] Linux: Include <linux/sockios.h> in <bits/socket.h> under __USE_MISC
- From: Szabolcs Nagy <Szabolcs dot Nagy at arm dot com>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: nd <nd at arm dot com>, Arnd Bergmann <arnd at arndb dot de>, GNU C Library <libc-alpha at sourceware dot org>, Sergei Trofimovich <slyfox at gentoo dot org>, Networking <netdev at vger dot kernel dot org>, Linux Kernel Mailing List <linux-kernel at vger dot kernel dot org>, "David S. Miller" <davem at davemloft dot net>, Michael Kerrisk <mtk dot manpages at gmail dot com>, linux-man <linux-man at vger dot kernel dot org>
- Date: Mon, 22 Jul 2019 13:47:58 +0000
- Subject: Re: [PATCH glibc] Linux: Include <linux/sockios.h> in <bits/socket.h> under __USE_MISC
- Arc-authentication-results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=arm.com;dmarc=pass action=none header.from=arm.com;dkim=pass header.d=arm.com;arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KeSbYSJul9r2fXsJYxHOx2Y8CX0KfDov2P7DPO6F6Eg=; b=eA0Pyucw1zcVvy6FckOWkF5PVxmWW7y5YlCwBlQdeWFrB1o0JeZy8q5oYE7TDUCTAWhkQrsna3alaP9cdQaWhTrO6XTOEg9WgLaiSjsu4aT/Xo9ksyk3L8fEIpKRtxyabrvm9z/NlF56PPso94OdJtuDVS2lntj/+3eZavupJB+4/bkeJpA87ZVh9W+d6KewLqVbwAJCSxgRbpK5VO4uKSzWIaMZsBxnfFMAaSzq8wu8Euj1upa/0lx5cbpamqSdPYFbNZ9tp1WvY0kJhLuhkFhpWu9P5KfGAgnYi1OocFgHR4FX4khq8nutCYI+VmSP1NrTvtwtqm6tOvg20M4ekQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ng1OoFiOMWHWpWg7xD8r1PbS27j9K9TA/mMiWxxxAFYyzhX9JE5ub9/vUvPHwf3ufUzY4hCET52qsLtLd8BjknaVbQgFJSTPPN6HMAQB8EjU1PRXw/McyGFEwclD/EzlqV0IPV8pv66s7j15nSmG1VXKKY/xYZDin59o61Q/5fhqu7CsoOzYHKdj0yh2vtHRg1mq8/xCpHOMThvcDxRaIT5jmqQ/i4pMvDBDNNHYLJtdvqb2iUWlhNVEFXeVyhJsYQxmrYRH4xMu+LqU63sHaD0Kw6ZTFX0w+wsmm6eZrNfc/Y+efcvS7RHpWkOGX4/ultH9CVcw1+HHaWhgBPjvGA==
- Original-authentication-results: spf=none (sender IP is ) smtp.mailfrom=Szabolcs dot Nagy at arm dot com;
- References: <87ftmys3un.fsf@oldenburg2.str.redhat.com> <CAK8P3a0hC4wvjwCi4=DCET3C4qARMY6c58ffjwG3b1ZPM6kr-A@mail.gmail.com> <2431941f-3aac-d31f-e6f5-8ed2ed7b2e5c@arm.com> <87lfwqqj3s.fsf@oldenburg2.str.redhat.com>
On 22/07/2019 14:44, Florian Weimer wrote:
> * Szabolcs Nagy:
>
>> (note: in musl these ioctl macros are in sys/ioctl.h
>> which is not a posix header so namespace rules are
>> less strict than for sys/socket.h and users tend to
>> include it for ioctl())
>
> <sys/ioctl.h> can be confusing because some of the constants may depend
> on types that aren't declared by including the header. This makes their
> macros unusable. Defining ioctl constants in headers which also provide
> the matching types avoids that problem at least, also it can introduce
> namespace issues.
yeah, the way we deal with that is we hard code the numbers
since the size of struct is abi, they cannot change.