ftp.nice.ch/pub/next/unix/admin/sysinfo.1.1.0.s.tar.gz#/system.h

This is system.h in view mode; [Download] [Up]

/*
 * Copyright (c) 1992 Michael A. Cooper.
 * This software may be freely distributed provided it is not sold for 
 * profit and the author is credited appropriately.
 */

/*
 * $Header: /src/common/usc/bin/sysinfo/RCS/system.h,v 1.28 1992/11/24 04:05:02 mcooper Exp $
 *
 * $Log: system.h,v $
 * Revision 1.28  1992/11/24  04:05:02  mcooper
 * Remove obsolete nstring() macro.
 *
 * Revision 1.27  1992/08/07  02:22:15  mcooper
 * Change OS Name of "Concentrix 2800" to be "Concentrix-2800"
 * and "NeXT Mach" to be "NeXTStep".
 *
 * Revision 1.26  1992/07/07  23:42:55  mcooper
 * Don't use #elif.
 *
 * Revision 1.25  1992/07/07  23:30:23  mcooper
 * Put wrapper around nlist declarations for NeXT/Mach.
 *
 * Revision 1.24  1992/07/07  22:24:06  mcooper
 * Don't define HAVE_IPI for sun3's or SUN4E_ARCH.
 *
 * Revision 1.23  1992/04/26  23:32:06  mcooper
 * Add Copyright notice
 *
 * Revision 1.22  1992/04/18  20:47:43  mcooper
 * Merge Solbourne stuff back into main "sun" area.
 *
 * Revision 1.20  1992/04/17  01:08:56  mcooper
 * BROKEN_NLIST_CHECK is no longer needed.
 *
 * Revision 1.19  1992/04/12  22:02:15  mcooper
 * - Add Tadpole support.
 * - Remove obsolete MODEL_SHIFTVAL.
 * - Update solbourne to current "sun" stuff.
 *
 * Revision 1.17  1992/03/31  02:44:32  mcooper
 * Add BROKEN_NLIST_CHECK to hp300.
 *
 * Revision 1.16  1992/03/22  00:27:11  mcooper
 * Remove obsolete items.
 *
 * Revision 1.15  1992/03/09  01:08:10  mcooper
 * Ultrix now has HAVE_MODELNAME.
 *
 * Revision 1.14  1992/03/08  23:10:27  mcooper
 * Add HAVE_PACKETFILTER to Ultrix.
 *
 * Revision 1.13  1992/03/08  04:56:17  mcooper
 * Add NEED_SOCKIO for suns and HAVE_IF_VERSION for ultrix.
 *
 * Revision 1.12  1992/03/06  18:39:55  mcooper
 * - Add HAVE_NLIST where needed.
 * - Add ultrix stuff for devices.
 * - Define HAVE_KVM if NEED_KVM is defined.
 *
 * Revision 1.11  1992/03/01  23:29:39  mcooper
 * Add new MODELNAME and ?ARCHNAME stuff.
 *
 * Revision 1.10  1992/02/27  00:09:36  mcooper
 * Update solbourne to have HAVE_MAINBUS and HAVE_OPENPROM.
 *
 * Revision 1.9  1992/02/22  02:18:44  mcooper
 * Add definitions for sun HAVE_MAINBUS and HAVE_OPENPROM.
 *
 * Revision 1.8  1992/02/17  01:00:14  mcooper
 * Update solbourne.
 *
 * Revision 1.7  1992/02/10  21:04:51  mcooper
 * - Add #ifdef's for HAVE_IPI
 * - Change sun #include <arch/cpu.h> to <machine/cpu.h
 * - Define SECSIZE, HAVE_DK_IOCTL, and HAVE_NIT.
 *
 * Revision 1.6  1991/10/09  03:37:17  mcooper
 * Add support for getting serial number
 * and model name directly from system on
 * Alliant FX80 series.
 *
 * Revision 1.5  1991/10/01  01:48:56  mcooper
 * Add HAVE_SERIALNUM for Alliant 2800.
 *
 * Revision 1.4  1991/09/30  05:28:34  mcooper
 * Set OSVERS_FROM_KERNVER correctly for alliant 2800.
 *
 * Revision 1.3  1991/09/30  05:21:57  mcooper
 * Add support for getting memory and model
 * number on Alliant 2800's.
 *
 * Revision 1.2  1991/09/30  04:48:10  mcooper
 * Don't need to define COFF for Sun386i
 * since it is predefined.
 *
 * Revision 1.1  1991/09/30  04:32:36  mcooper
 * Initial revision
 *
 */

#ifndef __sysinfo_system__
#define __sysinfo_system__

/*
 * System dependant information
 */

#if defined(sun)
#	include <sys/param.h>
#	include <sys/file.h>
#	include <machine/cpu.h>
	/*
	 * What manufacturer is this?
	 */
#	if defined(TAD_SPBK_ARCH)
#		define MAN_SHORT	"Tadpole"
#		define MAN_LONG		"Tadpole Technology Inc"
#		define TADPOLE
#	else
#	if defined(CPU_TYPE_SERIES4) || defined(CPU_TYPE_SERIES5) || \
    	   defined(CPU_TYPE_SERIES5E) || defined(CPU_TYPE_SERIES6)
#		define MAN_SHORT	"Solbourne"
#		define MAN_LONG		"Solbourne Computer Corporation"
#		define SOLBOURNE
#	else
#		define MAN_SHORT	"Sun"
#		define MAN_LONG		"Sun Microsystems Incorporated"
#		define HAVE_SUNROMVEC
#	endif
#	endif

#	if defined(mc68020)
#		define ARCH_TYPE 	"sun3"
#		define HAVE_MAINBUS
#	endif
#	if defined(sparc)
#		define ARCH_TYPE 	"sun4"
#		if !defined(TADPOLE) && !defined(SOLBOURNE) && \
		   !defined(SUN4E_ARCH)
#			define HAVE_IPI
#		endif
#		if !defined(TADPOLE)
#			define HAVE_MAINBUS
#		endif
#	endif
#	if defined(i386)
#		define ARCH_TYPE 	"sun386"
#		define HAVE_MAINBUS
#	endif
#	if defined(OPENPROMS)
#		define HAVE_OPENPROM
#	endif
#	define NEED_SOCKIO
#	define HAVE_IDMETHOD
#	define HAVE_VARARGS
#	define HAVE_UNAME
#	define HAVE_KVM
#	define HAVE_NLIST
#	define HAVE_NIT
#	define HAVE_KARCHNAME
#	if !defined(SECSIZE)
#		define SECSIZE	512		/* Size of a disk sector */
#	endif
#	define KERNSTR_END	'\n'
/*
 * This is to get around an error on Sun386i's in <sun386/cpu.h>
 */
#if defined(SUN386_ARCH) && !defined(I386_ARCH)
#define I386_ARCH SUN386_ARCH
#endif
#endif /* sun */

#if defined(ultrix) || defined(vax)
#	if defined(ultrix)
#		define HAVE_UNAME
#		include <unistd.h>
#	else
#		include <sys/file.h>
#		define OS_NAME	"BSD"
#	endif
#	define MAN_SHORT	"DEC"
#	define MAN_LONG		"Digital Equipment Corporation"
#	define HAVE_VARARGS
#	define HAVE_UBA
#	define HAVE_IF_VERSION
#	define HAVE_PACKETFILTER
#	define HAVE_NLIST
#	define NEED_KVM
#	define KERNSTR_END	'\n'
#	if !defined(SECSIZE)
#		define SECSIZE	512		/* Size of a disk sector */
#	endif
#endif /* ultrix || vax */

#if defined(hp300)
#	include <sys/file.h>
#	include <sys/param.h>
#	define MAN_SHORT	"HP"
#	define MAN_LONG		"Hewlett Packard"
#	define OS_NAME		"BSD"
#	if defined(BSD) && BSD == 43
#		define OS_VERSION	"4.3"
#	endif
#	define CPU_NAME		"MC68030"
#	define HAVE_VARARGS
#	define HAVE_NLIST
#	define KERNSTR_END	'\n'
#	define NEED_KVM
#endif /* hp300 */

#if defined(alliant)
#	include <sys/file.h>
#	define MAN_SHORT	"Alliant"
#	define MAN_LONG		"Alliant Computer Corporation"
#	if defined(i860)
#		include <sys/alliant2800.h>
#		define CPU_NAME		"i860"
#		define ARCH_TYPE 	"alliant2800"
#		define OS_NAME		"Concentrix2800"
#		define HAVE_MODELNUM
#		define HAVE_MEMORYSIZE
#		define HAVE_SERIALNUM
#		define OSVERS_FROM_KERNVER 4
#	else
#		include <sys/param.h>
#		include <machine/vmparam.h>
#		include <machine/bpb.h>
#		define OS_NAME		"Concentrix"
#		define ARCH_TYPE 	"alliant"
#		define HAVE_LIB_SYSCFG
#		define HAVE_USERETC
#		define OSVERS_FROM_KERNVER 3
#	endif
#	define HAVE_NLIST
#	define NEED_KVM
#endif /* alliant */

#if defined(NeXT)
#	include <sys/file.h>
#	include <kern/mach_host.h>
#	define MAN_SHORT	"NeXT"
#	define MAN_LONG		"NeXT Computer"
#	define OS_NAME		"NeXTStep"
#	define HAVE_VARARGS
#	define HAVE_HOST_INFO
#	define HAVE_KARCHNAME
#	define HAVE_AARCHNAME
#	define HAVE_NLIST
#	define NEED_KVM
#	define KERNSTR_END	';'
#	if !defined(mc68k)
#		define mc68k
#	endif
#endif /* NeXT */

#if defined(_AIX)
#	include <sys/file.h>
#	define MAN_SHORT	"IBM"
#	define MAN_LONG		"International Business Machines Corporation"
#	ifdef _IBMR2
#		define CPU_NAME	"rios"
#	endif
#	define ARCH_TYPE	"rs6000"
#	define KARCH_TYPE	ARCH_TYPE
#	define HAVE_VARARGS
#	define HAVE_UNAME
#	define UNAME_REL_VER_COMB
#	define HAVE_NLIST
#	define NEED_KVM
#endif /* _AIX */

/*
 * Everything depends on HAVE_KVM
 */
#if	defined(NEED_KVM) && !defined(HAVE_KVM)
#define HAVE_KVM
#endif

#endif /* __sysinfo_system__ */

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.