diff options
Diffstat (limited to 'libio')
57 files changed, 516 insertions, 597 deletions
diff --git a/libio/__fpurge.c b/libio/__fpurge.c index 342456fb48..473a600a02 100644 --- a/libio/__fpurge.c +++ b/libio/__fpurge.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2002 Free Software Foundation, Inc. +/* Copyright (C) 2000-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -25,7 +25,7 @@ __fpurge (FILE *fp) { /* Wide-char stream. */ if (_IO_in_backup (fp)) - INTUSE(_IO_free_wbackup_area) (fp); + _IO_free_wbackup_area (fp); fp->_wide_data->_IO_read_end = fp->_wide_data->_IO_read_ptr; fp->_wide_data->_IO_write_ptr = fp->_wide_data->_IO_write_base; @@ -34,7 +34,7 @@ __fpurge (FILE *fp) { /* Byte stream. */ if (_IO_in_backup (fp)) - INTUSE(_IO_free_backup_area) (fp); + _IO_free_backup_area (fp); fp->_IO_read_end = fp->_IO_read_ptr; fp->_IO_write_ptr = fp->_IO_write_base; diff --git a/libio/__fsetlocking.c b/libio/__fsetlocking.c index b1453292dd..8b0b52fa33 100644 --- a/libio/__fsetlocking.c +++ b/libio/__fsetlocking.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2002 Free Software Foundation, Inc. +/* Copyright (C) 2000-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -34,4 +34,4 @@ __fsetlocking (FILE *fp, int type) return result; } -INTDEF(__fsetlocking) +libc_hidden_def (__fsetlocking) diff --git a/libio/filedoalloc.c b/libio/filedoalloc.c index 64eb731c00..b7733c7f88 100644 --- a/libio/filedoalloc.c +++ b/libio/filedoalloc.c @@ -126,7 +126,7 @@ _IO_file_doallocate (fp) #endif } ALLOC_BUF (p, size, EOF); - INTUSE(_IO_setb) (fp, p, p + size, 1); + _IO_setb (fp, p, p + size, 1); return 1; } -INTDEF(_IO_file_doallocate) +libc_hidden_def (_IO_file_doallocate) diff --git a/libio/fileops.c b/libio/fileops.c index 93750f8084..7c7fef1c75 100644 --- a/libio/fileops.c +++ b/libio/fileops.c @@ -60,8 +60,6 @@ extern int errno; # define lseek(FD, Offset, Whence) __lseek (FD, Offset, Whence) # define read(FD, Buf, NBytes) __read (FD, Buf, NBytes) # define write(FD, Buf, NBytes) __write (FD, Buf, NBytes) -# define _IO_do_write _IO_new_do_write /* For macro uses. */ -# define _IO_file_close_it _IO_new_file_close_it #else # define _IO_new_do_write _IO_do_write # define _IO_new_file_attach _IO_file_attach @@ -148,10 +146,10 @@ _IO_new_file_init (fp) fp->file._offset = _IO_pos_BAD; fp->file._IO_file_flags |= CLOSED_FILEBUF_FLAGS; - INTUSE(_IO_link_in) (fp); + _IO_link_in (fp); fp->file._fileno = -1; } -INTDEF2(_IO_new_file_init, _IO_file_init) +libc_hidden_ver (_IO_new_file_init, _IO_file_init) int _IO_new_file_close_it (fp) @@ -175,7 +173,7 @@ _IO_new_file_close_it (fp) else write_status = 0; - INTUSE(_IO_unsave_markers) (fp); + _IO_unsave_markers (fp); int close_status = ((fp->_flags2 & _IO_FLAGS2_NOCLOSE) == 0 ? _IO_SYSCLOSE (fp) : 0); @@ -185,24 +183,24 @@ _IO_new_file_close_it (fp) if (fp->_mode > 0) { if (_IO_have_wbackup (fp)) - INTUSE(_IO_free_wbackup_area) (fp); - INTUSE(_IO_wsetb) (fp, NULL, NULL, 0); + _IO_free_wbackup_area (fp); + _IO_wsetb (fp, NULL, NULL, 0); _IO_wsetg (fp, NULL, NULL, NULL); _IO_wsetp (fp, NULL, NULL); } #endif - INTUSE(_IO_setb) (fp, NULL, NULL, 0); + _IO_setb (fp, NULL, NULL, 0); _IO_setg (fp, NULL, NULL, NULL); _IO_setp (fp, NULL, NULL); - INTUSE(_IO_un_link) ((struct _IO_FILE_plus *) fp); + _IO_un_link ((struct _IO_FILE_plus *) fp); fp->_flags = _IO_MAGIC|CLOSED_FILEBUF_FLAGS; fp->_fileno = -1; fp->_offset = _IO_pos_BAD; return close_status ? close_status : write_status; } -INTDEF2(_IO_new_file_close_it, _IO_file_close_it) +libc_hidden_ver (_IO_new_file_close_it, _IO_file_close_it) void _IO_new_file_finish (fp, dummy) @@ -215,9 +213,9 @@ _IO_new_file_finish (fp, dummy) if (!(fp->_flags & _IO_DELETE_DONT_CLOSE)) _IO_SYSCLOSE (fp); } - INTUSE(_IO_default_finish) (fp, 0); + _IO_default_finish (fp, 0); } -INTDEF2(_IO_new_file_finish, _IO_file_finish) +libc_hidden_ver (_IO_new_file_finish, _IO_file_finish) _IO_FILE * _IO_file_open (fp, filename, posix_mode, prot, read_write, is32not64) @@ -249,7 +247,7 @@ _IO_file_open (fp, filename, posix_mode, prot, read_write, is32not64) close_not_cancel (fdesc); return NULL; } - INTUSE(_IO_link_in) ((struct _IO_FILE_plus *) fp); + _IO_link_in ((struct _IO_FILE_plus *) fp); return fp; } libc_hidden_def (_IO_file_open) @@ -378,7 +376,7 @@ _IO_new_file_fopen (fp, filename, mode, is32not64) /* Something went wrong, we cannot load the conversion modules. This means we cannot proceed since the user explicitly asked for these. */ - (void) INTUSE(_IO_file_close_it) (fp); + (void) _IO_file_close_it (fp); __set_errno (EINVAL); return NULL; } @@ -431,7 +429,7 @@ _IO_new_file_fopen (fp, filename, mode, is32not64) return result; } -INTDEF2(_IO_new_file_fopen, _IO_file_fopen) +libc_hidden_ver (_IO_new_file_fopen, _IO_file_fopen) _IO_FILE * _IO_new_file_attach (fp, fd) @@ -453,7 +451,7 @@ _IO_new_file_attach (fp, fd) __set_errno (save_errno); return fp; } -INTDEF2(_IO_new_file_attach, _IO_file_attach) +libc_hidden_ver (_IO_new_file_attach, _IO_file_attach) _IO_FILE * _IO_new_file_setbuf (fp, p, len) @@ -470,7 +468,7 @@ _IO_new_file_setbuf (fp, p, len) return fp; } -INTDEF2(_IO_new_file_setbuf, _IO_file_setbuf) +libc_hidden_ver (_IO_new_file_setbuf, _IO_file_setbuf) _IO_FILE * @@ -512,7 +510,7 @@ _IO_new_do_write (fp, data, to_do) return (to_do == 0 || (_IO_size_t) new_do_write (fp, data, to_do) == to_do) ? 0 : EOF; } -INTDEF2(_IO_new_do_write, _IO_do_write) +libc_hidden_ver (_IO_new_do_write, _IO_do_write) static _IO_size_t @@ -539,8 +537,7 @@ new_do_write (fp, data, to_do) } count = _IO_SYSWRITE (fp, data, to_do); if (fp->_cur_column && count) - fp->_cur_column = INTUSE(_IO_adjust_column) (fp->_cur_column - 1, data, - count) + 1; + fp->_cur_column = _IO_adjust_column (fp->_cur_column - 1, data, count) + 1; _IO_setg (fp, fp->_IO_buf_base, fp->_IO_buf_base, fp->_IO_buf_base); fp->_IO_write_base = fp->_IO_write_ptr = fp->_IO_buf_base; fp->_IO_write_end = (fp->_mode <= 0 @@ -577,7 +574,7 @@ _IO_new_file_underflow (fp) free (fp->_IO_save_base); fp->_flags &= ~_IO_IN_BACKUP; } - INTUSE(_IO_doallocbuf) (fp); + _IO_doallocbuf (fp); } /* Flush all line buffered files before reading. */ @@ -585,7 +582,7 @@ _IO_new_file_underflow (fp) if (fp->_flags & (_IO_LINE_BUF|_IO_UNBUFFERED)) { #if 0 - INTUSE(_IO_flush_all_linebuffered) (); + _IO_flush_all_linebuffered (); #else /* We used to flush all line-buffered stream. This really isn't required by any standard. My recollection is that @@ -602,7 +599,7 @@ _IO_new_file_underflow (fp) #endif } - INTUSE(_IO_switch_to_get_mode) (fp); + _IO_switch_to_get_mode (fp); /* This is very tricky. We have to adjust those pointers before we call _IO_SYSREAD () since @@ -629,7 +626,7 @@ _IO_new_file_underflow (fp) _IO_pos_adjust (fp->_offset, count); return *(unsigned char *) fp->_IO_read_ptr; } -INTDEF2(_IO_new_file_underflow, _IO_file_underflow) +libc_hidden_ver (_IO_new_file_underflow, _IO_file_underflow) /* Guts of underflow callback if we mmap the file. This stats the file and updates the stream state to match. In the normal case we return zero. @@ -802,7 +799,7 @@ decide_maybe_mmap (_IO_FILE *fp) } else { - INTUSE(_IO_setb) (fp, p, (char *) p + st.st_size, 0); + _IO_setb (fp, p, (char *) p + st.st_size, 0); if (fp->_offset == _IO_pos_BAD) fp->_offset = 0; @@ -857,7 +854,7 @@ _IO_new_file_overflow (f, ch) /* Allocate a buffer if needed. */ if (f->_IO_write_base == NULL) { - INTUSE(_IO_doallocbuf) (f); + _IO_doallocbuf (f); _IO_setg (f, f->_IO_buf_base, f->_IO_buf_base, f->_IO_buf_base); } /* Otherwise must be currently reading. @@ -870,7 +867,7 @@ _IO_new_file_overflow (f, ch) if (__builtin_expect (_IO_in_backup (f), 0)) { size_t nbackup = f->_IO_read_end - f->_IO_read_ptr; - INTUSE(_IO_free_backup_area) (f); + _IO_free_backup_area (f); f->_IO_read_base -= MIN (nbackup, f->_IO_read_base - f->_IO_buf_base); f->_IO_read_ptr = f->_IO_read_base; @@ -888,20 +885,20 @@ _IO_new_file_overflow (f, ch) f->_IO_write_end = f->_IO_write_ptr; } if (ch == EOF) - return INTUSE(_IO_do_write) (f, f->_IO_write_base, - f->_IO_write_ptr - f->_IO_write_base); + return _IO_do_write (f, f->_IO_write_base, + f->_IO_write_ptr - f->_IO_write_base); if (f->_IO_write_ptr == f->_IO_buf_end ) /* Buffer is really full */ if (_IO_do_flush (f) == EOF) return EOF; *f->_IO_write_ptr++ = ch; if ((f->_flags & _IO_UNBUFFERED) || ((f->_flags & _IO_LINE_BUF) && ch == '\n')) - if (INTUSE(_IO_do_write) (f, f->_IO_write_base, - f->_IO_write_ptr - f->_IO_write_base) == EOF) + if (_IO_do_write (f, f->_IO_write_base, + f->_IO_write_ptr - f->_IO_write_base) == EOF) return EOF; return (unsigned char) ch; } -INTDEF2(_IO_new_file_overflow, _IO_file_overflow) +libc_hidden_ver (_IO_new_file_overflow, _IO_file_overflow) int _IO_new_file_sync (fp) @@ -936,7 +933,7 @@ _IO_new_file_sync (fp) /* setg(base(), ptr, ptr); */ return retval; } -INTDEF2(_IO_new_file_sync, _IO_file_sync) +libc_hidden_ver (_IO_new_file_sync, _IO_file_sync) static int _IO_file_sync_mmap (_IO_FILE *fp) @@ -993,7 +990,7 @@ _IO_new_file_seekoff (fp, offset, dir, mode) FIXME: simulate mem-papped files. */ if (fp->_IO_write_ptr > fp->_IO_write_base || _IO_in_put_mode (fp)) - if (INTUSE(_IO_switch_to_get_mode) (fp)) + if (_IO_switch_to_get_mode (fp)) return EOF; if (fp->_IO_buf_base == NULL) @@ -1004,7 +1001,7 @@ _IO_new_file_seekoff (fp, offset, dir, mode) free (fp->_IO_read_base); fp->_flags &= ~_IO_IN_BACKUP; } - INTUSE(_IO_doallocbuf) (fp); + _IO_doallocbuf (fp); _IO_setp (fp, fp->_IO_buf_base, fp->_IO_buf_base); _IO_setg (fp, fp->_IO_buf_base, fp->_IO_buf_base, fp->_IO_buf_base); } @@ -1112,7 +1109,7 @@ _IO_new_file_seekoff (fp, offset, dir, mode) return offset; dumb: - INTUSE(_IO_unsave_markers) (fp); + _IO_unsave_markers (fp); result = _IO_SYSSEEK (fp, offset, dir); if (result != EOF) { @@ -1133,7 +1130,7 @@ resync: |
