]>
Commit | Line | Data |
---|---|---|
c08bc50a | 1 | /* Copyright (C) 1996, 1997, 1998, 2001 Free Software Foundation, Inc. |
8a523922 UD |
2 | This file is part of the GNU C Library. |
3 | ||
4 | The GNU C Library is free software; you can redistribute it and/or | |
5 | modify it under the terms of the GNU Library General Public License as | |
6 | published by the Free Software Foundation; either version 2 of the | |
7 | License, or (at your option) any later version. | |
8 | ||
9 | In addition to the permissions in the GNU Library General Public | |
10 | License, the Free Software Foundation gives you unlimited | |
11 | permission to link the compiled version of this file with other | |
12 | programs, and to distribute those programs without any restriction | |
6d52618b | 13 | coming from the use of this file. (The Library General Public |
8a523922 UD |
14 | License restrictions do apply in other respects; for example, they |
15 | cover modification of the file, and distribution when not linked | |
16 | into another program.) | |
17 | ||
18 | The GNU C Library is distributed in the hope that it will be useful, | |
19 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
20 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
21 | Library General Public License for more details. | |
22 | ||
23 | You should have received a copy of the GNU Library General Public | |
24 | License along with the GNU C Library; see the file COPYING.LIB. If not, | |
25 | write to the Free Software Foundation, 59 Temple Place - Suite 330, | |
26 | Boston, MA 02111-1307, USA. */ | |
28f540f4 | 27 | |
ff9bef7f | 28 | #include <sys/stat.h> |
28f540f4 | 29 | |
c43b8c4b RM |
30 | /* This definition is only used if inlining fails for this function; see |
31 | the last page of <sys/stat.h>. The real work is done by the `x' | |
32 | function which is passed a version number argument. We arrange in the | |
33 | makefile that when not inlined this function is always statically | |
34 | linked; that way a dynamically-linked executable always encodes the | |
35 | version number corresponding to the data structures it uses, so the `x' | |
36 | functions in the shared library can adapt without needing to recompile | |
37 | all callers. */ | |
d2f5be2a | 38 | |
cc3fa755 | 39 | #undef fstat |
bdbf022d | 40 | #undef __fstat |
ff9bef7f RM |
41 | int |
42 | __fstat (int fd, struct stat *buf) | |
43 | { | |
44 | return __fxstat (_STAT_VER, fd, buf); | |
45 | } | |
d2f5be2a | 46 | |
ff9bef7f | 47 | weak_alias (__fstat, fstat) |
c08bc50a UD |
48 | |
49 | /* Hide the symbol so that no definition but the one locally in the | |
50 | executable or DSO is used. */ | |
51 | #ifdef HAVE_DOT_HIDDEN | |
52 | asm (".hidden\tfstat"); | |
53 | asm (".hidden\t__fstat"); | |
54 | #endif |