Merge lp:~jamessan/pangoterm/kfreebsd-fixes into lp:pangoterm

Proposed by James McCoy
Status: Merged
Approved by: Paul "LeoNerd" Evans
Approved revision: 564
Merged at revision: 564
Proposed branch: lp:~jamessan/pangoterm/kfreebsd-fixes
Merge into: lp:pangoterm
Diff against target: 37 lines (+20/-2)
1 file modified
main.c (+20/-2)
To merge this branch: bzr merge lp:~jamessan/pangoterm/kfreebsd-fixes
Reviewer Review Type Date Requested Status
Paul "LeoNerd" Evans Approve
Review via email: mp+245462@code.launchpad.net

Description of the change

Only use IUTF8, NL0, CR0, BS0, VT0, and FF0 termios flags when defined. This fixes the build failures on hurd and kFreebsd -- https://buildd.debian.org/status/package.php?p=pangoterm&suite=experimental.

To post a comment you must log in.
Revision history for this message
Paul "LeoNerd" Evans (leonerd) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'main.c'
2--- main.c 2014-03-03 01:54:41 +0000
3+++ main.c 2014-12-31 04:25:37 +0000
4@@ -140,13 +140,31 @@
5 /* None of the docs about termios explain how to construct a new one of
6 * these, so this is largely a guess */
7 struct termios termios = {
8- .c_iflag = ICRNL|IXON|IUTF8,
9- .c_oflag = OPOST|ONLCR|NL0|CR0|TAB0|BS0|VT0|FF0,
10+ .c_iflag = ICRNL|IXON,
11+ .c_oflag = OPOST|ONLCR|TAB0,
12 .c_cflag = CS8|CREAD,
13 .c_lflag = ISIG|ICANON|IEXTEN|ECHO|ECHOE|ECHOK,
14 /* c_cc later */
15 };
16
17+#ifdef IUTF8
18+ termios.c_iflag |= IUTF8;
19+#endif
20+#ifdef NL0
21+ termios.c_oflag |= NL0;
22+#endif
23+#ifdef CR0
24+ termios.c_oflag |= CR0;
25+#endif
26+#ifdef BS0
27+ termios.c_oflag |= BS0;
28+#endif
29+#ifdef VT0
30+ termios.c_oflag |= VT0;
31+#endif
32+#ifdef FF0
33+ termios.c_oflag |= FF0;
34+#endif
35 #ifdef ECHOCTL
36 termios.c_lflag |= ECHOCTL;
37 #endif

Subscribers

People subscribed via source and target branches

to status/vote changes: