Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIGWINCH support #213

Merged
merged 4 commits into from
Aug 24, 2017
Merged

SIGWINCH support #213

merged 4 commits into from
Aug 24, 2017

Conversation

mptre
Copy link
Owner

@mptre mptre commented Jul 17, 2017

No description provided.

@mptre
Copy link
Owner Author

mptre commented Jul 18, 2017

Any objections on using C99? /cc @calleerlandsson @mike-burns

@mptre mptre force-pushed the winsz branch 3 times, most recently from e32fb73 to eb3b53a Compare July 18, 2017 21:11
@ghost
Copy link

ghost commented Jul 24, 2017

This will break my beloved gcc 2.95 on ancient machines here ... but anyway: time moves on ... and all this just for including some stuff from OpenBSD-folks, that no one uses ... ;-)

@mptre
Copy link
Owner Author

mptre commented Jul 25, 2017

@DBOTW can you confirm that compiling this PR with GCC 2.95 still works?

@ghost
Copy link

ghost commented Jul 25, 2017

After some more "tweaking" (replace -Wextra with -Wno-format) and defining LLONG_MIN and LLONG_MAX in compat-strtonum.c (I knew this would cause trouble ;-) it works!

@mptre mptre changed the title Redraw support SIGWINCH support Jul 26, 2017
@mptre
Copy link
Owner Author

mptre commented Jul 26, 2017

@DBOTW thanks for confirming.

@mptre
Copy link
Owner Author

mptre commented Jul 26, 2017

The remaining pieces to get SIGWINCH working is now merged into this
PR.

Does anyone have access to a machine where SIGWINCH is not defined?
I'm more in favor of skipping the autoconf check if we can't test it
properly. Even the tmux portable unconditionally assumes its
present as far as I see it.

@ghost
Copy link

ghost commented Jul 26, 2017

Hard to find such a machine: even HP-UX 8.x (and earlier) have SIGWINCH (called SIGWINDOW) ...
I fired up my HP9000 Model 715/50 with HP-UX 10.20 and compiled pick with SIGWINCH support and it worked ... most of the time ... sometimes pressing ^L was necessary to clean up the mess ... :-)

Seems this was caused by a missing

new_attributes.c_cc[VMIN] = 1;

in tty_init(void) ... now everything runs perfect (even resizing) under HP-UX 10.20:
pick-hpux

@mptre
Copy link
Owner Author

mptre commented Jul 26, 2017

Thanks for checking! I then advocate on omitting the autoconf check for
now and get this released. If we receive any reports on build failures
we could revisit this matter when we know it's an actual issue.

@calleluks
Copy link
Collaborator

This looks great @mptre and @DBOTW. Thanks for all your great work! Feel free to rebase and merge, @mptre.

Precedence order: environment variables, TIOCGWINSZ, terminfo
Required by compat-strtonum.c which makes use of `long long`.
@mptre
Copy link
Owner Author

mptre commented Aug 24, 2017

Thanks everyone, merged!

@mptre mptre deleted the winsz branch August 24, 2017 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants