diff options
author | dfr <dfr@FreeBSD.org> | 1998-06-07 17:13:14 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 1998-06-07 17:13:14 +0000 |
commit | 1d5f38ac2264102518a09c66a7b285f57e81e67e (patch) | |
tree | 83ce2f0e2b8041d2c933d3beffc1f4465ea5b929 /sys/i386/ibcs2 | |
parent | 83423d0e5a4ad035e44392f0427cb39232031e45 (diff) | |
download | FreeBSD-src-1d5f38ac2264102518a09c66a7b285f57e81e67e.zip FreeBSD-src-1d5f38ac2264102518a09c66a7b285f57e81e67e.tar.gz |
This commit fixes various 64bit portability problems required for
FreeBSD/alpha. The most significant item is to change the command
argument to ioctl functions from int to u_long. This change brings us
inline with various other BSD versions. Driver writers may like to
use (__FreeBSD_version == 300003) to detect this change.
The prototype FreeBSD/alpha machdep will follow in a couple of days
time.
Diffstat (limited to 'sys/i386/ibcs2')
-rw-r--r-- | sys/i386/ibcs2/ibcs2_ioctl.c | 2 | ||||
-rw-r--r-- | sys/i386/ibcs2/ibcs2_isc_sysent.c | 2 | ||||
-rw-r--r-- | sys/i386/ibcs2/ibcs2_proto.h | 293 | ||||
-rw-r--r-- | sys/i386/ibcs2/ibcs2_sysent.c | 2 | ||||
-rw-r--r-- | sys/i386/ibcs2/ibcs2_xenix.h | 68 | ||||
-rw-r--r-- | sys/i386/ibcs2/ibcs2_xenix_sysent.c | 2 | ||||
-rw-r--r-- | sys/i386/ibcs2/syscalls.conf | 3 | ||||
-rw-r--r-- | sys/i386/ibcs2/syscalls.isc.conf | 3 | ||||
-rw-r--r-- | sys/i386/ibcs2/syscalls.xenix.conf | 3 |
9 files changed, 203 insertions, 175 deletions
diff --git a/sys/i386/ibcs2/ibcs2_ioctl.c b/sys/i386/ibcs2/ibcs2_ioctl.c index 873ecc8..e285071 100644 --- a/sys/i386/ibcs2/ibcs2_ioctl.c +++ b/sys/i386/ibcs2/ibcs2_ioctl.c @@ -338,7 +338,7 @@ ibcs2_ioctl(p, uap) { struct filedesc *fdp = p->p_fd; struct file *fp; - int (*ctl) __P((struct file *, int, caddr_t, struct proc *)); + int (*ctl) __P((struct file *, u_long, caddr_t, struct proc *)); int error; if (SCARG(uap, fd) < 0 || SCARG(uap, fd) >= fdp->fd_nfiles || diff --git a/sys/i386/ibcs2/ibcs2_isc_sysent.c b/sys/i386/ibcs2/ibcs2_isc_sysent.c index 344dcab..51dab23 100644 --- a/sys/i386/ibcs2/ibcs2_isc_sysent.c +++ b/sys/i386/ibcs2/ibcs2_isc_sysent.c @@ -5,6 +5,8 @@ * created from Id: syscalls.isc,v 1.4 1997/04/09 15:44:44 bde Exp */ +#include "opt_compat.h" + #include <sys/param.h> #include <sys/sysent.h> #include <sys/sysproto.h> diff --git a/sys/i386/ibcs2/ibcs2_proto.h b/sys/i386/ibcs2/ibcs2_proto.h index 75ea03e..9f378dd 100644 --- a/sys/i386/ibcs2/ibcs2_proto.h +++ b/sys/i386/ibcs2/ibcs2_proto.h @@ -10,260 +10,265 @@ #include <sys/signal.h> +struct proc; + +#define PAD_(t) sizeof(register_t) <= sizeof(t) ? \ + 0 : sizeof(register_t) - sizeof(t) + struct ibcs2_read_args { - int fd; - char * buf; - u_int nbytes; + int fd; char fd_[PAD_(int)]; + char * buf; char buf_[PAD_(char *)]; + u_int nbytes; char nbytes_[PAD_(u_int)]; }; struct ibcs2_open_args { - char * path; - int flags; - int mode; + char * path; char path_[PAD_(char *)]; + int flags; char flags_[PAD_(int)]; + int mode; char mode_[PAD_(int)]; }; struct ibcs2_wait_args { - int a1; - int a2; - int a3; + int a1; char a1_[PAD_(int)]; + int a2; char a2_[PAD_(int)]; + int a3; char a3_[PAD_(int)]; }; struct ibcs2_creat_args { - char * path; - int mode; + char * path; char path_[PAD_(char *)]; + int mode; char mode_[PAD_(int)]; }; struct ibcs2_unlink_args { - char * path; + char * path; char path_[PAD_(char *)]; }; struct ibcs2_execv_args { - char * path; - char ** argp; + char * path; char path_[PAD_(char *)]; + char ** argp; char argp_[PAD_(char **)]; }; struct ibcs2_chdir_args { - char * path; + char * path; char path_[PAD_(char *)]; }; struct ibcs2_time_args { - ibcs2_time_t * tp; + ibcs2_time_t * tp; char tp_[PAD_(ibcs2_time_t *)]; }; struct ibcs2_mknod_args { - char * path; - int mode; - int dev; + char * path; char path_[PAD_(char *)]; + int mode; char mode_[PAD_(int)]; + int dev; char dev_[PAD_(int)]; }; struct ibcs2_chmod_args { - char * path; - int mode; + char * path; char path_[PAD_(char *)]; + int mode; char mode_[PAD_(int)]; }; struct ibcs2_chown_args { - char * path; - int uid; - int gid; + char * path; char path_[PAD_(char *)]; + int uid; char uid_[PAD_(int)]; + int gid; char gid_[PAD_(int)]; }; struct ibcs2_stat_args { - char * path; - struct ibcs2_stat * st; + char * path; char path_[PAD_(char *)]; + struct ibcs2_stat * st; char st_[PAD_(struct ibcs2_stat *)]; }; struct ibcs2_lseek_args { - int fd; - long offset; - int whence; + int fd; char fd_[PAD_(int)]; + long offset; char offset_[PAD_(long)]; + int whence; char whence_[PAD_(int)]; }; struct ibcs2_mount_args { - char * special; - char * dir; - int flags; - int fstype; - char * data; - int len; + char * special; char special_[PAD_(char *)]; + char * dir; char dir_[PAD_(char *)]; + int flags; char flags_[PAD_(int)]; + int fstype; char fstype_[PAD_(int)]; + char * data; char data_[PAD_(char *)]; + int len; char len_[PAD_(int)]; }; struct ibcs2_umount_args { - char * name; + char * name; char name_[PAD_(char *)]; }; struct ibcs2_setuid_args { - int uid; + int uid; char uid_[PAD_(int)]; }; struct ibcs2_stime_args { - long * timep; + long * timep; char timep_[PAD_(long *)]; }; struct ibcs2_alarm_args { - unsigned sec; + unsigned sec; char sec_[PAD_(unsigned)]; }; struct ibcs2_fstat_args { - int fd; - struct ibcs2_stat * st; + int fd; char fd_[PAD_(int)]; + struct ibcs2_stat * st; char st_[PAD_(struct ibcs2_stat *)]; }; struct ibcs2_pause_args { - int dummy; + register_t dummy; }; struct ibcs2_utime_args { - char * path; - struct ibcs2_utimbuf * buf; + char * path; char path_[PAD_(char *)]; + struct ibcs2_utimbuf * buf; char buf_[PAD_(struct ibcs2_utimbuf *)]; }; struct ibcs2_stty_args { - int fd; - struct sgttyb * buf; + int fd; char fd_[PAD_(int)]; + struct sgttyb * buf; char buf_[PAD_(struct sgttyb *)]; }; struct ibcs2_gtty_args { - int fd; - struct sgttyb * buf; + int fd; char fd_[PAD_(int)]; + struct sgttyb * buf; char buf_[PAD_(struct sgttyb *)]; }; struct ibcs2_access_args { - char * path; - int flags; + char * path; char path_[PAD_(char *)]; + int flags; char flags_[PAD_(int)]; }; struct ibcs2_nice_args { - int incr; + int incr; char incr_[PAD_(int)]; }; struct ibcs2_statfs_args { - char * path; - struct ibcs2_statfs * buf; - int len; - int fstype; + char * path; char path_[PAD_(char *)]; + struct ibcs2_statfs * buf; char buf_[PAD_(struct ibcs2_statfs *)]; + int len; char len_[PAD_(int)]; + int fstype; char fstype_[PAD_(int)]; }; struct ibcs2_kill_args { - int pid; - int signo; + int pid; char pid_[PAD_(int)]; + int signo; char signo_[PAD_(int)]; }; struct ibcs2_fstatfs_args { - int fd; - struct ibcs2_statfs * buf; - int len; - int fstype; + int fd; char fd_[PAD_(int)]; + struct ibcs2_statfs * buf; char buf_[PAD_(struct ibcs2_statfs *)]; + int len; char len_[PAD_(int)]; + int fstype; char fstype_[PAD_(int)]; }; struct ibcs2_pgrpsys_args { - int type; - caddr_t dummy; - int pid; - int pgid; + int type; char type_[PAD_(int)]; + caddr_t dummy; char dummy_[PAD_(caddr_t)]; + int pid; char pid_[PAD_(int)]; + int pgid; char pgid_[PAD_(int)]; }; struct ibcs2_xenix_args { - int a1; - int a2; - int a3; - int a4; - int a5; + int a1; char a1_[PAD_(int)]; + int a2; char a2_[PAD_(int)]; + int a3; char a3_[PAD_(int)]; + int a4; char a4_[PAD_(int)]; + int a5; char a5_[PAD_(int)]; }; struct ibcs2_times_args { - struct tms * tp; + struct tms * tp; char tp_[PAD_(struct tms *)]; }; struct ibcs2_plock_args { - int cmd; + int cmd; char cmd_[PAD_(int)]; }; struct ibcs2_setgid_args { - int gid; + int gid; char gid_[PAD_(int)]; }; struct ibcs2_sigsys_args { - int sig; - ibcs2_sig_t fp; + int sig; char sig_[PAD_(int)]; + ibcs2_sig_t fp; char fp_[PAD_(ibcs2_sig_t)]; }; struct ibcs2_msgsys_args { - int which; - int a2; - int a3; - int a4; - int a5; - int a6; + int which; char which_[PAD_(int)]; + int a2; char a2_[PAD_(int)]; + int a3; char a3_[PAD_(int)]; + int a4; char a4_[PAD_(int)]; + int a5; char a5_[PAD_(int)]; + int a6; char a6_[PAD_(int)]; }; struct ibcs2_sysi86_args { - int cmd; - int * arg; + int cmd; char cmd_[PAD_(int)]; + int * arg; char arg_[PAD_(int *)]; }; struct ibcs2_shmsys_args { - int which; - int a2; - int a3; - int a4; + int which; char which_[PAD_(int)]; + int a2; char a2_[PAD_(int)]; + int a3; char a3_[PAD_(int)]; + int a4; char a4_[PAD_(int)]; }; struct ibcs2_semsys_args { - int which; - int a2; - int a3; - int a4; - int a5; + int which; char which_[PAD_(int)]; + int a2; char a2_[PAD_(int)]; + int a3; char a3_[PAD_(int)]; + int a4; char a4_[PAD_(int)]; + int a5; char a5_[PAD_(int)]; }; struct ibcs2_ioctl_args { - int fd; - int cmd; - caddr_t data; + int fd; char fd_[PAD_(int)]; + int cmd; char cmd_[PAD_(int)]; + caddr_t data; char data_[PAD_(caddr_t)]; }; struct ibcs2_uadmin_args { - int cmd; - int func; - caddr_t data; + int cmd; char cmd_[PAD_(int)]; + int func; char func_[PAD_(int)]; + caddr_t data; char data_[PAD_(caddr_t)]; }; struct ibcs2_utssys_args { - int a1; - int a2; - int flag; + int a1; char a1_[PAD_(int)]; + int a2; char a2_[PAD_(int)]; + int flag; char flag_[PAD_(int)]; }; struct ibcs2_execve_args { - char * path; - char ** argp; - char ** envp; + char * path; char path_[PAD_(char *)]; + char ** argp; char argp_[PAD_(char **)]; + char ** envp; char envp_[PAD_(char **)]; }; struct ibcs2_fcntl_args { - int fd; - int cmd; - char * arg; + int fd; char fd_[PAD_(int)]; + int cmd; char cmd_[PAD_(int)]; + char * arg; char arg_[PAD_(char *)]; }; struct ibcs2_ulimit_args { - int cmd; - int newlimit; + int cmd; char cmd_[PAD_(int)]; + int newlimit; char newlimit_[PAD_(int)]; }; struct ibcs2_rmdir_args { - char * path; + char * path; char path_[PAD_(char *)]; }; struct ibcs2_mkdir_args { - char * path; - int mode; + char * path; char path_[PAD_(char *)]; + int mode; char mode_[PAD_(int)]; }; struct ibcs2_getdents_args { - int fd; - char * buf; - int nbytes; + int fd; char fd_[PAD_(int)]; + char * buf; char buf_[PAD_(char *)]; + int nbytes; char nbytes_[PAD_(int)]; }; struct ibcs2_sysfs_args { - int cmd; - caddr_t d1; - char * buf; + int cmd; char cmd_[PAD_(int)]; + caddr_t d1; char d1_[PAD_(caddr_t)]; + char * buf; char buf_[PAD_(char *)]; }; struct ibcs2_getmsg_args { - int fd; - struct ibcs2_stropts * ctl; - struct ibcs2_stropts * dat; - int * flags; + int fd; char fd_[PAD_(int)]; + struct ibcs2_stropts * ctl; char ctl_[PAD_(struct ibcs2_stropts *)]; + struct ibcs2_stropts * dat; char dat_[PAD_(struct ibcs2_stropts *)]; + int * flags; char flags_[PAD_(int *)]; }; struct ibcs2_putmsg_args { - int fd; - struct ibcs2_stropts * ctl; - struct ibcs2_stropts * dat; - int flags; + int fd; char fd_[PAD_(int)]; + struct ibcs2_stropts * ctl; char ctl_[PAD_(struct ibcs2_stropts *)]; + struct ibcs2_stropts * dat; char dat_[PAD_(struct ibcs2_stropts *)]; + int flags; char flags_[PAD_(int)]; }; struct ibcs2_poll_args { - struct ibcs2_poll * fds; - long nfds; - int timeout; + struct ibcs2_poll * fds; char fds_[PAD_(struct ibcs2_poll *)]; + long nfds; char nfds_[PAD_(long)]; + int timeout; char timeout_[PAD_(int)]; }; struct ibcs2_secure_args { - int cmd; - int a1; - int a2; - int a3; - int a4; - int a5; + int cmd; char cmd_[PAD_(int)]; + int a1; char a1_[PAD_(int)]; + int a2; char a2_[PAD_(int)]; + int a3; char a3_[PAD_(int)]; + int a4; char a4_[PAD_(int)]; + int a5; char a5_[PAD_(int)]; }; struct ibcs2_symlink_args { - char * path; - char * link; + char * path; char path_[PAD_(char *)]; + char * link; char link_[PAD_(char *)]; }; struct ibcs2_lstat_args { - char * path; - struct ibcs2_stat * st; + char * path; char path_[PAD_(char *)]; + struct ibcs2_stat * st; char st_[PAD_(struct ibcs2_stat *)]; }; struct ibcs2_readlink_args { - char * path; - char * buf; - int count; + char * path; char path_[PAD_(char *)]; + char * buf; char buf_[PAD_(char *)]; + int count; char count_[PAD_(int)]; }; struct ibcs2_isc_args { - int dummy; + register_t dummy; }; int ibcs2_read __P((struct proc *, struct ibcs2_read_args *)); int ibcs2_open __P((struct proc *, struct ibcs2_open_args *)); @@ -327,4 +332,6 @@ int ibcs2_isc __P((struct proc *, struct ibcs2_isc_args *)); #endif /* COMPAT_43 */ +#undef PAD_ + #endif /* !_IBCS2_SYSPROTO_H_ */ diff --git a/sys/i386/ibcs2/ibcs2_sysent.c b/sys/i386/ibcs2/ibcs2_sysent.c index f011ec6..175b734 100644 --- a/sys/i386/ibcs2/ibcs2_sysent.c +++ b/sys/i386/ibcs2/ibcs2_sysent.c @@ -5,6 +5,8 @@ * created from Id: syscalls.master,v 1.8 1997/04/09 15:44:46 bde Exp */ +#include "opt_compat.h" + #include <sys/param.h> #include <sys/sysent.h> #include <sys/sysproto.h> diff --git a/sys/i386/ibcs2/ibcs2_xenix.h b/sys/i386/ibcs2/ibcs2_xenix.h index df0568e..f83f268 100644 --- a/sys/i386/ibcs2/ibcs2_xenix.h +++ b/sys/i386/ibcs2/ibcs2_xenix.h @@ -10,67 +10,72 @@ #include <sys/signal.h> +struct proc; + +#define PAD_(t) sizeof(register_t) <= sizeof(t) ? \ + 0 : sizeof(register_t) - sizeof(t) + struct xenix_rdchk_args { - int fd; + int fd; char fd_[PAD_(int)]; }; struct xenix_chsize_args { - int fd; - long size; + int fd; char fd_[PAD_(int)]; + long size; char size_[PAD_(long)]; }; struct xenix_ftime_args { - struct timeb * tp; + struct timeb * tp; char tp_[PAD_(struct timeb *)]; }; struct xenix_nap_args { - int millisec; + int millisec; char millisec_[PAD_(int)]; }; struct xenix_scoinfo_args { - int dummy; + register_t dummy; }; struct xenix_eaccess_args { - char * path; - int flags; + char * path; char path_[PAD_(char *)]; + int flags; char flags_[PAD_(int)]; }; struct ibcs2_sigaction_args { - int sig; - struct ibcs2_sigaction * act; - struct ibcs2_sigaction * oact; + int sig; char sig_[PAD_(int)]; + struct ibcs2_sigaction * act; char act_[PAD_(struct ibcs2_sigaction *)]; + struct ibcs2_sigaction * oact; char oact_[PAD_(struct ibcs2_sigaction *)]; }; struct ibcs2_sigprocmask_args { - int how; - ibcs2_sigset_t * set; - ibcs2_sigset_t * oset; + int how; char how_[PAD_(int)]; + ibcs2_sigset_t * set; char set_[PAD_(ibcs2_sigset_t *)]; + ibcs2_sigset_t * oset; char oset_[PAD_(ibcs2_sigset_t *)]; }; struct ibcs2_sigpending_args { - ibcs2_sigset_t * mask; + ibcs2_sigset_t * mask; char mask_[PAD_(ibcs2_sigset_t *)]; }; struct ibcs2_sigsuspend_args { - ibcs2_sigset_t * mask; + ibcs2_sigset_t * mask; char mask_[PAD_(ibcs2_sigset_t *)]; }; struct ibcs2_getgroups_args { - int gidsetsize; - ibcs2_gid_t * gidset; + int gidsetsize; char gidsetsize_[PAD_(int)]; + ibcs2_gid_t * gidset; char gidset_[PAD_(ibcs2_gid_t *)]; }; struct ibcs2_setgroups_args { - int gidsetsize; - ibcs2_gid_t * gidset; + int gidsetsize; char gidsetsize_[PAD_(int)]; + ibcs2_gid_t * gidset; char gidset_[PAD_(ibcs2_gid_t *)]; }; struct ibcs2_sysconf_args { - int name; + int name; char name_[PAD_(int)]; }; struct ibcs2_pathconf_args { - char * path; - int name; + char * path; char path_[PAD_(char *)]; + int name; char name_[PAD_(int)]; }; struct ibcs2_fpathconf_args { - int fd; - int name; + int fd; char fd_[PAD_(int)]; + int name; char name_[PAD_(int)]; }; struct ibcs2_rename_args { - char * from; - char * to; + char * from; char from_[PAD_(char *)]; + char * to; char to_[PAD_(char *)]; }; struct xenix_utsname_args { - long addr; + long addr; char addr_[PAD_(long)]; }; int xenix_rdchk __P((struct proc *, struct xenix_rdchk_args *)); int xenix_chsize __P((struct proc *, struct xenix_chsize_args *)); @@ -90,4 +95,11 @@ int ibcs2_fpathconf __P((struct proc *, struct ibcs2_fpathconf_args *)); int ibcs2_rename __P((struct proc *, struct ibcs2_rename_args *)); int xenix_utsname __P((struct proc *, struct xenix_utsname_args *)); +#ifdef COMPAT_43 + + +#endif /* COMPAT_43 */ + +#undef PAD_ + #endif /* !_IBCS2_XENIX_H_ */ diff --git a/sys/i386/ibcs2/ibcs2_xenix_sysent.c b/sys/i386/ibcs2/ibcs2_xenix_sysent.c index c8804fe..eb81543 100644 --- a/sys/i386/ibcs2/ibcs2_xenix_sysent.c +++ b/sys/i386/ibcs2/ibcs2_xenix_sysent.c @@ -5,6 +5,8 @@ * created from Id: syscalls.xenix,v 1.5 1997/04/09 15:44:47 bde Exp */ +#include "opt_compat.h" + #include <sys/param.h> #include <sys/sysent.h> #include <sys/sysproto.h> diff --git a/sys/i386/ibcs2/syscalls.conf b/sys/i386/ibcs2/syscalls.conf index 4474f6e..ebdaa97 100644 --- a/sys/i386/ibcs2/syscalls.conf +++ b/sys/i386/ibcs2/syscalls.conf @@ -1,8 +1,9 @@ -# syscalls.conf $Id$ +# syscalls.conf $Id: syscalls.conf,v 1.4 1997/02/22 09:33:32 peter Exp $ sysnames="/dev/null" sysproto="ibcs2_proto.h" sysproto_h=_IBCS2_SYSPROTO_H_ syshdr="ibcs2_syscall.h" +sysmk="/dev/null" syssw="ibcs2_sysent.c" syshide="/dev/null" syscallprefix="IBCS2_SYS_" diff --git a/sys/i386/ibcs2/syscalls.isc.conf b/sys/i386/ibcs2/syscalls.isc.conf index fc52716..90e30ff 100644 --- a/sys/i386/ibcs2/syscalls.isc.conf +++ b/sys/i386/ibcs2/syscalls.isc.conf @@ -1,9 +1,10 @@ -# syscalls.conf $Id$ +# syscalls.conf $Id: syscalls.isc.conf,v 1.3 1997/02/22 09:33:37 peter Exp $ sysnames="/dev/null" #sysproto="ibcs2_isc.h" sysproto="/dev/null" sysproto_h=_IBCS2_ISC_H_ syshdr="ibcs2_isc_syscall.h" +sysmk="/dev/null" syssw="ibcs2_isc_sysent.c" syshide="/dev/null" syscallprefix="IBCS2_ISC_" diff --git a/sys/i386/ibcs2/syscalls.xenix.conf b/sys/i386/ibcs2/syscalls.xenix.conf index 742080e..4b4af8b 100644 --- a/sys/i386/ibcs2/syscalls.xenix.conf +++ b/sys/i386/ibcs2/syscalls.xenix.conf @@ -1,8 +1,9 @@ -# syscalls.conf $Id$ +# syscalls.conf $Id: syscalls.xenix.conf,v 1.3 1997/02/22 09:33:40 peter Exp $ sysnames="/dev/null" sysproto="ibcs2_xenix.h" sysproto_h=_IBCS2_XENIX_H_ syshdr="ibcs2_xenix_syscall.h" +sysmk="/dev/null" syssw="ibcs2_xenix_sysent.c" syshide="/dev/null" syscallprefix="IBCS2_XENIX_" |