History log of /freebsd/lib/libc/gen/opendir.c (Results 76 – 100 of 112)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/2.1.7_cvs, release/2.1.6_cvs, release/2.1.6.1, release/2.1.5_cvs
# d71458ee 02-May-1996 Poul-Henning Kamp <phk@FreeBSD.org>

Cache the result of getpagesize() so we only make one syscall.
Use getpagesize instead of CLBYTES.


# 0b50c8d6 29-Mar-1996 Bruce Evans <bde@FreeBSD.org>

stat() before open() because opening of special files may be harmful.


Revision tags: release/2.1.0_cvs, release/2.0.5_cvs
# 55e2b2c6 21-Apr-1995 Bruce Evans <bde@FreeBSD.org>

Fix bugs in opendir():
- it succeeded on non-directories (see POSIX 5.1.2.4).
- it hung on (non-open) named pipes.
- it leaked memory if the second malloc() failed.
- it didn't preserve errno across

Fix bugs in opendir():
- it succeeded on non-directories (see POSIX 5.1.2.4).
- it hung on (non-open) named pipes.
- it leaked memory if the second malloc() failed.
- it didn't preserve errno across errors in close().

show more ...


Revision tags: release/2.0, release/1.1.5.1_cvs
# 58f0484f 27-May-1994 Rodney W. Grimes <rgrimes@FreeBSD.org>

BSD 4.4 Lite Lib Sources


# 070f2a98 21-Mar-2010 Ed Schouten <ed@FreeBSD.org>

Let opendir() use O_DIRECTORY.

I am not removing the fstat() calls here, since we cannot yet assume
people will always run kernels that respect O_DIRECTORY.


# e5c9c853 20-Jan-2010 Andrey A. Chernov <ache@FreeBSD.org>

Style: rename internal function to opendir_compar()

Pointed by: bde


# b9a74f2a 18-Jan-2010 Andrey A. Chernov <ache@FreeBSD.org>

Double checking my commit I found that comment saying that
POSIX 2008 and XSI 7require strcoll() for opendir() is not true.
I can't find such requirement in POSIX 2008 and XSI 7.

So, back out that p

Double checking my commit I found that comment saying that
POSIX 2008 and XSI 7require strcoll() for opendir() is not true.
I can't find such requirement in POSIX 2008 and XSI 7.

So, back out that part of my commit, returning old strcmp(), and remove
this misleading comment.

show more ...


# dcdafd0e 18-Jan-2010 Andrey A. Chernov <ache@FreeBSD.org>

a) Use strcoll() in opendir() and alphasort() as POSIX 2008 requires.
It also matches now how our 'ls' works for years.

b) Remove comment expressed 2 fears:
1) One just simple describe how strco

a) Use strcoll() in opendir() and alphasort() as POSIX 2008 requires.
It also matches now how our 'ls' works for years.

b) Remove comment expressed 2 fears:
1) One just simple describe how strcoll() works in _any_ context,
not for directories only. Are we plan to remove strcoll() from everything
just because it is little more complex than strcmp()? I doubt, and
directories give nothing different here. Moreover, strcoll() used
in 'ls' for years and nobody complaints yet.

2) Plain wrong statement about undefined strcoll() behaviour. strcoll()
always gives predictable results, falling back to strcmp() on any
trouble, see strcoll(3).

No objections from -current list discussion.

show more ...


# 9199c09a 06-Jan-2010 Warner Losh <imp@FreeBSD.org>

Merge from head at r201628.

# This hasn't been tested, and there are at least three bad commits
# that need to be backed out before the branch will be stable again.


# f5636f88 05-Jan-2010 Konstantin Belousov <kib@FreeBSD.org>

Do not rely on behaviour undefined by ANSI C, use thunks to adapt
alphasort-like interface to the comparision function required by
qsort() and qsort_r().

For opendir() thunk and alphasort(), comment

Do not rely on behaviour undefined by ANSI C, use thunks to adapt
alphasort-like interface to the comparision function required by
qsort() and qsort_r().

For opendir() thunk and alphasort(), comment on why we deviated from
POSIX by using strcmp() instead of strcoll().

Requested and reviewed by: bde
MFC after: 2 weeks

show more ...


# 4176dd52 04-Jan-2010 Konstantin Belousov <kib@FreeBSD.org>

Modernize scandir(3) and alphasort(3) interfaces according to the IEEE
Std 1003.1-2008. Both Linux and Solaris conforms to the new definitions,
so we better follow too (older glibc used old BSDish al

Modernize scandir(3) and alphasort(3) interfaces according to the IEEE
Std 1003.1-2008. Both Linux and Solaris conforms to the new definitions,
so we better follow too (older glibc used old BSDish alphasort prototype
and corresponding type of the comparision function for scandir). While
there, change the definitions of the functions to ANSI C and fix several
style issues nearby.

Remove requirement for "sys/types.h" include for functions from manpage.

POSIX also requires that alphasort(3) sorts as if strcoll(3) was used,
but leave the strcmp(3) call in the function for now.

Adapt in-tree callers of scandir(3) to new declaration. The fact that
select_sections() from catman(1) could modify supplied struct dirent is
a bug.

PR: standards/142255
MFC after: 2 weeks

show more ...


Revision tags: release/8.0.0_cvs, release/8.0.0, release/7.2.0_cvs, release/7.2.0, release/7.1.0_cvs, release/7.1.0, release/6.4.0_cvs, release/6.4.0
# 6fda52ba 16-Apr-2008 Xin LI <delphij@FreeBSD.org>

Implement fdopendir(3) by splitting __opendir2() into two parts, the upper part
deals with the usual __opendir2() calls, and the rest part with an interface
translator to expose fdopendir(3) function

Implement fdopendir(3) by splitting __opendir2() into two parts, the upper part
deals with the usual __opendir2() calls, and the rest part with an interface
translator to expose fdopendir(3) functionality. Manual page was obtained from
kib@'s work for *at(2) system calls.

show more ...


# f6386c25 16-Apr-2008 Xin LI <delphij@FreeBSD.org>

Style fixes to opendir.c:
- Use /*- for copyright block;
- ANSIfy.


Revision tags: release/7.0.0_cvs, release/7.0.0, release/6.3.0_cvs, release/6.3.0, release/6.2.0_cvs, release/6.2.0
# c879ae35 09-Jan-2007 Warner Losh <imp@FreeBSD.org>

Per Regents of the University of Calfornia letter, remove advertising
clause.

# If I've done so improperly on a file, please let me know.


Revision tags: release/5.5.0_cvs, release/5.5.0, release/6.1.0_cvs, release/6.1.0, release/6.0.0_cvs, release/6.0.0, release/5.4.0_cvs, release/5.4.0, release/4.11.0_cvs, release/4.11.0, release/5.3.0_cvs, release/5.3.0
# 4eae39bf 14-Aug-2004 Stefan Farfeleder <stefanf@FreeBSD.org>

Avoid using void pointers in additive expressions.

PR: 56653


Revision tags: release/4.10.0_cvs, release/4.10.0, release/5.2.1_cvs, release/5.2.1, release/5.2.0_cvs, release/5.2.0
# 4da7d0f5 26-Dec-2003 Doug Rabson <dfr@FreeBSD.org>

Make sure we initialise dirp->dd_size if we aren't reading a unionfs
directory.

Special thanks to: valgrind


Revision tags: release/4.9.0_cvs, release/4.9.0, release/5.1.0_cvs, release/5.1.0
# 6e7988b9 16-May-2003 Tim J. Robbins <tjr@FreeBSD.org>

Catch up with the renaming of the "union" filesystem to "unionfs".
Fixes a problem where directory entries could show up twice: once
on the top layer of the union stack, and once on the bottom layer.

Catch up with the renaming of the "union" filesystem to "unionfs".
Fixes a problem where directory entries could show up twice: once
on the top layer of the union stack, and once on the bottom layer.

Approved by: re (rwatson)

show more ...


Revision tags: release/4.8.0_cvs, release/4.8.0, release/5.0.0_cvs, release/5.0.0
# 81b3ad59 04-Jan-2003 Tim J. Robbins <tjr@FreeBSD.org>

#include <string.h> for strcmp()'s prototype.


Revision tags: release/4.7.0_cvs, release/4.6.2_cvs, release/4.6.2, release/4.6.1, release/4.6.0_cvs, release/4.5.0_cvs, release/4.4.0_cvs
# ea8d448a 01-Feb-2002 David E. O'Brien <obrien@FreeBSD.org>

Fix SCM ID's.


# 6eabd845 10-Oct-2001 Bruce Evans <bde@FreeBSD.org>

Compensate for "Compensate for header dethreading" by backing it out.


# e16138fe 01-May-2001 Mark Murray <markm@FreeBSD.org>

Compensate for header dethreading.


# b2bcd87e 23-Apr-2001 Joerg Wunsch <joerg@FreeBSD.org>

Fix directory reads of MNT_UNION mounts, where entries present in both
layers would be displayed twice.

PR: bin/26498
Submitted by: Olliver Fromme <olli@secnetix.de>


Revision tags: release/4.3.0_cvs, release/4.3.0
# 8bb47e40 05-Mar-2001 David E. O'Brien <obrien@FreeBSD.org>

Fix style bug that was introduced.


# d201fe46 24-Jan-2001 Daniel Eischen <deischen@FreeBSD.org>

Remove _THREAD_SAFE and make libc thread-safe by default by
adding (weak definitions to) stubs for some of the pthread
functions. If the threads library is linked in, the real
pthread functions will

Remove _THREAD_SAFE and make libc thread-safe by default by
adding (weak definitions to) stubs for some of the pthread
functions. If the threads library is linked in, the real
pthread functions will pulled in.

Use the following convention for system calls wrapped by the
threads library:
__sys_foo - actual system call
_foo - weak definition to __sys_foo
foo - weak definition to __sys_foo

Change all libc uses of system calls wrapped by the threads
library from foo to _foo. In order to define the prototypes
for _foo(), we introduce namespace.h and un-namespace.h
(suggested by bde). All files that need to reference these
system calls, should include namespace.h before any standard
includes, then include un-namespace.h after the standard
includes and before any local includes. <db.h> is an exception
and shouldn't be included in between namespace.h and
un-namespace.h namespace.h will define foo to _foo, and
un-namespace.h will undefine foo.

Try to eliminate some of the recursive calls to MT-safe
functions in libc/stdio in preparation for adding a mutex
to FILE. We have recursive mutexes, but would like to avoid
using them if possible.

Remove uneeded includes of <errno.h> from a few files.

Add $FreeBSD$ to a few files in order to pass commitprep.

Approved by: -arch

show more ...


# 10d1cba0 11-Dec-2000 Daniel Eischen <deischen@FreeBSD.org>

Move telldir position recording type definitions and prototypes
to "telldir.h" in order to prevent namespace pollution in
<dirent.h> (which was including <sys/queue.h>).

Add $FreeBSD$ to rewinddir.c

Move telldir position recording type definitions and prototypes
to "telldir.h" in order to prevent namespace pollution in
<dirent.h> (which was including <sys/queue.h>).

Add $FreeBSD$ to rewinddir.c and seekdir.c.

show more ...


12345