This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
coreutils: enable stdbuf (was: Setup patch to keep test version if test version installed)
- From: Yaakov Selkowitz <yselkowitz at cygwin dot com>
- To: cygwin-apps at cygwin dot com
- Cc: Eric Blake <eblake at redhat dot com>
- Date: Fri, 06 Feb 2015 12:47:22 -0600
- Subject: coreutils: enable stdbuf (was: Setup patch to keep test version if test version installed)
- Authentication-results: sourceware.org; auth=none
- References: <87iofp5wfu dot fsf at Rainer dot invalid> <20150130094251 dot GP14265 at calimero dot vinschen dot de> <87zj906pzq dot fsf at Rainer dot invalid> <20150202091726 dot GT14265 at calimero dot vinschen dot de> <20150205085749 dot GP2635 at calimero dot vinschen dot de> <87wq3whgc8 dot fsf at Rainer dot invalid> <20150205091958 dot GQ2635 at calimero dot vinschen dot de> <20150205094155 dot GR2635 at calimero dot vinschen dot de> <87zj8sdo8q dot fsf at Rainer dot invalid> <87vbjgdnrs dot fsf at Rainer dot invalid> <20150206092403 dot GB1035 at calimero dot vinschen dot de> <54D4C913 dot 1000705 at redhat dot com>
On Fri, 2015-02-06 at 07:00 -0700, Eric Blake wrote:
> stdbuf uses LD_PRELOAD to tell a process in main() that it should use
> line or no buffering, regardless of whether the output file is a file.
> And cygwin supports LD_PRELOAD. But to date, no one has helped figure
> out how to port it to cygwin (I assume it should work, but have not had
> time to try it - the difficulties lie more in getting the coreutils
> Makefile to target the difference in cygwin naming with .dll instead of
> .so and with .exe suffixes to worry about).
It would help if coreutils would use libtool, but I don't know if
upstream would be willing to consider that. In the meantime, since
libstdbuf is just a module, the .so isn't a problem, and the build can
be worked around with a bit of a hack:
https://sourceforge.net/p/cygwin-ports/coreutils/ci/41db3dd6ed8d004e60b3005a9199e81306291b8c/
with the caveat that tests/misc/stdbuf.sh won't work in-tree.
--
Yaakov