Deleted Added
full compact
opendir.c (165903) opendir.c (178253)
1/*
1/*-
2 * Copyright (c) 1983, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.

--- 16 unchanged lines hidden (view full) ---

26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#if defined(LIBC_SCCS) && !defined(lint)
31static char sccsid[] = "@(#)opendir.c 8.8 (Berkeley) 5/1/95";
32#endif /* LIBC_SCCS and not lint */
33#include <sys/cdefs.h>
2 * Copyright (c) 1983, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.

--- 16 unchanged lines hidden (view full) ---

26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#if defined(LIBC_SCCS) && !defined(lint)
31static char sccsid[] = "@(#)opendir.c 8.8 (Berkeley) 5/1/95";
32#endif /* LIBC_SCCS and not lint */
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: head/lib/libc/gen/opendir.c 165903 2007-01-09 00:28:16Z imp $");
34__FBSDID("$FreeBSD: head/lib/libc/gen/opendir.c 178253 2008-04-16 18:40:52Z delphij $");
35
36#include "namespace.h"
37#include <sys/param.h>
38#include <sys/mount.h>
39#include <sys/stat.h>
40
41#include <dirent.h>
42#include <errno.h>
43#include <fcntl.h>
44#include <stdlib.h>
45#include <string.h>
46#include <unistd.h>
47#include "un-namespace.h"
48
49#include "telldir.h"
50/*
51 * Open a directory.
52 */
53DIR *
35
36#include "namespace.h"
37#include <sys/param.h>
38#include <sys/mount.h>
39#include <sys/stat.h>
40
41#include <dirent.h>
42#include <errno.h>
43#include <fcntl.h>
44#include <stdlib.h>
45#include <string.h>
46#include <unistd.h>
47#include "un-namespace.h"
48
49#include "telldir.h"
50/*
51 * Open a directory.
52 */
53DIR *
54opendir(name)
55 const char *name;
54opendir(const char *name)
56{
57
58 return (__opendir2(name, DTF_HIDEW|DTF_NODUP));
59}
60
61DIR *
55{
56
57 return (__opendir2(name, DTF_HIDEW|DTF_NODUP));
58}
59
60DIR *
62__opendir2(name, flags)
63 const char *name;
64 int flags;
61__opendir2(const char *name, int flags)
65{
66 DIR *dirp;
67 int fd;
68 int incr;
69 int saved_errno;
70 int unionstack;
71 struct stat statb;
72

--- 211 unchanged lines hidden ---
62{
63 DIR *dirp;
64 int fd;
65 int incr;
66 int saved_errno;
67 int unionstack;
68 struct stat statb;
69

--- 211 unchanged lines hidden ---