Merge tag 'v30+20220905'
Marco d'Itri
1 year, 6 months ago
14 | 14 | * License along with this library; if not, see <http://www.gnu.org/licenses/>. |
15 | 15 | */ |
16 | 16 | |
17 | /* We unset _FILE_OFFSET_BITS here so we can override both stat and stat64 on | |
18 | * 32-bit architectures and forward each to the right libc function */ | |
19 | #undef _FILE_OFFSET_BITS | |
20 | ||
17 | 21 | #include <assert.h> |
18 | 22 | #include <dirent.h> |
19 | 23 | #include <dlfcn.h> |
182 | 186 | WRAP_1ARG(DIR*, NULL, opendir); |
183 | 187 | |
184 | 188 | WRAP_2ARGS(FILE*, NULL, fopen, const char*); |
189 | WRAP_2ARGS(FILE*, NULL, fopen64, const char*); | |
185 | 190 | WRAP_2ARGS(int, -1, mkdir, mode_t); |
186 | 191 | WRAP_2ARGS(int, -1, access, int); |
187 | 192 | WRAP_2ARGS(int, -1, stat, struct stat*); |
188 | 193 | WRAP_2ARGS(int, -1, lstat, struct stat*); |
189 | #ifndef _FILE_OFFSET_BITS | |
190 | 194 | WRAP_2ARGS(int, -1, stat64, struct stat64*); |
191 | 195 | WRAP_2ARGS(int, -1, lstat64, struct stat64*); |
192 | 196 | WRAP_OPEN(64); |
193 | #endif | |
194 | 197 | |
195 | 198 | WRAP_OPEN(); |
196 | 199 | |
197 | 200 | #ifdef HAVE___XSTAT |
198 | 201 | WRAP_VERSTAT(__x,); |
199 | 202 | WRAP_VERSTAT(__lx,); |
200 | #ifndef _FILE_OFFSET_BITS | |
201 | 203 | WRAP_VERSTAT(__x,64); |
202 | 204 | WRAP_VERSTAT(__lx,64); |
203 | 205 | #endif |
204 | #endif |