Commit 4a8bce89 by Steven G. Kargl

error.c: Add errno.h

2006-10-21  Steven G. Kargl  <kargl@gcc.gnu.org>

        * runtime/error.c: Add errno.h
        (generate_error): Set iostat to errno on OS error.
        * libgfortran.h: Set ERROR_OS to 5000

From-SVN: r117939
parent 96208aed
2006-10-21 Steven G. Kargl <kargl@gcc.gnu.org>
* runtime/error.c: Add errno.h
(generate_error): Set iostat to errno on OS error.
* libgfortran.h: Set ERROR_OS to 5000
2006-10-20 Francois-Xavier Coudert <coudert@clipper.ens.fr>
* generated/minval_r8.c: Regenerate.
......
......@@ -397,7 +397,7 @@ typedef enum
ERROR_EOR = -2,
ERROR_END = -1,
ERROR_OK = 0, /* Indicates success, must be zero. */
ERROR_OS, /* Operating system error, more info in errno. */
ERROR_OS = 5000, /* Operating system error, more info in errno. */
ERROR_OPTION_CONFLICT,
ERROR_BAD_OPTION,
ERROR_MISSING_OPTION,
......
......@@ -34,6 +34,7 @@ Boston, MA 02110-1301, USA. */
#include <stdarg.h>
#include <string.h>
#include <float.h>
#include <errno.h>
#include "libgfortran.h"
#include "../io/io.h"
......@@ -457,7 +458,7 @@ generate_error (st_parameter_common *cmp, int family, const char *message)
{
/* Set the error status. */
if ((cmp->flags & IOPARM_HAS_IOSTAT))
*cmp->iostat = family;
*cmp->iostat = (family == ERROR_OS) ? errno : family;
if (message == NULL)
message =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment