sunos_dirent.h revision 1.1
11.1Smycroft/* $NetBSD: sunos_dirent.h,v 1.1 1995/10/09 11:24:10 mycroft Exp $ */ 21.1Smycroft 31.1Smycroft/* 41.1Smycroft * Copyright (c) 1994 Christos Zoulas 51.1Smycroft * All rights reserved. 61.1Smycroft * 71.1Smycroft * Redistribution and use in source and binary forms, with or without 81.1Smycroft * modification, are permitted provided that the following conditions 91.1Smycroft * are met: 101.1Smycroft * 1. Redistributions of source code must retain the above copyright 111.1Smycroft * notice, this list of conditions and the following disclaimer. 121.1Smycroft * 2. Redistributions in binary form must reproduce the above copyright 131.1Smycroft * notice, this list of conditions and the following disclaimer in the 141.1Smycroft * documentation and/or other materials provided with the distribution. 151.1Smycroft * 3. The name of the author may not be used to endorse or promote products 161.1Smycroft * derived from this software without specific prior written permission 171.1Smycroft * 181.1Smycroft * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 191.1Smycroft * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 201.1Smycroft * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 211.1Smycroft * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 221.1Smycroft * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 231.1Smycroft * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 241.1Smycroft * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 251.1Smycroft * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 261.1Smycroft * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 271.1Smycroft * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 281.1Smycroft */ 291.1Smycroft 301.1Smycroft#ifndef _SUNOS_DIRENT_H_ 311.1Smycroft#define _SUNOS_DIRENT_H_ 321.1Smycroft 331.1Smycroft#define SUNOS_MAXNAMLEN 255 341.1Smycroft 351.1Smycroftstruct sunos_dirent { 361.1Smycroft long d_off; 371.1Smycroft u_long d_fileno; 381.1Smycroft u_short d_reclen; 391.1Smycroft u_short d_namlen; 401.1Smycroft char d_name[SUNOS_MAXNAMLEN + 1]; 411.1Smycroft}; 421.1Smycroft 431.1Smycroft#define SUNOS_NAMEOFF(dp) ((char *)&(dp)->d_name - (char *)dp) 441.1Smycroft#define SUNOS_RECLEN(de,namlen) ALIGN((SUNOS_NAMEOFF(de) + (namlen) + 1)) 451.1Smycroft 461.1Smycroft#endif /* !_SVR4_DIRENT_H_ */ 47