From 858ee15decf0c6d6ff74ae5c1baae1652b3b5e84 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 19 Feb 2007 05:44:33 +0000 Subject: * sysdeps/unix/closedir.c: Outside libc don't use locking. * sysdeps/unix/opendir.c: Likewise. * sysdeps/unix/readdir.c: Likewise. --- sysdeps/unix/readdir.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'sysdeps/unix/readdir.c') diff --git a/sysdeps/unix/readdir.c b/sysdeps/unix/readdir.c index 4a0f089..13e5e9a 100644 --- a/sysdeps/unix/readdir.c +++ b/sysdeps/unix/readdir.c @@ -1,5 +1,4 @@ -/* Copyright (C) 1991,92,93,94,95,96,97,99,2000,02 - Free Software Foundation, Inc. +/* Copyright (C) 1991-1997,1999,2000,2002,2007 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 @@ -42,7 +41,9 @@ __READDIR (DIR *dirp) DIRENT_TYPE *dp; int saved_errno = errno; +#ifndef NOT_IN_libc __libc_lock_lock (dirp->lock); +#endif do { @@ -110,7 +111,9 @@ __READDIR (DIR *dirp) /* Skip deleted files. */ } while (dp->d_ino == 0); +#ifndef NOT_IN_libc __libc_lock_unlock (dirp->lock); +#endif return dp; } -- cgit v1.1