Skip to content

Commit

Permalink
2000-03-13 Roland McGrath <roland@baalperazim.frob.com>
Browse files Browse the repository at this point in the history
	* 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.
  • Loading branch information
Roland McGrath committed Mar 17, 2000
1 parent 0db0e14 commit 1b67abb
Showing 1 changed file with 15 additions and 18 deletions.
33 changes: 15 additions & 18 deletions sysdeps/generic/lockfile.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* lockfile - Handle locking and unlocking of stream.
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
/* lockfile - Handle locking and unlocking of stream. Singlethreaded version.
Copyright (C) 1996,97,2000 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
Expand All @@ -17,44 +17,41 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */

typedef int FILE;
#include <stdio.h>

#undef _IO_flockfile
#undef _IO_funlockfile
#undef _IO_ftrylockfile

void
__internal_flockfile (FILE *stream)
__flockfile (FILE *stream)
{
/* Do nothing. Using this version does not do any locking. */
}
weak_alias (__flockfile, flockfile);
#ifdef USE_IN_LIBIO
weak_alias (__internal_flockfile, _IO_flockfile)
#else
weak_alias (__internal_flockfile, __flockfile)
weak_alias (__flockfile, _IO_flockfile)
#endif
weak_alias (__internal_flockfile, flockfile);


void
__internal_funlockfile (FILE *stream)
__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)
weak_alias (__funlockfile, _IO_funlockfile)
#endif
weak_alias (__internal_funlockfile, funlockfile);
weak_alias (__funlockfile, funlockfile);


int
__internal_ftrylockfile (FILE *stream)
__ftrylockfile (FILE *stream)
{
/* Do nothing. Using this version does not do any locking. */
return 1;
}
weak_alias (__ftrylockfile, ftrylockfile);
#ifdef USE_IN_LIBIO
weak_alias (__internal_ftrylockfile, _IO_ftrylockfile)
#else
weak_alias (__internal_ftrylockfile, __ftrylockfile)
weak_alias (__ftrylockfile, _IO_ftrylockfile)
#endif
weak_alias (__internal_ftrylockfile, ftrylockfile);

0 comments on commit 1b67abb

Please sign in to comment.