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
=== modified file 'main.c'
--- main.c 2014-03-03 01:54:41 +0000
+++ main.c 2014-12-31 04:25:37 +0000
@@ -140,13 +140,31 @@
140 /* None of the docs about termios explain how to construct a new one of140 /* None of the docs about termios explain how to construct a new one of
141 * these, so this is largely a guess */141 * these, so this is largely a guess */
142 struct termios termios = {142 struct termios termios = {
143 .c_iflag = ICRNL|IXON|IUTF8,143 .c_iflag = ICRNL|IXON,
144 .c_oflag = OPOST|ONLCR|NL0|CR0|TAB0|BS0|VT0|FF0,144 .c_oflag = OPOST|ONLCR|TAB0,
145 .c_cflag = CS8|CREAD,145 .c_cflag = CS8|CREAD,
146 .c_lflag = ISIG|ICANON|IEXTEN|ECHO|ECHOE|ECHOK,146 .c_lflag = ISIG|ICANON|IEXTEN|ECHO|ECHOE|ECHOK,
147 /* c_cc later */147 /* c_cc later */
148 };148 };
149149
150#ifdef IUTF8
151 termios.c_iflag |= IUTF8;
152#endif
153#ifdef NL0
154 termios.c_oflag |= NL0;
155#endif
156#ifdef CR0
157 termios.c_oflag |= CR0;
158#endif
159#ifdef BS0
160 termios.c_oflag |= BS0;
161#endif
162#ifdef VT0
163 termios.c_oflag |= VT0;
164#endif
165#ifdef FF0
166 termios.c_oflag |= FF0;
167#endif
150#ifdef ECHOCTL168#ifdef ECHOCTL
151 termios.c_lflag |= ECHOCTL;169 termios.c_lflag |= ECHOCTL;
152#endif170#endif

Subscribers

People subscribed via source and target branches

to status/vote changes: