about summary refs log tree commit diff
path: root/libio/iogetdelim.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/iogetdelim.c')
-rw-r--r--libio/iogetdelim.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/libio/iogetdelim.c b/libio/iogetdelim.c
index edc5228693..3d0c976f9c 100644
--- a/libio/iogetdelim.c
+++ b/libio/iogetdelim.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1996, 1997, 1998, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1994,1996,1997,1998,2001,2003 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
@@ -55,8 +55,7 @@ _IO_getdelim (lineptr, n, delimiter, fp)
       return -1;
     }
   CHECK_FILE (fp, -1);
-  _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
-  _IO_flockfile (fp);
+  _IO_acquire_lock (fp);
   if (_IO_ferror_unlocked (fp))
     {
       result = -1;
@@ -120,8 +119,7 @@ _IO_getdelim (lineptr, n, delimiter, fp)
   result = cur_len;
 
 unlock_return:
-  _IO_funlockfile (fp);
-  _IO_cleanup_region_end (0);
+  _IO_release_lock (fp);
   return result;
 }