144630Smckusick /* 244630Smckusick * Copyright (c) 1989 Jan-Simon Pendry 344630Smckusick * Copyright (c) 1989 Imperial College of Science, Technology & Medicine 4*61785Sbostic * Copyright (c) 1989, 1993 5*61785Sbostic * The Regents of the University of California. All rights reserved. 644630Smckusick * 744630Smckusick * This code is derived from software contributed to Berkeley by 844630Smckusick * Jan-Simon Pendry at Imperial College, London. 944630Smckusick * 1044630Smckusick * %sccs.include.redist.c% 1144630Smckusick * 12*61785Sbostic * @(#)os-hpux.h 8.1 (Berkeley) 06/06/93 1349685Spendry * 1452452Spendry * $Id: os-hpux.h,v 5.2.2.1 1992/02/09 15:10:23 jsp beta $ 1549685Spendry * 1649685Spendry * HP/9000 HP-UX definitions for Amd (automounter) 1744630Smckusick */ 1844630Smckusick 1944630Smckusick /* 2044630Smckusick * Does the compiler grok void * 2144630Smckusick */ 2244630Smckusick #ifdef __GNUC__ 2344630Smckusick #define VOIDP 2444630Smckusick #endif 2544630Smckusick 2644630Smckusick /* 2744630Smckusick * Which version of the Sun RPC library we are using 2844630Smckusick * This is the implementation release number, not 2944630Smckusick * the protocol revision number. 3044630Smckusick */ 3144630Smckusick #define RPC_3 3244630Smckusick 3344630Smckusick /* 3444630Smckusick * Which version of the NFS interface are we using. 3544630Smckusick * This is the implementation release number, not 3644630Smckusick * the protocol revision number. 3744630Smckusick */ 3844630Smckusick #define NFS_3 3944630Smckusick 4044630Smckusick /* 4144630Smckusick * Byte ordering 4244630Smckusick */ 4344630Smckusick #undef ARCH_ENDIAN 4447534Spendry #if defined(hp9000s200) || defined(hp9000s300) || defined(hp9000s800) 4544630Smckusick #define ARCH_ENDIAN "big" 4644630Smckusick #endif 4747534Spendry 4847534Spendry #ifndef __hpux 4947534Spendry #define HPUX_VERSION_6 5044630Smckusick #endif 5144630Smckusick 5244630Smckusick /* 5347534Spendry * No support for syslog() prior to 7.0 5444630Smckusick */ 5547534Spendry #ifdef HPUX_VERSION_6 5644630Smckusick #undef HAS_SYSLOG 5747534Spendry #endif 5844630Smckusick 5944630Smckusick /* 6044630Smckusick * No support for ndbm 6144630Smckusick */ 6244630Smckusick #undef OS_HAS_NDBM 6344630Smckusick 6444630Smckusick /* 6544630Smckusick * Name of filesystem types 6644630Smckusick */ 6744630Smckusick #define MOUNT_TYPE_UFS MOUNT_UFS 6844630Smckusick #define MOUNT_TYPE_NFS MOUNT_NFS 6944630Smckusick #undef MTAB_TYPE_UFS 7044630Smckusick #define MTAB_TYPE_UFS "hfs" 7144630Smckusick 7244630Smckusick /* 7344630Smckusick * Where to get NFS definitions 7444630Smckusick */ 7544630Smckusick #define NFS_HDR "misc-hpux.h" 7644630Smckusick 7744630Smckusick /* 7844630Smckusick * Where to get union wait 7944630Smckusick */ 8044630Smckusick #undef WAIT 8144630Smckusick #define WAIT "uwait.h" 8247534Spendry #ifdef HPUX_VERSION_6 8344630Smckusick #define SIGCHLD SIGCLD 8444630Smckusick #endif 8544630Smckusick #define SYS5_SIGNALS 8644630Smckusick 8744630Smckusick /* 8844630Smckusick * Miscellaneous HP-UX definitions 8944630Smckusick */ 9044630Smckusick 9147534Spendry #define NEED_XDR_POINTER 9247534Spendry #define NEED_CLNT_SPERRNO 9344630Smckusick 9444630Smckusick /* 9544630Smckusick * Use <fcntl.h> rather than <sys/file.h> 9644630Smckusick */ 9744630Smckusick #define USE_FCNTL 9844630Smckusick 9944630Smckusick /* 10044630Smckusick * Use fcntl() rather than flock() 10144630Smckusick */ 10244630Smckusick #define LOCK_FCNTL 10344630Smckusick 10447534Spendry /* 10547534Spendry * Additional fields in struct mntent 10647534Spendry * are fixed up here 10747534Spendry */ 10847534Spendry #define FIXUP_MNTENT(mntp) { \ 10947534Spendry (mntp)->mnt_time = clocktime(); \ 11047534Spendry } 11147534Spendry #define FIXUP_MNTENT_DUP(mntp, mp) { \ 11247534Spendry (mntp)->mnt_time = (mp)->mnt_time; \ 11347534Spendry } 11447534Spendry 11544630Smckusick #define bzero(ptr, len) memset(ptr, 0, len) 11644630Smckusick #define bcopy(from, to, len) memcpy(to, from, len) 11744630Smckusick #define getpagesize() (2048) 11844630Smckusick #undef MOUNT_TRAP 11944630Smckusick #define MOUNT_TRAP(type, mnt, flags, mnt_data) \ 12044630Smckusick vfsmount(type, mnt->mnt_dir, flags, mnt_data) 12144630Smckusick #undef UNMOUNT_TRAP 12244630Smckusick #define UNMOUNT_TRAP(mnt) umount(mnt->mnt_dir) 12344630Smckusick #define NFDS 30 /* conservative */ 12444630Smckusick #define MOUNTED MNT_MNTTAB 125