aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/libgfortran.h
diff options
context:
space:
mode:
authorThomas Koenig <tkoenig@gcc.gnu.org>2007-07-29 20:01:45 +0000
committerThomas Koenig <tkoenig@gcc.gnu.org>2007-07-29 20:01:45 +0000
commitd8163f5cc068347dfd74cb03c9e7b6cfcd3a8460 (patch)
tree05a77906359d7bd336aba3bd8c097b7414e1f63a /libgfortran/libgfortran.h
parent6a56381bf7e8825e08ec3a47bc14230528c82462 (diff)
downloadgcc-d8163f5cc068347dfd74cb03c9e7b6cfcd3a8460.zip
gcc-d8163f5cc068347dfd74cb03c9e7b6cfcd3a8460.tar.gz
gcc-d8163f5cc068347dfd74cb03c9e7b6cfcd3a8460.tar.bz2
re PR libfortran/32858 (printf-capabilities for runtime_error())
2007-07-29 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/32858 PR libfortran/30814 * configure.ac: Added checks for presence of stdio.h and stdarg.h. Test presence of vsnprintf(). * configure: Regenerated. * config.h.in: Regenerated. * libgfortran.h: Include <stdio.h>. Add printf attribute to prototype of runtime_error. Remove prototype for st_sprintf. Add prototype for st_vprintf. * runtime/main.c (store_exec_path): Replace st_sprintf by sprintf. * runtime/error.c (st_sprintf): Remove. (runtime_error): Rewrite as a variadic function. Call st_vprintf(). * intrinsics/pack_generic.c: Output extents of LHS and RHS for bounds error. * io/open.c (new_unit): Replace st_sprintf by sprintf. * io/list_read.c (convert_integer): Likewise. (parse_repeat): Likewise. (read_logical): Likewise. (read_character): Likewise. (parse_real): Likewise. (read_real): Likewise. (check_type): Likewise. (nml_parse_qualifyer): Likewise. (nml_read_obj): Likewise. (nml_get_ojb_data): Likewise. * io/unix.c (init_error_stream): Remove. (tempfile): Replace st_sprintf by sprintf. (st_vprintf): New function. (st_printf): Rewrite to call st_vprintf. * io/transfer.c (require_type): Replace st_sprintf by sprintf. * io/format.c (format_error): Likewise. * io/write.c (nml_write_obj): Likewise. 2007-07-29 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/32858 PR libfortran/30814 * gfortran.dg/pack_bounds_1.f90: Adjust to new error message. From-SVN: r127049
Diffstat (limited to 'libgfortran/libgfortran.h')
-rw-r--r--libgfortran/libgfortran.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/libgfortran/libgfortran.h b/libgfortran/libgfortran.h
index a1efab2..33c2e2c 100644
--- a/libgfortran/libgfortran.h
+++ b/libgfortran/libgfortran.h
@@ -31,6 +31,7 @@ Boston, MA 02110-1301, USA. */
#ifndef LIBGFOR_H
#define LIBGFOR_H
+#include <stdio.h>
#include <math.h>
#include <stddef.h>
#include <float.h>
@@ -593,7 +594,8 @@ iexport_proto(os_error);
extern void show_locus (st_parameter_common *);
internal_proto(show_locus);
-extern void runtime_error (const char *) __attribute__ ((noreturn));
+extern void runtime_error (const char *, ...)
+ __attribute__ ((noreturn, format (printf, 1, 2)));
iexport_proto(runtime_error);
extern void runtime_error_at (const char *, const char *)
@@ -607,10 +609,6 @@ internal_proto(internal_error);
extern const char *get_oserror (void);
internal_proto(get_oserror);
-extern void st_sprintf (char *, const char *, ...)
- __attribute__ ((format (printf, 2, 3)));
-internal_proto(st_sprintf);
-
extern const char *translate_error (int);
internal_proto(translate_error);
@@ -688,6 +686,9 @@ extern int st_printf (const char *, ...)
__attribute__ ((format (printf, 1, 2)));
internal_proto(st_printf);
+extern int st_vprintf (const char *, va_list);
+internal_proto(st_vprintf);
+
extern char * filename_from_unit (int);
internal_proto(filename_from_unit);