[mercury-users] rotd-2007-02-10 won't compile on Ubuntu

Michael Day mikeday at yeslogic.com
Thu Feb 15 09:16:04 AEDT 2007


Hi Julien,

> I'm open to suggestions on how to handle this one more gracefully.

You could just not call fatal error, as in the case where fdopen() is 
not available:

#else
     /*
     ** XXX Standard ANSI/ISO C provides no way to set stdin/stdout
     ** to binary mode.  I guess we just have to punt...
     */
     MR_file(mercury_stdin_binary) = stdin;
     MR_file(mercury_stdout_binary) = stdout;
#endif

I guess a more elegant approach would be to delay calling fdopen() until 
the program actually tries to access the binary input/output streams, 
but just not aborting would already be an improvement.

Michael

-- 
Print XML with Prince!
http://www.princexml.com
--------------------------------------------------------------------------
mercury-users mailing list
Post messages to:       mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions:          mercury-users-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the users mailing list