list_read.c (snprintf): Define if HAVE_SNPRINTF isn't defined.
authorJakub Jelinek <jakub@redhat.com>
Wed, 9 Apr 2008 09:00:31 +0000 (11:00 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 9 Apr 2008 09:00:31 +0000 (11:00 +0200)
commit24722ea98e979fd3c7a0e82c8f422544fa5cd947
tree6adbb3fdbc2fa0e1f069fddef84052635c7be029
parent6d21c8af174ff13abfce72ca8be40c1def60c53f
list_read.c (snprintf): Define if HAVE_SNPRINTF isn't defined.

* io/list_read.c (snprintf): Define if HAVE_SNPRINTF isn't defined.
(nml_read_obj): Add nml_err_msg_size argument.  Pass it down to
recursive call.  Use snprintf instead of sprintf when %s nl->var_name
is used.
(nml_get_obj_data): Add nml_err_msg_size argument.  Pass it down to
nml_read_obj call.  Use snprintf instead of sprintf when %s
nl->var_name is used.  Pass nml_err_msg to nml_parse_qualifier instead
of parse_err_msg array.  Append " for namelist variable " and
nl->var_name to it.
(namelist_read): Increase size of nml_err_msg array to 200.  Pass
sizeof nml_err_msg as extra argument to nml_get_obj_data.

* gfortran.dg/namelist_47.f90: New test.

From-SVN: r134132
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/namelist_47.f90 [new file with mode: 0644]
libgfortran/ChangeLog
libgfortran/io/list_read.c