| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: netbsd32.h,v 1.81 2009/01/28 00:43:04 njoly Exp $ */ | | 1 | /* $NetBSD: netbsd32.h,v 1.82 2009/03/16 20:48:13 njoly Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (c) 1998, 2001, 2008 Matthew R. Green | | 4 | * Copyright (c) 1998, 2001, 2008 Matthew R. Green |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * Redistribution and use in source and binary forms, with or without | | 7 | * Redistribution and use in source and binary forms, with or without |
8 | * modification, are permitted provided that the following conditions | | 8 | * modification, are permitted provided that the following conditions |
9 | * are met: | | 9 | * are met: |
10 | * 1. Redistributions of source code must retain the above copyright | | 10 | * 1. Redistributions of source code must retain the above copyright |
11 | * notice, this list of conditions and the following disclaimer. | | 11 | * notice, this list of conditions and the following disclaimer. |
12 | * 2. Redistributions in binary form must reproduce the above copyright | | 12 | * 2. Redistributions in binary form must reproduce the above copyright |
13 | * notice, this list of conditions and the following disclaimer in the | | 13 | * notice, this list of conditions and the following disclaimer in the |
14 | * documentation and/or other materials provided with the distribution. | | 14 | * documentation and/or other materials provided with the distribution. |
| @@ -148,26 +148,27 @@ typedef netbsd32_pointer_t netbsd32_fsid | | | @@ -148,26 +148,27 @@ typedef netbsd32_pointer_t netbsd32_fsid |
148 | typedef netbsd32_pointer_t netbsd32_lwpidp; | | 148 | typedef netbsd32_pointer_t netbsd32_lwpidp; |
149 | typedef netbsd32_pointer_t netbsd32_ucontextp; | | 149 | typedef netbsd32_pointer_t netbsd32_ucontextp; |
150 | typedef netbsd32_pointer_t netbsd32_caddr_t; | | 150 | typedef netbsd32_pointer_t netbsd32_caddr_t; |
151 | typedef netbsd32_pointer_t netbsd32_lwpctlp; | | 151 | typedef netbsd32_pointer_t netbsd32_lwpctlp; |
152 | | | 152 | |
153 | /* | | 153 | /* |
154 | * now, the compatibility structures and their fake pointer types. | | 154 | * now, the compatibility structures and their fake pointer types. |
155 | */ | | 155 | */ |
156 | | | 156 | |
157 | /* from <sys/types.h> */ | | 157 | /* from <sys/types.h> */ |
158 | typedef netbsd32_pointer_t netbsd32_fd_setp_t; | | 158 | typedef netbsd32_pointer_t netbsd32_fd_setp_t; |
159 | typedef netbsd32_intptr_t netbsd32_semid_t; | | 159 | typedef netbsd32_intptr_t netbsd32_semid_t; |
160 | typedef netbsd32_pointer_t netbsd32_semidp_t; | | 160 | typedef netbsd32_pointer_t netbsd32_semidp_t; |
| | | 161 | typedef netbsd32_uint64 netbsd32_dev_t; |
161 | | | 162 | |
162 | /* from <sys/uio.h> */ | | 163 | /* from <sys/uio.h> */ |
163 | typedef netbsd32_pointer_t netbsd32_iovecp_t; | | 164 | typedef netbsd32_pointer_t netbsd32_iovecp_t; |
164 | struct netbsd32_iovec { | | 165 | struct netbsd32_iovec { |
165 | netbsd32_voidp iov_base; /* Base address. */ | | 166 | netbsd32_voidp iov_base; /* Base address. */ |
166 | netbsd32_size_t iov_len; /* Length. */ | | 167 | netbsd32_size_t iov_len; /* Length. */ |
167 | }; | | 168 | }; |
168 | | | 169 | |
169 | /* from <sys/time.h> */ | | 170 | /* from <sys/time.h> */ |
170 | typedef int32_t netbsd32_timer_t; | | 171 | typedef int32_t netbsd32_timer_t; |
171 | typedef int32_t netbsd32_time50_t; | | 172 | typedef int32_t netbsd32_time50_t; |
172 | typedef netbsd32_int64 netbsd32_time_t; | | 173 | typedef netbsd32_int64 netbsd32_time_t; |
173 | typedef netbsd32_pointer_t netbsd32_timerp_t; | | 174 | typedef netbsd32_pointer_t netbsd32_timerp_t; |
| @@ -584,33 +585,33 @@ struct netbsd32_msghdr { | | | @@ -584,33 +585,33 @@ struct netbsd32_msghdr { |
584 | typedef netbsd32_pointer_t netbsd32_omsghdrp_t; | | 585 | typedef netbsd32_pointer_t netbsd32_omsghdrp_t; |
585 | struct netbsd32_omsghdr { | | 586 | struct netbsd32_omsghdr { |
586 | netbsd32_caddr_t msg_name; /* optional address */ | | 587 | netbsd32_caddr_t msg_name; /* optional address */ |
587 | int msg_namelen; /* size of address */ | | 588 | int msg_namelen; /* size of address */ |
588 | netbsd32_iovecp_t msg_iov; /* scatter/gather array */ | | 589 | netbsd32_iovecp_t msg_iov; /* scatter/gather array */ |
589 | int msg_iovlen; /* # elements in msg_iov */ | | 590 | int msg_iovlen; /* # elements in msg_iov */ |
590 | netbsd32_caddr_t msg_accrights; /* access rights sent/recvd */ | | 591 | netbsd32_caddr_t msg_accrights; /* access rights sent/recvd */ |
591 | int msg_accrightslen; | | 592 | int msg_accrightslen; |
592 | }; | | 593 | }; |
593 | | | 594 | |
594 | /* from <sys/stat.h> */ | | 595 | /* from <sys/stat.h> */ |
595 | typedef netbsd32_pointer_t netbsd32_stat12p_t; | | 596 | typedef netbsd32_pointer_t netbsd32_stat12p_t; |
596 | struct netbsd32_stat12 { /* NetBSD-1.2 stat struct */ | | 597 | struct netbsd32_stat12 { /* NetBSD-1.2 stat struct */ |
597 | dev_t st_dev; /* inode's device */ | | 598 | uint32_t st_dev; /* inode's device */ |
598 | uint32_t st_ino; /* inode's number */ | | 599 | uint32_t st_ino; /* inode's number */ |
599 | uint16_t st_mode; /* inode protection mode */ | | 600 | uint16_t st_mode; /* inode protection mode */ |
600 | uint16_t st_nlink; /* number of hard links */ | | 601 | uint16_t st_nlink; /* number of hard links */ |
601 | uid_t st_uid; /* user ID of the file's owner */ | | 602 | uid_t st_uid; /* user ID of the file's owner */ |
602 | gid_t st_gid; /* group ID of the file's group */ | | 603 | gid_t st_gid; /* group ID of the file's group */ |
603 | dev_t st_rdev; /* device type */ | | 604 | uint32_t st_rdev; /* device type */ |
604 | struct netbsd32_timespec st_atimespec;/* time of last access */ | | 605 | struct netbsd32_timespec st_atimespec;/* time of last access */ |
605 | struct netbsd32_timespec st_mtimespec;/* time of last data modification */ | | 606 | struct netbsd32_timespec st_mtimespec;/* time of last data modification */ |
606 | struct netbsd32_timespec st_ctimespec;/* time of last file status change */ | | 607 | struct netbsd32_timespec st_ctimespec;/* time of last file status change */ |
607 | netbsd32_int64 st_size; /* file size, in bytes */ | | 608 | netbsd32_int64 st_size; /* file size, in bytes */ |
608 | netbsd32_int64 st_blocks; /* blocks allocated for file */ | | 609 | netbsd32_int64 st_blocks; /* blocks allocated for file */ |
609 | uint32_t st_blksize; /* optimal blocksize for I/O */ | | 610 | uint32_t st_blksize; /* optimal blocksize for I/O */ |
610 | uint32_t st_flags; /* user defined flags for file */ | | 611 | uint32_t st_flags; /* user defined flags for file */ |
611 | uint32_t st_gen; /* file generation number */ | | 612 | uint32_t st_gen; /* file generation number */ |
612 | int32_t st_lspare; | | 613 | int32_t st_lspare; |
613 | netbsd32_int64 st_qspare[2]; | | 614 | netbsd32_int64 st_qspare[2]; |
614 | }; | | 615 | }; |
615 | | | 616 | |
616 | typedef netbsd32_pointer_t netbsd32_stat43p_t; | | 617 | typedef netbsd32_pointer_t netbsd32_stat43p_t; |
| @@ -666,33 +667,33 @@ struct netbsd32_stat50 { | | | @@ -666,33 +667,33 @@ struct netbsd32_stat50 { |
666 | struct netbsd32_timespec50 st_mtimespec;/* time of last data modification */ | | 667 | struct netbsd32_timespec50 st_mtimespec;/* time of last data modification */ |
667 | struct netbsd32_timespec50 st_ctimespec;/* time of last file status change */ | | 668 | struct netbsd32_timespec50 st_ctimespec;/* time of last file status change */ |
668 | struct netbsd32_timespec50 st_birthtimespec; /* time of creation */ | | 669 | struct netbsd32_timespec50 st_birthtimespec; /* time of creation */ |
669 | netbsd32_int64 st_size; /* file size, in bytes */ | | 670 | netbsd32_int64 st_size; /* file size, in bytes */ |
670 | netbsd32_uint64 st_blocks; /* blocks allocated for file */ | | 671 | netbsd32_uint64 st_blocks; /* blocks allocated for file */ |
671 | blksize_t st_blksize; /* optimal blocksize for I/O */ | | 672 | blksize_t st_blksize; /* optimal blocksize for I/O */ |
672 | uint32_t st_flags; /* user defined flags for file */ | | 673 | uint32_t st_flags; /* user defined flags for file */ |
673 | uint32_t st_gen; /* file generation number */ | | 674 | uint32_t st_gen; /* file generation number */ |
674 | uint32_t st_spare[2]; | | 675 | uint32_t st_spare[2]; |
675 | }; | | 676 | }; |
676 | | | 677 | |
677 | typedef netbsd32_pointer_t netbsd32_statp_t; | | 678 | typedef netbsd32_pointer_t netbsd32_statp_t; |
678 | struct netbsd32_stat { | | 679 | struct netbsd32_stat { |
679 | dev_t st_dev; /* inode's device */ | | 680 | netbsd32_dev_t st_dev; /* inode's device */ |
680 | mode_t st_mode; /* inode protection mode */ | | 681 | mode_t st_mode; /* inode protection mode */ |
681 | netbsd32_uint64 st_ino; /* inode's number */ | | 682 | netbsd32_uint64 st_ino; /* inode's number */ |
682 | nlink_t st_nlink; /* number of hard links */ | | 683 | nlink_t st_nlink; /* number of hard links */ |
683 | uid_t st_uid; /* user ID of the file's owner */ | | 684 | uid_t st_uid; /* user ID of the file's owner */ |
684 | gid_t st_gid; /* group ID of the file's group */ | | 685 | gid_t st_gid; /* group ID of the file's group */ |
685 | dev_t st_rdev; /* device type */ | | 686 | netbsd32_dev_t st_rdev; /* device type */ |
686 | struct netbsd32_timespec st_atimespec;/* time of last access */ | | 687 | struct netbsd32_timespec st_atimespec;/* time of last access */ |
687 | struct netbsd32_timespec st_mtimespec;/* time of last data modification */ | | 688 | struct netbsd32_timespec st_mtimespec;/* time of last data modification */ |
688 | struct netbsd32_timespec st_ctimespec;/* time of last file status change */ | | 689 | struct netbsd32_timespec st_ctimespec;/* time of last file status change */ |
689 | struct netbsd32_timespec st_birthtimespec; /* time of creation */ | | 690 | struct netbsd32_timespec st_birthtimespec; /* time of creation */ |
690 | netbsd32_int64 st_size; /* file size, in bytes */ | | 691 | netbsd32_int64 st_size; /* file size, in bytes */ |
691 | netbsd32_uint64 st_blocks; /* blocks allocated for file */ | | 692 | netbsd32_uint64 st_blocks; /* blocks allocated for file */ |
692 | blksize_t st_blksize; /* optimal blocksize for I/O */ | | 693 | blksize_t st_blksize; /* optimal blocksize for I/O */ |
693 | uint32_t st_flags; /* user defined flags for file */ | | 694 | uint32_t st_flags; /* user defined flags for file */ |
694 | uint32_t st_gen; /* file generation number */ | | 695 | uint32_t st_gen; /* file generation number */ |
695 | uint32_t st_spare[2]; | | 696 | uint32_t st_spare[2]; |
696 | }; | | 697 | }; |
697 | | | 698 | |
698 | /* from <sys/statvfs.h> */ | | 699 | /* from <sys/statvfs.h> */ |