OSDN Git Service

* io/inquire.c: Include io.h before string.h.
[pf3gnuchains/gcc-fork.git] / libgfortran / ChangeLog
1 2010-07-31  David Edelsohn  <edelsohn@gnu.org>
2
3         * io/inquire.c: Include io.h before string.h.
4
5 2010-07-28  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
6
7         PR libfortran/44931
8         * io/inquire.c (inquire_via_unit): Use ttyname to return actual device
9         file name for stdin, stdout, and stderr.  If ttyname does not succeed
10         fall back to default names for these units. Include string.h to allow
11         using strlen function.
12         * unix.c: Remove typedef of unix_stream structure, move to unix.h.
13         * unix.h: Add typedef of unix_stream structure so that it is
14         accessible to inquire.c.
15
16 2010-07-19  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
17
18         PR libfortran/44953
19         * io/unix.c (mem_alloc_w4): Return gfc_char4_t instead of char type
20         pointer. (mem_write4): Remove cast to gfc_char4_t.
21         * io/transfer.c (write_block): Use a gfc_char4_t pointer.
22         (memset4): New helper function. (next_record_w): Use new helper
23         function rather than sset for internal units.  Don't attempt to pad
24         with spaces if it is not needed.
25         * io/unix.h: Update prototype for mem_alloc_w4.
26         * io/write.c (memset4): Use gfc_char4_t pointer and chracter type.
27         Don't use multiply by 4 to compute offset. (memcpy4): Likewise.
28         (write_default_char4): Use a gfc_char4_t pointer and update memset4
29         and memcpy calls. (write_a): Likewise. (write_l): Likewise.
30         (write_boz): Likewise. (write_decimal): Likewise. (write_x): Likewise.
31         (write_char): Add support for character(kind=4) internal units that
32         was previously missed. (write_integer): Use a gfc_char4_t pointer and
33         update memset4 and memcpy calls. (write_character): Likewise.
34         (write_separator): Add support for character(kind=4) internal units
35         that was previously missed.
36         * write_float.def (output_float): Use a gfc_char4_t pointer and
37         update memset4 and memcpy calls. (write_infnan): Likewise.
38         (output_float_FMT_G_): Likewise.
39         
40 2010-07-16  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
41
42         PR libfortran/37077
43         * io/read.c (read_default_char4): Add support for reading into a
44         kind-4 character variable from a character(kind=4) internal unit.
45         * io/io.h (read_block_form4): Add prototype.
46         * io/unit.c (get_internal_unit): Add call to fbuf_init.
47         (free_internal_unit): Add call to fbuf_destroy. (get_unit): Fix
48         whitespace.
49         * io/transfer.c (read_sf_internal): Use fbuf_alloc to allocate a string
50         to recieve the wide characters translated to single byte chracters.
51         (read_block_form): Fix whitespace. (read_block_form4): New function to
52         read from a character(kind=4) internal unit into a character(kind=4)
53         variable. (read_block_direct): Fix whitespace. (write_block): Fix
54         whitespace. (formatted_transfer_scalar_read): Likewise.
55         (formatted_transfer_scalar_write): Likewise.
56         * io/write.c (write_character): Add support for list directed write of
57         a kind=1 character string to a character(kind=4) internal unit.
58
59 2010-07-14  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
60
61         PR libfortran/44934
62         * io/file_pos.c (st_endfile): Correctly set unit flags for form.
63         * io/transfer.c (data_transfer_init): Fix indentation of whitespace.
64
65 2010-07-12  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
66
67         PR libfortran/37077
68         * io/read.c: Fix comment.
69         * io/io.h (is_char4_unit): New macro.
70         * io/unit.c (get_internal_unit): Call new function open_internal4.
71         * io/unix.c (mem_alloc_r4): New function. (mem_alloc_w4): New function.
72         (mem_read4): New function, temporary stub. (mem_write4): New function.
73         (open_internal4): New function to set stream pointers to use the new
74         mem functions.
75         * io/transfer.c (write_block): Use new mem_alloc_w4 to access internal
76         units of kind=4.
77         * io/unix.h: Add prototypes for open_internal4, mem_alloc_w4, and
78         mem_alloc_r4.
79         * io/write.c (memset4): New helper function. (memcpy4): New helper
80         function. (write_default_char4): Use new helper functions.
81         (write_a): Likewise. (write_l): Likewise. (write_boz): Likewise.
82         (write_decimal): Likewise. (write_x): Likewise.
83         (write_integer): Likewise.
84         * io/write_float.def (output_float): Add code blocks to handle internal
85         unit kind=4 output utilizing gfc_char4_t pointers. (write_infnan): Use
86         new helper functions. (OUTPUT_FLOAT_FMT_G): Update this macro likewise.
87
88 2010-07-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
89
90         * config/fpu-387.h [__sun__ && __svr4__] Include <signal.h>,
91         <ucontext.h>.
92         (sigill_caught): New.
93         (sigill_hdlr): New function
94         (has_sse) [__sun__ && __svr4__]: Check if SSE instruction causes
95         SIGILL.
96
97 2010-07-11  Kai Tietz  <kai.tietz@onevision.com>
98
99         PR libfortran/44698
100         * io/unix.c (flush_buf): Add _commit for WIN32.
101
102 2010-06-28  Tobias Burnus  <burnus@net-b.de>
103
104         PR fortran/43298
105         * list_read.c (parse_real): Do not pass (..) on for NAN(..).
106         * read.c (convert_real): Fix comment about NAN/INF.
107
108 2010-07-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
109
110         * configure.ac (gfortran_use_symver): Only check for Sun-style symbol
111         versioning on Solaris 2.
112         * configure: Regenerate.
113
114 2010-07-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
115
116         * configure.ac: Check for Sun symbol versioning.
117         * configure: Regenerate.
118
119         * Makefile.am [LIBGFOR_USE_SYMVER]: Protect version_arg with
120         LIBGFOR_USE_SYMVER_GNU.
121         Add version_dep.
122         [LIBGFOR_USE_SYMVER_SUN]: Handle Sun symbol versioning.
123         [!LIBGFOR_USE_SYMVER]: Add version_dep.
124         (libgfortran_la_DEPENDENCIES): Set to $(version_dep).
125         * Makefile.in: Regenerate.
126
127 2010-06-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
128
129         PR libfortran/43298
130         * io/read.c: Add code to parse and read Inf, Infinity, NaN, and Nan with
131         optional parenthesis.
132
133 2010-06-28  Tobias Burnus  <burnus@net-b.de>
134
135         PR fortran/43298
136         * list_read.c (parse_real, read_real): Support NAN(alphanum).
137
138 2010-06-25  Tobias Burnus  <burnus@net-b.de>
139
140         * intrinsics/selected_real_kind.f90
141         (_gfortran_selected_real_kind2008): Add function.
142         (_gfortran_selected_real_kind): Stub which calls
143         _gfortran_selected_real_kind2008.
144         * gfortran.map (GFORTRAN_1.4): Add
145         _gfortran_selected_real_kind2008.
146         * mk-srk-inc.sh: Save also RADIX.
147
148 2010-06-25  Tobias Burnus  <burnus@net-b.de>
149
150         * runtime/compile_options.c (init_compile_options): Update
151         compile_options.allow_std for GFC_STD_F2008_OBS.
152         * io/transfer.c (formatted_transfer_scalar_read,
153         formatted_transfer_scalar_write): Fix allow_std check.
154         * io/list_read.c (nml_parse_qualifier): Ditto.
155
156 2010-06-18  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
157
158         PR libfortran/44477
159         * io/file_pos.c (st_endfile): Add check for ENDFILE when file is
160         already positioned after the EOF marker. Use find_or_create_unit
161         instead of find_unit. If unit is not connected, connect it and create 
162         the file with default settings.
163         * io/transfer.c (data_transfer_init):  Add check for attempted READ or
164         WRITE when file is already positioned after the EOF marker.
165
166 2010-06-10  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
167
168         * intrinsics/selected_char_kind.c (selected_char_kind): Fix
169         return value for ISO_10646.
170
171 2010-06-09  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
172
173         * mk-kinds-h.sh: Define GFC_REAL_*_LITERAL_SUFFIX and
174         GFC_REAL_*_LITERAL macros for each kind.
175         * intrinsics/cpu_time.c (cpu_time_4, cpu_time_8, cpu_time_10,
176         cpu_time_16): Use them.
177         * intrinsics/random.c (rnumber_4, rnumber_8, rnumber_10,
178         rnumber_16): Likewise.
179
180 2010-06-09  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
181
182         * intrinsics/system_clock.c (system_clock_4, system_clock_8):
183         Undefine TCK.
184
185 2010-06-04  Thomas Koenig  <tkoenig@gcc.gnu.org>
186
187         PR libfortran/34670
188         * intrinsics/date_and_time.c:  Replace assert with runtime_error
189         when VALUE is too small.
190
191 2010-05-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
192
193         PR fortran/43851
194         * runtime/stop.c (stop_string): Make sure nothing is emitted for
195         blank stop.
196
197 2010-05-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
198
199         PR fortran/43851
200         * runtime/stop.c (error_stop_numeric): New function and updated comment.
201         Add declaration for stop_numeric and remove declaration for stop_string.
202         (stop_string): Use for blank STOP.
203         (stop_numeric): Remove use of special -1 stop code.
204         * runtime/pause.c (do_pause): Use stop_string for blank stop.
205         (pause_numeric): Remove use of special -1 pause code.
206         * gfortran.map: Add new symbol to run-time library.
207         * libgfortran.h: Move declaration for stop_string to here to make
208         function visible for do_pause. Remove declaration for stop_numeric.
209
210 2010-05-08  Janne Blomqvist  <jb@gcc.gnu.org>
211
212         * io/unix.h (mem_alloc_r): Fix typo to reduce visibility.
213
214 2010-05-07  Janne Blomqvist  <jb@gcc.gnu.org>
215
216         * libgfortran.h (free_mem): Remove prototype.
217         * runtime/memory.c (free_mem): Remove function.
218         * intrinsics/date_and_time.c (secnds): Replace free_mem() with
219         free().
220         * io/fbuf.c (fbuf_destroy): Likewise.
221         * io/format.c (free_format_hash_table): Likewise.
222         (save_parsed_format): Likewise.
223         (free_format_data): Likewise.
224         * io/list_read.c (free_saved): Likewise.
225         (free_line): Likewise.
226         (nml_touch_nodes): Likewise.
227         (nml_read_obj): Likewise
228         * io/lock.c (free_ionml): Likewise.
229         * io/open.c (new_unit): Likewise.
230         (already_open): Likewise.
231         * io/unit.c (destroy_unit_mutex): Likewise.
232         (free_internal_unit): Likewise.
233         (close_unit_1): Likewise.
234         * io/unix.c (raw_close): Likewise.
235         (buf_close): Likewise.
236         (mem_close): Likewise.
237         (tempfile): Likewise.
238         * io/write.c (nml_write_obj): Likewise.
239         * io/write_float.def (output_float_FMT_G_##): Likewise.
240         * runtime/error.c (show_locus): Likewise.
241
242 2010-05-04  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
243
244         PR other/43620
245         * configure.ac (AM_INIT_AUTOMAKE): Add no-dist.
246         * configure: Regenerate.
247         * Makefile.in: Regenerate.
248
249 2010-04-30  Kai Tietz  <kai.tietz@onevision.com>
250
251         PR/43844
252         * io/unix.c (raw_truncate): Explicit cast from integer-scalar
253         to pointer.
254         (tempfile): Use for mingw GetTempPath and avoid double slash
255         for path.
256
257 2010-04-24  Kai Tietz  <kai.tietz@onevision.com>
258
259         PR/43844
260         * io/unix.c (tempfile): Correct logic for mktemp case.
261
262 2010-04-06  Tobias Burnus  <burnus@net-b.de>
263
264         PR fortran/39997
265         * runtime/stop.c (error_stop_string): New function.
266         * gfortran.map (_gfortran_error_stop_string): Add.
267
268 2010-04-02  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
269
270         * Makefile.in: Regenerate.
271         * aclocal.m4: Regenerate.
272
273 2010-04-01  Janne Blomqvist  <jb@gcc.gnu.org>
274
275         PR libfortran/43605
276         * io/intrinsics.c (gf_ftell): New function, seek to correct offset.
277         (ftell): Call gf_ftell.
278         (FTELL_SUB): Likewise.
279
280 2010-04-01  Paul Thomas  <pault@gcc.gnu.org>
281
282         * io/transfer.c : Update copyright.
283         * io/unix.c : ditto
284         * io/read.c : ditto
285         * io/io.h : ditto
286         * io/unix.h : ditto
287         * io/inquire.c : ditto
288         * io/format.c : ditto
289         * io/list_read.c : ditto
290         * runtime/error.c : ditto
291         * libgfortran.h : ditto
292         * intrinsics/date_and_time.c: ditto
293         * intrinsics/args.c : ditto
294
295 2010-04-01  Janne Blomqvist  <jb@gcc.gnu.org>
296
297         PR libfortran/43605
298         * io/intrinsics.c (ftell): Reset fbuf, correct offset.
299         (FTELL_SUB): Likewise.
300
301 2010-03-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
302
303         PR libfortran/43265
304         * io/transfer.c (next_record_r): Only call hit_eof for specific
305         conditions when an EOF is encountered.
306
307 2010-03-29  Tobias Burnus  <burnus@net-b.de>
308
309         PR fortran/43551
310         * io/unix.c (buf_write): Set physical_offset after lseek.
311
312 2010-03-25  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
313
314         PR libfortran/43517
315         * io/read.c (read_x): Return if seen EOR condition.
316
317 2010-03-21  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
318
319         PR fortran/43409
320         * io/io.h: Fix type of size in st_parameter_inquire structure.
321
322 2010-03-20  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
323
324         PR fortran/43409
325         * io/unix.h: Add prototype for new function to return file size.
326         * io/unix.c (file_size): New function.
327         * io/inquire.c (inquire_via_unit): Use new function.
328         (inquire_via_filename): Use new function.
329
330 2010-03-17  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
331
332         * io/transfer.c (read_sf_internal): Remove stray function declaration
333         used during debugging.
334
335 2010-03-17  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
336
337         PR libfortran/43265
338         * io/io.h: Delete prototype for read_sf, making it static.
339         * io/read.c (read_x): Modify to call hit_eof if PAD="no".
340         * io/transfer.c (read_sf_internal): New static function extracted from
341         read_sf for use on internal units only. Handle empty string case.
342         (read_sf): New factoring of this function, make it static.  Add special
343         conditions for EOF based on ADVANCE="no", PAD="no", and whether any
344         bytes have been previously read from the record.
345         (read_block_form): Modify to call read_sf or read_sf_internal.
346         (next_record_r): Add a done flag similar to next_record_w. Call hit_eof
347         if internal array unit next record returns finished, meaning an EOF was
348         found and not done, ie not the last record expected.  For external
349         units call hit_eof if item_count is 1 or there are no pending spaces.
350         (next_record): Update call to next_record_r.
351
352 2010-03-12  Kai Tietz  <kai.tietz@onevision.com>
353
354         PR/42950
355         * io/format.c (parse_format_list): Add to ERROR, WARNING,
356         SILENT enumerators NOTIFICATION_ prefix.
357         * runtime/error.c (notification_std): Likewise.
358         * libgfortran.h (notification): Likewise.
359         (GFC_LARGEST_BUF): Check for HAVE_GFC_INTEGER_16.
360
361 2010-03-11  Tobias Burnus  <burnus@net-b.de>
362
363         PR fortran/43228
364         * io/list_read.c (nml_parse_qualifier): Disable expanded_read
365         for array sections.
366
367 2010-03-10  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
368
369         PR libfortran/43320
370         * io/transfer.c (next_record_r): Add hit_eof based on item_count
371         condition.
372
373 2010-03-09  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
374
375         PR libfortran/43265
376         * io/read.c: Include fbuf.h and unix.h to enable lower level I/O for
377         read_x. (read_x): Replace the use of read_sf with equivalent lower level
378         I/O, eliminating unneeded code and handling EOF and EOR conditions.
379         * io/io.h: Revise prototype for read_sf.
380         * io/transfer.c (read_sf): Delete no_error parameter and all uses of it.
381         (read_block_form): Likewise.
382         (next_record_r): Delete wrong code call to hit_eof.
383
384 2010-03-08  Kai TIetz  <kai.tietz@onevision.com>
385
386         PR/42950
387         * libgfortran.h (_POSIX): Define if __MINGW32__ is defined.
388         (gfc_printf): Define to gnu_printf for __MINGW32__ case,
389         otherwise to __printf__.
390         (gfc_strtof,gfc_strtod,gfc_strtold): Define for mingw case
391         to POSIX compatible converter functions.
392         (runtime_error): Use instead gfc_printf as formatter
393         attribute name.
394         (runtime_error_at): Likewise.
395         (runtime_warning_at): Likewise.
396         (st_printf): Likewise.
397         * intrinsics/date_and_time.c (localtime_r): Undefine
398         possible defined macro.
399         (gmtime_r): Likewise.
400         * io/read.c (convert_real): Use gfc_strtof, gfc_strtod,
401         and gfc_strtold.
402
403 2010-02-24  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
404
405         PR libfortran/43155
406         * io/transfer.c (require_type): Subtract one from item_count for output
407         of error message.  Add comment before formatted_transfer function
408         explaining why the item_count is off by one.
409
410 2010-02-24  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
411
412         * io/write_float.def (WRITE_FLOAT): Use __builtin_signbit.
413
414 2010-02-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
415
416         * io/list_read.c (list_formatted_read_scalar): Remove duplicate code.
417
418 2010-02-09  Tobias Burnus  <burnus@net-b.de>
419
420         PR fortran/42996
421         * intrinsics/args.c (get_command_argument_i4): Always return
422         commandline-argument length for length parameter.
423
424 2010-02-06  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
425
426         PR libfortran/42742
427         * io/format.c (reset_fnode_counters): Use the correct pointer to the
428         head of the fnode list. (parse_format): Remove previous hack that set
429         limit on size of format string for caching.
430
431 2010-02-06  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
432
433         PR libfortran
434         * io/transfer.c (read_sf): Handle EOR and EOF conditions for
435         ADVANCE="no" with PAD="yes" or PAD="no".
436
437 2010-02-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
438
439         PR libfortran/42901
440         * io/list_read.c (nml_get_obj_data): Add new qualifier flag, clean up
441         code, and adjust logic to set namelist info pointer correctly for array
442         qualifiers of derived type components.
443
444 2010-01-15  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
445
446         PR libfortran/42742
447         * io/format.c (parse_format): Set limit on size of format strings that
448         will be cached.
449
450 2010-01-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
451
452         * configure: Regenerate.
453
454 2010-01-03  Janne Blomqvist  <jb@gcc.gnu.org>
455
456         PR libfortran/42420
457         * io/unix.c: Defines for MINGW stat and fstat.
458         (gfstat_t): New typedef.
459         (id_from_fd): Use gfstat_t instead of struct stat.
460         (fd_to_stream): Likewise.
461         (compare_file_filename): Likewise.
462         (find_file): Likewise.
463         (file_exists): Likewise.
464         (inquire_sequential): Likewise.
465         (inquire_direct): Likewise.
466         (inquire_formatted): Likewise.
467
468 \f
469 Copyright (C) 2010 Free Software Foundation, Inc.
470
471 Copying and distribution of this file, with or without modification,
472 are permitted in any medium without royalty provided the copyright
473 notice and this notice are preserved.