]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - libio/feof.c
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / libio / feof.c
index c89182c2881b5a576d83ec9ace3086919b4c59da..9d8a2c96fac2bc7e487239e7508dbd3ea5dfa8e5 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2019 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
 #include "stdio.h"
 
 int
-_IO_feof (fp)
-     _IO_FILE* fp;
+_IO_feof (FILE *fp)
 {
   int result;
   CHECK_FILE (fp, EOF);
+  if (!_IO_need_lock (fp))
+    return _IO_feof_unlocked (fp);
   _IO_flockfile (fp);
   result = _IO_feof_unlocked (fp);
   _IO_funlockfile (fp);
   return result;
 }
 
-#ifdef weak_alias
 weak_alias (_IO_feof, feof)
 
 #ifndef _IO_MTSAFE_IO
 #undef feof_unlocked
 weak_alias (_IO_feof, feof_unlocked)
 #endif
-#endif