mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-25 20:03:58 +08:00
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
This commit is contained in:
parent
96208aed83
commit
4a8bce89d1
@ -1,3 +1,9 @@
|
||||
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 =
|
||||
|
Loading…
Reference in New Issue
Block a user