sunos_dirent.h revision 1.2
11.2Schristos/*	$NetBSD: sunos_dirent.h,v 1.2 1998/09/05 14:50:26 christos Exp $	 */
21.1Smycroft
31.2Schristos/*-
41.2Schristos * Copyright (c) 1994 The NetBSD Foundation, Inc.
51.1Smycroft * All rights reserved.
61.1Smycroft *
71.2Schristos * This code is derived from software contributed to The NetBSD Foundation
81.2Schristos * by Christos Zoulas.
91.2Schristos *
101.1Smycroft * Redistribution and use in source and binary forms, with or without
111.1Smycroft * modification, are permitted provided that the following conditions
121.1Smycroft * are met:
131.1Smycroft * 1. Redistributions of source code must retain the above copyright
141.1Smycroft *    notice, this list of conditions and the following disclaimer.
151.1Smycroft * 2. Redistributions in binary form must reproduce the above copyright
161.1Smycroft *    notice, this list of conditions and the following disclaimer in the
171.1Smycroft *    documentation and/or other materials provided with the distribution.
181.2Schristos * 3. All advertising materials mentioning features or use of this software
191.2Schristos *    must display the following acknowledgement:
201.2Schristos *        This product includes software developed by the NetBSD
211.2Schristos *        Foundation, Inc. and its contributors.
221.2Schristos * 4. Neither the name of The NetBSD Foundation nor the names of its
231.2Schristos *    contributors may be used to endorse or promote products derived
241.2Schristos *    from this software without specific prior written permission.
251.1Smycroft *
261.2Schristos * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
271.2Schristos * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
281.2Schristos * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
291.2Schristos * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
301.2Schristos * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
311.2Schristos * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
321.2Schristos * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
331.2Schristos * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
341.2Schristos * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
351.2Schristos * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
361.2Schristos * POSSIBILITY OF SUCH DAMAGE.
371.1Smycroft */
381.1Smycroft
391.1Smycroft#ifndef	_SUNOS_DIRENT_H_
401.1Smycroft#define	_SUNOS_DIRENT_H_
411.1Smycroft
421.1Smycroft#define SUNOS_MAXNAMLEN	255
431.1Smycroft
441.1Smycroftstruct sunos_dirent {
451.1Smycroft	long		d_off;
461.1Smycroft	u_long		d_fileno;
471.1Smycroft	u_short		d_reclen;
481.1Smycroft	u_short		d_namlen;
491.1Smycroft	char		d_name[SUNOS_MAXNAMLEN + 1];
501.1Smycroft};
511.1Smycroft
521.1Smycroft#define SUNOS_NAMEOFF(dp)       ((char *)&(dp)->d_name - (char *)dp)
531.1Smycroft#define SUNOS_RECLEN(de,namlen) ALIGN((SUNOS_NAMEOFF(de) + (namlen) + 1))
541.1Smycroft
551.1Smycroft#endif /* !_SVR4_DIRENT_H_ */
56