]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - libio/fileno.c
hurd: Fix build
[thirdparty/glibc.git] / libio / fileno.c
index 49e239394eac7790e549731ce23dd669cbd18627..343bdcde50d8cd603bc944fa64d145c3accf5dd0 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993,95,96,97,2002 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
@@ -28,8 +28,7 @@
 #include <stdio.h>
 
 int
-fileno (fp)
-     _IO_FILE* fp;
+__fileno (FILE *fp)
 {
   CHECK_FILE (fp, EOF);
 
@@ -41,12 +40,12 @@ fileno (fp)
 
   return _IO_fileno (fp);
 }
-libc_hidden_def (fileno)
+libc_hidden_def (__fileno)
+weak_alias (__fileno, fileno)
+libc_hidden_weak (fileno)
 
-#ifdef weak_alias
 /* The fileno implementation for libio does not require locking because
    it only accesses once a single variable and this is already atomic
    (at least at thread level).  Therefore we don't test _IO_MTSAFE_IO here.  */
 
-weak_alias (fileno, fileno_unlocked)
-#endif
+weak_alias (__fileno, fileno_unlocked)