/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/*
* University Copyright- Copyright (c) 1982, 1986, 1988
* The Regents of the University of California
* All Rights Reserved
*
* University Acknowledgment- Portions of this document are derived from
* software developed by the University of California, Berkeley, and its
* contributors.
*/
#ifndef _SYS_DIR_H
#define _SYS_DIR_H
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/isa_defs.h>
#include <sys/int_types.h>
/*
* This header file provides BSD compatibility for DIR and direct structures.
* The fields in the BSD DIR structure are identical to to the SVR4 DIR
* structure, except for the fact that the dd_buf field in SVR4 is not
* statically allocated.
* The BSD direct structure is similar (not identical) to the dirent
* structure. All fields of the direct structure can be obtained using
* the information provided by dirent.
* All routines manipulating DIR structures are compatible, only readdir
* is not. The BSD version of this routine returns a direct structure.
*/
#ifdef __cplusplus
extern "C" {
#endif
#endif
#if _FILE_OFFSET_BITS == 32
struct direct {
};
struct direct {
};
#endif
#if defined(_LARGEFILE64_SOURCE)
struct direct64 {
};
#endif
/*
* The macro DIRSIZ(dp) gives an amount of space required to represent
* a directory entry.
*/
#if _FILE_OFFSET_BITS == 32
#endif
#if defined(_LARGEFILE64_SOURCE)
#endif
#ifndef KERNEL
/*
* Definitions for library routines operating on directories.
*/
typedef struct _dirdesc {
int dd_fd;
int dd_loc;
int dd_size;
char *dd_buf;
} DIR;
#ifndef NULL
#define NULL 0
#endif
#if defined(_LP64) && defined(_LARGEFILE64_SOURCE)
#ifdef __PRAGMA_REDEFINE_EXTNAME
#else
#endif
#endif
#ifdef __PRAGMA_REDEFINE_EXTNAME
#else
#endif
#endif
#if defined(__STDC__)
int (*)(struct direct *),
#else
extern long telldir();
extern void seekdir();
extern int scandir();
extern int alphasort();
extern void rewinddir();
extern void closedir();
#endif
!defined(__PRAGMA_REDEFINE_EXTNAME))
#if defined(__STDC__)
int (*)(struct direct64 *),
#else
extern int scandir64();
extern int alphasort64();
#endif
#endif /* _LARGEFILE64_SOURCE... */
#endif
#ifdef __cplusplus
}
#endif
#endif /* _SYS_DIR_H */