mirror of git://sourceware.org/git/glibc.git
2000-03-13 Roland McGrath <roland@baalperazim.frob.com>
* sysdeps/generic/lockfile.c: Include <stdio.h> (_IO_flockfile, _IO_funlockfile, _IO_ftrylockfile): #undef these in case <libio.h> defined them. (__flockfile, __funlockfile, __ftrylockfile): Functions renamed from __internal_*. (flockfile, _IO_flockfile, funlockfile, _IO_funlockfile, ftrylockfile, _IO_ftrylockfile): Fix aliases accordingly.
This commit is contained in:
parent
0db0e14977
commit
1b67abbbfd
|
|
@ -1,5 +1,5 @@
|
||||||
/* lockfile - Handle locking and unlocking of stream.
|
/* lockfile - Handle locking and unlocking of stream. Singlethreaded version.
|
||||||
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
Copyright (C) 1996,97,2000 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
|
@ -17,44 +17,41 @@
|
||||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
Boston, MA 02111-1307, USA. */
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
typedef int FILE;
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#undef _IO_flockfile
|
||||||
|
#undef _IO_funlockfile
|
||||||
|
#undef _IO_ftrylockfile
|
||||||
|
|
||||||
|
void
|
||||||
|
__flockfile (FILE *stream)
|
||||||
|
{
|
||||||
|
/* Do nothing. Using this version does not do any locking. */
|
||||||
|
}
|
||||||
|
weak_alias (__flockfile, flockfile);
|
||||||
|
#ifdef USE_IN_LIBIO
|
||||||
|
weak_alias (__flockfile, _IO_flockfile)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
__internal_flockfile (FILE *stream)
|
__funlockfile (FILE *stream)
|
||||||
{
|
{
|
||||||
/* Do nothing. Using this version does not do any locking. */
|
/* Do nothing. Using this version does not do any locking. */
|
||||||
}
|
}
|
||||||
#ifdef USE_IN_LIBIO
|
#ifdef USE_IN_LIBIO
|
||||||
weak_alias (__internal_flockfile, _IO_flockfile)
|
weak_alias (__funlockfile, _IO_funlockfile)
|
||||||
#else
|
|
||||||
weak_alias (__internal_flockfile, __flockfile)
|
|
||||||
#endif
|
#endif
|
||||||
weak_alias (__internal_flockfile, flockfile);
|
weak_alias (__funlockfile, funlockfile);
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
__internal_funlockfile (FILE *stream)
|
|
||||||
{
|
|
||||||
/* Do nothing. Using this version does not do any locking. */
|
|
||||||
}
|
|
||||||
#ifdef USE_IN_LIBIO
|
|
||||||
weak_alias (__internal_funlockfile, _IO_funlockfile)
|
|
||||||
#else
|
|
||||||
weak_alias (__internal_funlockfile, __funlockfile)
|
|
||||||
#endif
|
|
||||||
weak_alias (__internal_funlockfile, funlockfile);
|
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
__internal_ftrylockfile (FILE *stream)
|
__ftrylockfile (FILE *stream)
|
||||||
{
|
{
|
||||||
/* Do nothing. Using this version does not do any locking. */
|
/* Do nothing. Using this version does not do any locking. */
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
weak_alias (__ftrylockfile, ftrylockfile);
|
||||||
#ifdef USE_IN_LIBIO
|
#ifdef USE_IN_LIBIO
|
||||||
weak_alias (__internal_ftrylockfile, _IO_ftrylockfile)
|
weak_alias (__ftrylockfile, _IO_ftrylockfile)
|
||||||
#else
|
|
||||||
weak_alias (__internal_ftrylockfile, __ftrylockfile)
|
|
||||||
#endif
|
#endif
|
||||||
weak_alias (__internal_ftrylockfile, ftrylockfile);
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue