summary refs log tree commit diff
path: root/libio/fputc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/fputc.c')
-rw-r--r--libio/fputc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libio/fputc.c b/libio/fputc.c
index 2339139f72..339861119f 100644
--- a/libio/fputc.c
+++ b/libio/fputc.c
@@ -1,5 +1,5 @@
 /*
-Copyright (C) 1993 Free Software Foundation
+Copyright (C) 1993, 1996 Free Software Foundation, Inc.
 
 This file is part of the GNU IO Library.  This library is free
 software; you can redistribute it and/or modify it under the
@@ -30,6 +30,10 @@ fputc (c, fp)
      int c;
      _IO_FILE *fp;
 {
+  int result;
   CHECK_FILE (fp, EOF);
-  return _IO_putc (c, fp);
+  _IO_flockfile (fp);
+  result = _IO_putc_unlocked (c, fp);
+  _IO_funlockfile (fp);
+  return result;
 }