Mir

Merge lp:~cjwatson/mir/stdint-include into lp:mir

Proposed by Colin Watson
Status: Merged
Approved by: Daniel van Vugt
Approved revision: no longer in the source branch.
Merged at revision: 1483
Proposed branch: lp:~cjwatson/mir/stdint-include
Merge into: lp:mir
Diff against target: 23 lines (+2/-0)
2 files modified
src/client/lttng/input_receiver_report_tp.h (+1/-0)
src/client/lttng/rpc_report_tp.h (+1/-0)
To merge this branch: bzr merge lp:~cjwatson/mir/stdint-include
Reviewer Review Type Date Requested Status
Daniel van Vugt Approve
PS Jenkins bot (community) continuous-integration Approve
Alan Griffiths Needs Fixing
Chris Halse Rogers Approve
Alberto Aguirre (community) Approve
Kevin DuBois (community) Approve
Review via email: mp+211340@code.launchpad.net

Commit message

Include <stdint.h> for standard integer types.

Description of the change

This should fix the failure seen in https://launchpad.net/ubuntu/+source/mir/0.1.6+14.04.20140310-0ubuntu1/+build/5800637, by including <stdint.h> where the standard integer types (uint32_t, etc.) are used. src/server/report/lttng/lttng_utils.h already has this so the server works fine, but on the client side it currently depends on what happens to be included by other headers, which is going to be architecture-dependent to at least some extent.

To post a comment you must log in.
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Hmm. I was going to recommend including <cstdint> but existing practice isn't consistent anyway.

review: Approve
Revision history for this message
Kevin DuBois (kdub) wrote :

okay

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Kevin DuBois (kdub) wrote :

I don't see how those CI problems could be caused by this, retriggering CI

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Alberto Aguirre (albaguirre) wrote :

Good.

review: Approve
Revision history for this message
Chris Halse Rogers (raof) wrote :

Looks good to me. Let's see if CI has cleared up yet.

review: Approve
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Being C++, technically you're meant to:
    #include <cstdint>
to guarantee you get nice safe 'extern "C"' declarations. But the C-style usually still works.

review: Approve
Revision history for this message
Colin Watson (cjwatson) wrote :

I was just matching the existing uses in
src/server/report/lttng/scene_report_tp.h and
src/client/lttng/input_receiver_report_tp.h (and indeed various other
files). If you think I should change *all* the existing uses, then I
can add a revision to this branch that does that; but I'd rather not
make it inconsistent.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

No need to change other instances that are beyond the intended scope of the proposal. But a little inconsistency is OK if the newer instances are more correct.

Revision history for this message
Colin Watson (cjwatson) wrote :

OK, pushing a change to these instances.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Some headers need to be C compatible.

In file included from /mir/src/client/lttng/tracepoints.c:4:0:
/mir/src/client/lttng/rpc_report_tp.h:29:19: fatal error: cstdint: No such file or directory
 #include <cstdint>
                   ^
compilation terminated.

review: Needs Fixing
Revision history for this message
Colin Watson (cjwatson) wrote :

Hilarious. That's what I did until everyone told me to do otherwise.
I'll revert my last patch.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Argh. Tripped up by the one reporting implementation in Mir that's C and not C++ :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/client/lttng/input_receiver_report_tp.h'
2--- src/client/lttng/input_receiver_report_tp.h 2014-02-03 11:44:32 +0000
3+++ src/client/lttng/input_receiver_report_tp.h 2014-03-18 15:14:23 +0000
4@@ -26,6 +26,7 @@
5 #define MIR_CLIENT_LTTNG_INPUT_RECEIVER_REPORT_TP_H_
6
7 #include <lttng/tracepoint.h>
8+#include <stdint.h>
9
10 #ifdef __clang__
11 /*
12
13=== modified file 'src/client/lttng/rpc_report_tp.h'
14--- src/client/lttng/rpc_report_tp.h 2014-03-06 06:05:17 +0000
15+++ src/client/lttng/rpc_report_tp.h 2014-03-18 15:14:23 +0000
16@@ -26,6 +26,7 @@
17 #define MIR_CLIENT_LTTNG_RPC_REPORT_TP_H_
18
19 #include <lttng/tracepoint.h>
20+#include <stdint.h>
21
22 #ifdef __clang__
23 /*

Subscribers

People subscribed via source and target branches