informix
Informix DataBlade API Programmer's Manual
DataBlade API Function Descriptions

mi_file_errno()

The mi_file_errno() function returns the value of the system errno variable after a file input/output (I/O) operation.

Syntax

Usage

File I/O functions of the C library call underlying system or platform file I/O functions. These system or platform functions set a global variable called errno to indicate status. For a list of DataBlade API file-access functions, see Accessing Operating-System Files.

These file-access functions call the corresponding C library functions to perform their tasks. Therefore, the value of the errno is available for a DataBlade API module.

On UNIX platforms, you can check the errno variable directly, immediately after a DataBlade API file I/O function. Therefore, use of mi_file_errno() is not required for UNIX platforms. In fact, the mi_file_errno() function is on UNIX platforms as the errno variable.

Important: If you plan to port the user-defined routine (UDR) or DataBlade module to Windows NT, Informix strongly recommends use of mi_file_errno() to retrieve the errno value.

On Windows NT, global variables, such as errno, are not easily accessible. Therefore, to obtain the errno value after a DataBlade API file I/O operation, use the mi_file_errno() function. DataBlades and UDRs that execute on the Windows NT platform must use mi_file_errno() to access the errno for file operations.

Return Values

None.

Related Topics

See the description of the following functions: mi_file_allocate(), mi_file_close(), mi_file_open(), mi_file_read(), mi_file_seek(), mi_file_sync(), mi_file_tell(), mi_file_to_file(), and mi_file_to_large_object()


Informix DataBlade API Programmer's Manual, Version 9.2
Copyright © 1999, Informix Software, Inc. All rights reserved