tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Would you accept a small patch to make window(1) work on non-BSD systems?
Jeremy C. Reed <reed <at> reedmedia.net> writes:
> NetBSD's source does include various portability code for non-NetBSD.
>
> Send your patch.
My work isn't ready for production yet. The rest of this message explains why
not.
My work so far has been a quick hack. The Makefile does not make
intermediate .o files, just a single binary. The two code changes I made were:
- I commented out "#include <util.h>" from wwpty.c. But that's needed on
NetBSD for the openpty function prototype.
- window(1) uses the historical BSD signal API. I made a typedef defining
sig_t in wwsuspend.c, since BSD defines sig_t in the system headers but most
other Unices don't. I don't know what wwsuspend.c does, and the README's
internals primer doesn't explain it. But I bet that because of what I did,
wwsuspend.c probably won't work on other Unices. The ideal would be to switch
window(1) to using POSIX signal handling but I don't plan to do that.
I plan to wait for a reply to
http://thread.gmane.org/gmane.os.netbsd.devel.userlevel/9839/focus=9856 . Then
I'll improve my GNUmakefile further and use ifdef's to implement the 2 code
changes above for non-BSD systems only. I suspect that using autoconf plus
automake for feature detection and header dependency tracking would be
overkill here. But I can't assume users will have mkdep. So I'll use the
dependency tracking method proposed in
http://make.paulandlesley.org/autodep.html#output . If you have anything to
add, your comments would be appreciated.
Cheers,
-j
jasonspiro4 at gmail.com
Home |
Main Index |
Thread Index |
Old Index