aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2012-05-15 16:00:26 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2012-05-15 16:00:26 -0700
commit1053f60019a911b6338d3279b2e6fba406bbc1eb (patch)
tree817f903aa1af8a9548bf3de40d679d9ec519a486
parentf466203a93088fd437b5ba8873e343a85d7bd7d5 (diff)
downloadklibc-1053f60019a911b6338d3279b2e6fba406bbc1eb.tar.gz
[klibc] Change stdio prefix from _io_ to _IO_
_io_ isn't actually implementation namespace, so use _IO_ instead. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
-rw-r--r--usr/include/stdio.h20
-rw-r--r--usr/klibc/stdio/fclose.c2
-rw-r--r--usr/klibc/stdio/fdopen.c4
-rw-r--r--usr/klibc/stdio/feof.c2
-rw-r--r--usr/klibc/stdio/ferror.c2
-rw-r--r--usr/klibc/stdio/fflush.c6
-rw-r--r--usr/klibc/stdio/fgetc.c2
-rw-r--r--usr/klibc/stdio/fileno.c2
-rw-r--r--usr/klibc/stdio/fread.c10
-rw-r--r--usr/klibc/stdio/fseek.c10
-rw-r--r--usr/klibc/stdio/ftell.c2
-rw-r--r--usr/klibc/stdio/fwrite.c10
-rw-r--r--usr/klibc/stdio/rewind.c2
13 files changed, 37 insertions, 37 deletions
diff --git a/usr/include/stdio.h b/usr/include/stdio.h
index d6aec6221094e..bfc7b4bee04d3 100644
--- a/usr/include/stdio.h
+++ b/usr/include/stdio.h
@@ -12,10 +12,10 @@
#include <unistd.h>
struct _IO_file {
- off_t _io_filepos; /* File position */
- int _io_fileno; /* Underlying file descriptor */
- _Bool _io_eof; /* End of file flag */
- _Bool _io_error; /* Error flag */
+ off_t _IO_filepos; /* File position */
+ int _IO_fileno; /* Underlying file descriptor */
+ _Bool _IO_eof; /* End of file flag */
+ _Bool _IO_error; /* Error flag */
};
typedef struct _IO_file FILE;
@@ -113,28 +113,28 @@ fwrite(const void *__p, size_t __s, size_t __n, FILE * __f)
__extern_inline off_t ftell(FILE *__f)
{
- return __f->_io_filepos;
+ return __f->_IO_filepos;
}
__extern_inline int fileno(FILE *__f)
{
- return __f->_io_fileno;
+ return __f->_IO_fileno;
}
__extern_inline int ferror(FILE *__f)
{
- return __f->_io_error;
+ return __f->_IO_error;
}
__extern_inline int feof(FILE *__f)
{
- return __f->_io_eof;
+ return __f->_IO_eof;
}
__extern_inline void clearerr(FILE *__f)
{
- __f->_io_error = 0;
- __f->_io_eof = 0;
+ __f->_IO_error = 0;
+ __f->_IO_eof = 0;
}
#endif
diff --git a/usr/klibc/stdio/fclose.c b/usr/klibc/stdio/fclose.c
index 288b1b8c66bb0..756de4329d777 100644
--- a/usr/klibc/stdio/fclose.c
+++ b/usr/klibc/stdio/fclose.c
@@ -11,7 +11,7 @@ int fclose(FILE *file)
fflush(file);
- rv = close(f->pub._io_fileno);
+ rv = close(f->pub._IO_fileno);
/* Remove from linked list */
f->next->prev = f->prev;
diff --git a/usr/klibc/stdio/fdopen.c b/usr/klibc/stdio/fdopen.c
index e4226e9b0145a..2536eb71cfaba 100644
--- a/usr/klibc/stdio/fdopen.c
+++ b/usr/klibc/stdio/fdopen.c
@@ -30,9 +30,9 @@ FILE *fdopen(int fd, const char *mode)
goto err;
f->data = f->buf = (char *)f + bufoffs;
- f->pub._io_fileno = fd;
+ f->pub._IO_fileno = fd;
pos = lseek(fd, 0, SEEK_CUR);
- f->pub._io_filepos = (pos >= 0) ? pos : 0;
+ f->pub._IO_filepos = (pos >= 0) ? pos : 0;
f->bufsiz = BUFSIZ;
f->bufmode = isatty(fd) ? _IOLBF : _IOFBF;
diff --git a/usr/klibc/stdio/feof.c b/usr/klibc/stdio/feof.c
index 6762c08e25366..590b1c5912893 100644
--- a/usr/klibc/stdio/feof.c
+++ b/usr/klibc/stdio/feof.c
@@ -3,5 +3,5 @@
int feof(FILE *__f)
{
- return __f->_io_eof;
+ return __f->_IO_eof;
}
diff --git a/usr/klibc/stdio/ferror.c b/usr/klibc/stdio/ferror.c
index 6b4502abc7758..8b36e443cb595 100644
--- a/usr/klibc/stdio/ferror.c
+++ b/usr/klibc/stdio/ferror.c
@@ -3,5 +3,5 @@
int ferror(FILE *__f)
{
- return __f->_io_error;
+ return __f->_IO_error;
}
diff --git a/usr/klibc/stdio/fflush.c b/usr/klibc/stdio/fflush.c
index 56f477155de4f..dfccd24d4f8d1 100644
--- a/usr/klibc/stdio/fflush.c
+++ b/usr/klibc/stdio/fflush.c
@@ -18,15 +18,15 @@ int __fflush(struct _IO_file_pvt *f)
p = f->buf;
while (f->obytes) {
- rv = write(f->pub._io_fileno, p, f->obytes);
+ rv = write(f->pub._IO_fileno, p, f->obytes);
if (rv == -1) {
if (errno == EINTR || errno == EAGAIN)
continue;
- f->pub._io_error = true;
+ f->pub._IO_error = true;
return EOF;
} else if (rv == 0) {
/* EOF on output? */
- f->pub._io_eof = true;
+ f->pub._IO_eof = true;
return EOF;
}
diff --git a/usr/klibc/stdio/fgetc.c b/usr/klibc/stdio/fgetc.c
index 1d6e599316df5..04d9ce02382a3 100644
--- a/usr/klibc/stdio/fgetc.c
+++ b/usr/klibc/stdio/fgetc.c
@@ -11,7 +11,7 @@ int fgetc(FILE *file)
if (__likely(f->ibytes)) {
f->ibytes--;
- f->pub._io_filepos++;
+ f->pub._IO_filepos++;
return (unsigned char) *f->data++;
} else {
return _fread(&ch, 1, file) == 1 ? ch : EOF;
diff --git a/usr/klibc/stdio/fileno.c b/usr/klibc/stdio/fileno.c
index 2750f2eb6c562..b5a101618684e 100644
--- a/usr/klibc/stdio/fileno.c
+++ b/usr/klibc/stdio/fileno.c
@@ -3,5 +3,5 @@
int fileno(FILE *__f)
{
- return __f->_io_fileno;
+ return __f->_IO_fileno;
}
diff --git a/usr/klibc/stdio/fread.c b/usr/klibc/stdio/fread.c
index 1cb8a0c4d8aa6..caad20b40bbdc 100644
--- a/usr/klibc/stdio/fread.c
+++ b/usr/klibc/stdio/fread.c
@@ -37,14 +37,14 @@ size_t _fread(void *buf, size_t count, FILE *file)
nb = f->bufsiz;
}
- rv = read(f->pub._io_fileno, rdptr, nb);
+ rv = read(f->pub._IO_fileno, rdptr, nb);
if (rv == -1) {
if (errno == EINTR || errno == EAGAIN)
continue;
- f->pub._io_error = true;
+ f->pub._IO_error = true;
return bytes;
} else if (rv == 0) {
- f->pub._io_eof = true;
+ f->pub._IO_eof = true;
return bytes;
@@ -54,7 +54,7 @@ size_t _fread(void *buf, size_t count, FILE *file)
p += rv;
bytes += rv;
count -= rv;
- f->pub._io_filepos += rv;
+ f->pub._IO_filepos += rv;
} else {
f->ibytes = rv;
f->data = rdptr;
@@ -74,7 +74,7 @@ size_t _fread(void *buf, size_t count, FILE *file)
count -= nb;
f->data += nb;
f->ibytes -= nb;
- f->pub._io_filepos += nb;
+ f->pub._IO_filepos += nb;
}
}
return bytes;
diff --git a/usr/klibc/stdio/fseek.c b/usr/klibc/stdio/fseek.c
index f848844ef500b..d352aa0c71951 100644
--- a/usr/klibc/stdio/fseek.c
+++ b/usr/klibc/stdio/fseek.c
@@ -14,19 +14,19 @@ __extern int fseek(FILE *file, off_t where, int whence)
return -1;
if (whence == SEEK_CUR) {
- where += f->pub._io_filepos;
+ where += f->pub._IO_filepos;
whence = SEEK_SET;
}
- rv = lseek(f->pub._io_fileno, where, whence);
+ rv = lseek(f->pub._IO_fileno, where, whence);
if (__likely(rv != (off_t)-1)) {
- f->pub._io_filepos = rv;
- f->pub._io_eof = false;
+ f->pub._IO_filepos = rv;
+ f->pub._IO_eof = false;
f->ibytes = 0;
f->obytes = 0;
return 0;
} else {
- f->pub._io_error = true;
+ f->pub._IO_error = true;
return -1;
}
}
diff --git a/usr/klibc/stdio/ftell.c b/usr/klibc/stdio/ftell.c
index 2dba32d48a056..f3133d8709fde 100644
--- a/usr/klibc/stdio/ftell.c
+++ b/usr/klibc/stdio/ftell.c
@@ -3,5 +3,5 @@
off_t ftell(FILE *f)
{
- return f->_io_filepos;
+ return f->_IO_filepos;
}
diff --git a/usr/klibc/stdio/fwrite.c b/usr/klibc/stdio/fwrite.c
index 5931906cce43c..86eb3d4dac054 100644
--- a/usr/klibc/stdio/fwrite.c
+++ b/usr/klibc/stdio/fwrite.c
@@ -23,22 +23,22 @@ static size_t fwrite_noflush(const void *buf, size_t count,
* The buffer is empty and the write is large,
* so bypass the buffering entirely.
*/
- rv = write(f->pub._io_fileno, p, count);
+ rv = write(f->pub._IO_fileno, p, count);
if (rv == -1) {
if (errno == EINTR || errno == EAGAIN)
continue;
- f->pub._io_error = true;
+ f->pub._IO_error = true;
break;
} else if (rv == 0) {
/* EOF on output? */
- f->pub._io_eof = true;
+ f->pub._IO_eof = true;
break;
}
p += rv;
bytes += rv;
count -= rv;
- f->pub._io_filepos += rv;
+ f->pub._IO_filepos += rv;
} else {
nb = f->bufsiz - f->obytes;
nb = (count < nb) ? count : nb;
@@ -48,7 +48,7 @@ static size_t fwrite_noflush(const void *buf, size_t count,
f->obytes += nb;
count -= nb;
bytes += nb;
- f->pub._io_filepos += nb;
+ f->pub._IO_filepos += nb;
}
}
}
diff --git a/usr/klibc/stdio/rewind.c b/usr/klibc/stdio/rewind.c
index 67bd35749f361..fb7cd5ac48346 100644
--- a/usr/klibc/stdio/rewind.c
+++ b/usr/klibc/stdio/rewind.c
@@ -4,5 +4,5 @@
void rewind(FILE *f)
{
if (!fseek(f, 0, SEEK_SET))
- f->_io_error = false;
+ f->_IO_error = false;
}