Programming and posix - April 2002

April 3, 2002
Solution Symposium
Page 88
hp e3000
programming
and posix
error handling with mpe intrinsics
_mpe_errno, _mpe_intrinsic are global variables defined in
<errno.h>
Requires _MPEXL_SOURCE compile directive to use
Porting Wrappers has functions pmpeerror() & strmpeerror()
plus header file <mpeerrno.h>
#include <mpeerrno.h>
#pragma intrinsic FCONTROL
FCONTROL(_MPE_FILENO(fildes), 2, &dummy);
if ( ( ccode_return = ccode() ) != CCE )
{
errno = EINVAL;
mpe_errno = ccode_return;
mpe_intrinsic = FCONTROL_INTRINSIC;
#if defined(DEBUG) || defined(PRINT_ERROR)
pmpeerror("functionX(): FCONTROL(2)");
#endif
return -1;
}