This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH] Remove <stdint.h> from <sys/sdt.h>
- From: Chung-Lin Tang <cltang at codesourcery dot com>
- To: Josh Stone <jistone at redhat dot com>, <systemtap at sourceware dot org>
- Date: Thu, 23 Oct 2014 23:27:32 +0800
- Subject: Re: [PATCH] Remove <stdint.h> from <sys/sdt.h>
- Authentication-results: sourceware.org; auth=none
- References: <544622C5 dot 3010500 at codesourcery dot com> <54466DC2 dot 1010300 at redhat dot com>
On 2014/10/21 10:29 PM, Josh Stone wrote:
> On 10/21/2014 05:09 AM, Chung-Lin Tang wrote:
>> Hi,
>> We're in the process of considering adding the <sys/sdt.h> header during
>> the build of a full toolchain, which will allow the enabling of
>> SystemTap probes in some target libraries (e.g. glibc).
>>
>> There's a small problem that I'm encountering: we're configuring glibc
>> with --enable-systemtap, but the configure tests tries a test compile
>> with <sys/sdt.h> before we even have glibc (headers) installed, a small
>> circular dependency actually.
>
> That is a nice ordering problem indeed...
>
>> I'm guessing the [u]int(8/16/32)_t types were probably historically used
>> in the <sys/sdt.h> header, but as of currently I see no need of
>> <stdint.h> in there. May I suggest to simply remove the #include? (I've
>> attached the one-liner patch to be clear)
>
> I'm trying to see why we had that even historically, and I'm not sure.
> As of now, the only thing I see is __CHAR_BIT__, which is builtin by
> gcc. Roland also mentioned a while ago that we might remove stdint.h:
> https://lists.fedoraproject.org/pipermail/devel/2011-January/147999.html
>
> The only risk is that someone may have come to depend on this indirect
> inclusion, but any such user really ought to include stdint.h directly.
>
> Have you tried the testsuite with that line removed?
I tried 'make installcheck' on a x86_64 machine. I see no regressions
before/after removing #include <stdint.h> (actually I saw a single
FAIL->PASS in systemtap.samples/tcptest.stp, though I doubt it's because
of this change)
Thanks,
Chung-Lin