summaryrefslogtreecommitdiff
path: root/usr/src/lib/libc/port/stdio/getc.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/lib/libc/port/stdio/getc.c')
-rw-r--r--usr/src/lib/libc/port/stdio/getc.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/usr/src/lib/libc/port/stdio/getc.c b/usr/src/lib/libc/port/stdio/getc.c
index cfcf53f347..b7a48b7f3a 100644
--- a/usr/src/lib/libc/port/stdio/getc.c
+++ b/usr/src/lib/libc/port/stdio/getc.c
@@ -25,9 +25,7 @@
*/
/* Copyright (c) 1988 AT&T */
-/* All Rights Reserved */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
+/* All Rights Reserved */
#pragma weak _getc_unlocked = getc_unlocked
@@ -51,10 +49,7 @@ getc(FILE *iop)
int c;
FLOCKFILE(lk, iop);
-
- _SET_ORIENTATION_BYTE(iop);
-
- c = (--iop->_cnt < 0) ? __filbuf(iop) : *iop->_ptr++;
+ c = getc_unlocked(iop);
FUNLOCKFILE(lk);
return (c);
}
@@ -63,5 +58,12 @@ getc(FILE *iop)
int
getc_unlocked(FILE *iop)
{
+ _SET_ORIENTATION_BYTE(iop);
+ return ((--iop->_cnt < 0) ? __filbuf(iop) : *iop->_ptr++);
+}
+
+int
+_getc_internal(FILE *iop)
+{
return ((--iop->_cnt < 0) ? __filbuf(iop) : *iop->_ptr++);
}