+2018-10-06 Janne Blomqvist <jb@gcc.gnu.org>
+
+ * io/unix.c (compare_file_filename): Use gfc_charlen_type instead
+ of int for string length.
+ (inquire_sequential): Likewise.
+ (inquire_direct): Likewise.
+ (inquire_formatted): Likewise.
+ (inquire_unformatted): Likewise.
+ (inquire_access): Likewise.
+ (inquire_read): Likewise.
+ (inquire_write): Likewise.
+ (inquire_readwrite): Likewise.
+ * io/unix.h (compare_file_filename): Likewise.
+ (inquire_sequential): Likewise.
+ (inquire_direct): Likewise.
+ (inquire_formatted): Likewise.
+ (inquire_unformatted): Likewise.
+ (inquire_read): Likewise.
+ (inquire_write): Likewise.
+ (inquire_readwrite): Likewise.
+
2018-10-02 Gerald Pfeifer <gerald@pfeifer.com>
* io/close.c [!HAVE_UNLINK_OPEN_FILE]: Include <string.h>.
filename. */
int
-compare_file_filename (gfc_unit *u, const char *name, int len)
+compare_file_filename (gfc_unit *u, const char *name, gfc_charlen_type len)
{
struct stat st;
int ret;
string. */
const char *
-inquire_sequential (const char *string, int len)
+inquire_sequential (const char *string, gfc_charlen_type len)
{
struct stat statbuf;
suitable for direct access. Returns a C-style string. */
const char *
-inquire_direct (const char *string, int len)
+inquire_direct (const char *string, gfc_charlen_type len)
{
struct stat statbuf;
is suitable for formatted form. Returns a C-style string. */
const char *
-inquire_formatted (const char *string, int len)
+inquire_formatted (const char *string, gfc_charlen_type len)
{
struct stat statbuf;
is suitable for unformatted form. Returns a C-style string. */
const char *
-inquire_unformatted (const char *string, int len)
+inquire_unformatted (const char *string, gfc_charlen_type len)
{
return inquire_formatted (string, len);
}
suitable for access. */
static const char *
-inquire_access (const char *string, int len, int mode)
+inquire_access (const char *string, gfc_charlen_type len, int mode)
{
if (string == NULL)
return no;
suitable for READ access. */
const char *
-inquire_read (const char *string, int len)
+inquire_read (const char *string, gfc_charlen_type len)
{
return inquire_access (string, len, R_OK);
}
suitable for READ access. */
const char *
-inquire_write (const char *string, int len)
+inquire_write (const char *string, gfc_charlen_type len)
{
return inquire_access (string, len, W_OK);
}
suitable for read and write access. */
const char *
-inquire_readwrite (const char *string, int len)
+inquire_readwrite (const char *string, gfc_charlen_type len)
{
return inquire_access (string, len, R_OK | W_OK);
}
extern stream *error_stream (void);
internal_proto(error_stream);
-extern int compare_file_filename (gfc_unit *, const char *, int);
+extern int compare_file_filename (gfc_unit *, const char *, gfc_charlen_type);
internal_proto(compare_file_filename);
extern gfc_unit *find_file (const char *file, gfc_charlen_type file_len);
extern GFC_IO_INT file_size (const char *file, gfc_charlen_type file_len);
internal_proto(file_size);
-extern const char *inquire_sequential (const char *, int);
+extern const char *inquire_sequential (const char *, gfc_charlen_type);
internal_proto(inquire_sequential);
-extern const char *inquire_direct (const char *, int);
+extern const char *inquire_direct (const char *, gfc_charlen_type);
internal_proto(inquire_direct);
-extern const char *inquire_formatted (const char *, int);
+extern const char *inquire_formatted (const char *, gfc_charlen_type);
internal_proto(inquire_formatted);
-extern const char *inquire_unformatted (const char *, int);
+extern const char *inquire_unformatted (const char *, gfc_charlen_type);
internal_proto(inquire_unformatted);
-extern const char *inquire_read (const char *, int);
+extern const char *inquire_read (const char *, gfc_charlen_type);
internal_proto(inquire_read);
-extern const char *inquire_write (const char *, int);
+extern const char *inquire_write (const char *, gfc_charlen_type);
internal_proto(inquire_write);
-extern const char *inquire_readwrite (const char *, int);
+extern const char *inquire_readwrite (const char *, gfc_charlen_type);
internal_proto(inquire_readwrite);
extern void flush_if_preconnected (stream *);