Just looking at POSIX compliant fdopen() as defined under Watcom..
To my eye, it looks like youre probably best off replacing the stuff all together with ANSI IO.
Maybe I got this wrong but (from Watcom example doc)
#include
#include
#include
void main()
{
int handle;
FILE *fp;
handle = open( "file", O_RDONLY | O_TEXT );
if( handle != -1 ) {
fp = fdopen( handle, "r" );
if( fp != NULL ) {
/*
process the stream
*/
fclose( fp );
} else {
close( handle );
}
}
}
doesn't look especially useful. You could just use fopen("file", "r") and skip the open() / fdopen() stuff.
Well, in the above example at least :-)