[
https://issues.apache.org/jira/browse/XERCESC-1614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12536399
]
William Tan commented on XERCESC-1614:
--------------------------------------
It seems that the openStdInHandle method is not implemented for the "MacOS"
platform, which encapsulates both the old Mac OS and Mac OS X. I presume the
old Mac OS didn't have the notion of standard input, or required some tweak.
Thankfully, OS X is fairly POSIX compliant, and even has "/dev/stdin" so as a
proof of concept that this is indeed the problem, I came up with the following
hack and it worked.
For the actual patch though, we'll probably want to preserve the old behavior
for <= OS 9, and use some sort of "fdopen" implementation in XMLMacPosixFile.
--- util/Platforms/MacOS/MacOSPlatformUtils.cpp 2007-10-20 00:17:40.000000000
-0400
+++ util/Platforms/MacOS/MacOSPlatformUtils.cpp.new 2007-10-20
00:18:07.000000000 -0400
@@ -253,9 +253,7 @@
FileHandle
XMLPlatformUtils::openStdInHandle(MemoryManager* const manager)
{
- XMLCh stdinStr[] = {chLatin_s, chLatin_t, chLatin_d, chLatin_i, chLatin_n,
chNull};
- ThrowXMLwithMemMgr1(XMLPlatformUtilsException,
XMLExcepts::File_CouldNotOpenFile, stdinStr, manager);
- return NULL;
+ return openFile("/dev/stdin", manager);
}
> StdInParse fails in Mac OS X
> ----------------------------
>
> Key: XERCESC-1614
> URL: https://issues.apache.org/jira/browse/XERCESC-1614
> Project: Xerces-C++
> Issue Type: Bug
> Components: Samples/Tests
> Affects Versions: 2.6.0
> Environment: Mac OS X Darwin Kernel Version 8.7.1
> Reporter: Ganesh Kumar
>
> The sample program StdInParse fails in Mac OS X. All three programs fail with
> the following exception:
> Fatal Error at (file , line 0, char 0): An exception occurred!
> Type:XMLPlatformException, Message:Could not open file: stdin
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]