1/* $NetBSD: linux_types.h,v 1.8 2023/02/12 14:59:22 andvar Exp $ */ 2 3/*- 4 * Copyright (c) 1998 The NetBSD Foundation, Inc. 5 * All rights reserved. 6 * 7 * This code is derived from software contributed to The NetBSD Foundation 8 * by Eric Haszlakiewicz. 9 * 10 * Redistribution and use in source and binary forms, with or without 11 * modification, are permitted provided that the following conditions 12 * are met: 13 * 1. Redistributions of source code must retain the above copyright 14 * notice, this list of conditions and the following disclaimer. 15 * 2. Redistributions in binary form must reproduce the above copyright 16 * notice, this list of conditions and the following disclaimer in the 17 * documentation and/or other materials provided with the distribution. 18 * 19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 * POSSIBILITY OF SUCH DAMAGE. 30 */ 31 32#ifndef _ALPHA_LINUX_TYPES_H 33#define _ALPHA_LINUX_TYPES_H 34 35typedef unsigned int linux_uid_t; 36typedef unsigned int linux_gid_t; 37typedef unsigned int linux_dev_t; 38typedef unsigned int linux_ino_t; 39typedef unsigned int linux_mode_t; 40typedef unsigned int linux_nlink_t; 41typedef long linux_time_t; 42typedef long linux_suseconds_t; 43typedef long linux_clock_t; 44typedef long linux_off_t; 45typedef int linux_pid_t; 46 47/* From linux_termios.h */ 48typedef unsigned char linux_cc_t; 49typedef unsigned int linux_speed_t; 50typedef unsigned int linux_tcflag_t; 51 52struct linux_stat { 53 linux_dev_t lst_dev; 54 linux_ino_t lst_ino; 55 linux_mode_t lst_mode; 56 linux_nlink_t lst_nlink; 57 linux_uid_t lst_uid; 58 linux_gid_t lst_gid; 59 linux_dev_t lst_rdev; 60 linux_off_t lst_size; 61 linux_time_t lst_atime; /* Note: Linux uses */ 62 linux_time_t lst_mtime; /* unsigned long */ 63 linux_time_t lst_ctime; /* for these */ 64 unsigned int lst_blksize; 65 int lst_blocks; 66 unsigned int lst_flags; /* unused */ 67 unsigned int lst_gen; /* unused */ 68}; 69 70/* The stat64 structure increases the size of dev_t, blkcnt_t, adds 71 nanosecond resolution times, and padding for expansion. */ 72#define LINUX_STAT64_HAS_NSEC 1 73struct linux_stat64 { 74 unsigned long lst_dev; 75 unsigned long lst_ino; 76 unsigned long lst_rdev; 77 long lst_size; 78 unsigned long lst_blocks; 79 80 unsigned int lst_mode; 81 unsigned int lst_uid; 82 unsigned int lst_gid; 83 unsigned int lst_blksize; 84 unsigned int lst_nlink; 85 unsigned int __pad0; 86 87 unsigned long lst_atime; 88 unsigned long lst_atime_nsec; 89 unsigned long lst_mtime; 90 unsigned long lst_mtime_nsec; 91 unsigned long lst_ctime; 92 unsigned long lst_ctime_nsec; 93 long __pad1[3]; 94}; 95 96#endif /* !_ALPHA_LINUX_TYPES_H */ 97