Porting JX
November 29th, 2005
The good news, in case you hadn’t noticed, is that our software now runs on both Mac OS and Cygwin — at least, out latest beta does.
Porting our software to Windows 2K/XP has been stalled for a few months now, but the good news is that I recently made a bit more progress by eliminating most of the uses of JInPipeStream. This particular class was originally a good idea, but since it is based on a GNU extension to the C++ stream library which never caught on, it now has to go. I’m replacing it with functions in jStreamUtil.h that operate directly on a file descriptor. Of course, this means that we lose the convenience of the stream in operator (>>), but that seems to be a small price to pay for cross-platform compatibility.
The same fate awaits JOutPipeStream.
On a similar note, since strstream is deprecated, almost all references to it have been replaced with stringstream, and jStrStreamUtil.h is now gone. Personally, I dislike the descision to deprecate strstream, because stringstream always makes copies of the data, and this is a disaster in certain cases where efficiency is critical — though I suppose some would claim that the entire C++ stream library should be avoided when efficiency matters!
If anybody has any good news about stringstream colluding with string to avoid copying data, please let me know!
Entry Filed under: Cross Platform
Leave a Comment
You must be logged in to post a comment.
Subscribe to the comments via RSS Feed