mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-23 13:30:06 +00:00
Rename dirfd to __dirfd, add weak_alias.
This commit is contained in:
parent
fabe2a9514
commit
94c3cff583
@ -1,5 +1,5 @@
|
||||
/* Return the file descriptor used by a DIR stream. Stub version.
|
||||
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995, 1996, 2012 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
|
||||
@ -21,12 +21,13 @@
|
||||
#include <errno.h>
|
||||
|
||||
int
|
||||
dirfd (dirp)
|
||||
__dirfd (dirp)
|
||||
DIR *dirp;
|
||||
{
|
||||
__set_errno (ENOSYS);
|
||||
return -1;
|
||||
}
|
||||
weak_alias(__dirfd, dirfd)
|
||||
|
||||
stub_warning (dirfd)
|
||||
#include <stub-tag.h>
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* dirfd -- Return the file descriptor used by a DIR stream. Hurd version.
|
||||
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995, 1996, 2012 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
|
||||
@ -22,7 +22,7 @@
|
||||
#include <errno.h>
|
||||
|
||||
int
|
||||
dirfd (DIR *dirp)
|
||||
__dirfd (DIR *dirp)
|
||||
{
|
||||
int fd;
|
||||
__mutex_lock (&_hurd_dtable_lock);
|
||||
@ -38,3 +38,4 @@ dirfd (DIR *dirp)
|
||||
|
||||
return fd;
|
||||
}
|
||||
weak_alias(__dirfd, dirfd)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Return the file descriptor used by a DIR stream. Unix version.
|
||||
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995, 1996, 2012 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
|
||||
@ -22,8 +22,9 @@
|
||||
#undef dirfd
|
||||
|
||||
int
|
||||
dirfd (dirp)
|
||||
__dirfd (dirp)
|
||||
DIR *dirp;
|
||||
{
|
||||
return dirp->fd;
|
||||
}
|
||||
weak_alias(__dirfd, dirfd)
|
||||
|
Loading…
Reference in New Issue
Block a user