1
0

Source code upload

This commit is contained in:
calmsacibis995
2022-09-29 17:59:04 +03:00
parent 72fa9da3d7
commit 8fc8fa8089
33399 changed files with 11964078 additions and 0 deletions

51
eoe/include/ABIinfo.h Normal file
View File

@@ -0,0 +1,51 @@
/**************************************************************************
* *
* Copyright (C) 1996 Silicon Graphics, Inc. *
* *
* These coded instructions, statements, and computer programs contain *
* unpublished proprietary information of Silicon Graphics, Inc., and *
* are protected by Federal copyright law. They may not be disclosed *
* to third parties or copied or duplicated in any form, in whole or *
* in part, without the prior written consent of Silicon Graphics, Inc. *
* *
**************************************************************************/
#ifndef __ABI_INFO_H__
#define __ABI_INFO_H__
#ident "$Revision: 1.2 $"
#ifdef __cplusplus
extern "C" {
#endif
#define ABIinfo_current 0
#define ABIinfo_abi32 1
#define ABIinfo_abi64 2
/* ABIinfo selectors */
#define ABIinfo_BlackBook 0x01
#define ABIinfo_mpconf 0x02
#define ABIinfo_abicc 0x03
#define ABIinfo_XPG 0x04
#define ABIinfo_backtrace 0x05
#define ABIinfo_largefile 0x06
#define ABIinfo_longlong 0x07
#define ABIinfo_X11 0x08
#define ABIinfo_mmap 0x09
/* return values */
#define ConformanceGuide_10 0x010000 /* version 1.0 */
#define ConformanceGuide_11 0x010100 /* version 1.1 */
#define ConformanceGuide_12 0x010200 /* version 1.2 */
#define ConformanceGuide_20 0x020000 /* version 2.0 */
#define ConformanceGuide_30 0x030000 /* version 3.0 */
#define ConformanceGuide_31 0x030100 /* version 3.1 */
#define ConformanceGuide_40 0x040000 /* version 4.0 */
/* function prototype */
extern int ABIinfo(int, int);
#ifdef __cplusplus
}
#endif
#endif

81
eoe/include/Makefile Normal file
View File

@@ -0,0 +1,81 @@
#
# Makefile for irix/include, to install header files under /usr/include.
#
include $(ROOT)/usr/include/make/commondefs
#
# Public header files, shipped to customers and used by almost everyone.
# Try to keep these alphabetized, to avoid duplicates and ease searches.
# These are in alphabetical order!
#
PUBLIC_HFILES= \
abi_mutex.h aio.h archives.h asm.h assert.h \
ABIinfo.h \
bstring.h \
cap_net.h capability.h clearance.h \
core.out.h cpio.h cr1.h crypt.h cs.h ctype.h \
dbm.h deflt.h devmgmt.h di_passwd.h di_group.h di_aux.h \
dial.h dirent.h dlfcn.h \
errno.h exportent.h \
fam.h fcntl.h fetchop.h fmtmsg.h fnmatch.h fp_class.h fsd.h ftw.h \
getabi.h getopt.h glob.h grio.h grp.h \
hostreg.h \
ia.h iconv.h invent.h \
langinfo.h lastlog.h limits.h listen.h locale.h locale_attr.h \
malloc.h mdbm.h memory.h mls.h mntent.h mon.h \
monetary.h mutex.h mqueue.h \
ndbm.h netconfig.h netdb.h netdir.h nl_types.h ns_api.h ns_daemon.h \
paths.h \
pfmt.h pkgdev.h pkginfo.h pkglocs.h pkgstrct.h pkgtrans.h \
poll.h proj.h pthread.h pwd.h \
re_comp.h regdef.h regex.h regexp.h resolv.h \
sac.h sat.h sched.h search.h semaphore.h \
setjmp.h sgtty.h shadow.h shareIIhooks.h siginfo.h signal.h \
sgi_nl.h ssdi.h standards.h \
std.h stddef.h \
stdio.h stdlib.h string.h strings.h stropts.h \
sum.h sys.s sysexits.h syslog.h t6net.h \
task.h tar.h tcl.h termio.h termios.h time.h ttymap.h tzfile.h \
timers.h tiuser.h \
ucontext.h ulimit.h ulocks.h unistd.h ustat.h utime.h utmp.h utmpx.h \
valtools.h vme_dma_engine.h \
wait.h wchar.h wordexp.h wsregexp.h \
xti.h
#
# List of headers that only system software utilities need
# These are public within SGI for internal development of other ISM's
# but are not shipped to customers.
#
FRIEND_HFILES= \
comp.h \
devconvert.h diskinfo.h diskinvent.h \
mountinfo.h iconv_cnv.h iconv_int.h \
mediaclient.h \
sync.h \
uncomp.h \
xdr_mc.h
#
# List of subdirectories to run makes in.
#
SUBDIRS=arpa des protocols rpcsvc sys makerules
HPUT=$(INSTALL) -m 444 -F /usr/include
default:
COMMONPREF=inc
include $(COMMONRULES)
headers: install
exports:
install $(COMMONTARGS): $(COMMONPREF)$$@ $(_FORCE)
$(SUBDIRS_MAKERULE)
$(COMMONPREF)install: $(_FORCE)
$(HPUT) $(PUBLIC_HFILES)
$(HPUT) $(FRIEND_HFILES)

43
eoe/include/abi_mutex.h Normal file
View File

@@ -0,0 +1,43 @@
/**************************************************************************
* *
* Copyright (C) 1989-1994 Silicon Graphics, Inc. *
* *
* These coded instructions, statements, and computer programs contain *
* unpublished proprietary information of Silicon Graphics, Inc., and *
* are protected by Federal copyright law. They may not be disclosed *
* to third parties or copied or duplicated in any form, in whole or *
* in part, without the prior written consent of Silicon Graphics, Inc. *
* *
**************************************************************************/
#ifndef _ABI_MUTEX_
#define _ABI_MUTEX_
#ident "$Revision: 1.6 $"
#ifdef __cplusplus
extern "C" {
#endif
#define UNLOCKED 0
#define LOCKED 1
typedef struct abilock {
#if (_MIPS_SZLONG == 32)
unsigned long abi_lock;
#endif
#if (_MIPS_SZLONG == 64)
unsigned int abi_lock;
#endif
} abilock_t;
/* ABI mutex functions */
extern int init_lock(abilock_t *);
extern int acquire_lock(abilock_t *);
extern int release_lock(abilock_t *);
extern int stat_lock(abilock_t *);
extern void spin_lock(abilock_t *);
#ifdef __cplusplus
}
#endif
#endif

138
eoe/include/aio.h Normal file
View File

@@ -0,0 +1,138 @@
/*************************************************************************
* *
* Copyright (C) 1992-1997 Silicon Graphics, Inc. *
* *
* These coded instructions, statements, and computer programs contain *
* unpublished proprietary information of Silicon Graphics, Inc., and *
* are protected by Federal copyright law. They may not be disclosed *
* to third parties or copied or duplicated in any form, in whole or *
* in part, without the prior written consent of Silicon Graphics, Inc. *
* *
**************************************************************************/
#ident "$Revision: 1.20 $ $Author: jwag $"
#ifndef __AIO_H__
#define __AIO_H__
#ifdef __cplusplus
extern "C" {
#endif
#include <standards.h>
#include <sys/types.h>
#include <time.h>
#include <sys/timespec.h> /* for timespec_t in ANSI/XPG mode */
#include <sys/sigevent.h> /* for sigevent_t in ANSI/XPG mode */
#include <sys/signal.h>
#include <fcntl.h>
/*
* aio - POSIX 1003.1b-1993
* NOTE: watch for name space pollution.
*/
typedef struct aiocb {
int aio_fildes; /* file descriptor to perform aio on */
volatile void *aio_buf; /* Data buffer */
size_t aio_nbytes; /* number of bytes of data */
off_t aio_offset; /* file offset position */
int aio_reqprio; /* aio priority, (Currently must be 0) */
sigevent_t aio_sigevent; /* notification information */
int aio_lio_opcode; /* opcode for lio_listio() call */
unsigned long aio_reserved[7];/* reserved for internal use */
unsigned long aio_pad[6];
} aiocb_t;
#if _LFAPI
#if (_MIPS_SIM == _MIPS_SIM_ABI32)
typedef struct aiocb64 {
int aio_fildes; /* file descriptor to perform aio on */
volatile void *aio_buf; /* Data buffer */
size_t aio_nbytes; /* number of bytes of data */
off_t aio_oldoff; /* old: file offset position */
int aio_reqprio; /* aio priority, (Currently must be 0) */
sigevent_t aio_sigevent; /* notification information */
int aio_lio_opcode; /* opcode for lio_listio() call */
unsigned long aio_reserved[7];/* reserved for internal use */
unsigned long aio_pad[6];
off64_t aio_offset; /* file offset position */
} aiocb64_t;
#else /* (_MIPS_SIM == _MIPS_SIM_ABI32) */
typedef aiocb_t aiocb64_t;
#endif /* (_MIPS_SIM == _MIPS_SIM_ABI32) */
#endif /* _LFAPI */
/* for aio_cancel() return values */
#define AIO_CANCELED 1 /* cancelled operation */
#define AIO_NOTCANCELED 2 /* some ops not cancelled */
#define AIO_ALLDONE 3 /* all aio has completed */
/* for aiocb.aio_lio_opcode */
#define LIO_NOP 0 /* listio request with no data */
#define LIO_READ 1 /* listio read request */
#define LIO_WRITE 2 /* listio write request */
/* for lio_listio mode flag */
#define LIO_WAIT 4 /* blocks until lio_listio complete */
#define LIO_NOWAIT 3 /* asynchronous lio_listio call, doesn't block */
/* for lio_hold routine */
#define AIO_HOLD_CALLBACK 1
#define AIO_RELEASE_CALLBACK 2
#define AIO_ISHELD_CALLBACK 3
#if _SGIAPI || _ABIAPI
/* These three defines are not for use by applications. */
#define _AIO_SGI_LISTIO_MAX 2048
#define _AIO_SGI_MAX 2048
#define _AIO_SGI_PRIO_DELTA_MAX 0
/*
* This stucture is the optional argument to aio_sgi_init. The defaults
* that are used if NULL is given as the argument are in parentheses at the
* end of each comment.
*/
typedef struct aioinit {
int aio_threads; /* The number of aio threads to start (5) */
int aio_locks; /* Initial number of preallocated locks (3) */
int aio_num; /* estimated total simultanious aiobc structs (1000) */
int aio_usedba; /* Try to use DBA for raw I/O in lio_listio (0) */
int aio_debug; /* turn on debugging (0) */
int aio_numusers; /* max number of user sprocs making aio_* calls (5) */
int aio_reserved[3];
} aioinit_t;
extern void aio_sgi_init(aioinit_t *);
#if _LFAPI
extern void aio_sgi_init64(aioinit_t *);
#endif
#endif /* _SGIAPI || _ABIAPI */
extern int aio_read(aiocb_t *);
extern int aio_write(aiocb_t *);
extern int lio_listio(int, aiocb_t * const [], int, sigevent_t *);
extern int aio_cancel(int, aiocb_t *);
extern int aio_error(const aiocb_t *);
extern ssize_t aio_return(aiocb_t *);
extern int aio_suspend(const aiocb_t * const [], int, const timespec_t *);
extern int aio_fsync(int, aiocb_t *);
extern int aio_hold(int);
#if _LFAPI
extern int aio_read64(aiocb64_t *);
extern int aio_write64(aiocb64_t *);
extern int lio_listio64(int, aiocb64_t * const [], int, sigevent_t *);
extern int aio_cancel64(int, aiocb64_t *);
extern int aio_error64(const aiocb64_t *);
extern ssize_t aio_return64(aiocb64_t *);
extern int aio_suspend64(const aiocb64_t * const [], int, const timespec_t *);
extern int aio_fsync64(int, aiocb64_t *);
extern int aio_hold64(int);
#endif /* _LFAPI */
#ifdef __cplusplus
}
#endif
#endif /* __AIO_H__ */

177
eoe/include/archives.h Normal file
View File

@@ -0,0 +1,177 @@
#ifndef __ARCHIVES_H__
#define __ARCHIVES_H__
#ifdef __cplusplus
extern "C" {
#endif
/*
*
* Copyright 1992, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */
/* Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
/* UNIX System Laboratories, Inc. */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
/* Portions Copyright (c) 1988, Sun Microsystems, Inc. */
/* All Rights Reserved. */
#ident "$Revision: 1.4 $"
#include <sys/types.h>
#include <tar.h>
/* Magic numbers */
#define CMN_ASC 0x070701 /* Cpio Magic Number for ASCii header */
#define CMN_BIN 070707 /* Cpio Magic Number for Binary header */
#define CMN_BBS 0143561 /* Cpio Magic Number for Byte-Swap header */
#define CMN_CRC 0x070702 /* Cpio Magic Number for CRC header */
#define CMS_ASC "070701" /* Cpio Magic String for ASCii header */
#define CMS_CHR "070707" /* Cpio Magic String for CHR (-c) header */
#define CMS_CRC "070702" /* Cpio Magic String for CRC header */
#define CMN_SEC 0x070703 /* Tcpio Magic Number of TI/E header */
#define CMS_SEC "070703" /* Tcpio Magic String of TI/E header */
#define CMS_LEN 6 /* Cpio Magic String LENgth */
/* Various header and field lengths */
#define CHRSZ 76 /* -c hdr size minus filename field */
#define ASCSZ 110 /* ASC and CRC hdr size minus filename field */
#define TARSZ 512 /* TAR hdr size */
#define HNAMLEN 256 /* maximum filename length for binary and -c headers */
#define EXPNLEN 1024 /* maximum filename length for ASC and CRC headers */
#define HTIMLEN 2 /* length of modification time field */
#define HSIZLEN 2 /* length of file size field */
/* cpio binary header definition */
struct hdr_cpio {
short h_magic, /* magic number field */
h_dev; /* file system of file */
ushort_t h_ino, /* inode of file */
h_mode, /* modes of file */
h_uid, /* uid of file */
h_gid; /* gid of file */
short h_nlink, /* number of links to file */
h_rdev, /* maj/min numbers for special files */
h_mtime[HTIMLEN], /* modification time of file */
h_namesize, /* length of filename */
h_filesize[HSIZLEN]; /* size of file */
char h_name[HNAMLEN]; /* filename */
} ;
/* cpio ODC header format */
struct c_hdr {
char c_magic[CMS_LEN],
c_dev[6],
c_ino[6],
c_mode[6],
c_uid[6],
c_gid[6],
c_nlink[6],
c_rdev[6],
c_mtime[11],
c_namesz[6],
c_filesz[11],
c_name[HNAMLEN];
} ;
/* -c and CRC header format */
struct Exp_cpio_hdr {
char E_magic[CMS_LEN],
E_ino[8],
E_mode[8],
E_uid[8],
E_gid[8],
E_nlink[8],
E_mtime[8],
E_filesize[8],
E_maj[8],
E_min[8],
E_rmaj[8],
E_rmin[8],
E_namesize[8],
E_chksum[8],
E_name[EXPNLEN];
} ;
/* Tar header structure and format */
#define TBLOCK 512 /* length of tar header and data blocks */
#define TNAMLEN 100 /* maximum length for tar file names */
#define TMODLEN 8 /* length of mode field */
#define TUIDLEN 8 /* length of uid field */
#define TGIDLEN 8 /* length of gid field */
#define TSIZLEN 12 /* length of size field */
#define TTIMLEN 12 /* length of modification time field */
#define TCRCLEN 8 /* length of header checksum field */
/* tar header definition */
union tblock {
char dummy[TBLOCK];
struct tar_hdr {
char t_name[TNAMLEN], /* name of file */
t_mode[TMODLEN], /* mode of file */
t_uid[TUIDLEN], /* uid of file */
t_gid[TGIDLEN], /* gid of file */
t_size[TSIZLEN], /* size of file in bytes */
t_mtime[TTIMLEN], /* modification time of file */
t_cksum[TCRCLEN], /* checksum of header */
t_typeflag,
t_linkname[TNAMLEN], /* file this file linked with */
t_magic[TMAGLEN],
t_version[TVERSLEN],
t_uname[32],
t_gname[32],
t_devmajor[8],
t_devminor[8],
t_prefix[155];
} tbuf;
} ;
/* volcopy tape label format and structure */
#define VMAGLEN 8
#define VVOLLEN 6
#define VFILLEN 464
struct volcopy_label {
char v_magic[VMAGLEN],
v_volume[VVOLLEN],
v_reels,
v_reel;
long v_time,
v_length,
v_dens,
v_reelblks, /* u370 added field */
v_blksize, /* u370 added field */
v_nblocks; /* u370 added field */
char v_fill[VFILLEN];
long v_offset; /* used with -e and -reel options */
int v_type; /* does tape have nblocks field? */
} ;
#ifdef __cplusplus
}
#endif
#endif /* !__ARCHIVES_H__ */

15
eoe/include/arpa/Makefile Normal file
View File

@@ -0,0 +1,15 @@
#
# Makefile for bsd/arpa header file installation.
#
include $(ROOT)/usr/include/make/commondefs
PUBLIC_HFILES= ftp.h inet.h nameser.h telnet.h tftp.h
HPUT= $(INSTALL) -F /usr/include/arpa -m 444
default: install
include $(COMMONRULES)
install:
$(HPUT) $(PUBLIC_HFILES)

118
eoe/include/arpa/ftp.h Normal file
View File

@@ -0,0 +1,118 @@
#ifndef __ARPA_FTP_H__
#define __ARPA_FTP_H__
#ifdef __cplusplus
extern "C" {
#endif
#ident "$Revision: 1.4 $"
/*
*
* Copyright 1992, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
/*
* Copyright (c) 1983, 1989 Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted
* provided that the above copyright notice and this paragraph are
* duplicated in all such forms and that any documentation,
* advertising materials, and other materials related to such
* distribution and use acknowledge that the software was developed
* by the University of California, Berkeley. The name of the
* University may not be used to endorse or promote products derived
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* @(#)ftp.h 5.4 (Berkeley) 2/21/89
*/
/*
* Definitions for FTP
* See RFC-765
*/
/*
* Reply codes.
*/
#define PRELIM 1 /* positive preliminary */
#define COMPLETE 2 /* positive completion */
#define CONTINUE 3 /* positive intermediate */
#define TRANSIENT 4 /* transient negative completion */
#define ERROR 5 /* permanent negative completion */
/*
* Type codes
*/
#define TYPE_A 1 /* ASCII */
#define TYPE_E 2 /* EBCDIC */
#define TYPE_I 3 /* image */
#define TYPE_L 4 /* local byte size */
#ifdef FTP_NAMES
char *typenames[] = {"0", "ASCII", "EBCDIC", "Image", "Local" };
#endif
/*
* Form codes
*/
#define FORM_N 1 /* non-print */
#define FORM_T 2 /* telnet format effectors */
#define FORM_C 3 /* carriage control (ASA) */
#ifdef FTP_NAMES
char *formnames[] = {"0", "Nonprint", "Telnet", "Carriage-control" };
#endif
/*
* Structure codes
*/
#define STRU_F 1 /* file (no record structure) */
#define STRU_R 2 /* record structure */
#define STRU_P 3 /* page structure */
#ifdef FTP_NAMES
char *strunames[] = {"0", "File", "Record", "Page" };
#endif
/*
* Mode types
*/
#define MODE_S 1 /* stream */
#define MODE_B 2 /* block */
#define MODE_C 3 /* compressed */
#ifdef FTP_NAMES
char *modenames[] = {"0", "Stream", "Block", "Compressed" };
#endif
/*
* Record Tokens
*/
#define REC_ESC '\377' /* Record-mode Escape */
#define REC_EOR '\001' /* Record-mode End-of-Record */
#define REC_EOF '\002' /* Record-mode End-of-File */
/*
* Block Header
*/
#define BLK_EOR 0x80 /* Block is End-of-Record */
#define BLK_EOF 0x40 /* Block is End-of-File */
#define BLK_ERRORS 0x20 /* Block is suspected of containing errors */
#define BLK_RESTART 0x10 /* Block is Restart Marker */
#define BLK_BYTECOUNT 2 /* Bytes in this block */
#ifdef __cplusplus
}
#endif
#endif /* !__ARPA_FTP_H__ */

74
eoe/include/arpa/inet.h Normal file
View File

@@ -0,0 +1,74 @@
#ifndef __ARPA_INET_H__
#define __ARPA_INET_H__
/*
* Copyright 1992, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
#ident "$Revision: 1.12 $"
#ifdef __cplusplus
extern "C" {
#endif
/*
* Copyright (c) 1983 Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted
* provided that: (1) source distributions retain this entire copyright
* notice and comment, and (2) distributions including binaries display
* the following acknowledgement: ``This product includes software
* developed by the University of California, Berkeley and its contributors''
* in the documentation or other materials provided with the distribution
* and in all advertising materials mentioning features or use of this
* software. Neither the name of the University nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* @(#)inet.h 5.4 (Berkeley) 6/1/90
*/
/* External definitions for functions in inet(3N) */
#include <standards.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <sys/endian.h>
extern in_addr_t inet_addr(const char *);
extern in_addr_t inet_lnaof(struct in_addr);
extern struct in_addr inet_makeaddr(in_addr_t, in_addr_t);
extern in_addr_t inet_netof(struct in_addr);
extern in_addr_t inet_network(const char *);
extern char * inet_ntoa(struct in_addr);
#if _SGIAPI
extern int inet_aton(const char *, struct in_addr *);
extern int inet_pton(int, const char *, void *);
extern const char * inet_ntop(int, const void *, char *, size_t);
extern u_int inet_nsap_addr(const char *, u_char *, int);
extern char * inet_nsap_ntoa(int, const u_char *, char *);
extern int inet_isaddr(const char *, uint32_t *);
#endif /* _SGIAPI */
#ifdef __cplusplus
}
#endif
#endif /* !__ARPA_INET_H__ */

392
eoe/include/arpa/nameser.h Normal file
View File

@@ -0,0 +1,392 @@
/*
* ++Copyright++ 1983, 1989, 1993
* -
* Copyright (c) 1983, 1989, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* -
* Portions Copyright (c) 1993 by Digital Equipment Corporation.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies, and that
* the name of Digital Equipment Corporation not be used in advertising or
* publicity pertaining to distribution of the document or software without
* specific, written prior permission.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
* CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
* -
* Portions Copyright (c) 1995 by International Business Machines, Inc.
*
* International Business Machines, Inc. (hereinafter called IBM) grants
* permission under its copyrights to use, copy, modify, and distribute this
* Software with or without fee, provided that the above copyright notice and
* all paragraphs of this notice appear in all copies, and that the name of IBM
* not be used in connection with the marketing of any product incorporating
* the Software or modifications thereof, without specific, written prior
* permission.
*
* To the extent it has a right to do so, IBM grants an immunity from suit
* under its patents, if any, for the use, sale or manufacture of products to
* the extent that such products are used for performing Domain Name System
* dynamic updates in TCP/IP networks by means of the Software. No immunity is
* granted for any product per se or for any other function of any product.
*
* THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL,
* DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN
* IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
* --Copyright--
*/
/*
* @(#)nameser.h 8.1 (Berkeley) 6/2/93
* $Id: nameser.h,v 2.8 1997/11/15 20:31:40 jes Exp $
*/
#ifndef _NAMESER_H_
#define _NAMESER_H_
#include <sys/param.h>
#if ((!defined(BSD)) || (BSD < 199306)) && !defined(sgi)
# include <sys/bitypes.h>
#else
# include <sys/types.h>
#endif
#include <sys/cdefs.h>
#ifdef _AUX_SOURCE
# include <sys/types.h>
#endif
/*
* revision information. this is the release date in YYYYMMDD format.
* it can change every day so the right thing to do with it is use it
* in preprocessor commands such as "#if (__BIND > 19931104)". do not
* compare for equality; rather, use it to determine whether your resolver
* is new enough to contain a certain feature.
*/
#define __BIND 19960801 /* interface version stamp */
/*
* Define constants based on rfc883
*/
#define PACKETSZ 512 /* maximum packet size */
#define MAXDNAME 1025 /* maximum presentation domain name */
#define MAXCDNAME 255 /* maximum compressed domain name */
#define MAXLABEL 63 /* maximum length of domain label */
#define HFIXEDSZ 12 /* #/bytes of fixed data in header */
#define QFIXEDSZ 4 /* #/bytes of fixed data in query */
#define RRFIXEDSZ 10 /* #/bytes of fixed data in r record */
#define INT32SZ 4 /* for systems without 32-bit ints */
#define INT16SZ 2 /* for systems without 16-bit ints */
#define INADDRSZ 4 /* IPv4 T_A */
#define IN6ADDRSZ 16 /* IPv6 T_AAAA */
/*
* Internet nameserver port number
*/
#define NAMESERVER_PORT 53
/*
* Currently defined opcodes
*/
#define QUERY 0x0 /* standard query */
#define IQUERY 0x1 /* inverse query */
#define STATUS 0x2 /* nameserver status query */
/*#define xxx 0x3*/ /* 0x3 reserved */
#define NS_NOTIFY_OP 0x4 /* notify secondary of SOA change */
/*
* Currently defined response codes
*/
#define NOERROR 0 /* no error */
#define FORMERR 1 /* format error */
#define SERVFAIL 2 /* server failure */
#define NXDOMAIN 3 /* non existent domain */
#define NOTIMP 4 /* not implemented */
#define REFUSED 5 /* query refused */
/*
* Type values for resources and queries
*/
#define T_A 1 /* host address */
#define T_NS 2 /* authoritative server */
#define T_MD 3 /* mail destination */
#define T_MF 4 /* mail forwarder */
#define T_CNAME 5 /* canonical name */
#define T_SOA 6 /* start of authority zone */
#define T_MB 7 /* mailbox domain name */
#define T_MG 8 /* mail group member */
#define T_MR 9 /* mail rename name */
#define T_NULL 10 /* null resource record */
#define T_WKS 11 /* well known service */
#define T_PTR 12 /* domain name pointer */
#define T_HINFO 13 /* host information */
#define T_MINFO 14 /* mailbox information */
#define T_MX 15 /* mail routing information */
#define T_TXT 16 /* text strings */
#define T_RP 17 /* responsible person */
#define T_AFSDB 18 /* AFS cell database */
#define T_X25 19 /* X_25 calling address */
#define T_ISDN 20 /* ISDN calling address */
#define T_RT 21 /* router */
#define T_NSAP 22 /* NSAP address */
#define T_NSAP_PTR 23 /* reverse NSAP lookup (deprecated) */
#define T_SIG 24 /* security signature */
#define T_KEY 25 /* security key */
#define T_PX 26 /* X.400 mail mapping */
#define T_GPOS 27 /* geographical position (withdrawn) */
#define T_AAAA 28 /* IP6 Address */
#define T_LOC 29 /* Location Information */
#define T_NXT 30 /* Next Valid Name in Zone */
#define T_EID 31 /* Endpoint identifier */
#define T_NIMLOC 32 /* Nimrod locator */
#define T_SRV 33 /* Server selection */
#define T_ATMA 34 /* ATM Address */
#define T_NAPTR 35 /* Naming Authority PoinTeR */
/* non standard */
#define T_UINFO 100 /* user (finger) information */
#define T_UID 101 /* user ID */
#define T_GID 102 /* group ID */
#define T_UNSPEC 103 /* Unspecified format (binary data) */
/* Query type values which do not appear in resource records */
#define T_IXFR 251 /* incremental zone transfer */
#define T_AXFR 252 /* transfer zone of authority */
#define T_MAILB 253 /* transfer mailbox records */
#define T_MAILA 254 /* transfer mail agent records */
#define T_ANY 255 /* wildcard match */
/*
* Values for class field
*/
#define C_IN 1 /* the arpa internet */
#define C_CHAOS 3 /* for chaos net (MIT) */
#define C_HS 4 /* for Hesiod name server (MIT) (XXX) */
/* Query class values which do not appear in resource records */
#define C_ANY 255 /* wildcard match */
/*
* Flags field of the KEY RR rdata
*/
#define KEYFLAG_TYPEMASK 0xC000 /* Mask for "type" bits */
#define KEYFLAG_TYPE_AUTH_CONF 0x0000 /* Key usable for both */
#define KEYFLAG_TYPE_CONF_ONLY 0x8000 /* Key usable for confidentiality */
#define KEYFLAG_TYPE_AUTH_ONLY 0x4000 /* Key usable for authentication */
#define KEYFLAG_TYPE_NO_KEY 0xC000 /* No key usable for either; no key */
/* The type bits can also be interpreted independently, as single bits: */
#define KEYFLAG_NO_AUTH 0x8000 /* Key not usable for authentication */
#define KEYFLAG_NO_CONF 0x4000 /* Key not usable for confidentiality */
#define KEYFLAG_EXPERIMENTAL 0x2000 /* Security is *mandatory* if bit=0 */
#define KEYFLAG_RESERVED3 0x1000 /* reserved - must be zero */
#define KEYFLAG_RESERVED4 0x0800 /* reserved - must be zero */
#define KEYFLAG_USERACCOUNT 0x0400 /* key is assoc. with a user acct */
#define KEYFLAG_ENTITY 0x0200 /* key is assoc. with entity eg host */
#define KEYFLAG_ZONEKEY 0x0100 /* key is zone key for the zone named */
#define KEYFLAG_IPSEC 0x0080 /* key is for IPSEC use (host or user)*/
#define KEYFLAG_EMAIL 0x0040 /* key is for email (MIME security) */
#define KEYFLAG_RESERVED10 0x0020 /* reserved - must be zero */
#define KEYFLAG_RESERVED11 0x0010 /* reserved - must be zero */
#define KEYFLAG_SIGNATORYMASK 0x000F /* key can sign DNS RR's of same name */
#define KEYFLAG_RESERVED_BITMASK ( KEYFLAG_RESERVED3 | \
KEYFLAG_RESERVED4 | \
KEYFLAG_RESERVED10| KEYFLAG_RESERVED11)
/* The Algorithm field of the KEY and SIG RR's is an integer, {1..254} */
#define ALGORITHM_MD5RSA 1 /* MD5 with RSA */
#define ALGORITHM_EXPIRE_ONLY 253 /* No alg, no security */
#define ALGORITHM_PRIVATE_OID 254 /* Key begins with OID indicating alg */
/* Signatures */
/* Size of a mod or exp in bits */
#define MIN_MD5RSA_KEY_PART_BITS 512
#define MAX_MD5RSA_KEY_PART_BITS 2552
/* Total of binary mod and exp, bytes */
#define MAX_MD5RSA_KEY_BYTES ((MAX_MD5RSA_KEY_PART_BITS+7/8)*2+3)
/* Max length of text sig block */
#define MAX_KEY_BASE64 (((MAX_MD5RSA_KEY_BYTES+2)/3)*4)
/*
* Status return codes for T_UNSPEC conversion routines
*/
#define CONV_SUCCESS 0
#define CONV_OVERFLOW (-1)
#define CONV_BADFMT (-2)
#define CONV_BADCKSUM (-3)
#define CONV_BADBUFLEN (-4)
#ifndef BYTE_ORDER
#if (BSD >= 199103)
# include <machine/endian.h>
#else
#ifdef linux
# include <endian.h>
#else
#define LITTLE_ENDIAN 1234 /* least-significant byte first (vax, pc) */
#define BIG_ENDIAN 4321 /* most-significant byte first (IBM, net) */
#define PDP_ENDIAN 3412 /* LSB first in word, MSW first in long (pdp)*/
#if defined(vax) || defined(ns32000) || defined(sun386) || defined(i386) || \
defined(MIPSEL) || defined(_MIPSEL) || defined(BIT_ZERO_ON_RIGHT) || \
defined(__alpha__) || defined(__alpha)
#define BYTE_ORDER LITTLE_ENDIAN
#endif
#if defined(sel) || defined(pyr) || defined(mc68000) || defined(sparc) || \
defined(is68k) || defined(tahoe) || defined(ibm032) || defined(ibm370) || \
defined(MIPSEB) || defined(_MIPSEB) || defined(_IBMR2) || defined(DGUX) ||\
defined(apollo) || defined(__convex__) || defined(_CRAY) || \
defined(__hppa) || defined(__hp9000) || \
defined(__hp9000s300) || defined(__hp9000s700) || \
defined (BIT_ZERO_ON_LEFT) || defined(m68k)
#define BYTE_ORDER BIG_ENDIAN
#endif
#endif /* linux */
#endif /* BSD */
#endif /* BYTE_ORDER */
#if !defined(BYTE_ORDER) || \
(BYTE_ORDER != BIG_ENDIAN && BYTE_ORDER != LITTLE_ENDIAN && \
BYTE_ORDER != PDP_ENDIAN)
/* you must determine what the correct bit order is for
* your compiler - the next line is an intentional error
* which will force your compiles to bomb until you fix
* the above macros.
*/
error "Undefined or invalid BYTE_ORDER";
#endif
/*
* Structure for query header. The order of the fields is machine- and
* compiler-dependent, depending on the byte/bit order and the layout
* of bit fields. We use bit fields only in int variables, as this
* is all ANSI requires. This requires a somewhat confusing rearrangement.
*/
typedef struct {
unsigned id :16; /* query identification number */
#if BYTE_ORDER == BIG_ENDIAN
/* fields in third byte */
unsigned qr: 1; /* response flag */
unsigned opcode: 4; /* purpose of message */
unsigned aa: 1; /* authoritive answer */
unsigned tc: 1; /* truncated message */
unsigned rd: 1; /* recursion desired */
/* fields in fourth byte */
unsigned ra: 1; /* recursion available */
unsigned unused :1; /* unused bits (MBZ as of 4.9.3a3) */
unsigned ad: 1; /* authentic data from named */
unsigned cd: 1; /* checking disabled by resolver */
unsigned rcode :4; /* response code */
#endif
#if BYTE_ORDER == LITTLE_ENDIAN || BYTE_ORDER == PDP_ENDIAN
/* fields in third byte */
unsigned rd :1; /* recursion desired */
unsigned tc :1; /* truncated message */
unsigned aa :1; /* authoritive answer */
unsigned opcode :4; /* purpose of message */
unsigned qr :1; /* response flag */
/* fields in fourth byte */
unsigned rcode :4; /* response code */
unsigned cd: 1; /* checking disabled by resolver */
unsigned ad: 1; /* authentic data from named */
unsigned unused :1; /* unused bits (MBZ as of 4.9.3a3) */
unsigned ra :1; /* recursion available */
#endif
/* remaining bytes */
unsigned qdcount :16; /* number of question entries */
unsigned ancount :16; /* number of answer entries */
unsigned nscount :16; /* number of authority entries */
unsigned arcount :16; /* number of resource entries */
} HEADER;
/*
* Defines for handling compressed domain names
*/
#define INDIR_MASK 0xc0
extern u_int16_t _getshort __P((const u_char *));
extern u_int32_t _getlong __P((const u_char *));
/*
* Inline versions of get/put short/long. Pointer is advanced.
*
* These macros demonstrate the property of C whereby it can be
* portable or it can be elegant but rarely both.
*/
#define GETSHORT(s, cp) { \
register u_char *t_cp = (u_char *)(cp); \
(s) = ((u_int16_t)t_cp[0] << 8) \
| ((u_int16_t)t_cp[1]) \
; \
(cp) += INT16SZ; \
}
#define GETLONG(l, cp) { \
register u_char *t_cp = (u_char *)(cp); \
(l) = ((u_int32_t)t_cp[0] << 24) \
| ((u_int32_t)t_cp[1] << 16) \
| ((u_int32_t)t_cp[2] << 8) \
| ((u_int32_t)t_cp[3]) \
; \
(cp) += INT32SZ; \
}
#define PUTSHORT(s, cp) { \
register u_int16_t t_s = (u_int16_t)(s); \
register u_char *t_cp = (u_char *)(cp); \
*t_cp++ = t_s >> 8; \
*t_cp = t_s; \
(cp) += INT16SZ; \
}
#define PUTLONG(l, cp) { \
register u_int32_t t_l = (u_int32_t)(l); \
register u_char *t_cp = (u_char *)(cp); \
*t_cp++ = t_l >> 24; \
*t_cp++ = t_l >> 16; \
*t_cp++ = t_l >> 8; \
*t_cp = t_l; \
(cp) += INT32SZ; \
}
#endif /* !_NAMESER_H_ */

232
eoe/include/arpa/telnet.h Normal file
View File

@@ -0,0 +1,232 @@
#ifndef __ARPA_TELNET_H__
#define __ARPA_TELNET_H__
#ifdef __cplusplus
extern "C" {
#endif
#ident "$Revision: 1.8 $"
/*
*
* Copyright 1992, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
/*
* Copyright (c) 1983 Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted provided
* that: (1) source distributions retain this entire copyright notice and
* comment, and (2) distributions including binaries display the following
* acknowledgement: ``This product includes software developed by the
* University of California, Berkeley and its contributors'' in the
* documentation or other materials provided with the distribution and in
* all advertising materials mentioning features or use of this software.
* Neither the name of the University nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* @(#)telnet.h 5.10 (Berkeley) 6/28/90
*/
/*
* Definitions for the TELNET protocol.
*/
#define IAC 255 /* interpret as command: */
#define DONT 254 /* you are not to use option */
#define DO 253 /* please, you use option */
#define WONT 252 /* I won't use option */
#define WILL 251 /* I will use option */
#define SB 250 /* interpret as subnegotiation */
#define GA 249 /* you may reverse the line */
#define EL 248 /* erase the current line */
#define EC 247 /* erase the current character */
#define AYT 246 /* are you there */
#define AO 245 /* abort output--but let prog finish */
#define IP 244 /* interrupt process--permanently */
#define BREAK 243 /* break */
#define DM 242 /* data mark--for connect. cleaning */
#define NOP 241 /* nop */
#define SE 240 /* end sub negotiation */
#define EOR 239 /* end of record (transparent mode) */
#define ABORT 238 /* Abort process */
#define SUSP 237 /* Suspend process */
#define xEOF 236 /* End of file: EOF is already used... */
#define SYNCH 242 /* for telfunc calls */
#ifdef TELCMDS
char *telcmds[] = {
"EOF", "SUSP", "ABORT", "EOR",
"SE", "NOP", "DMARK", "BRK", "IP", "AO", "AYT", "EC",
"EL", "GA", "SB", "WILL", "WONT", "DO", "DONT", "IAC",
};
#define TELCMD_FIRST xEOF
#define TELCMD_LAST IAC
#define TELCMD_OK(x) ((x) <= TELCMD_LAST && (x) >= TELCMD_FIRST)
#define TELCMD(x) telcmds[(x)-TELCMD_FIRST]
#endif
/* telnet options */
#define TELOPT_BINARY 0 /* 8-bit data path */
#define TELOPT_ECHO 1 /* echo */
#define TELOPT_RCP 2 /* prepare to reconnect */
#define TELOPT_SGA 3 /* suppress go ahead */
#define TELOPT_NAMS 4 /* approximate message size */
#define TELOPT_STATUS 5 /* give status */
#define TELOPT_TM 6 /* timing mark */
#define TELOPT_RCTE 7 /* remote controlled transmission and echo */
#define TELOPT_NAOL 8 /* negotiate about output line width */
#define TELOPT_NAOP 9 /* negotiate about output page size */
#define TELOPT_NAOCRD 10 /* negotiate about CR disposition */
#define TELOPT_NAOHTS 11 /* negotiate about horizontal tabstops */
#define TELOPT_NAOHTD 12 /* negotiate about horizontal tab disposition */
#define TELOPT_NAOFFD 13 /* negotiate about formfeed disposition */
#define TELOPT_NAOVTS 14 /* negotiate about vertical tab stops */
#define TELOPT_NAOVTD 15 /* negotiate about vertical tab disposition */
#define TELOPT_NAOLFD 16 /* negotiate about output LF disposition */
#define TELOPT_XASCII 17 /* extended ascic character set */
#define TELOPT_LOGOUT 18 /* force logout */
#define TELOPT_BM 19 /* byte macro */
#define TELOPT_DET 20 /* data entry terminal */
#define TELOPT_SUPDUP 21 /* supdup protocol */
#define TELOPT_SUPDUPOUTPUT 22 /* supdup output */
#define TELOPT_SNDLOC 23 /* send location */
#define TELOPT_TTYPE 24 /* terminal type */
#define TELOPT_EOR 25 /* end or record */
#define TELOPT_TUID 26 /* TACACS user identification */
#define TELOPT_OUTMRK 27 /* output marking */
#define TELOPT_TTYLOC 28 /* terminal location number */
#define TELOPT_3270REGIME 29 /* 3270 regime */
#define TELOPT_X3PAD 30 /* X.3 PAD */
#define TELOPT_NAWS 31 /* window size */
#define TELOPT_TSPEED 32 /* terminal speed */
#define TELOPT_LFLOW 33 /* remote flow control */
#define TELOPT_LINEMODE 34 /* Linemode option */
#define TELOPT_XDISPLOC 35 /* X Display Location */
#define TELOPT_ENVIRON 36 /* Environment variables */
#define TELOPT_AUTHENTICATION 45 /* XXX Auto Authenticate */
#define TELOPT_EXOPL 255 /* extended-options-list */
#define NTELOPTS (1+TELOPT_AUTHENTICATION)
#ifdef TELOPTS
char *telopts[NTELOPTS] = {
"BINARY", "ECHO", "RCP", "SUPPRESS GO AHEAD", "NAME",
"STATUS", "TIMING MARK", "RCTE", "NAOL", "NAOP",
"NAOCRD", "NAOHTS", "NAOHTD", "NAOFFD", "NAOVTS",
"NAOVTD", "NAOLFD", "EXTEND ASCII", "LOGOUT", "BYTE MACRO",
"DATA ENTRY TERMINAL", "SUPDUP", "SUPDUP OUTPUT",
"SEND LOCATION", "TERMINAL TYPE", "END OF RECORD",
"TACACS UID", "OUTPUT MARKING", "TTYLOC",
"3270 REGIME", "X.3 PAD", "NAWS", "TSPEED", "LFLOW",
"LINEMODE", "XDISPLOC", "ENVIRON",
"UNKNOWN 37", "UNKNOWN 38", "UNKNOWN 39", "UNKNOWN 40", "UNKNOWN 41",
"UNKNOWN 42", "UNKNOWN 43", "UNKNOWN 44", "AUTHENTICATION",
};
#define TELOPT_FIRST TELOPT_BINARY
#define TELOPT_LAST TELOPT_AUTHENTICATION
#define TELOPT_OK(x) ((x) <= TELOPT_LAST && (x) >= TELOPT_FIRST)
#define TELOPT(x) telopts[(x)-TELOPT_FIRST]
#endif
/* sub-option qualifiers */
#define TELQUAL_IS 0 /* option is... */
#define TELQUAL_SEND 1 /* send option */
#define TELQUAL_INFO 2 /* ENVIRON: informational version of IS */
/*
* LINEMODE suboptions
*/
#define LM_MODE 1
#define LM_FORWARDMASK 2
#define LM_SLC 3
#define MODE_EDIT 0x01
#define MODE_TRAPSIG 0x02
#define MODE_ACK 0x04
#define MODE_SOFT_TAB 0x08
#define MODE_LIT_ECHO 0x10
#define MODE_MASK 0x1f
/* Not part of protocol, but needed to simplify things... */
#define MODE_FLOW 0x0100
#define MODE_ECHO 0x0200
#define MODE_INBIN 0x0400
#define MODE_OUTBIN 0x0800
#define MODE_FORCE 0x1000
#define SLC_SYNCH 1
#define SLC_BRK 2
#define SLC_IP 3
#define SLC_AO 4
#define SLC_AYT 5
#define SLC_EOR 6
#define SLC_ABORT 7
#define SLC_EOF 8
#define SLC_SUSP 9
#define SLC_EC 10
#define SLC_EL 11
#define SLC_EW 12
#define SLC_RP 13
#define SLC_LNEXT 14
#define SLC_XON 15
#define SLC_XOFF 16
#define SLC_FORW1 17
#define SLC_FORW2 18
#define NSLC 18
#define SLC_NAMES "0", "SYNCH", "BRK", "IP", "AO", "AYT", "EOR", \
"ABORT", "EOF", "SUSP", "EC", "EL", "EW", "RP", \
"LNEXT", "XON", "XOFF", "FORW1", "FORW2"
#define SLC_NOSUPPORT 0
#define SLC_CANTCHANGE 1
#define SLC_VARIABLE 2
#define SLC_DEFAULT 3
#define SLC_LEVELBITS 0x03
#define SLC_FUNC 0
#define SLC_FLAGS 1
#define SLC_VALUE 2
#define SLC_ACK 0x80
#define SLC_FLUSHIN 0x40
#define SLC_FLUSHOUT 0x20
#define ENV_VALUE 0
#define ENV_VAR 1
#define ENV_ESC 2
/*
* AUTHENTICATION suboptions
*/
#define TELQUAL_AUTHTYPE_NONE 0
#define TELQUAL_AUTHTYPE_PRIVATE 1
#define TELQUAL_AUTHTYPE_KERBEROS 2
/* Kerberos-specific */
#define TELQUAL_AUTHTYPE_KERBEROS_V4 4
#define TELQUAL_AUTHTYPE_KERBEROS_V5 5
#define TELQUAL_AUTHTYPE_KERBEROS_USERNAME 1
#ifdef __cplusplus
}
#endif
#endif /* !__ARPA_TELNET_H__ */

86
eoe/include/arpa/tftp.h Normal file
View File

@@ -0,0 +1,86 @@
#ifndef __ARPA_TFTP_H__
#define __ARPA_TFTP_H__
#ifdef __cplusplus
extern "C" {
#endif
#ident "$Revision: 1.4 $"
/*
*
* Copyright 1992, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
/*
* Copyright (c) 1983 Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted
* provided that the above copyright notice and this paragraph are
* duplicated in all such forms and that any documentation,
* advertising materials, and other materials related to such
* distribution and use acknowledge that the software was developed
* by the University of California, Berkeley. The name of the
* University may not be used to endorse or promote products derived
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* @(#)tftp.h 5.2 (Berkeley) 6/27/88
*/
/*
* Trivial File Transfer Protocol (IEN-133)
*/
#define SEGSIZE 512 /* data segment size */
/*
* Packet types.
*/
#define RRQ 01 /* read request */
#define WRQ 02 /* write request */
#define DATA 03 /* data packet */
#define ACK 04 /* acknowledgement */
#define ERROR 05 /* error code */
struct tftphdr {
short th_opcode; /* packet type */
union {
short tu_block; /* block # */
short tu_code; /* error code */
char tu_stuff[1]; /* request packet stuff */
} th_u;
char th_data[1]; /* data or error string */
};
#define th_block th_u.tu_block
#define th_code th_u.tu_code
#define th_stuff th_u.tu_stuff
#define th_msg th_data
/*
* Error codes.
*/
#define EUNDEF 0 /* not defined */
#define ENOTFOUND 1 /* file not found */
#define EACCESS 2 /* access violation */
#define ENOSPACE 3 /* disk full or allocation exceeded */
#define EBADOP 4 /* illegal TFTP operation */
#define EBADID 5 /* unknown transfer ID */
#define EEXISTS 6 /* file already exists */
#define ENOUSER 7 /* no such user */
#ifdef __cplusplus
}
#endif
#endif /* !__ARPA_TFTP_H__ */

37
eoe/include/asm.h Normal file
View File

@@ -0,0 +1,37 @@
#ifndef __ASM_H__
#define __ASM_H__
#ifdef __cplusplus
extern "C" {
#endif
#ident "$Revision: 1.5 $"
/*
*
* Copyright 1992, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
/* ------------------------------------------------------------------ */
/* | Copyright Unpublished, MIPS Computer Systems, Inc. All Rights | */
/* | Reserved. This software contains proprietary and confidential | */
/* | information of MIPS and its suppliers. Use, disclosure or | */
/* | reproduction is prohibited without the prior express written | */
/* | consent of MIPS. | */
/* ------------------------------------------------------------------ */
/* asm.h 1.1 */
#include "sys/asm.h"
#ifdef __cplusplus
}
#endif
#endif /* !__ASM_H__ */

54
eoe/include/assert.h Normal file
View File

@@ -0,0 +1,54 @@
#ifndef __ASSERT_H__
#define __ASSERT_H__
#ifdef __cplusplus
extern "C" {
#endif
/**************************************************************************
* *
* Copyright (C) 1984, Silicon Graphics, Inc. *
* *
* These coded instructions, statements, and computer programs contain *
* unpublished proprietary information of Silicon Graphics, Inc., and *
* are protected by Federal copyright law. They may not be disclosed *
* to third parties or copied or duplicated in any form, in whole or *
* in part, without the prior written consent of Silicon Graphics, Inc. *
* *
**************************************************************************/
/* Copyright (c) 1984 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ident "$Revision: 1.17 $"
/* ANSI C Notes:
*
* - THE IDENTIFIERS APPEARING OUTSIDE OF #ifdef __EXTENSIONS__ IN THIS
* standard header ARE SPECIFIED BY ANSI! CONFORMANCE WILL BE ALTERED
* IF ANY NEW IDENTIFIERS ARE ADDED TO THIS AREA UNLESS THEY ARE IN ANSI's
* RESERVED NAMESPACE. (i.e., unless they are prefixed by __[a-z] or
* _[A-Z]. For external objects, identifiers with the prefix _[a-z]
* are also reserved.)
*/
#ifdef NDEBUG
#undef assert
#define assert(EX) ((void)0)
#else
extern void __assert(const char *, const char *, int);
#ifdef __ANSI_CPP__
#define assert(EX) ((EX)?((void)0):__assert( # EX , __FILE__, __LINE__))
#else
#define assert(EX) ((EX)?((void)0):__assert("EX", __FILE__, __LINE__))
#endif
#endif /* NDEBUG */
#ifdef __cplusplus
}
#endif
#endif /* !__ASSERT_H__ */

57
eoe/include/bstring.h Normal file
View File

@@ -0,0 +1,57 @@
#ifndef __BSTRING_H__
#define __BSTRING_H__
#ifdef __cplusplus
extern "C" {
#endif
/*
* bstring(3C) -- byte string operations
*
* Copyright 1990, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
#ident "$Revision: 1.6 $"
#if !defined(_SIZE_T) && !defined(_SIZE_T_)
#define _SIZE_T
#if (_MIPS_SZLONG == 32)
typedef unsigned int size_t;
#endif
#if (_MIPS_SZLONG == 64)
typedef unsigned long size_t;
#endif
#endif
extern void bcopy(const void *, void *, size_t);
extern int bcmp(const void *, const void *, size_t);
extern void bzero(void *, size_t);
extern void blkclr(void *, size_t);
#ifdef __INLINE_INTRINSICS
/* The functions made intrinsic here can be activated by adding the
** option -D__INLINE_INTRINSICS
*/
#if (defined(_COMPILER_VERSION) && (_COMPILER_VERSION >= 721))
#pragma intrinsic (bcopy)
#pragma intrinsic (bzero)
#pragma intrinsic (blkclr)
#endif /* COMPILER_VERSION >= 721 */
#endif /* __INLINE_INTRINSICS */
#ifdef __cplusplus
}
#endif
#endif /* !__BSTRING_H__ */

144
eoe/include/cap_net.h Normal file
View File

@@ -0,0 +1,144 @@
#ifndef __CAP_NET_H__
#define __CAP_NET_H__
#include <sys/types.h>
#include <sys/capability.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <sys/schedctl.h>
#include <sched.h>
#include <sys/time.h>
#include <sys/syssgi.h>
#ifdef __cplusplus
extern "C" {
#endif
#ident "$Revision: 1.7 $"
__inline static int
cap_socket (int domain, int type, int protocol)
{
cap_t ocap;
const cap_value_t cap_network_mgt = CAP_NETWORK_MGT;
int r;
ocap = cap_acquire(1, &cap_network_mgt);
r = socket(domain, type, protocol);
cap_surrender(ocap);
return(r);
}
__inline static int
#if _NO_XOPEN4
cap_setsockopt (int s, int level, int name, const void *optval, int optlen)
#else
cap_setsockopt (int s, int level, int name, const void *optval, size_t optlen)
#endif
{
cap_t ocap;
const cap_value_t cap_network_mgt = CAP_NETWORK_MGT;
int r;
ocap = cap_acquire(1, &cap_network_mgt);
r = setsockopt(s, level, name, optval, optlen);
cap_surrender(ocap);
return(r);
}
__inline static int
cap_bind (int s, const struct sockaddr *name, int namelen)
{
cap_t ocap;
const cap_value_t cap_priv_port = CAP_PRIV_PORT;
int r;
ocap = cap_acquire(1, &cap_priv_port);
r = bind(s, name, namelen);
cap_surrender(ocap);
return(r);
}
__inline static int
cap_network_ioctl (int fd, int request, void *arg)
{
cap_t ocap;
const cap_value_t driver_caps[] = {CAP_NETWORK_MGT, CAP_DEVICE_MGT};
int r;
ocap = cap_acquire(2, driver_caps);
r = ioctl(fd, request, arg);
cap_surrender(ocap);
return (r);
}
__inline static ptrdiff_t
cap_settimetrim (long trim)
{
cap_t ocap;
const cap_value_t cap_time_mgt = CAP_TIME_MGT;
ptrdiff_t r;
ocap = cap_acquire(1, &cap_time_mgt);
r = syssgi(SGI_SETTIMETRIM, trim);
cap_surrender(ocap);
return (r);
}
__inline static ptrdiff_t
cap_schedctl (int cmd, pid_t pid, long val)
{
cap_t ocap;
const cap_value_t cap_sched_mgt = CAP_SCHED_MGT;
ptrdiff_t r;
ocap = cap_acquire(1, &cap_sched_mgt);
r = schedctl(cmd, pid, val);
cap_surrender(ocap);
return(r);
}
__inline static int
cap_sched_setscheduler (pid_t pid, int policy, const struct sched_param *p)
{
cap_t ocap;
const cap_value_t cap_sched_mgt = CAP_SCHED_MGT;
int r;
ocap = cap_acquire(1, &cap_sched_mgt);
r = sched_setscheduler(pid, policy, p);
cap_surrender(ocap);
return(r);
}
__inline static int
cap_adjtime (struct timeval *delta, struct timeval *odelta)
{
cap_t ocap;
const cap_value_t cap_time_mgt = CAP_TIME_MGT;
int r;
ocap = cap_acquire(1, &cap_time_mgt);
r = adjtime(delta, odelta);
cap_surrender(ocap);
return (r);
}
__inline static int
cap_settimeofday (struct timeval *tp, void *tzp)
{
cap_t ocap;
const cap_value_t cap_time_mgt = CAP_TIME_MGT;
int r;
ocap = cap_acquire(1, &cap_time_mgt);
r = settimeofday(tp, tzp);
cap_surrender(ocap);
return (r);
}
#ifdef __cplusplus
}
#endif
#endif /* __CAP_NET_H__ */

39
eoe/include/capability.h Normal file
View File

@@ -0,0 +1,39 @@
#ifndef __CAPABILITY_H__
#define __CAPABILITY_H__
#ifdef __cplusplus
extern "C" {
#endif
#ident "$Revision: 1.2 $"
/*
*
* Copyright 1992, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
#define USER_CAPABILITY "/etc/capability"
struct user_cap {
char *ca_name; /* Name */
char *ca_default; /* Default Capability */
char *ca_allowed; /* Allowed Capability */
};
extern struct user_cap *sgi_getcapabilitybyname (const char *);
extern int sgi_cap_cleared (const struct user_cap *, const char *);
#ifdef __cplusplus
}
#endif
#endif /* !__CAPABILITY_H__ */

70
eoe/include/clearance.h Normal file
View File

@@ -0,0 +1,70 @@
#ifndef __CLEARANCE_H__
#define __CLEARANCE_H__
#ifdef __cplusplus
extern "C" {
#endif
#ident "$Revision: 1.2 $"
/*
*
* Copyright 1992, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
/*
* Default path to clearance database.
*/
#define CLEARANCE "/etc/clearance"
/*
* Return codes from mac_cleared() and related functions.
*/
#define MAC_CLEARED 0 /* user is cleared at requested lbl */
#define MAC_NULL_USER_INFO -1 /* uip argument == 0 */
#define MAC_NULL_REQD_LBL -2 /* label argument == 0 */
#define MAC_BAD_REQD_LBL -3 /* user's requested label is bad */
#define MAC_MSEN_EQUAL -4 /* nobody can login at msen equal */
#define MAC_MINT_EQUAL -5 /* only root can login at mint equal */
#define MAC_BAD_USER_INFO -6 /* clearance field bad label(s) */
#define MAC_NULL_CLEARANCE -7 /* no clearance field */
#define MAC_LBL_TOO_LOW -8 /* lo_u_lbl > requested user label */
#define MAC_LBL_TOO_HIGH -9 /* hi_u_lbl < requested user label */
#define MAC_INCOMPARABLE -10 /* reqd label incomparable to range */
#define MAC_NO_MEM -11 /* no memory available */
#define MAC_BAD_RANGE -12 /* Bad range in clearance field */
#define MAC_LAST_CLEARANCE_ERROR MAC_INCOMPARABLE
struct clearance {
char *cl_name; /* Name */
char *cl_default; /* Default Clearance */
char *cl_allowed; /* Allowed Clearances */
};
struct mac_label;
int mac_cleared (const struct clearance *, const char *);
int mac_clearedlbl (const struct clearance *, struct mac_label *);
int mac_cleared_fl (const struct clearance *, struct mac_label *);
int mac_cleared_pl (const struct clearance *, struct mac_label *);
int mac_cleared_fs (const struct clearance *, const char *);
int mac_cleared_ps (const struct clearance *, const char *);
char *mac_clearance_error (int);
struct clearance *sgi_getclearancebyname (const char *);
#ifdef __cplusplus
}
#endif
#endif /* !__CLEARANCE_H__ */

423
eoe/include/comp.h Normal file
View File

@@ -0,0 +1,423 @@
/*
* Copyright 1996, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
#ifndef __COMP_H__
#define __COMP_H__
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Data compression streams: compression support
*
* NOTE: There is an alternative compression library that
* firsttime users of this library might also want to
* consider, depending on their needs. That's zlib.
*
* As of this writing (June 1996) zlib is part of the
* sources for ImageMagick_freeware, cosmocreate_1.0,
* netscape/plugin-src/RGB_PNGPlug, webmagic_3.0/lib,
* ifl_1.0/src/png and macromedia. Look for zlib.h.
*
* If I had known of zlib earlier, I might not have
* implemented this library version of compress.
*
* -- pj
*/
/*
* Guts of bsd/compress/compress.c, ripped out to form
* a subroutine package usable by applications so that they can
* compress/uncompress without invoking separate executables.
*
* Applications wishing to compress data should:
*
* 1) include this comp.h header file
* 2) define an instance of a COMP_DATA stream (let's call it xxx)
* 3) define memory allocator method: void *xxxmalloc(size_t)
* 4) define corresponding memory free method: void xxxfree(buf)
* 5) define output handler method: ssize_t xxxoutput(buf, buflen)
* 6) define an instance of COMP_OPTIONS options structure: xxxopts
* 7) invoke comp_options_default(&xxxopts) to set default options
* 8) invoke comp_init(&xxx, &xxxmalloc, &xxxfree, &xxxoutput)
* --- main compression loop ---
* 9) explicitly set any non-default options desired in xxxopts
* 10) invoke comp_begin(&xxx, &xxxopts)
* 11) repeatedly invoke comp_compress(&xxx, buf, buflen)
* 12) invoke comp_end(&xxx)
* --- end main loop ---
* 13) it's ok to reuse compress structs for other compressed
* streams, by invoking comp_begin() on them again.
* 14) invoke comp_destroy(&xxx) to free up allocated memory
*
* Expect during above:
* 1) calls to xxxmalloc(size_t) during comp_begin()
* for space that compressor might need
* 2) calls to xxxoutput(buf, buflen) during comp_compress()
* and comp_end(), to emit compressed results.
* 3) calls to xxxfree(buf) during comp_destroy() and comp_begin().
*
* The observant will guess that I also program in C++ ... pj.
*
* To uncompress data, see the matching uncomp.h/uncomp.c files.
*/
#ifndef __compress_types__
#define __compress_types__
typedef int32_t code_int; /* Must hold 2**MAXBITS values, as well as -1 */
typedef int32_t count_int;
typedef unsigned char char_type;
#endif /* !__compress_types__ */
#define COMPRESS_MAGIC_1 ((unsigned char)(0x1F))
#define COMPRESS_MAGIC_2 ((unsigned char)(0x9D))
/*
* compress.c - File compression ala IEEE Computer, June 1984.
*
* Authors: Spencer W. Thomas (decvax!harpo!utah-cs!utah-gr!thomas)
* Jim McKie (decvax!mcvax!jim)
* Steve Davies (decvax!vax135!petsd!peora!srd)
* Ken Turkowski (decvax!decwrl!turtlevax!ken)
* James A. Woods (decvax!ihnp4!ames!jaw)
* Joe Orost (decvax!vax135!petsd!joe)
*/
/*
* Reworked for SGI only as separate linkable routines Dec 1995, by:
* Paul Jackson pj@sgi.com
*
* I removed the code specific to 16 bit and VAX systems, because
* I figured that the increased costs to SGI of maintenance caused by
* the code confusion resulting from this unused code were greater
* than the increased costs of maintenance caused by dropping any
* pretense of supporting small systems, such as 8086's, or special
* VAX bit-field instructions. The insertion and extraction of
* variable length (9 to 16 bit) compression codes has been reoptimized
* for systems that have barrel shifters. The code "should" work on
* on any system with 32 or more bit flat addressing and either endian.
*
* Performance tests suggest that these various optimizations improve
* the system time for compression by over 30% (thanks to bigger reads
* or mmapping by the compress command, when recoded to make use of these
* routines) and the number of application cpu cycles to compress the
* 3 Mb /unix on my system from 546,579,559 to 369,443,157 for an
* reduction of 32.5%.
*
* Decompression performance gains are less, with application cpu
* cycles to decompress the above compressed /unix reduced from
* 304,686,267 to 260,303,793 for a reduction of 14.6%.
*
* Combined average reduction in time to compress and decompress a
* number of medium to large files is about 20% real time and about
* 22-24% user+sys cpu times, where each compression and each
* decompression operation is given equal weight in the average.
*
* In sum, the compressor is about 30% faster and the decompressor is
* about 15% faster, for an average improvement of perhaps 22%.
*/
/*
* Three function typedefs, for the three application provided
* methods to allocate and free memory, and to output the resulting
* compressed data.
*
* The comp_init() method, below, expects one of each of these
* function types to be passed in, for use by this compression stream.
*/
typedef void *(*comp_allocator_t)(size_t);
/*
* Memory allocator method type.
* Should allocate and return pointer to specified number
* of bytes of memory. Or else return 0 if unable to allocate.
* The libc "malloc" method can be used for an instance of this type.
*/
typedef void (*comp_free_t)(void *);
/*
* Memory free method type.
* Should deallocate the pointed to memory, under the assumption
* that this is memory that was provided by the corresponding
* allocator method. If "malloc" is the allocator, then "free"
* can be used for an instance of this type.
*/
typedef ssize_t (*comp_output_t)(void *param, void *buf, size_t buflen);
/*
* Data output method type.
* Should send the described bytes on their merry way.
* The compressor assumes that it can reuse the memory
* that contained these bytes as soon as the output call
* claims to have output them. The output method should
* return a count of the bytes successfully output, or -1
* on error. The compressor stream will repeatedly invoke
* the output method on the remaining bytes in the event
* of a partial output (return value less than entire buffer
* to be output). A simple wrapper to the libc "write"
* method, that provides a file descriptor, can be used
* for an instance of this type. The value of param is
* taken from the application controlled setting of the
* output_param option.
*/
/*
* The following flags and values are provided to enable the
* invoking application to control the detailed behaviour of
* the compressor. Use the method comp_options_default() to
* set all these options to their default value, then explicitly
* modify the options for which some other value is desired, then
* pass in the resulting options as part of the comp_begin() call.
*/
typedef struct comp_options {
/*
* The items in this struct are "public", in the C++ sense.
* The application is invited to know, access and modify these
* items by name.
*/
int block_compress; /* enables restarting codes */
/*
* By default, this is set, allowing the compressor, after all
* codes are used up and compression rate drops, to start all
* over. Set this flag to 0 to disable this feature.
*/
int nomagic; /* Skip 3-byte magic number header? */
/*
* Set the nomagic flag for the specified compression stream. By
* default this flag is 0. Set it to 1 for generate a compressed
* stream that lacks the 2-byte magic number header.
*/
int maxbits; /* user settable max # bits/code */
/*
* Set the maxbits value for the specified compression stream. By
* default this value is MAXBITS. It must be in the range
* [9..MAXBITS].
*/
code_int maxfilesize; /* for dynamic hash table sizing */
/*
* Used to reduce the size of the hash table actually used
* for small files. Defaults to 0, resulting in hnumentries of 69001,
* for 95% occupancy in the MAXBITS == 16 case. Set to an upper
* bound of the number of bytes to be compressed, and if this size
* happens to be in the interval (1, 47000), comp_init() will speed
* things up a bit by initializing only the portion of the hash table
* that will actually be needed.
*/
size_t outbufsize; /* total outbuf[] size to be allocated */
/*
* Set the dynamically allocated output buffer size.
* Defaults to 64 Kb.
*/
void *output_param; /* pass param through to fp_output() */
/*
* To make it easier for an application to have one fp_output()
* method handling multiple compression/decompression streams,
* an application can set this option to point to whatever data
* it wants passed through to the fp_output() method. In the
* simplest case, it might point to a simple int file descriptor,
* telling fp_output() where to write the buffer. Default is 0.
*/
int quiet; /* set by default; comp stats if 0 */
/*
* Set the quiet flag for the specified compression stream. By
* default this flag is 1. Set it to 0 for compression statistics.
*/
int verbose; /* If -DDEBUG, dump debug info */
/*
* Set the verbose flag for the specified compression stream. By
* default this flag is 0. Set it to 1 to dump debugging
* information. Only has affect if comp.c compiled -DDEBUG.
*/
int debug; /* If -DDEBUG, dump more debug info */
/*
* Set the debug flag for the specified compression stream. By
* default this flag is 0. Set it to 1 to dump debugging
* information. Only has affect if comp.c compiled -DDEBUG. Causes
* even more debug information to dump than verbose.
*/
FILE *diagstream; /* debug, stats written here */
/*
* Set the output FILE stream to which -DDEBUG information, and
* if quiet is turned off, compression ratio, is written.
* Defaults to stderr.
*/
} COMP_OPTIONS;
/*
* A data compression stream: the private data.
*/
typedef struct comp_data {
/*
* This entire struct is "private", in the C++ sense.
* Use the methods that are declared below to access
* the member data of this struct.
*/
/* internal compressor state */
int first_compress_call; /* comp_init sets, comp_compress clrs */
int n_bits; /* number of bits/code */
code_int maxcode; /* maximum code, given n_bits */
code_int maxmaxcode; /* should NEVER generate this code */
code_int free_ent; /* first unused entry */
int clear_flg; /* set when clearing hash table */
int ratio; /* track current compression ratio */
__int64_t checkpoint; /* where to check for block compress */
__int64_t in_count; /* length of input */
__int64_t bytes_out; /* length of compressed output */
__int64_t out_count; /* # of codes output (for debugging) */
int hshift; /* hash shift */
code_int ent; /* previous character from input */
int comp_errno; /* set if something fails */
/* application provided methods */
comp_allocator_t fp_allocator; /* application provided malloc() */
comp_free_t fp_free; /* application provided free() */
comp_output_t fp_output; /* application provided fp_output() */
/*
* Accumulate compression codes to be output in codebuf[8] until we have
* eight of them (which will always put us at a byte boundary). Then
* call _comp_output_codebuf() to pack them into outbuf[].
*/
code_int codebuf[8]; /* assemble compressed codes here */
code_int nextcode; /* next empty slot in codebuf[8] */
/* dynamically allocated hash and code tables */
count_int *htab; /* dynamically allocated hash table */
code_int hnumentries; /* number htab[] entries allocated */
code_int hnumentlast; /* previous value of hnumentries */
code_int htabsize; /* total htab[] size allocated */
unsigned short *codetab; /* dynamically allocated code table */
code_int codetabsize; /* total codetab[] size allocated */
/* comp_compress() buffers output here until calling the fp_output() method */
unsigned char *outbuf; /* dynamically allocated output buf */
long outbufcnt; /* number available chars in buffer */
long outbuflast; /* previous value of outbufsize */
unsigned char *outbufptr; /* next char goes here in buffer */
/* application controlled option flags */
COMP_OPTIONS options; /* copy of comp_init() provided opts */
} COMP_DATA;
/*
* The following methods are provided for use on compression streams.
* Each method takes an explicit pointer to a COMP_DATA stream as its
* first parameter, rather like the implied "this" pointer in C++.
*/
void comp_options_default(COMP_OPTIONS *);
/*
* Initialize a COMP_OPTIONS structure to the standard default values.
* Use this function before calling comp_init().
*/
void comp_init(COMP_DATA *, comp_allocator_t, comp_free_t, comp_output_t);
/*
* Initialize (or reinitialize) a COMP_DATA structure, including setting
* the function pointers for the allocator, free and output methods
* to the passed in values.
*/
int comp_begin(COMP_DATA *, COMP_OPTIONS *);
/*
* Call before each compression to re-initialize the COMP_DATA
* structure, resetting the COMP_OPTIONS.
* returns 0 on success, -1 on failure.
* Can fail if invocations of allocator fail during initialization.
* The allocator will be called during comp_begin().
* The free might be called during subsequent comp_destroy()
* or comp_begin() invocations.
* The output might be called during subsequent comp_compress() or
* comp_end() invocations.
*/
int comp_compress (COMP_DATA *, const unsigned char *buf, long buflen);
/*
* Provide some more data at location buf, length buflen,
* to be compressed by the specified compression stream. Returns 0
* if reaches end of provided input without error, else -1.
*/
int comp_end (COMP_DATA *);
/*
* Notify compression stream that input data has ended.
* Should cause stream to compress and output any remaining
* data still in its buffers. Return 0 on success, -1 on failure
* and -2 if success (no errors) but no compression savings.
* Can fail on internal error checking or if an invocation of
* the output method returns -1.
*/
void comp_destroy (COMP_DATA *);
/*
* Destroy specified compression stream. Primary consequence
* is to invoke the previously provided free method to free
* up any internally allocated buffer space.
*/
int comp_geterrno (COMP_DATA *);
/*
* Return value of last internal error number.
* Error code -1 means that a call to an application provided
* malloc, free or output method failed (as defined above).
* Error code 0 means no error has been observed.
*/
void comp_clrerrno (COMP_DATA *);
/*
* Clear (set to 0) the last internal error number for this stream.
* Calls to comp_compress() return with no work done if this error
* number is currently not zero.
*/
void comp_dump_tab (COMP_DATA *);
/*
* Dump the dictionary. No-op unless comp.c compiled -DDEBUG.
*/
#ifdef __cplusplus
}
#endif
#endif /* !__COMP_H__ */

128
eoe/include/core.out.h Normal file
View File

@@ -0,0 +1,128 @@
#ifndef __CORE_OUT_H__
#define __CORE_OUT_H__
#ifdef __cplusplus
extern "C" {
#endif
/**************************************************************************
* *
* Copyright (C) 1986,1989 Silicon Graphics, Inc. *
* *
* These coded instructions, statements, and computer programs contain *
* unpublished proprietary information of Silicon Graphics, Inc., and *
* are protected by Federal copyright law. They may not be disclosed *
* to third parties or copied or duplicated in any form, in whole or *
* in part, without the prior written consent of Silicon Graphics, Inc. *
* *
**************************************************************************/
#ident "$Revision: 1.15 $"
#include <sgidefs.h>
#include <sys/types.h>
/*
* Core file format
*
* The coreout struct lives at offset 0 in the core file.
*/
#define CORE_NIDESC 32 /* max # of info descriptors */
#define CORE_NAMESIZE 80 /* maximum process name length */
#define CORE_ARGSIZE 80 /* maximum process arguments length */
struct coreout {
int c_magic; /* core magic number */
int c_version; /* corefile version # */
unsigned c_vmapoffset; /* byte offset to start of vmaps */
int c_nvmap; /* # of vmaps */
char c_name[CORE_NAMESIZE];
/* name of process (as in ps) */
char c_args[CORE_ARGSIZE];
/* process arguments (as in ps) */
int c_sigcause; /* signal that caused dump */
struct idesc {
unsigned i_offset; /* byte offset to descriptor */
unsigned i_len; /* descriptor length in bytes */
unsigned i_flags; /* flags */
} c_idesc[CORE_NIDESC]; /* information descriptors */
};
#define CORE_MAGIC 0xdeadadb0
#define CORE_MAGIC64 0xdeadad40
#define CORE_MAGICN32 0xbabec0bb
#define CORE_VERSION1 1
/* map of a virtual space in a process */
struct vmap {
unsigned v_vaddr; /* virtual address */
unsigned v_len; /* length in bytes */
unsigned v_offset; /* offset in bytes from start of file */
ushort_t v_flags; /* flags */
ushort_t v_type; /* type of space */
};
/* vmap for core files from 64 bit processes */
struct vmap64 {
__uint64_t v_vaddr; /* virtual address */
__uint64_t v_len; /* length in bytes */
__uint64_t v_offset; /* offset in bytes from start of file */
ushort_t v_flags; /* flags */
ushort_t v_type; /* type of space */
};
/* v_flags */
#define VDUMPED 0x1 /* space was dumped in core file */
#define VPARTIAL 0x2 /* 1st 4096 bytes of text regions,
* to get elf program headers */
/* v_type */
#define VTEXT 1 /* space is text */
#define VDATA 2 /* space is data/bss space */
#define VSTACK 3 /* space is stack */
#define VSHMEM 4 /* space is shared mem */
#define VLIBTEXT 5 /* space is shd lib text (OBSOLETE) */
#define VLIBDATA 6 /* space is shd lib data (OBSOLETE) */
#define VGRAPHICS 7 /* space is graphics hardware */
#define VMAPFILE 8 /* space is memory mapped file */
#define VPHYS 9 /* space maps physical I/O space */
struct core_thread_data {
__uint64_t thrd_offset; /* offset to secondary thread data */
uint_t nthreads; /* number of secondary threads */
uint_t desc_offset[CORE_NIDESC]; /* desc offsets within thrd data */
uint_t prda_offset; /* prda offset within thrd data */
uint_t prda_len; /* prda length */
};
#define CORE_OUT_H_REV 1 /* -tcl (see os/sig.c) */
/* i_flags values */
#define IVALID 0x1 /* descriptor is valid */
/* indexes into idesc array */
#define I_GPREGS 0 /* 32 general purpose registers */
#define I_FPREGS 1 /* 32 floating point registers */
#define I_SPECREGS 2 /* special purpose control registers
* int EPC, CAUSE, BADVADDR, MDHI, MDLO
* int fpcsr, fpeir
*/
#define I_SIGHANDLER 3 /* signal handlers
* int *signal[MAXSIG]
*/
#define I_EXDATA 4 /* exec data
* int tsize, dsize, bsize
*/
#define I_THREADDATA 5 /* data for secondary (non-faulting)
* threads
*/
#ifdef __cplusplus
}
#endif
#endif /* !__CORE_OUT_H__ */

62
eoe/include/cpio.h Normal file
View File

@@ -0,0 +1,62 @@
#ifndef __CPIO_H__
#define __CPIO_H__
#ifdef __cplusplus
extern "C" {
#endif
#ident "$Revision: 1.3 $"
/*
*
* Copyright 1992, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
/* Copyright (c) 1988 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
/* The following are values used by c_mode field of the cpio archive.
*/
#define C_IRUSR 0000400
#define C_IWUSR 0000200
#define C_IXUSR 0000100
#define C_IRGRP 0000040
#define C_IWGRP 0000020
#define C_IXGRP 0000010
#define C_IROTH 0000004
#define C_IWOTH 0000002
#define C_IXOTH 0000001
#define C_ISUID 0004000
#define C_ISGID 0002000
#define C_ISVTX 0001000
#define C_ISDIR 0040000
#define C_ISFIFO 0010000
#define C_ISREG 0100000
#define C_ISBLK 0060000
#define C_ISCHR 0020000
#define C_ISCTG 0110000
#define C_ISLNK 0120000
#define C_ISSOCK 0140000
#define MAGIC "070707"
#ifdef __cplusplus
}
#endif
#endif /* !__CPIO_H__ */

52
eoe/include/cr1.h Normal file
View File

@@ -0,0 +1,52 @@
#ifndef __CR1_H__
#define __CR1_H__
#ifdef __cplusplus
extern "C" {
#endif
#ident "$Revision: 1.3 $"
/*
*
* Copyright 1992, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */
/* Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
/* UNIX System Laboratories, Inc. */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
/* Copyright (c) 1989 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ident "@(#)head.usr:cr1.h 1.1"
/*
* CR1 function prototype(s)
*/
char *getkey(char *, char *, char*); /* get key from daemon */
#ifdef __cplusplus
}
#endif
#endif /* !__CR1_H__ */

66
eoe/include/crypt.h Normal file
View File

@@ -0,0 +1,66 @@
#ifndef __CRYPT_H__
#define __CRYPT_H__
#ifdef __cplusplus
extern "C" {
#endif
#ident "$Revision: 1.5 $"
/*
*
* Copyright 1992, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
/* Copyright (c) 1988 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
/* Password and file encryption functions */
extern char *crypt(const char *, const char *);
extern int crypt_close(int *);
extern char *des_crypt(const char *, const char *);
extern void des_encrypt(char *, int);
extern void des_setkey(const char *);
extern void encrypt(char *, int);
extern int run_crypt(long, char *, unsigned, int *);
extern int run_setkey(int *, const char *);
extern void setkey(const char *);
extern void enigma_setkey(const char *);
extern void enigma_encrypt(char *, int);
extern void cryptbuf(char *, unsigned int, char *, char *, int);
#define X_ENCRYPT 0
#define X_DECRYPT 01
#define X_ECB 0
#define X_CBC 010
#define X_OFM 020
#define X_CFB 040
#define X_MODES 070
#define X_DES 0000
#define X_ENIGMA 0100
#define X_ALGORITHM 0700
#ifdef __cplusplus
}
#endif
#endif /* !__CRYPT_H__ */

49
eoe/include/cs.h Normal file
View File

@@ -0,0 +1,49 @@
#ifndef __CS_H__
#define __CS_H__
#ifdef __cplusplus
extern "C" {
#endif
#ident "$Revision: 1.3 $"
/*
*
* Copyright 1992, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */
/* Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
/* UNIX System Laboratories, Inc. */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ident "@(#)head.usr:cs.h 1.1.1.1"
struct csopts {
struct netconfig *nc_p;
int nd_opt;
struct netbuf *nb_p;
};
int
cs_connect(char *, char *, struct csopts *, int *);
void
cs_perror(char *, int);
#ifdef __cplusplus
}
#endif
#endif /* !__CS_H__ */

148
eoe/include/ctype.h Normal file
View File

@@ -0,0 +1,148 @@
#ifndef __CTYPE_H__
#define __CTYPE_H__
#ifdef __cplusplus
extern "C" {
#endif
#ident "$Revision: 1.29 $"
/*
*
* Copyright 1992, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
/* Copyright (c) 1988 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
/*
* Note - this is an ANSI and XPG4 header file - In ANSI mode only
* ANSI symbols are permitted!
*/
#include <standards.h>
#define _U 0x00000001 /* Upper case */
#define _L 0x00000002 /* Lower case */
#define _N 0x00000004 /* Numeral (digit) */
#define _S 0x00000008 /* Spacing character */
#define _P 0x00000010 /* Punctuation */
#define _C 0x00000020 /* Control character */
#define _B 0x00000040 /* Obsolete: was to designate the space character only */
#define _X 0x00000080 /* heXadecimal digit */
#define _A 0x00004000 /* Alphabetical characters only */
#define _PR 0x00008000 /* Printable characters only */
#define _G 0x40000000 /* Graphic characters only */
#define _BL 0x80000000 /* The blank character class */
#define _ISalpha (_U | _L | _A)
#define _ISupper (_U)
#define _ISlower (_L)
#define _ISdigit (_N)
#define _ISxdigit (_X)
#define _ISalnum (_U | _L | _A | _N)
#define _ISspace (_S | _BL)
#define _ISblank (_BL)
#define _ISpunct (_P)
#define _ISprint (_P | _U | _L | _N | _A | _X | _PR)
#define _ISgraph (_P | _U | _L | _N | _A | _X | _G)
#define _IScntrl (_C)
extern int isalnum(int);
extern int isalpha(int);
extern int iscntrl(int);
extern int isdigit(int);
extern int isgraph(int);
extern int islower(int);
extern int isprint(int);
extern int ispunct(int);
extern int isspace(int);
extern int __isblank(int);
extern int isupper(int);
extern int isxdigit(int);
extern int tolower(int);
extern int toupper(int);
/* ANSI permits anything that starts with a 'is' or 'to' */
extern int isascii(int);
extern int toascii(int);
#if _XOPEN4 && _NO_ANSIMODE
extern int _tolower(int);
extern int _toupper(int);
#endif
#ifndef _KERNEL
#include <locale_attr.h>
#ifndef _LINT
#define isalpha(c) ((__libc_attr._ctype_tbl->_class+1)[c] & _ISalpha)
#define isupper(c) ((__libc_attr._ctype_tbl->_class+1)[c] & _ISupper)
#define islower(c) ((__libc_attr._ctype_tbl->_class+1)[c] & _ISlower)
#define isdigit(c) ((__libc_attr._ctype_tbl->_class+1)[c] & _ISdigit)
#define isxdigit(c) ((__libc_attr._ctype_tbl->_class+1)[c] & _ISxdigit)
#define isalnum(c) ((__libc_attr._ctype_tbl->_class+1)[c] & _ISalnum)
#define isspace(c) ((__libc_attr._ctype_tbl->_class+1)[c] & _ISspace)
#define __isblank(c) ((__libc_attr._ctype_tbl->_class+1)[c] & _ISblank)
#define ispunct(c) ((__libc_attr._ctype_tbl->_class+1)[c] & _ISpunct)
#define isprint(c) ((__libc_attr._ctype_tbl->_class+1)[c] & _ISprint)
#define isgraph(c) ((__libc_attr._ctype_tbl->_class+1)[c] & _ISgraph)
#define iscntrl(c) ((__libc_attr._ctype_tbl->_class+1)[c] & _IScntrl)
#define isascii(c) (!((c) & ~0177))
#define toascii(c) ((c) & 0177)
#if _XOPEN4 && _NO_ANSIMODE
#define _toupper(c) ((__libc_attr._ctype_tbl->_upper+1)[c])
#define _tolower(c) ((__libc_attr._ctype_tbl->_lower+1)[c])
#endif
#endif /* lint */
#else /* _KERNEL */
extern unsigned char __ctype[];
#ifndef _LINT
#define isalpha(c) ((__ctype +1)[c] & _ISalpha)
#define isupper(c) ((__ctype +1)[c] & _ISupper)
#define islower(c) ((__ctype +1)[c] & _ISlower)
#define isdigit(c) ((__ctype +1)[c] & _ISdigit)
#define isxdigit(c) ((__ctype +1)[c] & _ISxdigit)
#define isalnum(c) ((__ctype +1)[c] & _ISalnum)
#define isspace(c) ((__ctype +1)[c] & _ISspace)
#define __isblank(c) ((__ctype +1)[c] & _ISblank)
#define ispunct(c) ((__ctype +1)[c] & _ISpunct)
#define isprint(c) ((__ctype +1)[c] & (_ISprint | _B))
#define isgraph(c) ((__ctype +1)[c] & _ISgraph)
#define iscntrl(c) ((__ctype +1)[c] & _IScntrl)
#define isascii(c) (!((c) & ~0177))
#define toascii(c) ((c) & 0177)
#if _XOPEN4 && _NO_ANSIMODE
#define _toupper(c) ((__ctype + 258)[c])
#define _tolower(c) ((__ctype + 258)[c])
#endif
#endif /* lint */
#endif
#ifdef __cplusplus
}
#endif
#endif /* !__CTYPE_H__ */

168
eoe/include/dbm.h Normal file
View File

@@ -0,0 +1,168 @@
#ifndef __DBM_H__
#define __DBM_H__
#ifdef __cplusplus
extern "C" {
#endif
#ident "$Revision: 1.11 $"
/*
*
* Copyright 1992, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
/*
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* @(#)dbm.h 5.2 (Berkeley) 85/06/26
*/
#include <standards.h>
#ifndef NULL
/*
* this is lunacy, we no longer use it (and never should have
* unconditionally defined it), but, this whole file is for
* backwards compatability - someone may rely on this.
*/
#define NULL ((char *) 0L)
#endif
#include "ndbm.h"
int dbminit(const char *);
void dbmclose(void);
#if _SGIAPI
int dbminit64(const char *);
void dbmclose64(void);
#endif
/*
* NOTE: Application software should NOT program to the _XXX interfaces.
*/
datum _fetch(datum);
int _store(datum, datum);
int _delete(datum);
datum _firstkey(void);
datum _nextkey(datum);
#if _SGIAPI
datum _fetch64(datum);
int _store64(datum, datum);
int _delete64(datum);
datum _firstkey64(void);
datum _nextkey64(datum);
#endif /* _SGIAPI */
#ifndef _DBM_INTERNAL
#if (_MIPS_SIM != _MIPS_SIM_ABI64)
datum fetch(datum);
int store(datum, datum);
int delete(datum);
datum firstkey(void);
datum nextkey(datum);
#if _SGIAPI
datum fetch64(datum);
int store64(datum, datum);
int delete64(datum);
datum firstkey64(void);
datum nextkey64(datum);
#endif /* _SGIAPI */
#else /* (_MIPS_SIM != _MIPS_SIM_ABI64) */
/*REFERENCED*/
static datum
fetch(datum key)
{
return _fetch(key);
}
/*REFERENCED*/
static int
store(datum key, datum dat)
{
return _store(key, dat);
}
/*REFERENCED*/
static int
delete(datum key)
{
return _delete(key);
}
/*REFERENCED*/
static datum
firstkey(void)
{
return _firstkey();
}
/*REFERENCED*/
static datum
nextkey(datum key)
{
return _nextkey(key);
}
#if _SGIAPI
/*REFERENCED*/
static datum
fetch64(datum key)
{
return _fetch64(key);
}
/*REFERENCED*/
static int
store64(datum key, datum dat)
{
return _store64(key, dat);
}
/*REFERENCED*/
static int
delete64(datum key)
{
return _delete64(key);
}
/*REFERENCED*/
static datum
firstkey64(void)
{
return _firstkey64();
}
/*REFERENCED*/
static datum
nextkey64(datum key)
{
return _nextkey64(key);
}
#endif /* _SGIAPI */
#endif /* (_MIPS_SIM != _MIPS_SIM_ABI64) */
#endif /* _DBM_INTERNAL */
#ifdef __cplusplus
}
#endif
#endif /* !__DBM_H__ */

79
eoe/include/deflt.h Normal file
View File

@@ -0,0 +1,79 @@
#ifndef __DEFLT_H__
#define __DEFLT_H__
#ifdef __cplusplus
extern "C" {
#endif
#ident "$Revision: 1.5 $"
/*
*
* Copyright 1992, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
/* Copyright (c) 1987, 1988 Microsoft Corporation */
/* All Rights Reserved */
/* This Module contains Proprietary Information of Microsoft */
/* Corporation and should be treated as Confidential. */
/*
* @(#) deflt.h 1.1 86/10/07
*/
/*** deflt.h -- include file for deflt(3).
*
*/
#define DEFLT "/etc/default"
/*
* Following for defcntl(3).
* If you add new args, make sure that the default is:
* OFF new-improved-feature-off, i.e. current state of affairs
* ON new-improved-feature-on
* or that you change the code for deflt(3) to have the old value as the
* default. (for compatibility).
*/
/* ... cmds */
#define DC_GETFLAGS 0 /* get current flags */
#define DC_SETFLAGS 1 /* set flags */
/* ... args */
#define DC_CASE 0001 /* ON: respect case; OFF: ignore case */
#define DC_STD ((0) | (DC_CASE))
#define TURNON(flags, mask) flags |= mask
#define TURNOFF(flags, mask) flags &= ~(mask)
#define ISON(flags, mask) (((flags) & (mask)) == (mask))
#define ISOFF(flags, mask) (((flags) & (mask)) != (mask))
#define DEF_WRITE 0
#define DEF_DEL 1
extern FILE *defopen(char * );
extern char *defread(FILE *ptr, char *defname);
extern int defclose(FILE * );
#ifdef __cplusplus
}
#endif
#endif /* !__DEFLT_H__ */

16
eoe/include/des/Makefile Normal file
View File

@@ -0,0 +1,16 @@
#
# Makefile for rpc header file installation.
#
include $(ROOT)/usr/include/make/commondefs
PRIVATE_HFILES= \
des.h desdata.h softdes.h
HPUT= $(INSTALL) -m 444 -F /usr/include/des
default: install
include $(COMMONRULES)
install:
$(HPUT) -idb "noship" $(PRIVATE_HFILES)

106
eoe/include/des/des.h Normal file
View File

@@ -0,0 +1,106 @@
#ifndef __DES_DES_H__
#define __DES_DES_H__
#ifdef __cplusplus
extern "C" {
#endif
#ident "$Revision: 1.3 $"
/*
*
* Copyright 1992, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */
/* Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
/* UNIX System Laboratories, Inc. */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ident "@(#)uts-comm:net/des/des.h 1.3"
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
* PROPRIETARY NOTICE (Combined)
*
* This source code is unpublished proprietary information
* constituting, or derived under license from AT&T's UNIX(r) System V.
* In addition, portions of such source code were derived from Berkeley
* 4.3 BSD under license from the Regents of the University of
* California.
*
*
*
* Copyright Notice
*
* Notice of copyright on this source code product does not indicate
* publication.
*
* (c) 1986,1987,1988,1989 Sun Microsystems, Inc
* (c) 1983,1984,1985,1986,1987,1988,1989 AT&T.
* All rights reserved.
*/
/*
* Generic DES driver interface
* Keep this file hardware independent!
*/
#ifdef _KERNEL
#ifndef _UTIL_TYPES_H
#include <util/types.h> /* REQUIRED */
#endif
#endif /* _KERNEL */
#define DES_MAXLEN 65536 /* maximum # of bytes to encrypt */
#define DES_QUICKLEN 16 /* maximum # of bytes to encrypt quickly */
enum desdir { ENCRYPT, DECRYPT };
enum desmode { CBC, ECB };
/*
* parameters to ioctl call
*/
struct desparams {
u_char des_key[8]; /* key (with low bit parity) */
enum desdir des_dir; /* direction */
enum desmode des_mode; /* mode */
u_char des_ivec[8]; /* input vector */
unsigned des_len; /* number of bytes to crypt */
union {
u_char UDES_data[DES_QUICKLEN];
u_char *UDES_buf;
} UDES;
# define des_data UDES.UDES_data /* direct data here if quick */
# define des_buf UDES.UDES_buf /* otherwise, pointer to data */
};
/*
* Encrypt an arbitrary sized buffer
*/
#define DESIOCBLOCK _IOWR('d', 6, struct desparams)
/*
* Encrypt of small amount of data, quickly
*/
#define DESIOCQUICK _IOWR('d', 7, struct desparams)
#ifdef __cplusplus
}
#endif
#endif /* !__DES_DES_H__ */

1108
eoe/include/des/desdata.h Normal file

File diff suppressed because it is too large Load Diff

131
eoe/include/des/softdes.h Normal file
View File

@@ -0,0 +1,131 @@
#ifndef __DES_SOFTDES_H__
#define __DES_SOFTDES_H__
#ifdef __cplusplus
extern "C" {
#endif
#ident "$Revision: 1.3 $"
/*
*
* Copyright 1992, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */
/* Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
/* UNIX System Laboratories, Inc. */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ident "@(#)uts-comm:net/des/softdes.h 1.3"
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
* PROPRIETARY NOTICE (Combined)
*
* This source code is unpublished proprietary information
* constituting, or derived under license from AT&T's UNIX(r) System V.
* In addition, portions of such source code were derived from Berkeley
* 4.3 BSD under license from the Regents of the University of
* California.
*
*
*
* Copyright Notice
*
* Notice of copyright on this source code product does not indicate
* publication.
*
* (c) 1986,1987,1988,1989 Sun Microsystems, Inc
* (c) 1983,1984,1985,1986,1987,1988,1989 AT&T.
* All rights reserved.
*/
/*
* softdes.h, Data types and definition for software DES
*/
#ifdef _KERNEL
#ifndef _UTIL_TYPES_H
#include <util/types.h> /* REQUIRED */
#endif
#endif /* _KERNEL */
/*
* A chunk is an area of storage used in three different ways
* - As a 64 bit quantity (in high endian notation)
* - As a 48 bit quantity (6 low order bits per byte)
* - As a 32 bit quantity (first 4 bytes)
*/
typedef union {
struct {
#if defined(vax) || defined(i386)
u_long _long1;
u_long _long0;
#else
u_long _long0;
u_long _long1;
#endif
} _longs;
#define long0 _longs._long0
#define long1 _longs._long1
struct {
#if defined(vax) || defined(i386)
u_char _byte7;
u_char _byte6;
u_char _byte5;
u_char _byte4;
u_char _byte3;
u_char _byte2;
u_char _byte1;
u_char _byte0;
#else
u_char _byte0;
u_char _byte1;
u_char _byte2;
u_char _byte3;
u_char _byte4;
u_char _byte5;
u_char _byte6;
u_char _byte7;
#endif
} _bytes;
#define byte0 _bytes._byte0
#define byte1 _bytes._byte1
#define byte2 _bytes._byte2
#define byte3 _bytes._byte3
#define byte4 _bytes._byte4
#define byte5 _bytes._byte5
#define byte6 _bytes._byte6
#define byte7 _bytes._byte7
} chunk_t;
/*
* Intermediate key storage
* Created by des_setkey, used by des_encrypt and des_decrypt
* 16 48 bit values
*/
struct deskeydata {
chunk_t keyval[16];
};
#ifdef __cplusplus
}
#endif
#endif /* !__DES_SOFTDES_H__ */

91
eoe/include/devconvert.h Normal file
View File

@@ -0,0 +1,91 @@
#ifndef __DEVCONVERT_H__
#define __DEVCONVERT_H__
#ifdef __cplusplus
extern "C" {
#endif
/**************************************************************************
* *
* Copyright (C) 1996, Silicon Graphics, Inc. *
* *
* These coded instructions, statements, and computer programs contain *
* unpublished proprietary information of Silicon Graphics, Inc., and *
* are protected by Federal copyright law. They may not be disclosed *
* to third parties or copied or duplicated in any form, in whole or *
* in part, without the prior written consent of Silicon Graphics, Inc. *
* *
**************************************************************************/
#ident "irix/include/devconvert.h $Revision: 1.1 $"
/* routines to convert among device files referring to
* the same device.
*/
/* includes */
#include <sys/types.h>
typedef int dv_bool;
const dv_bool dv_true = 1, dv_false = 0;
char *dev_to_scsiname(dev_t dev_in, char *scsiname_out, int *length_inout);
char *fdes_to_scsiname(int fdes_in, char *scsiname_out, int *length_inout);
char *filename_to_scsiname(const char *filename_in,
char *scsiname_out, int *length_inout);
char *dev_to_diskname(dev_t dev_in,
dv_bool raw_in, int partno_in,
char *diskname_out, int *length_inout);
char *fdes_to_diskname(int fdes_in,
dv_bool raw_in, int partno_in,
char *diskname_out, int *length_inout);
char *filename_to_diskname(const char *filename_in,
dv_bool raw_in, int partno_in,
char *diskname_out, int *length_inout);
char *dev_to_tapename(dev_t dev_in,
dv_bool raw_in, dv_bool rewind_in, dv_bool byteswap_in,
dv_bool var_bsize_in, int density_in, dv_bool compression_in,
char *tapename_out, int *length_inout);
char *fdes_to_tapename(int fdes_in,
dv_bool raw_in, dv_bool rewind_in, dv_bool byteswap_in,
dv_bool var_bsize_in, int density_in,
dv_bool compression_in,
char *tapename_out, int *length_inout);
char *filename_to_tapename(const char *filename_in,
dv_bool raw_in, dv_bool rewind_in, dv_bool byteswap_in,
dv_bool var_bsize_in, int density_in,
dv_bool compression_in,
char *tapename_out, int *length_inout);
/* For floppies, diameter is either 525 for 5 1/4" or 350 for 3 1/2".
* Capacity is in kbytes. The valid combinations are:
*
* Diameter Capacity Old Name
*
* 525 360 fdsXdY.48
* 525 720 fdsXdY.96
* 525 1200 fdsXdY.96hi
* 350 720 fdsXdY.3.5
* 350 1440 fdsXdY.3.5hi
* 350 20331 fdsXdY.3.5.20m
*
* Or, you may specify diameter and capacity of 0 to get a default
* device.
*/
char *dev_to_floppyname(dev_t dev_in,
int diameter, int capacity,
char *floppyname_out, int *length_inout);
char *fdes_to_floppyname(int fdes_in,
int diameter, int capacity,
char *floppyname_out, int *length_inout);
char *filename_to_floppyname(const char *filename_in,
int diameter, int capacity,
char *floppyname_out, int *length_inout);
#ifdef __cplusplus
}
#endif
#endif /* !__DEVCONVERT_H__ */

344
eoe/include/devmgmt.h Normal file
View File

@@ -0,0 +1,344 @@
#ifndef __DEVMGMT_H__
#define __DEVMGMT_H__
#ifdef __cplusplus
extern "C" {
#endif
#ident "$Revision: 1.6 $"
/*
*
* Copyright 1992, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */
/* Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
/* UNIX System Laboratories, Inc. */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ifndef __SVR4_1__ /* svr4 flavor */
/*
* devmgmt.h
*
* Contents:
* - Device Management definitions,
* - getvol() definitions
*/
/*
* Device management definitions
* - Default pathnames (relative to installation point)
* - Environment variable namess
* - Standard field names in the device table
* - Flags
* - Miscellaneous definitions
*/
/*
* Default pathnames (relative to the package installation
* point) to the files used by Device Management:
*
* DTAB_PATH Device table
* DGRP_PATH Device group table
* DVLK_PATH Device reservation table
*/
#define DTAB_PATH "/etc/device.tab"
#define DGRP_PATH "/etc/dgroup.tab"
#define DVLK_PATH "/etc/devlkfile"
/*
* Names of environment variables
*
* OAM_DEVTAB Name of variable that defines the pathname to
* the device-table file
* OAM_DGROUP Name of variable that defines the pathname to
* the device-group table file
* OAM_DEVLKTAB Name of variable that defines the pathname to
* the device-reservation table file
*/
#define OAM_DEVTAB "OAM_DEVTAB"
#define OAM_DGROUP "OAM_DGROUP"
#define OAM_DEVLKTAB "OAM_DEVLKTAB"
/*
* Standard field names in the device table
*/
#define DTAB_ALIAS "alias"
#define DTAB_CDEVICE "cdevice"
#define DTAB_BDEVICE "bdevice"
#define DTAB_PATHNAME "pathname"
/*
* Flags:
* For getdev() and getdgrp():
* DTAB_ANDCRITERIA Devices must meet all criteria
* instead of any of the criteria
* DTAB_EXCLUDEFLAG The list of devices or device groups
* is the list that is to be excluded,
* not those to select from.
* DTAB_LISTALL List all device groups, even those that
* have no valid members (getdgrp() only).
*/
#define DTAB_ANDCRITERIA 0x01
#define DTAB_EXCLUDEFLAG 0x02
#define DTAB_LISTALL 0x04
/*
* Miscellaneous Definitions
*
* DTAB_MXALIASLN Maximum alias length
*/
#define DTAB_MXALIASLN 14
/*
* Device Management Structure definitions
* reservdev Reserved device description
*/
/*
* struct reservdev
*
* Structure describes a reserved device.
*
* Elements:
* char *devname Alias of the reserved device
* pid_t key Key used to reserve the device
*/
struct reservdev{
char *devname;
pid_t key;
};
/*
* Device Management Functions:
*
* devattr() Returns a device's attribute
* devreserv() Reserves a device
* devfree() Frees a reserved device
* reservdev() Return list of reserved devices
* getdev() Get devices that match criteria
* getdgrp() Get device-groups containing devices
* that match criteria
* listdev() List attributes defined for a device
* listdgrp() List members of a device-group
*/
char *devattr(char *, char *);
int devfree(long, char *);
char **devreserv(long, char **[]);
char **getdev(char **, char **, int);
char **getdgrp(char **, char **, int);
char **listdev(char *);
char **listdgrp(char *);
struct reservdev **reservdev(void);
/*
* getvol() definitions
*/
#define DM_BATCH 0x0001
#define DM_ELABEL 0x0002
#define DM_FORMAT 0x0004
#define DM_FORMFS 0x0008
#define DM_WLABEL 0x0010
#define DM_OLABEL 0x0020
int getvol(char *, char *, int, char *);
#else /* __SVR4_1__ */ /* svr4.1 flavor */
#include <sys/types.h>
/*
* devmgmt.h
*
* Contents:
* - Device Management definitions,
* - getvol() definitions
*/
/*
* Device Management Definitions:
* - Default pathnames of Device Management data files
* - Device attribute names & valid values in Device Database
* - Flags
* - Miscellaneous definitions
*/
/*
* Default pathnames of Device Management data files:
*/
/*
* Device Database files (DDB files):
* - DDB_TAB = DTAB_PATH OAM attributes of devices
* - DDB_DSFMAP DSF mapping to devices
*/
#define DTAB_PATH "/etc/device.tab"
#define DDB_TAB DTAB_PATH
#define DDB_DSFMAP "/etc/security/ddb/ddb_dsfmap"
/*
* Old (saved copy) of Device Database files
* - ODDB_TAB OAM attributes of devices
* - ODDB_DSFMAP DSF mapping to devices
*/
#define ODDB_TAB "/etc/Odevice.tab"
#define ODDB_DSFMAP "/etc/security/ddb/Oddb_dsfmap"
/*
* Other Device Management files:
* - DGRP_PATH Device group table
* - DVLK_PATH Device reservation table
*/
#define DGRP_PATH "/etc/dgroup.tab"
#define DVLK_PATH "/etc/devlkfile"
/*
* Names of environment variables
*
* OAM_DGROUP Name of variable that defines the pathname to
* the device-group table file
* OAM_DEVLKTAB Name of variable that defines the pathname to
* the device-reservation table file
*/
#define OAM_DGROUP "OAM_DGROUP"
#define OAM_DEVLKTAB "OAM_DEVLKTAB"
/*
* Standard device attribute names in Device Database(DDB)
*/
/* Security attributes of devices */
#define DDB_ALIAS "alias"
/* device special file attributes of devices */
#define DDB_CDEVICE "cdevice"
#define DDB_BDEVICE "bdevice"
#define DDB_CDEVLIST "cdevlist"
#define DDB_BDEVLIST "bdevlist"
/* OA&M attributes of devices */
#define DTAB_ALIAS DDB_ALIAS
#define DDB_PATHNAME "pathname"
/* any other OA&M attrs defined here */
/*
* Device types: defines the type of device being allocated.
* DEV_DSF specified device special file(dsf) allocated
* DEV_ALIAS all dsfs mapped to logical device alias allocated
*/
#define DEV_DSF 1
#define DEV_ALIAS 2
#
/*
* Flags:
* For getdev() and getdgrp():
* DTAB_ANDCRITERIA Devices must meet all criteria
* instead of any of the criteria
* DTAB_EXCLUDEFLAG The list of devices or device groups
* is the list that is to be excluded,
* not those to select from.
* DTAB_LISTALL List all device groups, even those that
* have no valid members (getdgrp() only).
*/
#define DTAB_ANDCRITERIA 0x01
#define DTAB_EXCLUDEFLAG 0x02
#define DTAB_LISTALL 0x04
/*
* Miscellaneous Definitions
*
* DDB_MAXALIAS Maximum alias length
* DDB_MAGICLEN length of magic number in DDB files
*/
#define DDB_MAXALIAS 64 + 1 /* +1 for '\0' to end the string */
#define DDB_MAGICLEN 35
#define MAGICTOK "MAGIC%NO"
#define DTAB_MXALIASLN DDB_MAXALIAS
/*
* Device Management Structure definitions
* reservdev Reserved device description
*/
struct reservdev{
char *devname; /* Alias of the reserved device */
pid_t key; /* Key used to reserve the device */
};
/*
* Device Management Functions:
*
* devattr() Returns a device's attribute
* devreserv() Reserves a device
* devfree() Frees a reserved device
* reservdev() Return list of reserved devices
* getdev() Get devices that match criteria
* getdgrp() Get device-groups containing devices
* that match criteria
* listdev() List attributes defined for a device
* listdgrp() List members of a device-group
*/
char *devattr(char *, char *);
int devfree(long, char *);
char **devreserv(long, char **[]);
char **getdev(char **, char **, int);
char **getdgrp(char **, char **, int);
char **listdev(char *);
char **listdgrp(char *);
struct reservdev **reservdev(void);
/*
* getvol() definitions
*/
#define DM_BATCH 0x0001
#define DM_ELABEL 0x0002
#define DM_FORMAT 0x0004
#define DM_FORMFS 0x0008
#define DM_WLABEL 0x0010
#define DM_OLABEL 0x0020
int getvol(char *, char *, int, char *);
#endif /* __SVR4_1__ */
#ifdef __cplusplus
}
#endif
#endif /* !__DEVMGMT_H__ */

46
eoe/include/di_aux.h Normal file
View File

@@ -0,0 +1,46 @@
#ifndef __DI_AUX_H__
#define __DI_AUX_H__
#ifdef __cplusplus
extern "C" {
#endif
#ident "$Revision: 1.2 $"
/*
*
* Copyright 1995, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
#include <stdio.h> /* for FILE definition */
#include <grp.h> /* for gid_t definition */
/*
* Database-specific ssdi interface ---> Number and position of database
* interface routines. All srcs for aux should have the following
* routines.
*/
#define DI_INITAUXGROUP 0
#define DI_NAUXFUNCS 1
typedef int (*DI_INITAUXGROUP_SIG)(const char *, gid_t, FILE *);
int initauxgroup(const char *, gid_t, FILE *);
#ifdef __cplusplus
}
#endif
#endif /* !__DI_AUX_H__ */

51
eoe/include/di_group.h Normal file
View File

@@ -0,0 +1,51 @@
#ifndef __DI_GROUP_H__
#define __DI_GROUP_H__
#ifdef __cplusplus
extern "C" {
#endif
#ident "$Revision: 1.2 $"
/*
*
* Copyright 1995, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
/*
* Database-specific ssdi interface ---> Number and position of database
* interface routines. All srcs for passwd should have the following
* routines.
*/
#define DI_GETGRBYNAME 0
#define DI_GETGRBYGID 1
#define DI_SETGRENT 2
#define DI_GETGRENT 3
#define DI_ENDGRENT 4
#define DI_GETGRBYMEMBER 5
#define DI_NGRFUNCS 6
typedef struct group *(*DI_GETGRBYNAME_SIG)(const char *);
typedef struct group *(*DI_GETGRBYGID_SIG)(gid_t);
typedef void (*DI_SETGRENT_SIG)(void);
typedef struct group *(*DI_GETGRENT_SIG)(void);
typedef void (*DI_ENDGRENT_SIG)(void);
typedef int (*DI_GETGRBYMEMBER_SIG)(const char *, gid_t[]);
#ifdef __cplusplus
}
#endif
#endif /* !__DI_GROUP_H__ */

53
eoe/include/di_passwd.h Normal file
View File

@@ -0,0 +1,53 @@
#ifndef __DI_PASSWD_H__
#define __DI_PASSWD_H__
#ifdef __cplusplus
extern "C" {
#endif
#ident "$Revision: 1.2 $"
/*
*
* Copyright 1995, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
/*
* Database-specific ssdi interface ---> Number and position of database
* interface routines. All srcs for passwd should have the following
* routines.
*/
#include <pwd.h>
#define DI_GETPWBYNAME 0
#define DI_GETPWBYUID 1
#define DI_SETPWENT 2
#define DI_GETPWENT 3
#define DI_ENDPWENT 4
#define DI_NPWFUNCS 5
typedef struct passwd *(*DI_GETPWBYNAME_SIG)(const char *);
typedef struct passwd *(*DI_GETPWBYUID_SIG)(uid_t uid);
typedef void (*DI_SETPWENT_SIG)(void);
typedef struct passwd *(*DI_GETPWENT_SIG)(void);
typedef void (*DI_ENDPWENT_SIG)(void);
extern int _getpwent_no_ssdi;
#ifdef __cplusplus
}
#endif
#endif /* !__DI_PASSWD_H__ */

113
eoe/include/dial.h Normal file
View File

@@ -0,0 +1,113 @@
#ifndef __DIAL_H__
#define __DIAL_H__
#ifdef __cplusplus
extern "C" {
#endif
#ident "$Revision: 1.5 $"
/*
*
* Copyright 1992, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */
/* Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
/* UNIX System Laboratories, Inc. */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ident "@(#)head.usr:dial.h 1.2.2.1"
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ident "@(#)head.usr:dial.h 1.2.4.1"
#ifndef _SYS_TERMIO_H
#include <sys/termio.h>
#endif
/* uucico routines need these */
/*#define DIAL */
/* The following are no longer used by dial() and may be out of date. */
/* They are included here only to maintain source compatibility. */
#define STANDALONE
#define DEVDIR "/dev/" /* device path */
#define LOCK "/var/spool/uucp/LCK.." /* lock file semaphore */
#define DVC_LEN 80 /* max NO of chars in TTY-device path name */
/* End of unused definitions */
/* error mnemonics */
#define TRUE 1
#define FALSE 0
#define INTRPT (-1) /* interrupt occured */
#define D_HUNG (-2) /* dialer hung (no return from write) */
#define NO_ANS (-3) /* no answer (caller script failed) */
#define ILL_BD (-4) /* illegal baud-rate */
#define A_PROB (-5) /* acu problem (open() failure) */
#define L_PROB (-6) /* line problem (open() failure) */
#define NO_Ldv (-7) /* can't open Devices file */
#define DV_NT_A (-8) /* requested device not available */
#define DV_NT_K (-9) /* requested device not known */
#define NO_BD_A (-10) /* no device available at requested baud */
#define NO_BD_K (-11) /* no device known at requested baud */
#define DV_NT_E (-12) /* requested speed does not match */
#define BAD_SYS (-13) /* system not in Systems file */
#define CS_PROB (-14) /* connection server related error */
typedef struct{
int version; /* for future modifications to structure format */
char *service; /* name of service to use(default = "cu") */
char *class; /* "class" of device to use */
char *protocol; /* returns the protocol string for the connection made */
char *reserved1; /* reserved for future expansion */
} CALL_EXT;
typedef struct {
struct termio *attr; /* ptr to termio attribute struct */
int baud; /* unused */
int speed; /* 212A modem: low=300, high=1200 */
char *line; /* device name for out-going line */
char *telno; /* ptr to tel-no/system name string */
int modem; /* unused */
char *device; /* pointer to a CALL_EXT structure */
/* this was unused previously */
int dev_len; /* unused */
} CALL;
extern int dial(CALL);
extern void undial(int);
#ifdef __cplusplus
}
#endif
#endif /* !__DIAL_H__ */

102
eoe/include/dirent.h Normal file
View File

@@ -0,0 +1,102 @@
#ifndef __DIRENT_H__
#define __DIRENT_H__
#ifdef __cplusplus
extern "C" {
#endif
#ident "$Revision: 1.35 $"
/*
*
* Copyright 1992, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
/* Copyright (c) 1988 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#include <standards.h>
#include <sys/types.h>
#include <sys/dirent.h>
/*
* This is a POSIX/XPG header
*/
#if _SGIAPI
#define MAXNAMLEN 255 /* maximum filename length */
#define DIRBUF 4096 /* buffer size for fs-indep. dirs */
#endif /* _SGIAPI */
#if _SGIAPI && !defined(__SGI_NODIRENT_COMPAT)
#define dd_fd __dd_fd
#define dd_loc __dd_loc
#define dd_size __dd_size
#define dd_buf __dd_buf
#endif /* _SGIAPI && !__SGI_NODIRENT_COMPAT */
typedef struct {
int __dd_fd; /* file descriptor */
int __dd_loc; /* offset in block */
int __dd_size; /* amount of valid data */
char *__dd_buf; /* directory block */
int __dd_flags; /* using readdir64 or not; eof */
} DIR; /* stream data from opendir() */
/* values for __dd_flags */
#define _DIR_FLAGS_READDIR32 1
#define _DIR_FLAGS_READDIR64 2
#define _DIR_FLAGS_MODE (_DIR_FLAGS_READDIR32|_DIR_FLAGS_READDIR64)
#define _DIR_FLAGS_SEEN_EOF 4
extern DIR *opendir( const char * );
extern int closedir( DIR * );
extern dirent_t *readdir( DIR * );
extern void rewinddir( DIR * );
#if _SGIAPI && (_MIPS_SIM == _MIPS_SIM_NABI32)
extern off_t telldir( DIR * );
extern void seekdir( DIR *, off_t );
#else
extern long telldir( DIR * );
extern void seekdir( DIR *, long );
#define rewinddir( dirp ) seekdir( dirp, 0L )
#endif
#if _SGIAPI
extern int scandir(const char *, dirent_t **[],
int (*)(dirent_t *),
int (*)(dirent_t **, dirent_t **));
extern int alphasort(dirent_t **, dirent_t **);
extern int scandir64(const char *, dirent64_t **[],
int (*)(dirent64_t *),
int (*)(dirent64_t **, dirent64_t **));
extern int alphasort64(dirent64_t **, dirent64_t **);
extern int readdir64_r(DIR *, dirent64_t *, dirent64_t **);
extern off64_t telldir64(DIR *);
extern void seekdir64(DIR *, off64_t);
#endif /* _SGIAPI */
#if _LFAPI
extern dirent64_t *readdir64(DIR *);
#endif /* _LFAPI */
#if _POSIX1C
extern int readdir_r(DIR *, dirent_t *, dirent_t **);
#endif
#ifdef __cplusplus
}
#endif
#endif /* !__DIRENT_H__ */

209
eoe/include/diskinfo.h Normal file
View File

@@ -0,0 +1,209 @@
#ifndef __DISKINFO_H__
#define __DISKINFO_H__
#ifdef __cplusplus
extern "C" {
#endif
/**************************************************************************
* *
* Copyright (C) 1988, Silicon Graphics, Inc. *
* *
* These coded instructions, statements, and computer programs contain *
* unpublished proprietary information of Silicon Graphics, Inc., and *
* are protected by Federal copyright law. They may not be disclosed *
* to third parties or copied or duplicated in any form, in whole or *
* in part, without the prior written consent of Silicon Graphics, Inc. *
* *
**************************************************************************/
#ident "libdisk/diskinfo.h $Revision: 1.25 $"
#include <sgidefs.h>
/* Data structures, etc. for routines in libdisk.a.
First version created by Dave Olson @ SGI, 10/88
*/
/* defines */
/*
* Maximum drives per controller not including SCSI luns
* This is used to limit the size of names generated for drives
* and is not representative of hardware capabilities.
* See also irix/cmd/fx/fx.h
*/
#define MAX_DRIVE 1000
/* partition definitions for standard partitions */
#define PT_FSROOT 0 /* root partition */
#define PT_FSSWAP 1 /* swap partition */
#define PT_FSUSR 6 /* alt usr partition */
#define PT_FSALL 7 /* one big partition */
#define PT_VOLHDR 8 /* volume header partition */
#define PT_REPL 9 /* trk/sec replacement part */
#define PT_VOLUME 10 /* entire volume partition */
#define NPARTS 16 /* same as NPARTAB in dvh.h, but avoids having
all users of this library having to include dvh.h */
#define PT_BASE NPARTS /* pseudo partition used with partnum(),
getnextdisk(void), or getdiskname(inventory_t *, unsigned),
to get just the base part of the name */
/* states for fsstate */
#define NOFS 0 /* no valid fs */
#define MOUNTEDFS 1 /* filesystem mounted */
#define MTRDONLY 2 /* filesystem mounted readonly */
#define CLEAN 4 /* file system not mounted, but is clean */
#define DIRTY 5 /* has filesystem, but marked dirty */
/* defines for values of mtpt_fromwhere */
#define MTPT_NOTFOUND 0
#define MTPT_FROM_FSTAB 1
#define MTPT_FROM_MTAB 2
#define MTPT_FROM_SBLK 3
/* structures */
/* 'full' and 'nickname' pathnames for disk devices,
relative to the "devdir" directory. A pointer to
this structure is returned by the getdiskname(inventory_t *, unsigned)
routine. The ptr returned by getdiskname() points to a static structure,
and must be copied if you want to keep the data across calls to
getdiskname() or getnextdisk().
*/
struct disknames {
char fullname[32]; /* full name in the devdir/rdsk directory */
char bnickname[32]; /* short block name, e.g. "usr" for "dks0d1s6" */
char rnickname[32]; /* short raw name, e.g. "rusr" for "dks0d1s6" */
char nodeok; /* does the node for fullname exist in the file system? */
struct inventory_s *diskinv; /* pointer to inventory structure for this
device, valid only until endnextdisk() is called (avoid typedef
so only those who need it have to include sys/invent.h) */
};
/* per partition information */
struct ptinfo {
unsigned ptnum; /* partition # */
unsigned psize; /* partition size in sectors */
unsigned pstartblk; /* sector offset from start of disk */
unsigned ptype; /* partition type (PTYPE_* from dvh.h) */
char fsstate; /* see states above */
/* rest of fields valid only if fsstate != NOFS */
char fsname[8]; /* from super block */
char packname[8]; /* from super block */
__int64_t fssize; /* size of file system in sectors */
__int64_t ftotal; /* total data blocks in file system */
__int64_t itotal; /* total inodes in file system */
__int64_t fsfree; /* free sectors in file system */
__int64_t ifree; /* free inodes in file system */
char mountdir[64]; /* mount point if mounted, 'normal' mount point if not */
struct ptinfo **overlaps; /* pointer to array of ptrs to overlapping
partitions (NULL if none). terminated by NULL ptr */
};
/* structure defining the layout and state of a disk. Contains
information from volume header, mount table, and super block.
*/
struct diskinfo {
unsigned short sectorsize; /* bytes per sector */
unsigned capacity; /* number of sectors on volume */
};
/* extern declarations */
/* prefixes for the disknames of various disk controllers. Indexed
by the types defined in invent.h
*/
extern char *drive_prefixes[];
extern int mtpt_fromwhere; /* set by getmountpt to indicate source
of information. See MTPT* defines above */
/* function prototypes */
int setdiskname(char *);
struct disknames *getdiskname(struct inventory_s *, unsigned);
void enddiskname(void);
int setnextdisk(char *, unsigned);
struct disknames *getnextdisk(void);
void endnextdisk(void);
unsigned setdiskinfo(char *, char *, int);
struct ptinfo *getpartition(unsigned);
struct diskinfo *getdiskinfo(unsigned);
int putpartition(unsigned, struct ptinfo *);
void enddiskinfo(unsigned);
char *pttype_to_name(int);
char *getmountpt(char *, char *);
/* returns 1 if disk partition has a valid efs or xfs filesystem, else 0,
* second arg is a size to validate against filesystem size. */
int has_fs(char *, __int64_t);
/* returns 1 if disk partition has a valid filesystem of that type, else 0 */
int has_efs_fs(char *);
int has_xfs_fs(char *);
char *partname(char *, unsigned);
char *findrawpath(char *);
char *findblockpath(char *);
__int64_t findsize(char *);
int findtrksize(char *);
struct volume_header;
/* getdiskheader gets it from driver with DKIOCGETVH, while
* getheaderfromdisk gets it from the disk device with a read,
* both verify the volhdr with vhchksum. putdiskheader does both
* the ioctl and a write to disk */
int getdiskheader(int, struct volume_header *);
int getheaderfromdisk(int, struct volume_header *);
int putdiskheader(int, struct volume_header *, int);
int valid_vh(struct volume_header *);
int vhchksum(struct volume_header *);
int readb(int, void *, daddr_t, int);
int writeb(int, void *, daddr_t, int);
struct efs;
struct xfs_sb;
int getsuperblk_efs(char *, struct efs *);
int getsuperblk_xfs(char *, struct xfs_sb *);
int is_rootpart(char *);
void xlv_get_subvol_stripe(char *dfile, int type, int *sunit, int *swidth);
int disk_openraw (char *); /* open raw path associated with specified path */
int disk_openvh (char *); /* open volume header associated with specified path */
int disk_getblksz (int); /* get blocksize from raw device */
int disk_setblksz (int, int); /* set raw device blocksize */
#ifdef __cplusplus
}
#endif
/*
* Structures and function declarations used for disk accounting
* programs such as sar/sadc in conjunction with libdisk.
* It is expected that PCP will also use these.
*/
struct diosetup
{
struct diosetup *next; /* Pointer to next */
char dname[12]; /* Container for dname */
struct iotime *iotim_addrs; /* Pointer to iotim_addrs */
};
struct disk_iostat_info
{
struct disk_iostat_info *next; /* Pointer to next */
char *diskname; /* Pointer to disk name */
char *devicename; /* Pointer to device name */
};
void sgi_neo_disk_setup(struct disk_iostat_info * (alloc_fn)(void));
int dkiotime_neoget(char *dsname, struct iotime *iotim);
#endif /* !__DISKINFO_H__ */

80
eoe/include/diskinvent.h Normal file
View File

@@ -0,0 +1,80 @@
#if !defined(DISKINVENT_H)
#define DISKINVENT_H
#if defined(__cplusplus)
extern "C" {
#endif
/* Copyright 1995, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
/* diskinvent.h
*
* Generic thread safe disk inventory routines.
*/
#include <sgidefs.h>
#include <sys/types.h>
#include <invent.h> /* SGI system inventory */
#include <sys/stat.h>
#include <sys/dvh.h> /* disk volume header info */
#include <sys/sysmacros.h> /* major()/minor() */
#include <limits.h> /* PATH_MAX */
#include <sys/conf.h>
#define DSK_PART_VH 8 /* volheader partition */
#define DSK_PART_VOL 10 /* volume partition */
#define DSK_DEVNAME_MAX MAXDEVNAME
#define DSK_MAX_INVENTRIES 10 /* max # of inventory entries per graph node */
typedef int (*dsk_cbfunc)(char *, struct stat64 *, inventory_t *, int, void *);
/* prototypes */
int dsk_walk_drives(
int (*)(char *, struct stat64 *, inventory_t *, int, void *),
void *);
int dsk_walk_partitions(
int (*)(char *, struct stat64 *, inventory_t *, int, void *),
void *);
/* prototypes from pathinfo.c */
char *path_to_alias(char *, char *, int *);
char *dev_to_alias(dev_t, char *, int *);
char *diskpath_to_alias(char *, char *, int *);
char *diskpath_to_alias2(char *, char *, int *, inventory_t *, int);
char *path_to_vhpath(char *, char *, int *);
char *path_to_volpath(char *, char *, int *);
char *dev_to_partpath(dev_t, int, int, char *, int *, struct stat64 *);
char *path_to_partpath(const char *, int, int, char *, int *, struct stat64 *);
char *path_to_rawpath(char *, char *, int *, struct stat64 *);
char *dev_to_rawpath(dev_t, char *, int *, struct stat64 *);
int path_to_partnum(char *);
int dev_to_partnum(dev_t);
int path_to_ctlrnum(char *);
int dev_to_ctlrnum(dev_t);
int is_rootpart(char *);
__int64_t findsize(char *);
char *findrawpath(char *);
char *findblockpath(char *);
#if defined(__cplusplus)
}
#endif
#endif

71
eoe/include/dlfcn.h Normal file
View File

@@ -0,0 +1,71 @@
#ifndef __DLFCN_H__
#define __DLFCN_H__
#ifdef __cplusplus
extern "C" {
#endif
#ident "$Revision: 1.12 $"
/*
*
* Copyright 1992, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */
/* Copyright (c) 1988 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
/* UNIX System Laboratories, Inc. */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#include <standards.h>
/* declarations used for dynamic linking support routines */
extern void *dlopen(const char *, int);
extern void *dlsym(void *, const char *);
extern int dlclose(void *);
extern char *dlerror(void);
#if _SGIAPI
extern void *sgidladd(const char *, int);
extern void *sgidlopen_version(const char *, int, const char *, int);
extern char *sgigetdsoversion(const char *);
#endif /* _SGIAPI */
/* valid values for mode argument to dlopen/sgidladd/sgidlopen_version */
#define RTLD_LAZY 1 /* lazy function call binding */
#define RTLD_NOW 2 /* immediate function call binding */
#define RTLD_GLOBAL 4 /* symbols in this dlopen'ed obj */
/* are visible to other dlopen'ed objs */
#define RTLD_NOW_REPORT_ERROR 8 /* this is for sgidladd only -- */
/* RTLD_NOW treated like
* RTLD_LAZY in sgidladd and
* RTLD_NOW_REPORT_ERROR
* reports all unresolved
* symbols including TEXT
*/
#define RTLD_LOCAL 0 /* RTLD_LOCAL is the opposite of */
/* RTLD_GLOBAL, and RTLD_LOCAL
* is the default in case
* neither is specified.
* RTLD_LOCAL means that the symbols
* in the dlopen()ed DSO are not
* made globally visible.
*/
#ifdef __cplusplus
}
#endif
#endif /* !__DLFCN_H__ */

62
eoe/include/dpipe.h Normal file
View File

@@ -0,0 +1,62 @@
/**************************************************************************
* *
* Copyright (C) 1991-1996 Silicon Graphics, Inc. *
* *
* These coded instructions, statements, and computer programs contain *
* unpublished proprietary information of Silicon Graphics, Inc., and *
* are protected by Federal copyright law. They may not be disclosed *
* to third parties or copied or duplicated in any form, in whole or *
* in part, without the prior written consent of Silicon Graphics, Inc. *
* *
**************************************************************************/
#ident "$Header"
/*
* prototypes for data pipe interface
*/
#ifndef _DPIPE_H
#define _DPIPE_H
#include <sys/dpipe.h>
typedef struct dpipe_lib_hdl_s {
dpipe_end_trans_ctx_hdl_t (*bind_transfer)(struct dpipe_lib_hdl_s *,
int, /* pipe id */
__int64_t, /* transfer_id */
int /* src or sink*/);
} *dpipe_lib_hdl_t;
int dpipeCreate(int /* src_fd */, int /* sink_fd */);
int dpipeDestroy(int /* pipefd */);
__int64_t dpipeTransfer(int /* pipefd */,
dpipe_lib_hdl_t /* src_context */,
dpipe_lib_hdl_t /* sink_conext */);
int dpipeStop(int /* pipefd */, __int64_t /* transfer_id */);
int dpipeStatus(int /* pipefd */, __int64_t /* transfer_id */);
int dpipeReset(int /* pipefd */);
int dpipeFlush(int /* pipefd */);
/*
* The following functions play the file system pipe end role.
*/
typedef struct dpipe_fspe_ctx_s {
int iovcnt;
struct dpipe_fspe_bind_list *iov; /* see sys/dpipe.h */
} dpipe_fspe_ctx_t;
typedef struct dpipe_fspe_hdl_s {
dpipe_end_trans_ctx_hdl_t (*bind_transfer)(dpipe_lib_hdl_t, int,
__int64_t, int);
int fd;
dpipe_fspe_ctx_t *ctx;
struct dpipe_fspe_hdl_s *next;
} dpipe_fspe_hdl_t;
dpipe_lib_hdl_t dpipe_fspe_get_hdl(int /* fd */);
int dpipe_fspe_set_ctx(dpipe_lib_hdl_t, dpipe_fspe_ctx_t);
#endif /* _DPIPE_H */

67
eoe/include/errno.h Normal file
View File

@@ -0,0 +1,67 @@
#ifndef __ERRNO_H__
#define __ERRNO_H__
#ifdef __cplusplus
extern "C" {
#endif
#ident "$Revision: 1.28 $"
/*
*
* Copyright 1992-1997 Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
/* Copyright (c) 1988 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
/*
* Error codes
*/
#include <sys/errno.h>
#if (defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS))
#if _SGIAPI && _NO_ANSIMODE
extern char * sys_errlist[];
extern int sys_nerr;
extern int oserror(void);
extern int setoserror(int);
extern int goserror(void);
#endif /* _SGIAPI */
/*
* We don't use _POSIX1C or _XOPEN5 because we're not able to have
* all programs use a per-thread errno which requires an indirection
* to retrieve it. Of course, if you want thread safety - you need this.
*/
#if defined(_SGI_MP_SOURCE) || (_POSIX_C_SOURCE >= 199506L) \
|| (_XOPEN_SOURCE+0 >= 500)
#undef errno
#define errno (*__oserror())
extern int *__oserror(void);
#else
extern int errno;
#endif
#endif /* _LANGUAGE_C || _LANGUAGE_C_PLUS_PLUS */
#ifdef __cplusplus
}
#endif
#endif /* !__ERRNO_H__ */

67
eoe/include/exportent.h Normal file
View File

@@ -0,0 +1,67 @@
#ifndef __EXPORTENT_H__
#define __EXPORTENT_H__
#ident "$Revision: 1.9 $"
/*
*
* Copyright 1992, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
/* @(#)exportent.h 1.1 88/03/15 4.0NFSSRC SMI
*
* Copyright (c) 1988 by Sun Microsystems, Inc.
* 1.5 88/02/07 (C) 1986 SMI
*/
#include <stdio.h>
/*
* Exported file system table, see exportent(3)
*/
#define TABFILE "/etc/xtab" /* where the table is kept */
/*
* Options keywords
*/
#define ACCESS_OPT "access" /* machines that can mount fs */
#define ROOT_OPT "root" /* machines with root access of fs */
#define RO_OPT "ro" /* export read-only */
#define RW_OPT "rw" /* export read-mostly */
#define ANON_OPT "anon" /* uid for anonymous requests */
#define NOHIDE_OPT "nohide" /* visible from upper exported fs */
#define WSYNC_OPT "wsync" /* write synchronously to disk */
#define B32CLNT_OPT "32bitclients" /* mask off high 32 bits in cookie3 */
#define NOXATTR_OPT "noxattr" /* only trusted clients may access
extended attributes */
struct exportent {
char *xent_dirname; /* directory (or file) to export */
char *xent_options; /* options, as above */
};
#ifdef __cplusplus
extern "C" {
#endif
extern FILE *setexportent(void);
extern void endexportent(FILE *);
extern int remexportent(FILE *, char *);
extern int addexportent(FILE *, char *, char *);
extern char *getexportopt(struct exportent *, char *);
extern struct exportent *getexportent(FILE *);
#ifdef __cplusplus
}
#endif
#endif /* !__EXPORTENT_H__ */

319
eoe/include/fam.h Normal file
View File

@@ -0,0 +1,319 @@
#ifndef _FAM_
#define _FAM_
#ifdef __cplusplus
extern "C" {
#endif
/*****************************************************************************
*
* MODULE: Fam.h - File Alteration Monitor
*
* Fam allows applications to monitor files - receiving events when they
* change. The scheme is simple: Applications register which
* files/directories they are interested, and fam will notify the
* application when any of these files are changed.
*
*****************************************************************************/
/* For NAME_MAX - maximum # of chars in a filename */
#include "limits.h"
/*****************************************************************************
* DATA STRUCTURES
*
*
* FAMConnection Structure:
*
* The FAMConnection Data structure is created when opening a connection
* to fam. After that, it is passed into all fam procedures. This
* structure has all the information in it to talk to fam (Currently,
* the only data inside this structure is a file descriptor for
* the socket to fam).
*****************************************************************************/
typedef struct FAMConnection {
int fd;
void *client;
} FAMConnection;
/*****************************************************************************
* To access the fd inside this structure (so the application writer can
* use select for fam events), the following macro is defined (this will
* allow us to change the implementation without users having to change
* their code):
*****************************************************************************/
#define FAMCONNECTION_GETFD(fc) ((fc)->fd)
/*****************************************************************************
* FAMRequest Structure:
*
* Every time fam is called on to monitor a file, it passes back a
* FAMRequest structure. The main piece of data that this structure
* contans is a reqnum. This reqnum is guaranteed to be unique. When
* cancelling or suspending a monitor request, you must pass this
* data structure into FAMCancelMonitor or FAMSuspendMonitor to
* make sure that you are cancelling/suspending the correct request
* (You can monitor the same file/directory more than once).
*****************************************************************************/
typedef struct FAMRequest {
int reqnum;
} FAMRequest;
/*****************************************************************************
* Once again, to access the reqnum inside this structure, use the
* following macro:
*****************************************************************************/
#define FAMREQUEST_GETREQNUM(fc) ((fc)->reqnum)
/*****************************************************************************
* FAMEvent Structure:
*
* When a file/directory has been modified/deleted, fam will pass
* a FAMEvent structure to the application (through the callback
* in the FAMMonitorFile/Directory routines). This structure will
* describe what event happened to the file. The different events
* that can happen to a file are listed in the FAMCodes enum.
*****************************************************************************/
enum FAMCodes { FAMChanged=1, FAMDeleted=2, FAMStartExecuting=3,
FAMStopExecuting=4, FAMCreated=5, FAMMoved=6,
FAMAcknowledge=7, FAMExists=8, FAMEndExist=9 };
typedef struct FAMEvent {
FAMConnection* fc; /* The fam connection that event occurred on */
FAMRequest fr; /* Corresponds to the FamRequest from monitor */
char *hostname; /* host and filename - pointer to which */
char filename[PATH_MAX]; /* file changed */
void *userdata; /* userdata associated with this monitor req. */
enum FAMCodes code; /* What happened to file - see above */
} FAMEvent;
/*****************************************************************************
* ERROR HANDLING
*
* If an error occurs inside of libfam, a global named FAMErrno is set
* to a non-zero value and the routine that the error occurred in will
* return an error value (usually NULL). FAMErrlist is a global
* string array (indexed by FAMErrno) that describes the last error
* that happened;
*
* NOTE: currently FAMErrno and FamErrList are unused
*****************************************************************************/
extern int FAMErrno;
extern char *FamErrlist[];
/*
*[NOTE: Eventually, there will be a bunch of defines right here defining what
* errors can happen in using libfam ]
*/
/*****************************************************************************
* PROCEDURES:
*
* FAMOpen, FAMClose
*
* The first step that an application has to do is open a connection to
* fam. This is done through the FAMOpen. FAMOpen returns a FAMConnection
* data structure which is passed to all fam procedures. FAMClose closes
* a fam connection.
*
* On error, FAMOpen will return NULL and FAMClose will return -1 (and
* FAMErrno will be set to the value of the error).
*****************************************************************************/
extern int FAMOpen(FAMConnection* fc);
extern int FAMOpen2(FAMConnection* fc, const char* appName);
extern int FAMClose(FAMConnection* fc);
/*****************************************************************************
* FAMMonitorDirectory, FAMMonitorFile
*
* These routines tell fam to start monitoring a file/directory. The
* parameters to this function are a FAMConnection (received from FAMOpen),
* a filename and a user data ptr. A FAMRequest structure is returned.
* When the file/directory changes, a fam event structure will be
* generated. The application can retrieve this structure by calling
* FAMNextEvent (see description under FAMNextEvent).
*
* The difference between these two routines is that FAMMonitorDirectory
* monitors any changes that happens to the contents of the directory
* (as well as the directory file itself) and FAMMonitorFile monitors
* only what happens to a particular file.
*
* On error FAMMonitorDirectory/File will return NULL (and FAMErrno will
* be set to the value of the error).
*****************************************************************************/
extern int FAMMonitorDirectory(FAMConnection *fc,
const char *filename,
FAMRequest* fr,
void* userData);
extern int FAMMonitorFile(FAMConnection *fc,
const char *filename,
FAMRequest* fr,
void* userData);
extern int FAMMonitorCollection(FAMConnection *fc,
const char *filename,
FAMRequest* fr,
void* userData,
int depth,
const char* mask);
extern int FAMMonitorDirectory2(FAMConnection *fc,
const char *filename,
FAMRequest* fr);
extern int FAMMonitorFile2(FAMConnection *fc,
const char *filename,
FAMRequest* fr);
/*****************************************************************************
* FAMMonitorRemoteDirectory, FAMMonitorRemoteFile
*
* These routines do the same as FAMMonitorDirectory and FAMMonitorFile
* except they will do it on any machine in the network [NOTE: depending
* on the capability of fam - which is another topic].
*****************************************************************************/
extern int FAMMonitorRemoteDirectory(FAMConnection *fc,
const char *hostname,
const char *filename,
FAMRequest* fr,
void* userdata);
extern int FAMMonitorRemoteFile(FAMConnection *fc,
const char *hostname,
const char *filename,
FAMRequest* fr,
void* userdata);
/*****************************************************************************
* FAMSuspendMonitor, FAMResumeMonitor
*
* FAMSuspendMonitor enables applications to suspend
* receive events about files/directories that are changing. This can
* be useful in situations when an application is stowed and does not
* want to receive events until it is unstowed. FAMResumeMonitor
* signals fam to start monitoring the file/directory again.
*
* Both of these routines take a FAMConnection and a FAMRequest structure.
* The FAMRequest Structure is returned from the FAMMonitorFile/Directory
* routines.
*
* On error, FAMResume/SuspendMonitor will return -1 (and the global
* FAMErrno will be set to the value of the error).
*****************************************************************************/
int FAMSuspendMonitor(FAMConnection *fc, const FAMRequest *fr);
int FAMResumeMonitor(FAMConnection *fc, const FAMRequest *fr);
/*****************************************************************************
* FAMCancelMonitor
*
* When an application is done monitoring a file/directory, it should
* call FAMCancelMonitor. This routine will signal fam not to watch
* this directory anymore. Once again, the FAMRequest structure is
* returned from the FAMMonitorFile/Directory routines.
*
* On error, FAMCancelMonitor will return -1 (and the global
* FAMErrno will be set to the value of the error). This routine will free
* the FAMRequest structure that is passed in.
*****************************************************************************/
int FAMCancelMonitor(FAMConnection *fc, const FAMRequest *fr);
/*****************************************************************************
* FAMNextEvent, FAMPending
*
* FAMNextEvent will get the next fam event (file/directory change). If
* there are no fam events waiting, then FAMNextEvent will wait
* until a fam event has been received (from fam).
*
* FAMPending will return the number of fam events that are waiting.
* This routine always returns immediately to the caller.
*
* Essentially, there are two ways to for applications to receive fam
* events:
*
* 1. The "Polling" approach - Just call FAMPending periodically;
* like when the system is waiting for input. If FAMPending returns
* with a positive return value, then there are fam events waiting.
* Call FAMNextEvent to receive the events.
*
* 2. The "Select" approach - Use the fd returned from famOpen (in the
* FAMConnection structure) as one of the fds that the application
* selects on. When select returns saying that data is on the fam
* fd, call FAMNextEvent.
*
* FAMNextEvent reads any information that is on the fam socket,
* and returns it to the application (in the form of a FAMEvent).
*
* On error, FAMNextEvent and FAMPendingEvent will return -1 (and the global
* FAMErrno will be set to the value of the error).
*****************************************************************************/
int FAMNextEvent(FAMConnection *fc, FAMEvent *fe);
int FAMPending(FAMConnection* fc);
/*****************************************************************************
* FAMDebugLevel
*
* Sets the fam debugging level. Currently, there are three levels:
*
* FAM_DEBUG_OFF - no debugging information output - default
* FAM_DEBUG_ON - fam outputs various debugging information
* FAM_DEBUG_VERBOSE - even more information than FAM_DEBUG_ON
*
* All output is written to the syslog.
*
*****************************************************************************/
#define FAM_DEBUG_OFF 0
#define FAM_DEBUG_ON 1
#define FAM_DEBUG_VERBOSE 2
int FAMDebugLevel(FAMConnection *fc, int debugLevel);
#ifdef __cplusplus
}
#endif
#endif /* _FAM_ */

70
eoe/include/fcntl.h Normal file
View File

@@ -0,0 +1,70 @@
#ifndef __FCNTL_H__
#define __FCNTL_H__
#ifdef __cplusplus
extern "C" {
#endif
#ident "$Revision: 1.24 $"
/*
*
* Copyright 1992, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
/* Copyright (c) 1988 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#include <sys/types.h>
#include <sys/fcntl.h>
#ifndef S_IRWXU
#define S_IRWXU 00700 /* read, write, execute: owner */
#define S_IRUSR 00400 /* read permission: owner */
#define S_IWUSR 00200 /* write permission: owner */
#define S_IXUSR 00100 /* execute permission: owner */
#define S_IRWXG 00070 /* read, write, execute: group */
#define S_IRGRP 00040 /* read permission: group */
#define S_IWGRP 00020 /* write permission: group */
#define S_IXGRP 00010 /* execute permission: group */
#define S_IRWXO 00007 /* read, write, execute: other */
#define S_IROTH 00004 /* read permission: other */
#define S_IWOTH 00002 /* write permission: other */
#define S_IXOTH 00001 /* execute permission: other */
#define S_ISUID 0x800 /* set user id on execution */
#define S_ISGID 0x400 /* set group id on execution */
#endif /* S_IRWXU */
#ifndef SEEK_SET
# define SEEK_SET 0 /* Set file pointer to "offset" */
# define SEEK_CUR 1 /* Set file pointer to current plus "offset" */
# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
#endif
extern int fcntl(int, int, ...);
extern int open(const char *, int, ...);
extern int creat(const char *, mode_t);
#if _LFAPI
extern int open64(const char *, int, ...);
extern int creat64(const char *, mode_t);
#endif /* _LFAPI */
#ifdef __cplusplus
}
#endif
#endif /* !__FCNTL_H__ */

158
eoe/include/fetchop.h Normal file
View File

@@ -0,0 +1,158 @@
/*
*
* Copyright 1995, Silicon Graphics, Inc.
* ALL RIGHTS RESERVED
*
* UNPUBLISHED -- Rights reserved under the copyright laws of the United
* States. Use of a copyright notice is precautionary only and does not
* imply publication or disclosure.
*
* U.S. GOVERNMENT RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in FAR 52.227.19(c)(2) or subparagraph (c)(1)(ii) of the Rights
* in Technical Data and Computer Software clause at DFARS 252.227-7013 and/or
* in similar or successor clauses in the FAR, or the DOD or NASA FAR
* Supplement. Contractor/manufacturer is Silicon Graphics, Inc.,
* 2011 N. Shoreline Blvd. Mountain View, CA 94039-7311.
*
* THE CONTENT OF THIS WORK CONTAINS CONFIDENTIAL AND PROPRIETARY
* INFORMATION OF SILICON GRAPHICS, INC. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IN ANY FORM, IN WHOLE, OR IN PART, IS STRICTLY
* PROHIBITED WITHOUT THE PRIOR EXPRESS WRITTEN PERMISSION OF SILICON
* GRAPHICS, INC.
*/
#ifndef __FETCHOP_H__
#define __FETCHOP_H__
#define USE_DEFAULT_PM -1
typedef struct {
uid_t uid; /* owner's user id */
gid_t gid; /* owner's group id */
mode_t mode; /* access modes */
} atomic_perm_t;
typedef int atomic_res_ident_t;
typedef __uint32_t atomic_var_ident_t;
typedef unsigned long atomic_var_t;
typedef struct atomic_maint_s *atomic_maint_t;
typedef struct atomic_var_reg_s *atomic_var_reg_t;
typedef struct atomic_reservoir_s *atomic_reservoir_t;
#define ATOMIC_GET_VADDR 1
#define ATOMIC_SET_VADDR 2
#if SN0
#define FETCHOP_VAR_SIZE 64 /* 64 byte per fetchop variable */
#define FETCHOP_LOAD 0
#define FETCHOP_INCREMENT 8
#define FETCHOP_DECREMENT 16
#define FETCHOP_CLEAR 24
#define FETCHOP_FLUSH 56
#define FETCHOP_STORE 0
#define FETCHOP_AND 24
#define FETCHOP_OR 32
#define FETCHOP_LOAD_OP(addr, op) ( \
*(atomic_var_t *)((__psunsigned_t) (addr) + (op)))
#define FETCHOP_STORE_OP(addr, op, x) ( \
*(atomic_var_t *)((__psunsigned_t) (addr) + (op)) = \
(fetchop_var_t) (x))
#else /* !SN0 */
#define FETCHOP_VAR_SIZE sizeof(fetchop_var_t)
#endif /* SN0 */
atomic_res_ident_t atomic_alloc_res_ident(size_t);
atomic_res_ident_t atomic_alloc_res_ident_addr(size_t);
/*
* Initialize the atomic variable reservoir by the given policy module
* and from the reservoir in ident. IF ident is NULL then get a new ident
* If no particular policy modules are desired, USE_DEFAULT_PM is passed.
* Return: a pointer to the reservoir if successful
* NULL if failing to initialize
*/
atomic_reservoir_t
atomic_alloc_reservoir(pmo_handle_t, size_t, atomic_res_ident_t);
atomic_reservoir_t
atomic_alloc_reservoir_addr(pmo_handle_t, size_t,
atomic_res_ident_t, atomic_var_t *, uint);
/*
* Returns a reserved place in the bitmap array and sets the bit
* indicating that it has been reserved. Returns 0 on failure.
*/
atomic_var_ident_t atomic_alloc_var_ident(atomic_reservoir_t);
/*
* return the virtual address for a given variable identifier
* If ident is 0 then first get a valid place in the
* array
* return NULL on failure
*/
atomic_var_t *atomic_alloc_variable(atomic_reservoir_t, atomic_var_ident_t);
/* set permissions for what other processes have access to this reservoir */
int atomic_set_perms(atomic_reservoir_t, atomic_perm_t);
/* Free a atomic variable */
void atomic_free_variable(atomic_reservoir_t, atomic_var_t *);
/* Free a atomic variable */
void atomic_free_var_ident(atomic_reservoir_t, atomic_var_ident_t);
/* remove the shared memory segments associated with this reservoir */
void atomic_free_reservoir(atomic_reservoir_t);
/* Store a value in the atomic variable */
void atomic_store(atomic_var_t *, atomic_var_t);
/* Logical OR operation */
void atomic_store_and_or(atomic_var_t *, atomic_var_t);
/* Logical AND operation */
void atomic_store_and_and(atomic_var_t *, atomic_var_t);
/* Load the value of the atomic variable */
atomic_var_t atomic_load(atomic_var_t *);
/*
* Increment the variable
* Return: the old value stored in the variable
*/
atomic_var_t atomic_fetch_and_increment(atomic_var_t *);
/*
* Decrement the variable
* Return: the old value stored in the variable
*/
atomic_var_t atomic_fetch_and_decrement(atomic_var_t *);
/*
* Clear the variable
* Return: the old value stored in the variable
*/
atomic_var_t atomic_clear(atomic_var_t *);
#define OLD_FETCHOP_COMPATIBILITY
#ifdef OLD_FETCHOP_COMPATIBILITY
#define fetchop_reservoir_id_t atomic_res_ident_t
#define fetchop_reservoir_t atomic_reservoir_t
#define fetchop_var_t atomic_var_t
fetchop_reservoir_t fetchop_init(pmo_handle_t, size_t);
fetchop_var_t *fetchop_alloc(fetchop_reservoir_t);
void fetchop_free(fetchop_reservoir_t, fetchop_var_t *);
fetchop_var_t fetchop_load(fetchop_var_t *);
fetchop_var_t fetchop_increment(fetchop_var_t *);
fetchop_var_t fetchop_decrement(fetchop_var_t *);
fetchop_var_t fetchop_clear(fetchop_var_t *);
void storeop_store(fetchop_var_t *, fetchop_var_t);
void storeop_and(fetchop_var_t *, fetchop_var_t);
void storeop_or(fetchop_var_t *, fetchop_var_t);
#endif /* OLD_FETCHOP_COMPATIBILITY */
#endif /* __FETCHOP_H__ */

201
eoe/include/fmtmsg.h Normal file
View File

@@ -0,0 +1,201 @@
#ifndef __FMTMSG_H__
#define __FMTMSG_H__
#ifdef __cplusplus
extern "C" {
#endif
#ident "$Revision: 1.11 $"
/*
*
* Copyright 1992, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */
/* Copyright (c) 1988 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
/* UNIX System Laboratories, Inc. */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
/*
* fmtmsg.h
*
* The <fmtmsg.h> header file contains the definitions needed
* to use the fmtmsg() function. This function writes messages
* in a standard format to the standard error stream (stderr)
* and to the system console.
*/
/*
* Define the value "NULL" if it hasn't been defined already.
*/
#if _SGIAPI
#ifndef NULL
#define NULL 0L
#endif
#endif
/*
* Constraint definitions:
* MM_MXLABELLN Maximum size of a "label" in a message
* MM_MXTAGLN Maximum size of a "tag" in a message
* MM_MXTXTLN Maximum size of a text string
* MM_MXACTLN Maximum size of an action string
*/
#define MM_MXLABELLN 25
#define MM_MXTAGLN 32
#define MM_MXTXTLN 512
#define MM_MXACTLN 512
#if _SGIAPI
/*
* Environment variable names used by fmtmsg():
* MSGVERB Tells fmtmsg() which components it is to write
* to the standard error stream
*/
#define MSGVERB "MSGVERB"
#endif
/*
* Classification information
* - Definition of classifications
* - Definition of recoverability
* - Definition of source classifications
*/
/*
* Definition of the "null" classification
* MM_NULL Indicates that the classification has been omitted
*/
#define MM_NULL 0L
/*
* Definitions of type classifications:
* MM_HARD Hardware
* MM_SOFT Software
* MM_FIRM Firmware
*/
#define MM_HARD 0x00000001L
#define MM_SOFT 0x00000002L
#define MM_FIRM 0x00000004L
/*
* Definitions of recoverability subclassification
* MM_RECOVER Recoverable
* MM_NRECOV Non-recoverable
*/
#define MM_RECOVER 0x00000100L
#define MM_NRECOV 0x00000200L
/*
* Definitions of source subclassification
* MM_APPL Application
* MM_UTIL Utility
* MM_OPSYS Kernel
*/
#define MM_APPL 0x00000008L
#define MM_UTIL 0x00000010L
#define MM_OPSYS 0x00000020L
/*
* Definitions for the action to take with the message:
* MM_PRINT Write to the standard error stream
* MM_CONSOLE Treat the message as a console message
*/
#define MM_PRINT 0x00000040L
#define MM_CONSOLE 0x00000080L
/*
* Constants for severity values
*
* SEV_LEVEL Names the env variable that defines severities
*
* MM_NOSEV Message has no severity
* MM_HALT Message describes a severe error condition
* MM_ERROR Message describes an error condition
* MM_WARNING Message tells of probable error condition
* MM_INFO Message informs, not in error
*/
#if _SGIAPI
#define SEV_LEVEL "SEV_LEVEL"
#endif
#define MM_NOSEV 0
#define MM_HALT 1
#define MM_ERROR 2
#define MM_WARNING 3
#define MM_INFO 4
#define MM_FIX 1000000000 /* new severity for sgi_dofmt() */
#define MM_REASON 1000000001 /* new severity for sgi_dofmt() */
/*
* Null values for message components
* MM_NULLLBL Null value for the label-component
* MM_NULLSEV Null value for the severity-component
* MM_NULLMC Null value for the classification-component
* MM_NULLTXT Null value for the text-component
* MM_NULLACT Null value for the action-component
* MM_NULLTAG Null value for the tag-component
*/
#define MM_NULLLBL ((char *) 0L)
#define MM_NULLSEV MM_NOSEV
#define MM_NULLMC MM_NULL
#define MM_NULLTXT ((char *) 0L)
#define MM_NULLACT ((char *) 0L)
#define MM_NULLTAG ((char *) 0L)
/*
* Values returned by fmtmsg()
*
* MM_NOTOK None of the requested messages were generated
* MM_NOMSG No message was written to stderr
* MM_NOCON No console message was generated
*/
#define MM_NOTOK -1
#define MM_OK 0x00
#define MM_NOMSG 0x01
#define MM_NOCON 0x04
/* Function definition */
int fmtmsg(long, const char *, int, const char *, const char *, const char *);
#if _SGIAPI
int addseverity(int, const char *);
#endif
#ifdef __cplusplus
}
#endif
#endif /* !__FMTMSG_H__ */

39
eoe/include/fnmatch.h Normal file
View File

@@ -0,0 +1,39 @@
#ifndef _FNMATCH_H
#define _FNMATCH_H
#ifdef __cplusplus
extern "C" {
#endif
#ident "$Revision: 1.2 $"
/*
*
* Copyright 1995, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
#define FNM_PATHNAME 0001
#define FNM_PERIOD 0002
#define FNM_NOESCAPE 0004
#define FNM_NOSYS (-1)
#define FNM_NOMATCH (-2)
#define FNM_BADPAT (-3)
extern int fnmatch(const char *, const char *, int);
#ifdef __cplusplus
}
#endif
#endif /*_FNMATCH_H*/

57
eoe/include/fp_class.h Normal file
View File

@@ -0,0 +1,57 @@
#ifndef __FP_CLASS_H__
#define __FP_CLASS_H__
#ident "$Revision: 1.14 $"
/*
*
* Copyright 1992, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
#ifdef __cplusplus
extern "C" {
#endif
/* | Copyright (c) 1986 MIPS Computer Systems, Inc. | */
/* | All Rights Reserved. | */
/* --------------------------------------------------- */
/* $Revision: 1.14 $ */
#if (defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS))
extern int fp_class_d(double);
extern int fp_class_f(float);
#if _COMPILER_VERSION >= 400
extern int fp_class_q(long double);
extern int fp_class_l(long double);
#endif
#endif /* LANGUAGE_C */
/*
* Constants returned by the floating point fp_class_[fdl]() functions.
*/
#define FP_SNAN 0
#define FP_QNAN 1
#define FP_POS_INF 2
#define FP_NEG_INF 3
#define FP_POS_NORM 4
#define FP_NEG_NORM 5
#define FP_POS_DENORM 6
#define FP_NEG_DENORM 7
#define FP_POS_ZERO 8
#define FP_NEG_ZERO 9
#ifdef __cplusplus
}
#endif
#endif /* !__FP_CLASS_H__ */

63
eoe/include/fsd.h Normal file
View File

@@ -0,0 +1,63 @@
#ifndef __FSD_H__
#define __FSD_H__
#ifdef __cplusplus
extern "C" {
#endif
/*
* fsd.h
*
* Constants used by System Manager and the file system daemons
*
*
* Copyright 1991, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
#ident "$Revision: 1.3 $"
/*
* Flags for Exit codes for cdromd (or dosd) -q <fsname>
*
* The exit code for cdromd -q is a bitwise or of these masks; e.g.
*
* cdromd -q /dev/scsi/sc0d7l0
* echo $status
* 6 # == FSDDQ_YESFSD | FSDDQ_NOFSD
*
* This means that cdromd is running for /dev/scsi/sc0d7l0, and the
* system is configured so that it will start running for that device
* each time the system is booted.
*/
#define FSDQ_NOFSD 0x0000 /* cdromd is not running for fsname */
#define FSDQ_ERROR 0x0001 /* An error has occurred */
#define FSDQ_YESFSD 0x0002 /* cdromd is running for fsname */
#define FSDQ_ALWAYS 0x0004 /* system is configured for cdromd at boot */
#define FSDQ_NOICON 0x0008 /* do not display an icon for fsname */
/*
* Leave the old names for now so System Manager doesn't break
*/
#define CDQ_NOFSD FSDQ_NOFSD
#define CDQ_ERROR FSDQ_ERROR
#define CDQ_YESFSD FSDQ_YESFSD
#define CDQ_ALWAYS FSDQ_ALWAYS
#define CDQ_NOICON FSDQ_NOICON
#ifdef __cplusplus
}
#endif
#endif /* !__FSD_H__ */

121
eoe/include/ftw.h Normal file
View File

@@ -0,0 +1,121 @@
/*
*
* Copyright 1992, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */
/* Copyright (c) 1988 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
/* UNIX System Laboratories, Inc. */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ifndef __FTW_H__
#define __FTW_H__
#ident "$Revision: 1.27 $"
#ifdef __cplusplus
extern "C" {
#endif
#include <standards.h>
/*
* Codes for the third argument to the user-supplied function
* which is passed as the second argument to ftwalk
*/
#define FTW_F 0 /* file */
#define FTW_D 1 /* directory */
#define FTW_DNR 2 /* directory without read permission */
#define FTW_NS 3 /* unknown type, stat failed */
#define FTW_SL 4 /* symbolic link */
#define FTW_DP 6 /* directory */
#define FTW_SLN 7 /* symbolic link that points to nonexistent file */
/*
* Codes for the fourth argument to nftw. You can specify the
* union of these flags.
*/
#define FTW_PHYS 01 /* use lstat instead of stat */
#define FTW_MOUNT 02 /* do not cross a mount point */
#define FTW_CHDIR 04 /* chdir to each directory before reading */
#define FTW_DEPTH 010 /* call descendents before calling the parent */
#if _XOPEN4UX || _LFAPI
struct FTW
{
#if _SGIAPI
int quit;
#else
int __quit;
#endif
int base;
int level;
};
#endif /* _XOPEN4UX || _LFAPI */
#if _SGIAPI || _ABIAPI
/*
* legal values for quit
*/
#define FTW_SKD 1
#define FTW_FOLLOW 2
#define FTW_PRUNE 4
#endif /* _SGIAPI || _ABIAPI */
#include <sys/types.h>
#include <sys/stat.h>
extern int ftw(const char *,
int (*)(const char *, const struct stat *, int), int);
#if _XOPEN4UX
extern int nftw(const char *,
int (*)(const char *, const struct stat *, int, struct FTW *),
int, int);
#endif /* _XOPEN4UX */
#if _SGIAPI
extern int _xftw(int, const char *, int (*)(const char *, const struct stat *,
int), int);
#if !(((_MIPS_SIM == _MIPS_SIM_NABI32) || \
(_MIPS_SIM == _MIPS_SIM_ABI64)) && defined(_FTW_INTERNAL))
extern int _xftw64(int, const char *, int (*)(const char *,
const struct stat64 *, int), int);
#endif
#endif /* _SGIAPI */
#if _LFAPI
#if !(((_MIPS_SIM == _MIPS_SIM_NABI32) || \
(_MIPS_SIM == _MIPS_SIM_ABI64)) && defined(_FTW_INTERNAL))
extern int ftw64(const char *,
int (*)(const char *, const struct stat64 *,
int), int);
extern int nftw64(const char *,
int (*)(const char *, const struct stat64 *,
int, struct FTW *), int, int);
#endif
#define XFTWVER 2 /* version of file tree walk */
#endif /* _LFAPI */
#ifdef __cplusplus
}
#endif
#endif /* !__FTW_H__ */

73
eoe/include/getabi.h Normal file
View File

@@ -0,0 +1,73 @@
#ifndef __GETABI_H__
#define __GETABI_H__
#ident "$Revision: 1.3 $"
#ifdef __cplusplus
extern "C" {
#endif
/*
* Declarations for getabi().
*
* Copyright 1994, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
/* enumeration of possible abi types */
typedef enum {
noabi,
abi32, /* -32, generic 32-bit abi */
abio32, /* -o32, old mips1 32-bit abi */
abin32, /* -n32, new 32-bit abi */
abi64, /* -64, 64-bit abi */
lastabi
} abi_t;
/* values for generic-size */
#define SPECIFIC_ABI 0
#define GENERIC_ABI_SIZE 1
/* values for modify-abi-arg */
#define IGNORE_ABI_ARG 0
#define PRESERVE_ABI_ARG 1
#define REMOVE_ABI_ARG 2
#define ADD_ABI_ARG 3
#define ADD_FRONT_ABI_ARG 4
/*
* getabi() is used to determine what the abi is.
* First it checks the argv list,
* then the environment variable SGI_ABI,
* then the kernel (64-bit kernel defaults to 64-bit abi).
* The generic_size boolean says whether to report the generic
* size of the abi (abi32 or abi64) or to report the specific abi.
* The modify_abi_arg says to either ignore the argv list,
* or search the argv list and either preserve the args "as is",
* or remove the arg that specifies the abi
* or add the default value to the argv.
* Noabi is returned if an error occurs.
*/
extern abi_t getabi (
int, /*generic_size*/
int, /*modify_abi_arg*/
char***, /*argv*/
int* /*argc*/
);
#ifdef __cplusplus
}
#endif
#endif /* !__GETABI_H__ */

53
eoe/include/getopt.h Normal file
View File

@@ -0,0 +1,53 @@
#ifndef __GETOPT_H__
#define __GETOPT_H__
#ident "$Revision: 1.11 $"
#ifdef __cplusplus
extern "C" {
#endif
/*
* Declarations for getopt(3C).
*
* Copyright 1990, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
#include <standards.h>
extern int getopt(int, char *const *, const char *);
extern char *optarg;
extern int opterr;
extern int optind;
extern int optopt;
#if _SGIAPI
#define GETOPTDONE (-1)
/*
* This value is returned when an option argument is found that is not
* in the option list
*/
#define GETOPTHUH '?'
extern int getsubopt(char **, char *const *, char **);
extern void getoptreset(void);
#endif
#ifdef __cplusplus
}
#endif
#endif /* !__GETOPT_H__ */

180
eoe/include/glob.h Normal file
View File

@@ -0,0 +1,180 @@
/*
* glob.h
*
* header file for glob.c
*
* Copyright 1995, Silicon Graphics, Inc.
* ALL RIGHTS RESERVED
*
* UNPUBLISHED -- Rights reserved under the copyright laws of the United
* States. Use of a copyright notice is precautionary only and does not
* imply publication or disclosure.
*
* U.S. GOVERNMENT RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in FAR 52.227.19(c)(2) or subparagraph (c)(1)(ii) of the Rights
* in Technical Data and Computer Software clause at DFARS 252.227-7013 and/or
* in similar or successor clauses in the FAR, or the DOD or NASA FAR
* Supplement. Contractor/manufacturer is Silicon Graphics, Inc.,
* 2011 N. Shoreline Blvd. Mountain View, CA 94039-7311.
*
* THE CONTENT OF THIS WORK CONTAINS CONFIDENTIAL AND PROPRIETARY
* INFORMATION OF SILICON GRAPHICS, INC. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IN ANY FORM, IN WHOLE, OR IN PART, IS STRICTLY
* PROHIBITED WITHOUT THE PRIOR EXPRESS WRITTEN PERMISSION OF SILICON
* GRAPHICS, INC.
*/
/*
* Copyright (c) 1989, 1993
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Guido van Rossum.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)glob.h 8.1 (Berkeley) 6/2/93
*/
#ifndef _GLOB_H
#define _GLOB_H
#ifdef __cplusplus
extern "C" {
#endif
#ident "$Revision: 1.9 $"
#include <sys/types.h>
/*
* MIPS ABI and X/Open glob_t structure.
* This structure conforms to the MIPS ABI BB2.0
* specification. Applications that are recompiled
* will use this structure by default.
*/
typedef struct {
size_t gl_pathc; /* Count of total paths so far. */
char **gl_pathv; /* List of paths matching pattern. */
size_t gl_offs; /* Reserved at beginning of gl_pathv. */
void *gl_pad[8];
} glob_t;
#if _SGIAPI
/*
* SGI implementation specific glob_t structure.
* Old applications which haven't been recompiled
* already are using this structure.
*/
typedef struct {
size_t gl_pathc; /* Count of total paths so far. */
char **gl_pathv; /* List of paths matching pattern. */
size_t gl_offs; /* Reserved at beginning of gl_pathv. */
size_t gl_matchc; /* Count of paths matching pattern. */
size_t gl_flags; /* Copy of flags parameter to glob. */
/* Copy of errfunc parameter to glob. */
int (*gl_errfunc) (const char *, int);
} sgi_glob_t;
#endif
#define GLOB_APPEND 0x0001 /* Append to output from previous call. */
#define GLOB_DOOFFS 0x0002 /* Use gl_offs. */
#define GLOB_ERR 0x0004 /* Return on error. */
#define GLOB_MARK 0x0008 /* Append / to matching directories. */
#define GLOB_NOCHECK 0x0010 /* Return pattern itself if nothing matches. */
#define GLOB_NOSORT 0x0020 /* Don't sort. */
#define GLOB_NOESCAPE 0x0040 /* Disable backslash escaping. */
#define GLOB_BRACE 0x0080 /* Expand braces ala csh. */
#define GLOB_MAGCHAR 0x0100 /* Pattern had globbing characters. */
#define GLOB_NOMAGIC 0x0200 /* GLOB_NOCHECK without magic chars (csh). */
#define GLOB_QUOTE 0x0400 /* Quote special chars with \. */
#define GLOB_TILDE 0x0800 /* Expand tilde names from the passwd file. */
#define GLOB_NOSYS (-1) /* The implementation does not support this */
#define GLOB_ABORTED (-2) /* The scan was stopped */
#define GLOB_NOSPACE (-3) /* Malloc call failed. */
#define GLOB_NOMATCH (-4) /* No existing pathname matches */
#define GLOB_ABEND (-4) /* Unignored error. */
/*
* Applications recompiled with this include file will use
* the new routines: __nglob() and __nglobfree(). Old application
* binaries will use the old routines in libc: glob() and globfree().
*/
int __nglob (const char *, int, int (*)(const char *, int), glob_t *);
void __nglobfree (glob_t *);
#ifndef _GLOB_INTERNAL
#if _ABIAPI
/* BB3.0 interfaces */
int _xglob (const int, const char *, int, int (*)(const char *, int), glob_t *);
void _xglobfree (const int, glob_t *);
#define _MIPSABI_GLOB_VER 2
/*REFERENCED*/
static int
glob(const char *__pattern, int __flags, int (*__errfunc)(const char *, int), glob_t *__pglob)
{
return _xglob(_MIPSABI_GLOB_VER, __pattern, __flags, __errfunc, __pglob);
}
/*REFERENCED*/
static void
globfree (glob_t *__pglob)
{
_xglobfree(_MIPSABI_GLOB_VER, __pglob);
}
#else /* _ABIAPI */
/*REFERENCED*/
static int
glob(const char *__pattern, int __flags, int (*__errfunc)(const char *, int), glob_t *__pglob)
{
return __nglob(__pattern, __flags, __errfunc, __pglob);
}
/*REFERENCED*/
static void
globfree (glob_t *__pglob)
{
__nglobfree(__pglob);
}
#endif /* _ABIAPI */
#endif /* _GLOB_INTERNAL */
#ifdef __cplusplus
}
#endif
#endif /* !_GLOB_H_ */

184
eoe/include/grio.h Normal file
View File

@@ -0,0 +1,184 @@
/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */
/* Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
/* UNIX System Laboratories, Inc. */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ident "$Revision: 1.10 $"
#ifndef _GRIO_DOT_H_
#define _GRIO_DOT_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/types.h>
#include <sys/grio.h>
/*
* maximum number of GRIO streams allowed without a license
*/
#define DEFAULT_GRIO_STREAMS 4
/*
* maximum number of GRIO streams allowed with an "unlimited" license
*/
#define UNLIMITED_GRIO_STREAMS MAX_NUM_RESERVATIONS
/*
* Subcommands for the GRIO_GET_STATS command.
*/
#define GRIO_FILE_RESVS 1
#define GRIO_DEV_RESVS 2
#define GRIO_PROC_RESVS 3
#define GGD_INFO_KEY 0x53637445
#define GGD_INFO_MAGIC 0x53637445
/*
* this structure defines statisical
* information maintained by the ggd daemon
*/
typedef struct ggd_node_summary {
dev_t node_num; /* device # for node */
int devtype; /* device type */
int max_io_rate; /* rate in kbytes/sec */
int remaining_io_rate; /* rate in kbytes/sec */
int optiosize; /* opt i/o size in bytes */
int num_opt_ios; /* max number of opt i/os */
} ggd_node_summary_t;
typedef struct ggd_info_summary {
int rev_count; /* updated when ggd restarts */
int ggd_info_magic; /* magic number */
int num_nodes; /* num enteries in node_info */
int active_cmd_count; /* num enteries in per_cmd_ */
int max_cmd_count; /* set to GRIO_MAX_COMMANDS */
int per_cmd_count[GRIO_MAX_COMMANDS];
ggd_node_summary_t node_info[1];
} ggd_info_summary_t;
/*
* This file contains the defintions of the structures used to hold
* the bandwidth information for each I/O device supported at SGI.
* It also defines the structures used to build the tree of devices
* currently available on the system.
*/
#define GET_DEVCLASSES() get_devclassptr(defaultoptiosize)
/*
* This is the maximum number of immediate subcategories that any single
* device category may have. There are 3 types of device categories:
* class, type, state
* A single class item cannot have more than NUM_DEV_ITEMS different types
* associated with it. Similarily, a single type item cannot have more
* than NUM_DEV_ITEMS different states associated with it.
*
*/
#define NUM_DEV_ITEMS 25
/*
* IO Adaptor Defines:
* Specific to Everest platform.
* If the number of boards in the INV_IOBD board class reach to
* 19, the IO4_ADAPTOR_TYPE will have to be changed.
* Currently, there is only the CLOVER2 and the EVIO board in the
* INV_IOBD board class.
*/
#define IO4_ADAPTOR_TYPE 19
/*
* Types of IO4 adaptors that currently support guaranteed rate I/O.
*/
#define IO4_ADAP_SCSI_TYPE 0
#define IO4_ADAP_VMECC_TYPE 1
#define IO4_ADAP_EPC_TYPE 2
#define IO4_ADAP_SCIP_TYPE 3
/*
* These next structures are used in the table.c file to construct a
* static table which contains the bandwidth information for each I/O
* device supported at SGI.
*/
/*
* This structure holds the optimal I/O size in bytes and the number of
* requests of optimal I/O size that can be completed by the device in
* one second.
*/
typedef struct dev_info {
int maxioops;
int optiosize;
} dev_info_t;
/*
* This structure contains the state information for a device.
*/
typedef struct dev_state {
int state_id;
dev_info_t dev_info;
} dev_state_t;
/*
* This structure contains the type information for a device and a list
* of all the states associated with that device.
*/
typedef struct dev_type {
dev_state_t dev_state[NUM_DEV_ITEMS];
dev_info_t dev_info;
} dev_type_t;
/*
* This structure contains the class information for a device and a list
* of all the types associated with that device.
*/
typedef struct dev_class {
dev_type_t dev_type[NUM_DEV_ITEMS];
dev_info_t dev_info;
} dev_class_t;
/*
* The length of the string which uniquely identifies a type of disk.
*/
#define DISK_ID_SIZE 28
/*
* This structure contains the device information of a single type of
* disk drive and the identification string for that type of drive.
*/
typedef struct dev_disk {
char disk_id[DISK_ID_SIZE];
dev_info_t dev_info;
} dev_disk_t;
/*
* external declarations for lib_grio
*/
extern int defaultoptiosize;
extern dev_info_t unknown_dev_info;
extern dev_info_t * get_dev_io_limits(int, int, int);
extern int grio_query_device(int, int, int, int);
extern int grio_action_list(int, grio_resv_t *);
extern int grio_associate_file( int, stream_id_t *);
extern int grio_query_fs( dev_t, int *, int *);
/*
* routines for backward compatibility only
*/
extern int grio_unreserve_bw( stream_id_t *);
extern int grio_reserve_file( int, grio_resv_t *);
extern int grio_reserve_fs( dev_t, grio_resv_t *);
#ifdef __cplusplus
}
#endif
#endif /* _GRIO_DOT_H_ */

77
eoe/include/grp.h Normal file
View File

@@ -0,0 +1,77 @@
#ifndef __GRP_H__
#define __GRP_H__
#ifdef __cplusplus
extern "C" {
#endif
#ident "$Revision: 1.33 $"
/*
*
* Copyright 1992, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */
/* Copyright (c) 1988 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
/* UNIX System Laboratories, Inc. */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#include <standards.h>
#include <sys/types.h>
struct group { /* see getgrent(3) */
char *gr_name;
char *gr_passwd;
gid_t gr_gid;
char **gr_mem;
};
extern struct group *getgrgid(gid_t);
extern struct group *getgrnam(const char *);
#if _XOPEN4UX
extern struct group *getgrent(void);
extern void endgrent(void);
extern void setgrent(void);
#endif /* _XOPEN4UX */
#if _SGIAPI || _ABIAPI
#ifdef _BSD_COMPAT
extern int initgroups(char *, int);
#else
extern int initgroups(const char *, gid_t);
#endif /* _BSD_COMPAT */
#endif
#if _SGIAPI
#include <stdio.h>
extern struct group *fgetgrent(FILE *);
extern int BSDinitgroups(char *, int);
extern int getgrmember(const char *, gid_t [], int, int);
extern struct group * fgetgrent_r(FILE *, struct group *, char *, size_t);
extern struct group * getgrent_r(struct group *, char *, size_t);
#endif /* _SGIAPI */
#if _POSIX1C
extern int getgrgid_r(gid_t, struct group *, char *, size_t, struct group **);
extern int getgrnam_r(const char *, struct group *, char *, size_t, struct group **);
#endif
#ifdef __cplusplus
}
#endif
#endif /* !__GRP_H__ */

32
eoe/include/hostreg.h Normal file
View File

@@ -0,0 +1,32 @@
/*
* hostreg.h 1.1 7/27/88 host registrar initial release.
*/
#include <sys/bsd_types.h>
#define REG_NEWNAME 1 /* allocate new IP address */
#define REG_RENAME 2 /* rename host */
#define REG_DELETE 3 /* delete host and free IP address */
#define MAX_ALIASES 60 /* allows maximum characters */
struct reg_info {
u_int action;
union {
struct {
u_long network;
u_long netmask;
} alloc_info;
struct {
char passwd[9];
char rename_info[32];
} change_info;
} info;
char aliases[MAX_ALIASES+1];
};
#define info_network info.alloc_info.network
#define info_netmask info.alloc_info.netmask
#define info_rename info.change_info.rename_info
#define info_passwd info.change_info.passwd
typedef struct reg_info reg_info;

71
eoe/include/ia.h Normal file
View File

@@ -0,0 +1,71 @@
/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */
/* Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
/* UNIX System Laboratories, Inc. */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ident "$Revision: 1.11 $"
#ifndef _IA_DOT_H_
#define _IA_DOT_H_
#ifdef __cplusplus
extern "C" {
#endif
/* structure for the master */
struct master {
char ia_name[32];
char ia_pwdp[14] ; /* user password + NULL */
long ia_uid;
long ia_gid;
long ia_lstchg; /* password lastchanged date */
long ia_min; /* minimum number of days between password changes */
long ia_max; /* number of days password is valid */
long ia_warn;/* number of days to warn user to change passwd */
long ia_inact;/* number of days the login may be inactive */
long ia_expire;/* date when the login is no longer valid */
long ia_flag; /* not used */
long ia_dirsz;
long ia_shsz;
long ia_sgidcnt;
char *ia_dirp;
char *ia_shellp;
char *ia_pwdpgm; /* name of passwd modification program */
gid_t *ia_sgidp;
};
typedef struct master *uinfo_t;
/*
* Declare all ANSI-C I&A functions
*/
extern int ia_openinfo(char *, uinfo_t *);
extern int ia_openinfo_next(uinfo_t *);
extern void ia_closeinfo(uinfo_t);
extern char * ia_get_name(uid_t);
extern int ia_get_sgid(uinfo_t, gid_t **, long *);
extern void ia_get_uid(uinfo_t, uid_t *);
extern void ia_get_gid(uinfo_t, gid_t *);
extern void ia_get_dir(uinfo_t, char **);
extern void ia_get_sh(uinfo_t, char **);
extern void ia_get_logpwd(uinfo_t, char **);
extern void ia_get_pwdpgm(uinfo_t, char **);
extern void ia_get_logchg(uinfo_t, long *);
extern void ia_get_logmin(uinfo_t, long *);
extern void ia_get_logmax(uinfo_t, long *);
extern void ia_get_logwarn(uinfo_t, long *);
extern void ia_get_loginact(uinfo_t, long *);
extern void ia_get_logexpire(uinfo_t, long *);
extern void ia_get_logflag(uinfo_t, long *);
#ifdef __cplusplus
}
#endif
#endif /* _IA_DOT_H_ */

37
eoe/include/iconv.h Normal file
View File

@@ -0,0 +1,37 @@
#ifndef _ICONV_H
#define _ICONV_H
#ifdef __cplusplus
extern "C" {
#endif
#ident "$Revision: 1.6 $"
/*
*
* Copyright 1995, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
#include <sys/types.h>
typedef void *iconv_t;
extern iconv_t iconv_open(const char *, const char *);
extern size_t iconv(iconv_t, char **, size_t *, char **, size_t *);
extern int iconv_close(iconv_t);
#ifdef __cplusplus
}
#endif
#endif /*_ICONV_H*/

195
eoe/include/iconv_cnv.h Normal file
View File

@@ -0,0 +1,195 @@
#ifndef _ICONV_CNV_H
#define _ICONV_CNV_H
#ifdef __cplusplus
extern "C" {
#endif
#ident "$Revision: 1.6 $"
/*
*
* Copyright 1995-1997 Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
#include <sgidefs.h>
#include <stdlib.h>
#include <wchar.h>
/*
* iconv_cnv.h
*/
#define ICONV_C_INITIALIZE 1 /* initialize the state */
#define ICONV_C_DESTROY 2 /* release resources of the state */
typedef int ICONV_S_RELPTR;
typedef size_t ( * ICONV_CNVFUNC )(
void * handle,
char ** inbuf,
size_t * inbytesleft,
char ** outbuf,
size_t * outbytesleft
);
typedef void * ( * ICONV_CTLFUNC )(
int func,
void * state,
void * conv,
int numtab,
void ** table
);
typedef wint_t ( * ICONV_BTOWC )(
int sb,
void ** handle
);
typedef int ( * ICONV_MBTOWC )(
wchar_t * p_wc,
const char * p_str,
size_t nstr,
void ** handle
);
typedef int ( * ICONV_MBLEN )(
const char * p_str,
size_t nstr,
void ** handle
);
typedef size_t ( * ICONV_MBSTOWCS )(
wchar_t * p_wc,
const char * p_str,
size_t nwc,
void ** handle
);
typedef int ( * ICONV_WCTOB )(
wint_t wc,
void ** handle
);
typedef int ( * ICONV_WCTOMB )(
char * p_str,
wchar_t wc,
void ** handle
);
typedef size_t ( * ICONV_WCSTOMBS )(
char * p_str,
const wchar_t * p_wc,
size_t nstr,
void * handle
);
/* ======== ICONV_LIB_METHODS ========================================= */
/* PURPOSE:
* stdlib methods
*/
typedef struct ICONV_LIB_METHODS {
int iconv_magic; /* Magic word */
#define ICONV_MAGIC_NUM 0xc0afb5aa
ICONV_BTOWC iconv_btowc; /* ptr to btowc function */
ICONV_MBTOWC iconv_mbtowc; /* ptr to mbtowc function */
ICONV_MBLEN iconv_mblen; /* ptr to mblen function */
ICONV_MBSTOWCS iconv_mbstowcs; /* ptr to mbtowcs function */
ICONV_CTLFUNC iconv_mbwcctl; /* ptr to ctl func for mbtowc */
ICONV_WCTOB iconv_wctob; /* ptr to wctob function */
ICONV_WCTOMB iconv_wctomb; /* ptr to wctomb function */
ICONV_WCSTOMBS iconv_wcstombs; /* ptr to wcstombs function */
ICONV_CTLFUNC iconv_wcmbctl; /* ptr to ctl func for wctomb */
struct SGCC_METHS * iconv_sgcc_meths; /* Pointer to methods for */
/* compose funcs */
long iconv_fill[ 9 ]; /* Expansion room */
} ICONV_LIB_METHODS;
/* ======== _iconv_mbhandle_t ========================================== */
/* PURPOSE:
*
*/
typedef struct _iconv_mbhandle_s {
void * iconv_handle[2];/* This is not state but handles*/
/* that can be used for stateless*/
/* encodings. */
struct ICONV_LIBSPEC
* iconv_spec; /* Spec. */
ICONV_LIB_METHODS iconv_meths[ 1 ];
struct {
struct ICONV_T_SPECKEY
* iconv_speckey; /* The key used to get this spec*/
struct ICONV_HEAD
* iconv_head; /* mother of all heads */
char iconv_allocated; /* Allocated by malloc */
/* free()'d on mbwc_close */
char iconv_cfill[ sizeof( void * ) -1 ];
long iconv_state[ 8 ]; /* State for use by conversion*/
void * iconv_fill[ 3 ]; /* expansion space */
} iconv_mb[ 1 ];
} * _iconv_mbhandle_t;
extern struct _iconv_mbhandle_s __libc_mbhandle[];
#define ICONV_MAGIC_RESVALS 0xdf023a59
/* ======== ICONV_REFER ============================================== */
/* PURPOSE:
* This structure for a REFERENCE in Resources.
*/
typedef
struct ICONV_REFER {
int iconv_node_type; /* File or Symbols ... */
union {
struct {
ICONV_S_RELPTR iconv_file_ref;
} _file;
struct {
ICONV_S_RELPTR iconv_object;
ICONV_S_RELPTR iconv_symbol;
} _symbols;
} _objs;
} ICONV_REFER;
#define ICONV_REFER_FILE 1
#define ICONV_REFER_SYMBOL 2
#ifdef __cplusplus
}
#endif
#endif

536
eoe/include/iconv_int.h Normal file
View File

@@ -0,0 +1,536 @@
#ifndef _ICONV_INT_H
#define _ICONV_INT_H
#ifdef __cplusplus
extern "C" {
#endif
#ident "$Revision: 1.7 $"
/*
*
* Copyright 1995-1997 Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
#include <sgidefs.h>
#include <iconv_cnv.h>
/*
* iconv_int.h
*/
/* ==================================================================== */
/* ==================================================================== */
/* ======== ICONV_METHODS ============================================= */
/* PURPOSE:
* Methods for the converter
*/
typedef struct ICONV_METHODS {
ICONV_CNVFUNC iconv_converter; /* ptr to cnv function */
ICONV_CTLFUNC iconv_control; /* ptr to control function */
} ICONV_METHODS;
/* ==================================================================== */
/* ==================================================================== */
/* Helper macros */
#define ICONV_S_MKADDR( typ, baddr, reladd ) \
( (typ)( \
( __mkaddr = ( reladd ), \
__mkaddr ? ( __mkaddr + ( char * ) ( baddr ) ) : 0 \
) \
) )
#define ICONV_S_DEFMKADDR register ICONV_S_RELPTR __mkaddr;
/* ==================================================================== */
/* ==================================================================== */
/* Internal structures */
typedef int ICONV_INT;
typedef short ICONV_SHORT;
typedef ICONV_S_RELPTR ICONV_S_OBJECTSPEC;
typedef ICONV_S_RELPTR ICONV_S_SYMBOL;
typedef ICONV_S_RELPTR ICONV_S_METHSPEC;
typedef ICONV_S_RELPTR ICONV_R_SPEC;
/* ======== ICONV_S_TBLS ============================================== */
/* PURPOSE:
* Specifier for table
*/
typedef struct ICONV_S_TBLS {
ICONV_S_RELPTR iconv_tableobject; /* DSO or a file relptr */
ICONV_S_SYMBOL iconv_table; /* iconv_table == 0 means file*/
} ICONV_S_TBLS;
/* ======== ICONV_S_SPEC ============================================== */
/* PURPOSE:
* Iconv converter specifier
*
* specifiers must be sorted.
*/
typedef struct ICONV_S_SPEC {
ICONV_INT iconv_specnum; /* specnum */
ICONV_S_METHSPEC iconv_meth; /* relptr to methods */
short iconv_ntable; /* This spec is a join of n tables */
ICONV_S_TBLS iconv_table[ 1 ];
} ICONV_S_SPEC;
/* ======== ICONV_S_LSPEC ============================================= */
/* PURPOSE:
* STDLIB converter spec
*/
typedef struct ICONV_S_LSPEC {
ICONV_INT iconv_specnum; /* specnum */
ICONV_S_OBJECTSPEC iconv_obj_lmth; /* relptr to object specifier*/
ICONV_S_SYMBOL iconv_sym_lmth; /* Symbol of stdlib methods */
short iconv_ntable_mbwc; /* Number of tables for mbwc*/
short iconv_ntable_wcmb; /* Number of tables for wcmb*/
ICONV_S_TBLS iconv_table[ 1 ];
} ICONV_S_LSPEC;
/* ======== ICONV_T_SPECKEY =========================================== */
/* PURPOSE:
* Spec keys are loaded first and are searchable. These are used
* both by iconv specs and stdlib specs.
*/
typedef struct ICONV_T_SPECKEY {
ICONV_S_RELPTR iconv_specifier[ 2 ];
#define ICONV_SRC 0
#define ICONV_DST 1
ICONV_R_SPEC iconv_spec; /* relative pntr to spec */
/* ICONV_S_SPEC */
} ICONV_T_SPECKEY;
/* ======== ICONV_T_METHOD ============================================ */
/* PURPOSE:
* Method record
*/
typedef struct ICONV_T_METHOD {
ICONV_INT iconv_num; /* method number */
ICONV_S_OBJECTSPEC iconv_algobject; /* relptr to object specifier*/
ICONV_S_SYMBOL iconv_algorithm; /* symbol to conversion algorithm*/
ICONV_S_OBJECTSPEC iconv_ctlobject; /* relptr to object specifier*/
ICONV_S_SYMBOL iconv_control; /* symbol to compute the size*/
/* of the conversion state */
} ICONV_T_METHOD;
/* ======== ICONV_T_SYMBOL ============================================ */
/* PURPOSE:
* Symbol structure type for shared file
*/
typedef struct ICONV_T_SYMBOL {
ICONV_INT iconv_num; /* symbol number */
ICONV_S_RELPTR iconv_name; /* relative pointer to symbol name */
} ICONV_T_SYMBOL;
/* ======== ICONV_T_OBJECTSPEC ======================================== */
/* PURPOSE:
* Object structure type for shared file
*/
typedef struct ICONV_T_OBJECTSPEC {
ICONV_INT iconv_num; /* object number */
ICONV_S_RELPTR iconv_name; /* relative pointer to object name */
} ICONV_T_OBJECTSPEC;
/* ======== ICONV_T_FILE ============================================ */
/* PURPOSE:
* File structure type for shared file
*/
typedef struct ICONV_T_FILE {
ICONV_INT iconv_num; /* file number */
ICONV_S_RELPTR iconv_name; /* relative pointer to file name */
} ICONV_T_FILE;
/* ======== ICONV_T_LOC_ALIAS ========================================= */
/* PURPOSE:
* A locale alias record
*/
typedef struct ICONV_T_LOC_ALIAS {
ICONV_S_RELPTR iconv_locale; /* relative pointer to locale name */
ICONV_S_RELPTR iconv_value; /* relative pointer to alias value */
} ICONV_T_LOC_ALIAS;
/* ======== ICONV_S_ALIAS_LIST ======================================== */
/* PURPOSE:
* Locale alias list
*/
typedef struct ICONV_S_ALIAS_LIST {
ICONV_INT iconv_count;
ICONV_S_RELPTR iconv_filler;
ICONV_T_LOC_ALIAS iconv_aliases[ 1 ];
} ICONV_S_ALIAS_LIST;
/* ======== ICONV_T_LOC_CODESET ======================================= */
/* PURPOSE:
* A locale codeset specifier
*/
typedef struct ICONV_T_LOC_CODESET {
ICONV_S_RELPTR iconv_locale; /* relative pointer to locale name */
ICONV_S_RELPTR iconv_value; /* relative pointer to alias value */
} ICONV_T_LOC_CODESET;
/* ======== ICONV_S_CODESET_LIST ====================================== */
/* PURPOSE:
* Codeset list
*/
typedef struct ICONV_S_CODESET_LIST {
ICONV_INT iconv_count;
ICONV_S_RELPTR iconv_filler;
ICONV_T_LOC_CODESET iconv_codesets[ 1 ];
} ICONV_S_CODESET_LIST;
/* ======== ICONV_T_LOC_RESOURCE ====================================== */
/* PURPOSE:
* A resource specifier
*/
typedef struct ICONV_T_LOC_RESOURCE {
ICONV_S_RELPTR iconv_resname; /* relative pointer to resource name */
ICONV_S_RELPTR iconv_value; /* relative pointer to resource value */
} ICONV_T_LOC_RESOURCE;
/* ======== ICONV_S_RESOURCE_LIST ===================================== */
/* PURPOSE:
* Resource list
*/
typedef struct ICONV_S_RESOURCE_LIST {
ICONV_INT iconv_count;
ICONV_S_RELPTR iconv_filler;
ICONV_T_LOC_RESOURCE iconv_resources[ 1 ];
} ICONV_S_RESOURCE_LIST;
/* ======== ICONV_S_TABLE ============================================= */
/* PURPOSE:
* On disk image of table of converters
*/
typedef struct ICONV_S_TABLE {
#define ICONV_MAGIC 0x3cb4ca1e
ICONV_INT iconv_magicnum; /* magic number */
ICONV_INT iconv_numfiles; /* number of files */
ICONV_INT iconv_nummethods; /* number of methods */
ICONV_INT iconv_numobject; /* number of objects */
ICONV_INT iconv_symbols; /* number of symbols */
ICONV_INT iconv_numspecobj; /* number of spec objects */
ICONV_INT iconv_numlspcobj; /* number of libspec objects*/
ICONV_S_RELPTR iconv_alias_list; /* relptr to list of aliases*/
ICONV_S_RELPTR iconv_codeset_list; /* relptr to list of codesets*/
ICONV_S_RELPTR iconv_resource_list;/* relptr to list of codesets*/
ICONV_INT iconv_numlibspec; /* number of stdlib specs */
ICONV_INT iconv_numspec; /* number of specifiers */
ICONV_T_SPECKEY iconv_speckey[1]; /* specifier keys */
} ICONV_S_TABLE;
/* ======== ICONV_SPEC ================================================ */
/* PURPOSE:
* Working version of iconv specifier
*/
typedef struct ICONV_SPEC {
ICONV_S_SPEC * iconv_s_spec;
ICONV_METHODS * iconv_meth; /* methods evaluated */
short iconv_numtab; /* number of tables */
void * iconv_table[ 1 ]; /* ptr to converter table */
} ICONV_SPEC;
/* ======== ICONV_LIBSPEC ============================================= */
/* PURPOSE:
* Working version of STDLIB spec
*/
typedef struct ICONV_LIBSPEC {
ICONV_S_LSPEC * iconv_s_spec;
ICONV_LIB_METHODS
* iconv_meth; /* methods evaluated */
short iconv_numtab_mbwc; /* number of tables for mbwc*/
short iconv_numtab_wcmb; /* number of tables for wcmb*/
void * iconv_table[ 1 ]; /* ptr to converter table */
} ICONV_LIBSPEC;
/* ======== ICONV_OBJECT ============================================== */
/* PURPOSE:
* Object pointer !
*/
typedef struct ICONV_OBJECT {
void * iconv_dlhandle; /* DSO handle */
} ICONV_OBJECT;
/* ======== ICONV_SYMBOL ============================================== */
/* PURPOSE:
* Symbol specifier.
*/
typedef struct ICONV_SYMBOL {
void * iconv_symptr; /* Pointer for symbol */
} ICONV_SYMBOL;
/* ======== ICONV_FILE ================================================= */
/* PURPOSE:
* File specifier.
*/
typedef struct ICONV_FILE {
void * iconv_fileptr; /* Pointer for symbol */
} ICONV_FILE;
/* ======== ICONV_HEAD ================================================ */
/* PURPOSE:
* Head of the iconv structures
*/
#define ICONV_DEF_TYPE( NAME, TYPNAME, STUN, DEFREF, ARRAY ) \
STUN TYPNAME { \
ICONV_SPEC DEFREF iconv_spec ARRAY; \
\
ICONV_LIBSPEC DEFREF iconv_lspc ARRAY; \
\
ICONV_SYMBOL DEFREF iconv_sym ARRAY; \
\
ICONV_OBJECT DEFREF iconv_obj ARRAY; \
\
ICONV_METHODS DEFREF iconv_meth ARRAY; \
\
ICONV_FILE DEFREF iconv_file ARRAY; \
} NAME \
/* End of define */
#define __ICONV_NADA
typedef ICONV_DEF_TYPE( ICONV_HASH_TYP_OF, ICONV_HASH_TYP_OF, union, __ICONV_NADA, [1]);
typedef ICONV_DEF_TYPE( ICONV_HASH_TYP, ICONV_HASH_TYP, union, *,__ICONV_NADA );
typedef ICONV_DEF_TYPE( ICONV_INDEXES, ICONV_INDEXES, struct, **,__ICONV_NADA );
/* A macro to compute table number from the ICONV_INDEXES structure */
#define ICONV_TBLNO( A ) ( ( int ) \
( \
( ( void ** ) &( ( ICONV_INDEXES * ) 0 )->A ) \
- ( ( void ** ) 0 ) \
) \
) \
/* End of define */
typedef struct ICONV_HASH_ELEM {
unsigned iconv_tblno:6; /* Which table it belongs to */
unsigned iconv_fill:2; /* unused bits */
unsigned iconv_index:24; /* What is it's index in the table*/
ICONV_HASH_TYP * iconv_data; /* the data being pointed to */
} ICONV_HASH_ELEM;
/* ======== ICONV_HASH_SETTING ======================================== */
/* PURPOSE:
* The settings for the hash operation. These values are extracted
* from the iconvtab as resource "hash_parameters". Default values
* are coded into iconv_lib.c .
*/
typedef struct ICONV_HASH_SETTING {
unsigned short iconv_nelems; /* Number of elems in tbl */
unsigned short iconv_max_occ; /* maximum allowed occupancy */
unsigned short iconv_hash_key[4];/* random hash key */
unsigned short iconv_thresh;
unsigned short iconv_flags;
} ICONV_HASH_SETTING;
typedef struct ICONV_HASH_HEAD {
ICONV_HASH_SETTING *iconv_hash_set;
unsigned short iconv_noccupied;/* Number currently inserted */
ICONV_HASH_ELEM iconv_elems[1]; /* hang the hash elements */
/* off here */
} ICONV_HASH_HEAD;
/* The purpose for hasing is that the iconvtab is often very large and */
/* likely getting bigger and large majority of applications will only call */
/* setlocale and it is a waste of memory and time initializing the entire */
/* indexing array for all possible iconv elements. Using a two tiered */
/* system, allocation is done by dropping elements into a hash table until */
/* it fills and then to allocate the full size index tables so that the */
/* majority of applications will only require the first tier. Setting */
/* the hash table size should be small so that little memory is requested */
/* but large enough to handle a couple of calls to setlocale for the two */
/* worst locales and also be a reasonable hashing number (prime) with some */
/* left over just in case since hash table elements are small. */
typedef struct ICONV_HEAD {
ICONV_S_TABLE * iconv_table; /* if this is nil head is not init'd*/
ICONV_HASH_HEAD * iconv_hashtab; /* ptr to hash table */
union ICONV_TABLE {
ICONV_INDEXES iconv_idx[ 1 ]; /* Tables when in index mode */
ICONV_HASH_TYP ** iconv_array[ sizeof(ICONV_INDEXES)/sizeof(void *) ];
} iconv_tbl[ 1 ];
} ICONV_HEAD;
/* MACRO's to handle hash two tiered access. */
#define ICONV_H_REFTBL( head, tbl, index, lock ) \
( \
head->iconv_hashtab ? \
iconv_hash_seek( head, ICONV_TBLNO( tbl ), index, lock )->tbl : \
( head->iconv_tbl->iconv_idx->tbl[ index ] ) \
) \
/* end of macro */
#define ICONV_H_WRITETBL( head, tbl, index, value, lock, errlabel ) \
if ( head->iconv_hashtab ) { \
if (!iconv_hash_write(head, ICONV_TBLNO(tbl),index,value,lock)) {\
goto errlabel; \
} \
} else { \
if ( ! lock ) { \
ICONV_LOCK \
} \
if ( head->iconv_tbl->iconv_idx->tbl[ index ] ) { \
if ( ! lock ) { \
ICONV_UNLOCK \
} \
goto errlabel; \
} \
head->iconv_tbl->iconv_idx->tbl[ index ] = value; \
if ( ! lock ) { \
ICONV_UNLOCK \
} \
} \
/* end of macro */
#define ICONV_HASHFUNC( hash_key, index, tblno, nelem ) \
( ( \
(((index)^((hash_key)[0])) * ((hash_key)[1])) \
+ (((tblno)^((hash_key)[2])) * ((hash_key)[3])) \
) % (nelem) ) \
/* end of macro */
extern const char * __iconv_tabname__;
#define ICONV_TABNAME __iconv_tabname__
extern char ** __iconv_tabdirs__;
#define ICONV_TABDIRS __iconv_tabdirs__
/* ======== iconv_t ============================================== */
/* PURPOSE:
* This structure contains the header of
*/
struct _t_iconv {
ICONV_CNVFUNC iconv_converter;/* Keep converter function in a */
/* convienient place to reduce */
/* access time when iconv() is called*/
void * iconv_state; /* any required cnv state memory*/
/* required by the algoritm */
ICONV_SPEC * iconv_spec; /* Spec. */
ICONV_T_SPECKEY * iconv_speckey; /* Spec key */
struct ICONV_HEAD * iconv_head; /* mother of all heads */
long iconv_a_state[ 8 ]; /* State for use by conversion*/
};
/* set default mbstate - */
extern int __mbwc_setmbstate( const char * loc );
extern char * __mbwc_locale_alias( const char * loc );
extern char * __mbwc_locale_codeset( const char * loc );
extern void * __iconv_get_resource ( char * resname, void ** relo_base );
extern void * __iconv_open_reference ( ICONV_REFER * p_ref );
#ifdef __cplusplus
}
#endif
#endif

91
eoe/include/invent.h Normal file
View File

@@ -0,0 +1,91 @@
#ifndef __INVENT_H__
#define __INVENT_H__
/*
* User-level interface to kernel hardware inventory.
*
*
* Copyright 1992-1993 Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*
*
* Setinvent initializes a copy of the kernel's hardware inventory list.
* It returns -1 with errno set if it cannot fetch or allocate the list.
* Getinvent returns a pointer to the next list item. Endinvent destroys
* the list. Getinvent may be called without first calling setinvent.
*
* Call scaninvent with an int function pointer and an optional opaque
* pointer to iterate over inventory items. For each item, scaninvent
* calls the pointed-at (scan) function with a pointer to that item as
* the first argument, and with the opaque pointer as the scan function's
* second argument. If the scan function returns a non-zero value,
* scaninvent stops scanning and returns that value. Otherwise it
* returns 0 after scanning all items. Scaninvent returns -1 if it
* cannot successfully setinvent before scanning.
*
* Scaninvent normally calls endinvent before returning. To prevent
* scaninvent from calling endinvent, set _keepinvent to 1.
*
* For multi-threaded applications there are recursive versions of
* these routines.
*/
#ident "$Revision: 1.10 $"
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/invent.h>
int setinvent(void);
inventory_t *getinvent(void);
void endinvent(void);
int scaninvent(int (*)(inventory_t *, void *), void *);
extern int _keepinvent;
typedef struct {
int inv_count; /* count of records */
inventory_t *inv_table;
int inv_curr; /* current record */
} inv_state_t;
int setinvent_r(inv_state_t **);
inventory_t *getinvent_r(inv_state_t *);
void endinvent_r(inv_state_t *);
/*
* Interfaces for dealing with device names via /hw for hwgraph devices.
* dev_to_devname tries to convert from a dev_t to a canonical device name.
* fdes_to_devname tries to convert from a special file file descriptor
* to a device name. filename_to_devname tries to convert from the
* name of a special file to the device name that it represents.
*/
char * dev_to_devname(dev_t dev, char *buf, int *length);
char * fdes_to_devname(int fdes, char *buf, int *length);
char * filename_to_devname(char *filename, char *buf, int *length);
/*
* Interfaces for dealing with device driver names (prefixes) for
* a given special file.
*/
char * dev_to_drivername(dev_t dev, char *buf, int *length);
char * fdes_to_drivername(int fdes, char *buf, int *length);
char * filename_to_drivername(char *filename, char *buf, int *length);
#ifdef __cplusplus
}
#endif
#endif /* !__INVENT_H__ */

137
eoe/include/langinfo.h Normal file
View File

@@ -0,0 +1,137 @@
#ifndef __LANGINFO_H__
#define __LANGINFO_H__
#ifdef __cplusplus
extern "C" {
#endif
#ident "$Revision: 1.6 $"
/*
*
* Copyright 1992, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */
/* Copyright (c) 1988 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
/* UNIX System Laboratories, Inc. */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
/*
* The seven days of the week in their full beauty
*/
#define DAY_1 1 /* sunday */
#define DAY_2 2 /* monday */
#define DAY_3 3 /* tuesday */
#define DAY_4 4 /* wednesday */
#define DAY_5 5 /* thursday */
#define DAY_6 6 /* friday */
#define DAY_7 7 /* saturday */
/*
* The abbreviated seven days of the week
*/
#define ABDAY_1 8 /* sun */
#define ABDAY_2 9 /* mon */
#define ABDAY_3 10 /* tue */
#define ABDAY_4 11 /* wed */
#define ABDAY_5 12 /* thu */
#define ABDAY_6 13 /* fri */
#define ABDAY_7 14 /* sat */
/*
* The full names of the twelve months...
*/
#define MON_1 15 /* january */
#define MON_2 16 /* february */
#define MON_3 17 /* march */
#define MON_4 18 /* april */
#define MON_5 19 /* may */
#define MON_6 20 /* june */
#define MON_7 21 /* july */
#define MON_8 22 /* august */
#define MON_9 23 /* september */
#define MON_10 24 /* october */
#define MON_11 25 /* november */
#define MON_12 26 /* december */
/*
* ... and their abbreviated form
*/
#define ABMON_1 27 /* jan */
#define ABMON_2 28 /* feb */
#define ABMON_3 29 /* mar */
#define ABMON_4 30 /* apr */
#define ABMON_5 31 /* may */
#define ABMON_6 32 /* jun */
#define ABMON_7 33 /* jul */
#define ABMON_8 34 /* aug */
#define ABMON_9 35 /* sep */
#define ABMON_10 36 /* oct */
#define ABMON_11 37 /* nov */
#define ABMON_12 38 /* dec */
/*
* plus some special strings you might need to know
*/
#define RADIXCHAR 39 /* radix character */
#define THOUSEP 40 /* separator for thousand */
#define YESSTR 41 /* affirmative response for yes/no queries */
#define NOSTR 42 /* negative response for yes/no queries */
#define CRNCYSTR 43 /* currency symbol */
/*
* Default string used to format date and time
* e.g. Sunday, August 24 21:08:38 MET 1986
*/
#define D_T_FMT 44 /* string for formatting date and time */
#define D_FMT 45 /* date format */
#define T_FMT 46 /* time format */
#define AM_STR 47 /* am string */
#define PM_STR 48 /* pm string */
/*
* expanded codes per X/Open rel4, ver 2
*/
#define CODESET 49 /* code set name */
#define T_FMT_AMPM 50 /* a.m. or p.m. time format string */
#define ERA 51 /* era description segments */
#define ERA_D_FMT 52 /* era date format string */
#define ERA_D_T_FMT 53 /* era date and time format string */
#define ERA_T_FMT 54 /* era time format string */
#define ALT_DIGITS 55 /* alternative symbols for digits */
#define YESEXPR 56 /* affirmative response expression */
#define NOEXPR 57 /* negative response expression */
#define _MAXSTRMSG 57 /* Maximum number of strings in langinfo */
/*
* and the definitions of functions langinfo(3C)
*/
#include <nl_types.h>
char *nl_langinfo(nl_item); /* get a string from the database */
#ifdef __cplusplus
}
#endif
#endif /* !__LANGINFO_H__ */

67
eoe/include/lastlog.h Normal file
View File

@@ -0,0 +1,67 @@
#ifndef __LASTLOG_H__
#define __LASTLOG_H__
#ifdef __cplusplus
extern "C" {
#endif
/*
*
* Copyright 1992, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */
/* Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
/* UNIX System Laboratories, Inc. */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ident "$Revision: 1.8 $"
/*******************************************************************
PROPRIETARY NOTICE (Combined)
This source code is unpublished proprietary information
constituting, or derived under license from AT&T's UNIX(r) System V.
In addition, portions of such source code were derived from Berkeley
4.3 BSD under license from the Regents of the University of
California.
Copyright Notice
Notice of copyright on this source code product does not indicate
publication.
(c) 1986,1987,1988,1989 Sun Microsystems, Inc
(c) 1983,1984,1985,1986,1987,1988,1989 AT&T.
All rights reserved.
********************************************************************/
struct lastlog {
time_t ll_time;
char ll_line[32]; /* same as in utmpx */
char ll_host[257]; /* same as in utmpx */
ulong ll_level; /* MAC security level */
};
#ifdef __cplusplus
}
#endif
#endif /* !__LASTLOG_H__ */

313
eoe/include/limits.h Normal file
View File

@@ -0,0 +1,313 @@
/*
*
* Copyright 1992,1993, 1994,1995 Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
/* Copyright (c) 1988 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ifndef __LIMITS_H__
#define __LIMITS_H__
#ident "$Revision: 7.41 $"
#include <standards.h>
#include <sgidefs.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Note - this header is an ANSI/POSIX/POSIX2/POSIX1b/POSIX1c header. Carefull!
*/
/*
* ANSI limits
*/
#define CHAR_BIT 8 /* max # of bits in a "char" */
#define CHAR_MAX UCHAR_MAX /* max value of a "char" */
#define CHAR_MIN 0 /* min value of a "char" */
#define INT_MAX 2147483647 /* max value of an "int" */
#define INT_MIN (-2147483647-1) /* min value of an "int" */
#define SCHAR_MIN (-128) /* min value of a "signed char" */
#define SCHAR_MAX 127 /* max value of a "signed char" */
#define UCHAR_MAX 255U /* max value of an "unsigned char" */
#define MB_LEN_MAX 5
#define SHRT_MIN (-32768) /* min value of a "short int" */
#define SHRT_MAX 32767 /* max value of a "short int" */
#define USHRT_MAX 65535U /* max value of an "unsigned short int" */
#define UINT_MAX 4294967295U /* max value of an "unsigned int" */
#if (_MIPS_SZLONG == 32)
#define LONG_MIN (-2147483647-1) /* min value of a "long int" */
#define LONG_MAX 2147483647 /* max value of a "long int" */
#define ULONG_MAX 4294967295U /* max value of an "unsigned long int" */
#endif
#if (_MIPS_SZLONG == 64)
#define LONG_MIN (-9223372036854775807L-1L) /* min value of a "long int" */
#define LONG_MAX 9223372036854775807L /* max value of a "long int" */
#define ULONG_MAX 18446744073709551615LU /* max value of an "unsigned long int" */
#endif
#if (_SGIAPI || _ABIAPI) && _NO_ANSIMODE
#define LONGLONG_MIN (-9223372036854775807LL-1LL) /* min "long long int" */
#define LONGLONG_MAX 9223372036854775807LL /* max "long long int" */
#define ULONGLONG_MAX 18446744073709551615LLU /* max "unsigned long long int" */
#endif
#if _POSIX90 && _NO_ANSIMODE
/* POSIX90 conformant definitions - An implementation may define
* other symbols which reflect the actual implementation. Alternate
* definitions may not be as restrictive as the POSIX definitions.
*/
#define _POSIX_ARG_MAX 4096
#define _POSIX_CHILD_MAX 6
#define _POSIX_LINK_MAX 8
#define _POSIX_MAX_CANON 255
#define _POSIX_MAX_INPUT 255
#define _POSIX_NAME_MAX 14
#define _POSIX_NGROUPS_MAX 0
#define _POSIX_OPEN_MAX 16
#define _POSIX_PATH_MAX 255
#define _POSIX_PIPE_BUF 512
#define _POSIX_SSIZE_MAX 32767
#define _POSIX_STREAM_MAX 8
#define _POSIX_TZNAME_MAX 3
#endif /* _POSIX90 */
#if _POSIX2 && _NO_ANSIMODE
/*
* POSIX 1003.2 (shell/commands) additions
*/
#define _POSIX2_BC_BASE_MAX 99
#define _POSIX2_BC_DIM_MAX 2048
#define _POSIX2_BC_SCALE_MAX 99
#define _POSIX2_BC_STRING_MAX 1000
#define _POSIX2_COLL_WEIGHTS_MAX 2
#define _POSIX2_EXPR_NEST_MAX 32
#define _POSIX2_LINE_MAX 2048
#define _POSIX2_RE_DUP_MAX 255
#endif /* _POSIX2 */
#if (_POSIX93 || _XOPEN5) && _NO_ANSIMODE
/*
* POSIX 1003.1b (real-time) additions
*/
#define _POSIX_RTSIG_MAX 8 /* max RT sigs for application use */
#define _POSIX_SIGQUEUE_MAX 32 /* max # of queued signals pending */
#define _POSIX_MQ_OPEN_MAX 8 /* num of msg queues per process */
#define _POSIX_MQ_PRIO_MAX 32 /* num of message priorities */
#define _POSIX_SEM_NSEMS_MAX 256 /* num of semaphores per process */
#define _POSIX_SEM_VALUE_MAX 32767 /* max value for a semaphore */
#define _POSIX_DELAYTIMER_MAX 32 /* num of timer expiration overruns */
#define _POSIX_TIMER_MAX 32 /* num of timers per process */
#define _POSIX_CLOCKRES_MIN 20000000/* min CLOCK_REALTIME res in ns */
#endif /* _POSIX93 || _XOPEN5 && _NO_ANSIMODE */
#if (_POSIX93 || _ABIAPI || _XOPEN5) && _NO_ANSIMODE
#define _POSIX_AIO_MAX 1 /* num of oustanding async I/O ops */
#define _POSIX_AIO_LISTIO_MAX 2 /* num of I/O operations per lio */
#define _ABI_AIO_XFER_MAX (128 *1024)
#endif /* _POSIX93 || _ABIAPI || _XOPEN5 */
#if (_XOPEN4UX || _XOPEN5) && _NO_ANSIMODE
#define _XOPEN_IOV_MAX 16
#endif /* _XOPEN4UX || _XOPEN5 */
#if _POSIX1C && _NO_ANSIMODE
#define _POSIX_LOGIN_NAME_MAX 9 /* length in bytes incl. null of name */
#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
#define _POSIX_THREAD_KEYS_MAX 128 /* # data keys per process */
#define _POSIX_THREAD_THREADS_MAX 64 /* # threads per process */
#define _POSIX_TTY_NAME_MAX 9
#endif /* _POSIX1C */
/*
* Real limits. Some are only available via sysconf/pathconf
*/
#if _POSIX90 && _NO_ANSIMODE
/*
* ARG_MAX
* CHILD_MAX
* LINK_MAX
* NAME_MAX
* OPEN_MAX
* PATH_MAX
* STREAM_MAX
* - are available only thru sysconf/pathconf
*/
#define NGROUPS_MAX 16 /* max number of groups for a user */
#define TZNAME_MAX 8 /* max # bytes for time zone name */
#ifndef PIPE_BUF
#define PIPE_BUF 10240 /* max # bytes atomic in pipe write */
#endif
#ifndef MAX_CANON
#define MAX_CANON 256
#endif
#ifndef MAX_INPUT
#define MAX_INPUT 512
#endif
#define SSIZE_MAX LONG_MAX /* yes, its an int but this does the
* right thing for 64 bits */
#endif /* _POSIX90 */
#if _POSIX2 && _NO_ANSIMODE
#define BC_BASE_MAX 99
#define BC_DIM_MAX 2048
#define BC_SCALE_MAX 99
#define BC_STRING_MAX 1000
#define COLL_WEIGHTS_MAX 2
#define EXPR_NEST_MAX 32
#define LINE_MAX 2048
#define RE_DUP_MAX 255
#endif /* _POSIX2 */
#if _XOPEN4 && _NO_ANSIMODE
/*
* X/Open 4 additions
*
* ATEXIT_MAX
* IOV_MAX
* PAGESIZE
* PAGE_SIZE
* - are available via sysconf/pathconf
*/
#define PASS_MAX 32 /* max # of characters in a password */
#define CHARCLASS_NAME_MAX 14
#define NL_ARGMAX 9 /* max value of "digit" in calls to the
* NLS printf() and scanf() */
#define NL_LANGMAX 14 /* max # of bytes in a LANG name */
#define NL_NMAX 1 /* max # of bytes in N-to-1 mapping characters */
/* also defined in nl_types.h */
#ifndef NL_SETMAX
#define NL_SETMAX 255
#define NL_MSGMAX 32767
#define NL_TEXTMAX 2048
#endif
#ifndef NZERO
#define NZERO 20 /* default process priority */
#endif
#ifndef TMP_MAX
#define TMP_MAX 17576 /* 26 * 26 * 26 */
#endif
#define WORD_BIT 32 /* # of bits in a "word" or "int" */
#if (_MIPS_SZLONG == 32)
#define LONG_BIT 32 /* # of bits in a "long" */
#endif
#if (_MIPS_SZLONG == 64)
#define LONG_BIT 64 /* # of bits in a "long" */
#endif
#define DBL_DIG 15 /* digits of precision of a "double" */
#define DBL_MAX 1.7976931348623157E+308 /* max decimal value of a "double"*/
#define DBL_MIN 2.2250738585072014E-308 /* min decimal value of a "double"*/
#define FLT_DIG 6 /* digits of precision of a "float" */
#ifdef __STDC__
#define FLT_MAX 3.40282347E+38F /* max decimal value of a "float" */
#define FLT_MIN 1.17549435E-38F /* min decimal value of a "float" */
#else
#define FLT_MAX 3.40282347E+38 /* max decimal value of a "float" */
#define FLT_MIN 1.17549435E-38 /* min decimal value of a "float" */
#endif /* __STDC__ */
#endif /* _XOPEN4 */
#if _SGIAPI && _NO_ANSIMODE
/*
* Note that for POSIX/XPG3: ARG_MAX, CHILD_MAX, NAME_MAX, OPEN_MAX, PATH_MAX,
* come LINK_MAX only from sysconf/pathconf, but for default environment we
* put in backward compatibility defines
*/
#ifndef ARG_MAX
#define ARG_MAX 5120
#endif
#define CHILD_MAX 25 /* max # of processes per user id */
#define NAME_MAX 255 /* max # of characters in a file name */
#ifndef OPEN_MAX
#define OPEN_MAX 20 /* max files a process can have open */
#endif
#ifndef PATH_MAX
#define PATH_MAX 1024 /* max # of characters in a path name */
#endif
#define LINK_MAX 30000 /* max # of links to a single file */
/*
* Note that PID_MAX is for compatibility with SVID2 and is not a reliable
* guide of a maximum pid value once the value is 'frozen' into a binary.
* This definition will be deleted in a future release of Irix
*/
#define PID_MAX 0x7fffffff /* max value for a process ID */
#ifndef PIPE_MAX
#define PIPE_MAX 10240 /* max # bytes written to pipe in a wrt */
#endif
#define STD_BLK 1024 /* # bytes in a physical I/O block */
#define UID_MAX 0x7fffffff /* max value for a user or group ID */
#define USI_MAX UINT_MAX /* max decimal value of an "unsigned" */
#if !defined(SYS_NMLN)
#define SYS_NMLN 257 /* SVR4.0 size of utsname elements */
/* also defined in sys/utsname.h */
#endif /* !SYS_NMLN */
#ifndef CLK_TCK
#define CLK_TCK sysconf(3) /* clock ticks per second */
/* 3 is _SC_CLK_TCK */
#endif
#define LOGNAME_MAX 8 /* max # of characters in a login name */
#endif /* _SGIAPI */
#if _SGIAPI && _NO_ANSIMODE
#if (defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS))
#ifndef HUGE_VAL
#ifndef __TYPEDEF_H_VAL
#define __TYPEDEF_H_VAL
typedef union _h_val {
#if (_MIPS_SZLONG == 32)
unsigned long i[2];
#endif
#if (_MIPS_SZLONG == 64)
__uint32_t i[2];
#endif
double d;
} _h_val;
#endif /* __TYPEDEF_H_VAL */
extern const _h_val __huge_val;
#define HUGE_VAL __huge_val.d
#endif /* !HUGE_VAL */
#endif /* _LANGUAGE_C || _LANGUAGE_C_PLUS_PLUS */
#endif /* _SGIAPI */
#ifdef __cplusplus
}
#endif
#endif /* !__LIMITS_H__ */

113
eoe/include/listen.h Normal file
View File

@@ -0,0 +1,113 @@
/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */
/* Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
/* UNIX System Laboratories, Inc. */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ident "@(#)listen:listen.h 1.4.3.1"
/*
* listen.h: Include file for network listener related user programs
*
*/
/*
* The NLPS (Network Listener Process Service)
* protocol message sent by client machines to
* a listener process to request a service on the listener's
* machine. The message is sent to "netnodename(r_nodename)"
* where r_nodename is the nodename (see uname(2)) of the
* remote host. Note that client's need not know (or care)
* about the details of this message. They use the "nls_connect(3)"
* library routine which uses this message.
*
* msg format:
*
* "id:low:high:service_code"
*
* id = "NLPS"
* low:high = version number of listener (see prot msg)
* service_code is ASCII/decimal
*
* the following prot string can be run through sprintf with a service code
* to generate the message:
*
* len = sprintf(buf,nls_prot_msg,svc_code);
* t_snd(fd, buf, len, ...);
*
* See also: listen(1), nlsrequest(3)
*
* and on the UNIX PC STARLAN NETWORK:
* See also: nlsname(3), nlsconnect(3), nlsestablish(3)
*/
/*
* defines for compatability purposes
*/
#define nls_prot_msg nls_v0_d
#define nls_v2_msg nls_v2_s
/* REFERENCED */
static char *nls_v0_d = "NLPS:000:001:%d";
/* REFERENCED */
static char *nls_v0_s = "NLPS:000:001:%s";
/* REFERENCED */
static char *nls_v2_d = "NLPS:002:002:%d";
/* REFERENCED */
static char *nls_v2_s = "NLPS:002:002:%s";
#define NLSSTART 0
#define NLSFORMAT 2
#define NLSUNKNOWN 3
#define NLSDISABLED 4
#define SVC_CODE_SZ 14
/*
* Structure for handling multiple connection requests on the same stream.
*/
struct callsave {
struct t_call *c_cp;
struct callsave *c_np;
};
struct call_list {
struct callsave *cl_head;
struct callsave *cl_tail;
};
#define EMPTYLIST(p) (p->cl_head == (struct callsave *) NULL)
/*
* Ridiculously high value for maximum number of connects per stream.
* Transport Provider will determine actual maximum to be used.
*/
#define MAXCON 100
/*
* these are names of environment variables that the listener
* adds to the servers environment before the exec(2).
*
* the variables should be accessed via library routines.
*
* see nlsgetcall(3X) and nlsprovider(3X).
*/
#define NLSADDR "NLSADDR"
#define NLSOPT "NLSOPT"
#define NLSUDATA "NLSUDATA"
#define NLSPROVIDER "NLSPROVIDER"
/*
* the following variables can be accessed "normally"
*/
#define HOME "HOME"
#define PATH "PATH"

71
eoe/include/locale.h Normal file
View File

@@ -0,0 +1,71 @@
#ifndef __LOCALE_H__
#define __LOCALE_H__
#ifdef __cplusplus
extern "C" {
#endif
#ident "$Revision: 1.9 $"
/*
*
* Copyright 1992, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
/* Copyright (c) 1988 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
struct lconv {
char *decimal_point;
char *thousands_sep;
char *grouping;
char *int_curr_symbol;
char *currency_symbol;
char *mon_decimal_point;
char *mon_thousands_sep;
char *mon_grouping;
char *positive_sign;
char *negative_sign;
char int_frac_digits;
char frac_digits;
char p_cs_precedes;
char p_sep_by_space;
char n_cs_precedes;
char n_sep_by_space;
char p_sign_posn;
char n_sign_posn;
};
#define LC_CTYPE 0
#define LC_NUMERIC 1
#define LC_TIME 2
#define LC_COLLATE 3
#define LC_MONETARY 4
#define LC_MESSAGES 5
#define LC_ALL 6
#ifndef NULL
#define NULL 0L
#endif
extern char *setlocale(int, const char *);
extern struct lconv *localeconv(void);
#ifdef __cplusplus
}
#endif
#endif /* !__LOCALE_H__ */

105
eoe/include/locale_attr.h Normal file
View File

@@ -0,0 +1,105 @@
/**************************************************************************
* *
* Copyright (C) 1997 Silicon Graphics, Inc. *
* *
* These coded instructions, statements, and computer programs contain *
* unpublished proprietary information of Silicon Graphics, Inc., and *
* are protected by Federal copyright law. They may not be disclosed *
* to third parties or copied or duplicated in any form, in whole or *
* in part, without the prior written consent of Silicon Graphics, Inc. *
* *
**************************************************************************/
#ifndef __ATTR_H__
#define __ATTR_H__
#include <sgidefs.h>
#ifdef __cplusplus
extern "C" {
#endif
#ident "$Revision: 1.4 $"
/*
* This header file contains the definition of the __attr_t type and the
* declaration of the global attribute object __libc_attr.
*
* The __attr_t structure is the first attempt to regroup into one type
* all the information that defines a locale. This type is the foundation
* to the implementation of the m_* functions.
*
* The __libc_attr structure is a global instance that is referenced by
* existing functions that use locale-dependent information.
*/
/*
* This structure defines the contents of the LC_CTYPE
* file. The file is mapped into memory and its first
* three fields are accessed through macros and functions.
*
* NOTE: The current LC_CTYPE file also holds the old ctype structure
* which is not described here.
*/
typedef struct {
unsigned int _class [ 257 ];
signed short _lower [ 257 ];
signed short _upper [ 257 ];
char _cswidth [ 7 ];
char _fill [ 1 ];
/* Beginning of the optional tables generated by wchrtbl */
} __ctype_t;
/* Type of functions used for the ISSET2 and ISSET3 macros */
typedef int (*__isset_func_t)(int);
#ifndef _WINT_T
# define _WINT_T
#if (_MIPS_SZLONG == 32)
typedef long wint_t;
#endif
#if (_MIPS_SZLONG == 64)
typedef __int32_t wint_t;
#endif
#endif
/* Type of function used for the iscodeset macros */
typedef int (*__iscodeset_func_t)(int, wint_t);
/* Locale attribute structure */
typedef struct __attr {
__ctype_t * _ctype_tbl; /* Character class information and upper-lower conversion */
struct _csinfo { /* EUC encoding information */
unsigned char _eucwidth[3]; /* Extended character set width */
unsigned char _scrwidth[3]; /* Extended character set screen width */
unsigned char _mb_cur_max; /* Maximum bytes per character in current encoding */
} _csinfo;
struct _euc_func { /* EUC related functions */
int _is_euc; /* Indicates if the current locale is an EUC encoding */
__isset_func_t _isset2; /* Substitions for ISSET2 macros */
__isset_func_t _isset3; /* Substitions for ISSET3 macros */
__iscodeset_func_t _iscodeset; /* iscodeset functions */
} _euc_func;
struct _collate_res { /* Resources related to LC_COLLATE category */
unsigned char _coll_as_cmp; /* strcoll()/strxfrm() behave as strcmp()/strcpy() */
} _collate_res;
void * _fill[15]; /* Reserves space for future use */
} __attr_t;
#define _IS_EUC_LOCALE (__libc_attr._euc_func._is_euc)
/* The global locale attribute structure */
extern __attr_t __libc_attr;
#ifdef __cplusplus
}
#endif
#endif /* __ATTR_H__ */

View File

@@ -0,0 +1,73 @@
#!smake
#
# Makefile to install include/make files
#
# $(ROOT)/usr/include/make/commondefs comes from here, so ...
include releasedefs
NO_RELEASEDEFS=yes
include commondefs
INST= $(INSTALL) -F /usr/include/make -m 444
LDIRT=so_locations.dev so_locations so_locations_64.dev so_locations_64 \
so_locations_N32 so_locations_N32.dev
#
# DEVSOL - versions for ROOT
#
DEVSOL=so_locations.dev so_locations_N32.dev so_locations_64.dev
default: $(DEVSOL)
include commonrules
headers:so_locations so_locations_N32 so_locations_64
RAWIDB= $(INSTALL) -F /usr/lib -m 644 so_locations
RAWIDB= $(INSTALL) -F /usr/lib64 -m 644 -src so_locations_64 so_locations
RAWIDB= $(INSTALL) -F /usr/lib32 -m 644 -src so_locations_N32 so_locations
RAWIDB= $(INST) startversion commondefs commonrules releasedefs \
cmdcommondefs cmdcommonrules \
libleafrules libleafdefs librootdefs \
librootrules ismcommonrules ismcommondefs \
cordrules corddefs odefs oodefs o256podefs
#
# Building the BUILD version consists of taking the master version and
# changing the start address from the application start to the SGI start.
# (for 32 bit there is no difference)
#
so_locations so_locations_N32:so_locations.master
cp so_locations.master $@
chmod 644 $@
so_locations_64:so_locations_64.master
sed -n '1,/# Non SGI libraries should be below 0x0000004000000000 (1\/4Tb)/p' so_locations_64.master > so_locations_64
echo '$$start_address=0x000000000d980000' >> $@
chmod 644 $@
#
# Building the ROOT version consists of taking the BUILD version and
# changing the mode.
#
$(DEVSOL):$$(@:.dev=)
cp $(@:.dev=) $@
chmod 0644 $@
install: default $(_FORCE)
$(INST) startversion commondefs commonrules releasedefs \
cmdcommondefs cmdcommonrules \
libleafrules libleafdefs librootdefs \
librootrules ismcommonrules ismcommondefs \
cordrules corddefs odefs oodefs o256podefs
$(INSTALL) -F /usr/lib -m 444 -src so_locations.master so_locations
$(INSTALL) -F /usr/lib -m 644 -src so_locations.dev so_locations
@#
@# so_locations for 64bit libs
@#
$(INSTALL) -F /usr/lib64 -m 444 -src so_locations_64.master so_locations
$(INSTALL) -F /usr/lib64 -m 644 -src so_locations_64.dev so_locations
@#
@# so_locations for N32bit libs
@#
$(INSTALL) -F /usr/lib32 -m 444 -src so_locations.master so_locations
$(INSTALL) -F /usr/lib32 -m 644 -src so_locations_N32.dev so_locations

View File

@@ -0,0 +1,136 @@
#
# $Revision: 1.8 $
#
# Commondefs for building multiple versions of commands with different
# compiler flags.
#
# One can either select from one of the 'popular' versions, as defined in
# commondefs, or invent a new version. If one picks from the list
# in commondefs, then all the compiler flags will be set automatically
# otherwise one must use VERSION_* flags to customize the compile.
# commondefs defines generic versions for each ABI -
# 32 - for the ucode/MIPS ABI
# 64 - for 64 bit
# N32 - for the new 32 bit ABI
# These are independent of ISA, which can be decided on a release by
# release basis. It is recommended that 1 or all of these be chosen
# rather than any of the others in commondefs or a private version.
#
# Before including cmdcommondefs the Makefile must define:
#
# BASEVERSION - a string identifying the build to take place in the current
# directory, such as '32bit'.
# ALTVERSIONS - a list of strings identifying other alternate build areas.
#
# Every version requires a `versiondefs' file that customize that make for that
# version. The BASEVERSION versiondefs file is simply 'versiondefs' in the
# current directory; other alternate versiondefs files are prepended with the
# version name. For example, if the ALTVERSIONS=64bit, a `64bitversiondefs'
# file is required.
# Note that the values for BASEVERSION/ALTVERSIONS affect ONLY the makefile
# targets/operations - they have nothing to do with options or objects produced.
#
# Each versiondefs file MUST define:
#
# VERSION - this must match either BASEVERSION or something in the ALTVERSIONS
# list.
#
# Each versiondefs file will probably want to define:
#
# OBJECT_STYLE - which ABI/ISA should this version be built as.
# If left blank, than either the one specified in the top makefile
# or the default specified in releasedefs will be used.
#
# COMMANDS - the list of targets to build - if the list of objects to make
# is the same for all versions, COMMANDS may be set once in the
# top makefile. It must be set EITHER in a versiondefs file OR
# in the top makefile.
#
# Options common to all versions should be specified in the top Makefile
# by setting LCOPTS, LCDEFS, etc..
# Additional options for a particular verion can be added using:
# LCOPTS+=-foo
# In the appropriate versiondefs file
# Note that one should either:
# a) include cmdcommondefs AFTER setting L* OR
# b) use the += construct in the top makefile also
#
# N.B. - a) assumes that the default rule in the makefile contains $(TARGETS)
# b) assumes that makefile doesn't redefine TARGETS
#
CMDCOMMONRULES=$(ROOT)/usr/include/make/cmdcommonrules
#
# include releasedefs - it defines compiler versions and default build modes
# versiondefs needs it. It will also be included later from commondefs
#
include $(ROOT)/usr/include/make/releasedefs
#
# include version specific definitions
# This most likely sets OBJECT_STYLE which commondefs needs
#
#include <versiondefs>
#
# include normal commondefs
#
include $(ROOT)/usr/include/make/commondefs
COMMONPREF=cmd
#
# NOTE - the quotes are important here to force a string comaprison - otherwise
# #if the variable value began with a number, it might match (e.g. 32bit and
# 32elf match)
#
#if $(VERSION) == "$(BASEVERSION)"
TARGETS = $(COMMANDS) $(ALTVERSIONS)
SUBDIRS=$(ALTVERSIONS)
#if defined(ALTVERSIONS)
ALTVERSIONS_MAKERULE=$(SUBDIRS_MAKERULE)
#else
ALTVERSIONS_MAKERULE=
#endif
#
# sigh - we really can't afford to be doing the ALTVERSIONS at the same
# time as the top level makefile - but this means that the top level doesn't
# get run in parallel. There are some solutions (using .ORDER) if we can
# redefine the default rule, but that doesn't seem like a good idea.
# So we offer a solution - if the makefile doesn't mind having a new 'default'
# target, they can get parallelism
#
#if defined(WANTPARALLEL)
cmddefault!cmdbase $(ALTVERSIONS)
#else
.NOTPARALLEL:
#endif
#else
TARGETS=$(COMMANDS)
ALTVERSIONS_MAKERULE=
#endif
#
# The ALTVERSIONS dirs are created by tlinking. We exclude the a.outs in
# the base version, all intermediate objects, the depend file and versiondefs.
# We also exclude ALTVERSIONS itself to prevent infinite recursion by tlink.
#
TLINKXARGS = $(COMMANDS:S/^/-x'^/g:S/$/\$'/g) -x '^.*\.[oai]$$' \
-x '^.*\.so$$' \
-x '$(MKDEPFILE)' -x 'versiondefs' \
-x 'y.output' -x 'y.tab.[ch]' \
$(ALTVERSIONS:S/^/-x'^/g:S/$/\$'/g)
#
# IDB tags for 32 and 64 bit versions
#
IDB_TAG32=-idb "mach(MODE=32bit)"
IDB_TAG64=-idb "mach(MODE=64bit)"

View File

@@ -0,0 +1,39 @@
#
# $Revision: 1.4 $
#
# Commonrules for building multiple versions of commands with different flags.
#
# Rules of use described in `cmdcommondefs'.
#
#
# Common targets. The basic idea is that a make in the current (base)
# directory will descend into subdirectories if necessary; in the leaf
# (alternate version) directories it will not.
#
rmtargets!$(COMMONPREF)$$@
clobber!$(COMMONPREF)$$@
clean!$(COMMONPREF)$$@
$(ALTVERSIONS_MAKERULE)
install!$(VERSION)install
$(ALTVERSIONS_MAKERULE)
cmdbase!$(COMMANDS)
.ORDER: cmdbase $(ALTVERSIONS)
include $(COMMONRULES)
#
# Create the alternate version directory with tlink, descend into there
# and make.
#
$(ALTVERSIONS)!
$(TLINK) -r $(TLINKXARGS) . $(.TARGET)
rm -f $(.TARGET)/versiondefs
ln -sf ../$(.TARGET)versiondefs $(.TARGET)/versiondefs;
cd $(.TARGET); $(MAKE)
.MAKE:$(ALTVERSIONS)

View File

@@ -0,0 +1,948 @@
# Copyright 1990-1995 Silicon Graphics, Inc. All rights reserved.
#
#ident "$Revision: 1.195 $"
#
# Common makefile definitions.
#
# Notes:
# - Definitions with the same names only need to be passed on the
# command line of recursive makes if they would be redefined by
# the sub-makefile. Definitions passed on the command line are
# not reset by the environment or the definitions in the makefile.
# - C++ style macros are deprecated and will be removed when out of use.
# They must be interwoven in definitions to keep upward compatibility.
#
# - The contents of this header are changed based on some variables
# should be defined BEFORE including this file:
# OBJECT_STYLE - define basic ABI/ISA that should be used to create product.
# this also sets LD search paths, C/C++/Fortran/Pascal options.
# NO_OBJECT_STYLE - disable all this new OBJECT_STYLE business.
# Note that if one does this all the info in releasedefs about
# compiler versions, default compilation modes etc will be ignored.
# Only smake-files can do this.
# NO_LSRCH - do not set any library searching rules for LD options.
# ASTYLE - by default, the ABI/ISA for C is used for assembler -
# setting ASTYLE (to be assembler options) can override the OBJECT_STYLE
# to permit fine-tuning of asm code.
# NO_STARTOPT - don't set any of the DSO start option macros - this
# will keep the global so_locations files from being updated.
#
COMMONRULES= $(ROOT)/usr/include/make/commonrules
COMMONTARGS= clobber clean rmtargets fluff tags
PRODUCTDEFS= $(ROOT)/usr/include/make/$(PRODUCT)defs
RELEASEDEFS= $(ROOT)/usr/include/make/releasedefs
# include releasedefs by default
#if !defined(NO_RELEASEDEFS)
include $(RELEASEDEFS)
#endif
# Build tools, i.e., programs which are used as part of the build
# process. These must run on all supported build environments
# (currently IRIX 6.2 and up).
AR = $(TOOLROOT)/usr/bin/ar
AS = $(TOOLROOT)/usr/bin/as $(ENDIAN)
BISON = $(TOOLROOTSAFE) $(TOOLROOT)/usr/bin/bison
C++ = $(TOOLROOT)/usr/bin/CC
C++C = $(TOOLROOT)/usr/bin/CC
CC = $(TOOLROOT)/usr/bin/cc
CORD = $(TOOLROOT)/usr/bin/cord
CXX = $(C++)
F77 = $(TOOLROOT)/usr/bin/f77
FC = $(TOOLROOT)/usr/bin/f77
FLEX = $(TOOLROOTSAFE) $(TOOLROOT)/usr/bin/flex
GNUM4 = $(TOOLROOTSAFE) $(TOOLROOT)/usr/bin/gnum4
LEX = $(TOOLROOT)/usr/bin/lex -l $(ROOT)/usr/lib/lex/ncform
LD = $(TOOLROOT)/usr/bin/ld
LIBSPEC = $(TOOLROOT)/usr/sbin/libspec
LINT = $(TOOLROOT)/usr/bin/lint
LORDER = $(TOOLROOT)/usr/bin/lorder
MKF2C = $(TOOLROOT)/usr/bin/mkf2c
NM = $(TOOLROOT)/usr/bin/nm
PC = $(TOOLROOT)/usr/bin/pc
SETMAGIC= $(TOOLROOT)/usr/sbin/setmagic
SIZE = $(TOOLROOT)/usr/bin/size
STRIP = $(TOOLROOT)/usr/bin/strip
TAG = $(TOOLROOT)/usr/sbin/tag
TLINK = $(TOOLROOT)/usr/sbin/tlink
YACC = $(TOOLROOTSAFE) $(TOOLROOT)/usr/bin/yacc -P $(ROOT)/usr/lib/yaccpar
# A shell script which does whatever needs to be done to make toolroot
# binaries run on build machines (which may be running anything from
# IRIX 6.2 to 6.5).
#if defined(TOOLROOT) && $(TOOLROOT) != "/"
TOOLROOTSAFE = $(TOOLROOT)/usr/sbin/toolrootsafe
#endif
# XXX remove this as soon as we port libgl's makefiles to DSO
MKSHLIB = $(TOOLROOT)/usr/bin/mkshlib
# Old TOOLROOT-prefixed macros. References should be replaced with
# native 'echo', sh, etc. since special versions shouldn't really be
# needed
SHELL = /bin/sh
AWK = awk
NAWK = nawk
ECHO = echo
M4 = m4
#
# The native tools, which must be used when building programs that are
# run on the build host from a makefile. Use of these macros are
# deprecated, since we don't want to make assumptions about what's
# installed on the host. Instead, we rely on TOOLROOTSAFE to make sure
# that everything in the toolroot can run on all supported build
# environments.
HOST_CC = TOOLROOT= /usr/bin/cc
HOST_C++ = TOOLROOT= /usr/bin/CC
HOST_CXX = $(HOST_C++)
HOST_LD = TOOLROOT= /usr/bin/ld
HOST_YACC = _XPG= TOOLROOT= /usr/bin/yacc -p /usr/lib/yaccpar
HOST_LEX = TOOLROOT= /usr/bin/lex -l /usr/lib/lex/ncform
HOST_CFLAGS = $(CFLAGS:S/$(ROOT)//g)
HOST_C++FLAGS = $(C++FLAGS:S/$(ROOT)//g)
HOST_CXXFLAGS = $(HOST_C++FLAGS)
HOST_LDFLAGS = $(LDFLAGS:S/$(ROOT)//g)
HOST_CCF = $(HOST_CC) $(HOST_CFLAGS)
HOST_C++F = $(HOST_C++) $(HOST_C++FLAGS)
HOST_CXXF = $(HOST_C++F)
HOST_LDF = $(HOST_LD) $(HOST_LDFLAGS)
HOST_YACCF = $(HOST_YACC) $(YFLAGS)
HOST_LEXF = $(HOST_LEX) $(LFLAGS)
#
# Popular ABI/ISA combinations supported here:
#
# 32_M2 - MIPS/ABI; 32 bit; mips2
# 32_ABI - MIPS/ABI; 32 bit; mips1; ABI restrictions
# N32_M3 - new calling convention; 32 bit; mips3
# N32_M4 - new calling convention; 32 bit; mips4
# 64_M3 - new calling convention; 64 bit; mips3
# 64_M4 - new calling convention; 64 bit; mips4
# 64_ABI - MIPS/ABI; 64 bit; mips3/4; ABI restrictions
#
# The following are 'generic' these should be used unless fine control
# over ISA is required (releasedefs decides which ISA):
#
# 32 - MIPS/ABI; 32 bit;
# N32 - new calling convention; 32 bit;
# 64 - new calling convention; 64 bit;
#
ALLSTYLES=32 32_M2 32_ABI N32 N32_M3 N32_M4 64 64_M3 64_M4 64_ABI
#
# ENDIAN is defined only when cross-compiling
# it normally comes from the $(PRODUCT)defs file.
#
# The -nostdinc flag is defined to defeat searches of /usr/include in
# a cross development environment. Where it is placed on the command line
# does not matter. This replaces the nullary -I flag.
# Turn off some silly ansi warnings:
# The $(LWOFF) allows makefiles to set local warnings to ignore
# (note that a leading ',' with no whitespace is required).
#
# Criteria for adding a global woff:
# a) it in no way could indicate a potential bug in the software.
# This assumes that the software is required only to run on
# SGI equipment with SGI compilers.
# b) The infraction is ubiquitous. If only a few pieces of software
# suffer from a given warning - they should turn it off in
# their own Makefile (or fix it!).
#
# The ignored 3.XX compiler warnings are as followings:
#
# 515 - Constant is out of range and may be truncated
# 608 - Undefined the ANSI standard library defined macro <macro>
# 658 - bit-field <name> type required to be int, unsigned int,
# or signed int
# 799 - <keyword/type> is not standard ANSI
# 803 - Ignored invalid warning number(s) in -woff option
# 852 - can be const qualified (-wlint)
#
# The ignored 4.XX compiler warnings are as follows:
# 1048 - cast between pointer-to-object and pointer-to-function
# 1233 - explicit type is missing ("int" assumed)
# 1499 - -woff arguments must be in the range ...
# 1685 - The v6.02 compiler changes woff #1499 to 1685.
# The specific error is "invalid error number <warning number>"
WOFF=-woff 1685,515,608,658,799,803,852,1048,1233,1499$(LWOFF)
#
# Default C version, optimizer, common global options, and make-depend options.
#
CVERSION =
OPTIMIZER = -O
MKDEPOPT = -MDupdate $(MKDEPFILE)
COMMONGOPTS=$(OPTIMIZER) $(MKDEPOPT) $(ENDIAN)
#
# Pick appropriate STYLE - releasedefs defines the default
# Note that binaries that don't have absolute ISA requirements should use
# the generic OBJECT_STYLE={64, 32, N32}. This permits the default to be
# set by releasedefs
#
CSTYLE_32_M2 = -mips2 -o32
CSTYLE_32_ABI= -mips1 -o32 -D_MIPSABI_SOURCE=3
CSTYLE_N32_M3= -mips3 -n32
CSTYLE_N32_M4= -mips4 -n32
CSTYLE_R32 = -mips3 -r32
CSTYLE_64_M3 = -mips3 -64
CSTYLE_64_M4 = -mips4 -64
CSTYLE_64_ABI = -mips3 -64 -D_MIPSABI_SOURCE=3
# 'generic' styles - per ABI. releasedefs sets what it is.
# DEF_CSTYLE's are set in releasedefs
CSTYLE_32 = $(DEF_CSTYLE_32)
CSTYLE_N32 = $(DEF_CSTYLE_N32)
CSTYLE_64 = $(DEF_CSTYLE_64)
#
# Set OBJECT_STYLE if it hasn't already been set - note that std 'make'files
# will get this value. This is somewhat convoluted to be sure that
# 'make'-files will get the 'correct' value
#
#if defined(NO_OBJECT_STYLE)
OBJECT_STYLE=NONE
#endif
#if !defined(OBJECT_STYLE)
OBJECT_STYLE = $(DEF_OBJECT_STYLE)
#endif
#if $(OBJECT_STYLE) == "64"
CSTYLE=$(CSTYLE_64)
#elif $(OBJECT_STYLE) == "64_M3"
CSTYLE=$(CSTYLE_64_M3)
#elif $(OBJECT_STYLE) == "64_M4"
CSTYLE=$(CSTYLE_64_M4)
#elif $(OBJECT_STYLE) == "64_ABI"
CSTYLE=$(CSTYLE_64_ABI)
#elif $(OBJECT_STYLE) == "32_ABI"
CSTYLE=$(CSTYLE_32_ABI)
#elif $(OBJECT_STYLE) == "N32"
CSTYLE=$(CSTYLE_N32)
#elif $(OBJECT_STYLE) == "N32_M3"
CSTYLE=$(CSTYLE_N32_M3)
#elif $(OBJECT_STYLE) == "N32_M4"
CSTYLE=$(CSTYLE_N32_M4)
#elif $(OBJECT_STYLE) == "R32"
CSTYLE=$(CSTYLE_R32)
#elif $(OBJECT_STYLE) == "32"
CSTYLE=$(CSTYLE_32)
#elif $(OBJECT_STYLE) == "32_M2"
CSTYLE=$(CSTYLE_32_M2)
#elif $(OBJECT_STYLE) == "NONE"
CSTYLE=
#else
# set in releasedefs
# This is the one that 'make' sees
CSTYLE=$(DEF_CSTYLE)
#endif
GCOPTS = $(CSTYLE) $(OPTIMIZER) $(ENDIAN) $(MKDEPOPT) $(WOFF)
GCDEFS =
GCINCS = -nostdinc -I$(INCLDIR)
#
# Cc flags, composed of:
# variable (V*) (set on the command line),
# local (L*) (defined in the makefile),
# global (defined in this file),
# parts, in that order. This ordering has been used so that the variable or
# locally specified include directories are searched before the globally
# specified ones.
#
CFLAGS = $(CVERSION) $(VCFLAGS) $(LCFLAGS) $(GCFLAGS)
#
# Each of these three components is divided into defines (-D's and -U's),
# includes (-I's), and other options. By segregating the different
# classes of flag to cc, the defines (CDEFS) and includes (CINCS) can be
# easily given to other programs, e.g., lint.
#
# Notes:
# - The local assignments should be to LCOPTS, LCDEFS, and LCINCS, not to
# LCFLAGS, although CFLAGS will be correctly set if this is done.
# - If a program cannot be optimized, it should override the setting of
# OPTIMIZER with a line such as "OPTIMIZER=" in its make file.
# - If a program cannot be compiled with ANSI C, its makefile
# should set CVERSION=-cckr
#
VCFLAGS = $(VCDEFS) $(VCINCS) $(VCOPTS)
LCFLAGS = $(LCDEFS) $(LCINCS) $(LCOPTS)
GCFLAGS = $(GCDEFS) $(GCINCS) $(GCOPTS)
COPTS = $(VCOPTS) $(LCOPTS) $(GCOPTS)
CDEFS = $(VCDEFS) $(LCDEFS) $(GCDEFS)
CINCS = $(VCINCS) $(LCINCS) $(GCINCS)
#
# CXX flags are decomposed using the same hierarchy as C flags.
#
C++FLAGS = $(CVERSION) $(VCXXFLAGS) $(LCXXFLAGS) $(GCXXFLAGS)
CXXFLAGS = $(C++FLAGS)
VCXXFLAGS = $(VCXXDEFS) $(VCXXINCS) $(VCXXOPTS) $(VC++FLAGS)
LCXXFLAGS = $(LCXXDEFS) $(LCXXINCS) $(LCXXOPTS) $(LC++FLAGS)
GCXXFLAGS = $(GC++FLAGS)
CXXOPTS = $(VCXXOPTS) $(LCXXOPTS) $(GCXXOPTS) $(C++OPTS)
CXXDEFS = $(VCXXDEFS) $(LCXXDEFS) $(GCXXDEFS) $(C++DEFS)
CXXINCS = $(VCXXINCS) $(LCXXINCS) $(GCXXINCS) $(C++INCS)
VC++FLAGS = $(VC++DEFS) $(VC++INCS) $(VC++OPTS)
LC++FLAGS = $(LC++DEFS) $(LC++INCS) $(LC++OPTS)
GC++FLAGS = $(GC++DEFS) $(GC++INCS) $(GC++OPTS)
C++OPTS = $(VC++OPTS) $(LC++OPTS) $(GC++OPTS)
C++DEFS = $(VC++DEFS) $(LC++DEFS) $(GC++DEFS)
C++INCS = $(VC++INCS) $(LC++INCS) $(GC++INCS)
GC++OPTS = $(CSTYLE) $(OPTIMIZER) $(ENDIAN) $(MKDEPOPT)
GC++INCS = -nostdinc -I$(INCLDIR)/CC -I$(INCLDIR)
GC++DEFS =
#
# Loader flags, composed of library (-l's) and option parts, with
# the libraries appearing last. Both of these are divided into variable,
# local, and global parts. The composition of LDFLAGS is done in the
# other "direction" from CFLAGS so that all the -L's, which are part of
# LDOPTS, appear before any of the -l's, which are part of LDLIBS.
# Another benefit of segregating the libraries from the remaining of the
# loader options is that the libraries alone can easily be given to
# another program, e.g., lint.
#
# Notes:
# - -s belongs in GCOPTS or in the IDB program that does the actual
# installation.
#
# Note: To turn off -quickstart_info for specific Makefile add:
# LD_QUICKSTART_INFO=
LD_QUICKSTART_INFO=-quickstart_info
#
# locations to search for libs. We search the 'generic' locations such
# as usr/lib64 even though those are installed in a machine specific manner.
# This permits library writers that only want to have one 'least-common-
# denominator' version per ABI to install it directly in the generic location
# without having to create links. This should be OK in the build environment
# since we always search the specific directories first.
#
# Some user's may not want all this searching help - they can specify
# NO_LSRCH
#
#if !defined(NO_LSRCH)
LSRCH_32_M2 = -L$(ROOT)/lib -L$(ROOT)/usr/lib -L$(ROOT)/usr/lib/internal
LSRCH_N32_M3 = -L$(ROOT)/usr/lib32/mips3 -L$(ROOT)/usr/lib32 -L$(ROOT)/usr/lib32/internal
LSRCH_N32_M4 = -L$(ROOT)/usr/lib32/mips4 -L$(ROOT)/usr/lib32 -L$(ROOT)/usr/lib32/internal
LSRCH_32_ABI = -L$(ROOT)/usr/lib/abi
LSRCH_R32 = -L$(ROOT)/libr32 -L$(ROOT)/usr/libr32
LSRCH_64_M3 = -L$(ROOT)/usr/lib64/mips3 -L$(ROOT)/usr/lib64 -L$(ROOT)/usr/lib64/internal
LSRCH_64_M4 = -L$(ROOT)/usr/lib64/mips4 -L$(ROOT)/usr/lib64 -L$(ROOT)/usr/lib64/internal
LSRCH_64_ABI = -L$(ROOT)/usr/lib64/abi
#endif
#
# each 'popular' combination of ABI and ISA gets its own set of
# GLDOPTS_*
# It is assumed that a command that needs to be built with more than
# one ABI uses cmdcommon* - thus the appropriate versiondefs file will
# contain any needed VERSION_LDOPTS.
#
# DSO's don't follow this rule - they typically create all versions at the
# top - thus, they need access to all possible LDOPTS_* values, and need
# a way to add additional options per object style. So, we add a set of LDOPTS_*
# this can also be used for makefiles that would rather not use cmdcommon*.
#
GLDOPTS_32_M2 = -mips2 -o32 $(LD_QUICKSTART_INFO) -nostdlib $(LSRCH_32_M2)
GLDOPTS_32_ABI= -o32 -abi -nostdlib $(LSRCH_32_ABI)
GLDOPTS_N32_M3= -mips3 -n32 $(LD_QUICKSTART_INFO) -nostdlib $(LSRCH_N32_M3)
GLDOPTS_N32_M4= -mips4 -n32 $(LD_QUICKSTART_INFO) -nostdlib $(LSRCH_N32_M4)
GLDOPTS_R32 = -r32 $(LD_QUICKSTART_INFO) -nostdlib $(LSRCH_R32)
GLDOPTS_64_M3 = -mips3 -64 $(LD_QUICKSTART_INFO) -nostdlib $(LSRCH_64_M3)
GLDOPTS_64_M4 = -mips4 -64 $(LD_QUICKSTART_INFO) -nostdlib $(LSRCH_64_M4)
GLDOPTS_64_ABI= -mips3 -64 -abi -nostdlib $(LSRCH_64_ABI)
# until new ld
GLDOPTS_64_ABI= -mips3 -64 -nostdlib $(LSRCH_64_ABI)
#
# Most objects don't have absolute requirements for ISA - use these
# to get the default for each ABI as set by the release gods.
#
GLDOPTS_32 =$(DEF_GLDOPTS_32)
GLDOPTS_N32 =$(DEF_GLDOPTS_N32)
GLDOPTS_64 =$(DEF_GLDOPTS_64)
GLDLIBS=
#
# LDFLAG layout
#
# Incompatibility from previous commondefs:
# a) setting of LDOPTS in a makefile is probably wrong
#
LDFLAGS = $(LDOPTS) $(LDLIBS) $(ENDIAN)
LDOPTS = $(VLDOPTS) $(LLDOPTS) $(GLDOPTS)
LDLIBS = $(VLDLIBS) $(LLDLIBS) $(GLDLIBS)
#
# Pick appropriate GLDOPTS - releasedefs defines the default
# Note that binaries that don't have absolute ISA requirements should use
# the generic OBJECT_STYLE={64, 32, N32}. This permits the default to be
# set by releasedefs
#
#if $(OBJECT_STYLE) == "64"
GLDOPTS=$(GLDOPTS_64)
#elif $(OBJECT_STYLE) == "64_M3"
GLDOPTS=$(GLDOPTS_64_M3)
#elif $(OBJECT_STYLE) == "64_M4"
GLDOPTS=$(GLDOPTS_64_M4)
#elif $(OBJECT_STYLE) == "64_ABI"
GLDOPTS=$(GLDOPTS_64_ABI)
#elif $(OBJECT_STYLE) == "32_ABI"
GLDOPTS=$(GLDOPTS_32_ABI)
#elif $(OBJECT_STYLE) == "N32"
GLDOPTS=$(GLDOPTS_N32)
#elif $(OBJECT_STYLE) == "N32_M3"
GLDOPTS=$(GLDOPTS_N32_M3)
#elif $(OBJECT_STYLE) == "N32_M4"
GLDOPTS=$(GLDOPTS_N32_M4)
#elif $(OBJECT_STYLE) == "R32"
GLDOPTS=$(GLDOPTS_R32)
#elif $(OBJECT_STYLE) == "32"
GLDOPTS=$(GLDOPTS_32)
#elif $(OBJECT_STYLE) == "32_M2"
GLDOPTS=$(GLDOPTS_32_M2)
#elif $(OBJECT_STYLE) == "NONE"
GLDOPTS=
#else
# set in releasedefs
# This is one that 'make' sees
GLDOPTS=$(DEF_GLDOPTS)
#endif
LDOPTS_32 =$(VLDOPTS) $(LLDOPTS) $(LLDOPTS_32_M2) $(GLDOPTS_32_M2)
LDOPTS_32_M2 =$(VLDOPTS) $(LLDOPTS) $(LLDOPTS_32_M2) $(GLDOPTS_32_M2)
LDOPTS_32_ABI=$(VLDOPTS) $(LLDOPTS) $(LLDOPTS_32_ABI) $(GLDOPTS_32_ABI)
LDOPTS_N32 =$(VLDOPTS) $(LLDOPTS) $(LLDOPTS_N32_M3) $(GLDOPTS_N32)
LDOPTS_N32_M3=$(VLDOPTS) $(LLDOPTS) $(LLDOPTS_N32_M3) $(GLDOPTS_N32_M3)
LDOPTS_N32_M4=$(VLDOPTS) $(LLDOPTS) $(LLDOPTS_N32_M4) $(GLDOPTS_N32_M4)
LDOPTS_R32 =$(VLDOPTS) $(LLDOPTS) $(LLDOPTS_R32) $(GLDOPTS_R32)
LDOPTS_64 =$(VLDOPTS) $(LLDOPTS) $(LLDOPTS_64_M3) $(GLDOPTS_64)
LDOPTS_64_M3 =$(VLDOPTS) $(LLDOPTS) $(LLDOPTS_64_M3) $(GLDOPTS_64_M3)
LDOPTS_64_M4 =$(VLDOPTS) $(LLDOPTS) $(LLDOPTS_64_M4) $(GLDOPTS_64_M4)
LDOPTS_64_ABI=$(VLDOPTS) $(LLDOPTS) $(LLDOPTS_64_ABI) $(GLDOPTS_64_ABI)
#
# Loader options for making shared objects. By default, shared objects
# are all registered in a global location file.
# Redefine $(DSOSTARTOPT) to not update the registry file
#
# By default the DT_SONAME section is set to the name of the target shared
# object. Redefine $(DSONAMEOPT) to allow the DT_SONAME section to be
# something other than the targeted shared object name.
#
# DSOs are typically all made in one top level makefile, in place, rather
# than in subdirectories - therefore all the various flags must be
# present with no conditionals
#
#
# To build a DSO that doesn't use lib*rules:
#
# $(LD) $(LDDSOOPTS) $(LDOPTS) $(OBJECTS) $(LDLIBS) -o $@
#
# Note that LDOPTS must be before the OBJECTS and LDLIBS must be after.
# For local .so's make it easy to not update any registry files
#
#if !defined(NO_STARTOPT)
DSOREGFILE_32 = $(ROOT)/usr/lib/so_locations
DSOREGFILE = $(DSOREGFILE_32)
DSOREGFILE_R32 = $(ROOT)/usr/libr32/so_locations
DSOREGFILE_64 = $(ROOT)/usr/lib64/so_locations
DSOREGFILE_N32 = $(ROOT)/usr/lib32/so_locations
DSOSTARTOPT_32 = -update_registry $(DSOREGFILE_32)
DSOSTARTOPT = $(DSOSTARTOPT_32)
DSOSTARTOPT_R32 = -update_registry $(DSOREGFILE_R32)
DSOSTARTOPT_64 = -update_registry $(DSOREGFILE_64)
DSOSTARTOPT_N32 = -update_registry $(DSOREGFILE_N32)
#endif
DSONAMEOPT = -soname $@
#
# Note: To turn off -no_unresolved for a specific library Makefile, add:
# LD_NO_UNRESOLVED=
LD_NO_UNRESOLVED=-no_unresolved
#
# SGI specific versioning. Redefine $(DSOVERSION) to change version number.
# Redefine $(DSOVERSIONOPT) to skip versioning.
#
DSOVERSION = sgi1.0
DSOVERSIONOPT = -set_version $(DSOVERSION)
#
# Export files - each build can have up to 2 exports file - a common
# one (DSOEXPORTS) and a per-ABI version (DSOEXPORTS_XXX)
# Note that _ABI (MIPS ABI) ONLY uses the DSOEXPORTS_XX_ABI) exports file
# This feature not available for make ...
# Note that these macros must be set BEFORE including commondefs/librootdefs
#
#if defined(DSOEXPORTS)
DSOEXPORTSOPT=-exports_file $(DSOEXPORTS)
#else
# this is what make sees
DSOEXPORTSOPT=
#endif
# Permit per ABI exports file
#if defined(DSOEXPORTS_32)
DSOEXPORTSOPT_32=-exports_file $(DSOEXPORTS_32)
#else
# this is what make sees
DSOEXPORTSOPT_32=
#endif
#if defined(DSOEXPORTS_32_ABI)
DSOEXPORTSOPT_32_ABI=-exports_file $(DSOEXPORTS_32_ABI)
#else
# this is what make sees
DSOEXPORTSOPT_32_ABI=
#endif
#if defined(DSOEXPORTS_N32)
DSOEXPORTSOPT_N32=-exports_file $(DSOEXPORTS_N32)
#else
# this is what make sees
DSOEXPORTSOPT_N32=
#endif
#if defined(DSOEXPORTS_64)
DSOEXPORTSOPT_64=-exports_file $(DSOEXPORTS_64)
#else
# this is what make sees
DSOEXPORTSOPT_64=
#endif
#if defined(DSOEXPORTS_64_ABI)
DSOEXPORTSOPT_64_ABI=-exports_file $(DSOEXPORTS_64_ABI)
#else
# this is what make sees
DSOEXPORTSOPT_64_ABI=
#endif
#
# Each ABI gets the generic *LDDSOOPTS as well as a set of ABI specific ones
#
LDDSOOPTS_32 = $(VLDDSOOPTS) $(VLDDSOOPTS_32) \
$(LLDDSOOPTS) $(LLDDSOOPTS_32) \
$(GLDDSOOPTS) $(GLDDSOOPTS_32)
LDDSOOPTS_32_ABI= $(VLDDSOOPTS) $(VLDDSOOPTS_32_ABI) \
$(LLDDSOOPTS) $(LLDDSOOPTS_32_ABI) \
$(GLDDSOOPTS) $(GLDDSOOPTS_32_ABI)
LDDSOOPTS_R32 = $(VLDDSOOPTS) $(VLDDSOOPTS_R32) \
$(LLDDSOOPTS) $(LLDDSOOPTS_R32) \
$(GLDDSOOPTS) $(GLDDSOOPTS_R32)
LDDSOOPTS_N32 = $(VLDDSOOPTS) $(VLDDSOOPTS_N32) \
$(LLDDSOOPTS) $(LLDDSOOPTS_N32) \
$(GLDDSOOPTS) $(GLDDSOOPTS_N32)
LDDSOOPTS_64 = $(VLDDSOOPTS) $(VLDDSOOPTS_64) \
$(LLDDSOOPTS) $(LLDDSOOPTS_64) \
$(GLDDSOOPTS) $(GLDDSOOPTS_64)
LDDSOOPTS_64_ABI= $(VLDDSOOPTS) $(VLDDSOOPTS_64_ABI) \
$(LLDDSOOPTS) $(LLDDSOOPTS_64_ABI) \
$(GLDDSOOPTS) $(GLDDSOOPTS_64_ABI)
# Totally generic - common options for all ABIs
GLDDSOOPTS = -elf -shared -all $(MKDEPOPT) $(DSONAMEOPT)
GLDDSOOPTS_32 = $(LD_NO_UNRESOLVED) $(LD_QUICKSTART_INFO) \
$(DSOEXPORTSOPT) $(DSOEXPORTSOPT_32) \
$(DSOSTARTOPT_32) $(DSOVERSIONOPT)
GLDDSOOPTS_32_ABI = $(DSOEXPORTSOPT_32_ABI)
GLDDSOOPTS_R32 = $(LD_NO_UNRESOLVED) $(LD_QUICKSTART_INFO) \
$(DSOSTARTOPT_R32) $(DSOVERSIONOPT)
GLDDSOOPTS_N32 = $(LD_NO_UNRESOLVED) $(LD_QUICKSTART_INFO) \
$(DSOEXPORTSOPT) $(DSOEXPORTSOPT_N32) \
$(DSOSTARTOPT_N32) $(DSOVERSIONOPT)
GLDDSOOPTS_64 = $(LD_NO_UNRESOLVED) $(LD_QUICKSTART_INFO) \
$(DSOEXPORTSOPT) $(DSOEXPORTSOPT_64) \
$(DSOSTARTOPT_64) $(DSOVERSIONOPT)
GLDDSOOPTS_64_ABI = $(DSOEXPORTSOPT_64_ABI)
#
# set LDDSOOPTS based on OBJECT_STYLE - makes it easier to make .so's
# when one doesn't use lib*defs
#
#if $(OBJECT_STYLE) == "32_ABI"
LDDSOOPTS=$(LDDSOOPTS_32_ABI)
#elif $(OBJECT_STYLE) == "64_ABI"
LDDSOOPTS=$(LDDSOOPTS_64_ABI)
#elif $(OBJECT_STYLE:M64*) != ""
LDDSOOPTS=$(LDDSOOPTS_64)
#elif $(OBJECT_STYLE:MN32*) != ""
LDDSOOPTS=$(LDDSOOPTS_N32)
#elif $(OBJECT_STYLE:M32*) != ""
LDDSOOPTS=$(LDDSOOPTS_32)
#elif $(OBJECT_STYLE) == "NONE"
LDDSOOPTS=
#else
# this is what 'make' sees
LDDSOOPTS=$(LDDSOOPTS_32)
#endif
#
# F77 flags are just like cc flags.
#
FFLAGS= $(VFFLAGS) $(LFFLAGS) $(GFFLAGS)
VFFLAGS = $(VF77DEFS) $(VF77INCS) $(VF77OPTS)
LFFLAGS = $(LF77DEFS) $(LF77INCS) $(LF77OPTS)
GFFLAGS = $(GF77DEFS) $(GF77INCS) $(GF77OPTS)
F77OPTS = $(VF77OPTS) $(LF77OPTS) $(GF77OPTS)
F77DEFS = $(VF77DEFS) $(LF77DEFS) $(GF77DEFS)
F77INCS = $(VF77INCS) $(LF77INCS) $(GF77INCS)
GF77OPTS= $(CSTYLE) $(OPTIMIZER) $(ENDIAN) $(MKDEPOPT)
GF77DEFS= $(GCDEFS)
GF77INCS= $(GCINCS)
#
# Pc flags are just like cc flags.
#
PFLAGS = $(VPFLAGS) $(LPFLAGS) $(GPFLAGS)
VPFLAGS = $(VPDEFS) $(VPINCS) $(VPOPTS)
LPFLAGS = $(LPDEFS) $(LPINCS) $(LPOPTS)
GPFLAGS = $(GPDEFS) $(GPINCS) $(GPOPTS)
POPTS = $(VPOPTS) $(LPOPTS) $(GPOPTS)
PDEFS = $(VPDEFS) $(LPDEFS) $(GPDEFS)
PINCS = $(VPINCS) $(LPINCS) $(GPINCS)
GPOPTS = $(CSTYLE) $(OPTIMIZER) $(ENDIAN) $(MKDEPOPT)
GPDEFS = $(GCDEFS)
GPINCS = $(GCINCS)
#
# as flags are just like cc flags.
# By default, ASTYLE is the same as CSTYLE, but some may need to make
# the asm more aggressive than 'C' and can set ASTYLE. Users of 'make'
# always get ASTYLE == CSTYLE
#
#if !defined(ASTYLE)
ASTYLE=$(CSTYLE)
#endif
ASFLAGS = $(VASFLAGS) $(LASFLAGS) $(GASFLAGS)
VASFLAGS = $(VASDEFS) $(VASINCS) $(VASOPTS)
LASFLAGS = $(LASDEFS) $(LASINCS) $(LASOPTS)
GASFLAGS = $(GASDEFS) $(GASINCS) $(GASOPTS)
ASOPTS = $(VASOPTS) $(LASOPTS) $(GASOPTS)
ASDEFS = $(VASDEFS) $(LASDEFS) $(GASDEFS)
ASINCS = $(VASINCS) $(LASINCS) $(GASINCS)
GASOPTS = $(ASTYLE) $(OPTIMIZER) $(ENDIAN) $(MKDEPOPT)
GASDEFS = $(GCDEFS)
GASINCS = $(GCINCS)
#
# The install command to use.
#
INSTALL = $(TOOLROOT)/etc/install
#
# A not-so-common definition for graphics makefiles that want to install
# something on all machines.
# XXX can't we define "all" as a wildcard mach tag?
#
ALLGFXMACH = mach(GFXBOARD=LIGHT SUBGR=LIGHT \
GFXBOARD=LIGHT SUBGR=LG1MC \
GFXBOARD=EXPRESS SUBGR=EXPRESS \
GFXBOARD=EXPRESS SUBGR=IP19 \
GFXBOARD=EXPRESS SUBGR=IP21 \
GFXBOARD=EXPRESS SUBGR=IP25 \
GFXBOARD=EXPRESS SUBGR=I2_64 \
GFXBOARD=MGRAS SUBGR=MGRAS \
GFXBOARD=MGRAS SUBGR=IP27 \
GFXBOARD=MGRAS SUBGR=RACER \
GFXBOARD=VENICE SUBGR=IP19 \
GFXBOARD=VENICE SUBGR=IP21 \
GFXBOARD=VENICE SUBGR=IP25 \
GFXBOARD=KONA SUBGR=IP19 \
GFXBOARD=KONA SUBGR=IP25 \
GFXBOARD=KONA SUBGR=IP27 \
GFXBOARD=NEWPORT SUBGR=NG1 \
GFXBOARD=NEWPORT SUBGR=NEWTON \
GFXBOARD=NEWPRESS SUBGR=NEWPRESS \
GFXBOARD=CRIME SUBGR=CRM)
#
# For people who want to run etags on other types of files
#
CTAGFILES = \( -name '*.[cfhlpy]' -o -name '*.c++' \)
#
# MKDEPFILE is the name of the dependency database, included by commonrules.
#
MKDEPFILE = Makedepend
#
# Name of the location of various libs $(ROOT)/usr/$(LIB_LOCATION)/libfoo.[a,so]
# This is set in the releasedefs file.
#
LIB_LOCATION_O32=lib
LIB_LOCATION_N32=lib32
#
# Name of the runtime linker in /
#
# Note: this is used to set the PR_INTERP_NAME, but the DT_RPATH elf var must
# be set to the root of the $ROOTRLDNAME as well.
#
# To allow the changing of the default object style ... we now have
# two different ROOTRLDNAME's which then can be mapped to ROOTRLDNAME.
# The variable ROOTRLDNAME is set in the releasedefs file.
#
ROOTRLDNAME_O32=/lib/libc.so.1,-rpath,/lib
ROOTRLDNAME_N32=/lib32/libc.so.1,-rpath,/lib32
# libtoolroot.so allows executables which were linked against the
# current ROOT to be run on earlier versions of IRIX. TOOLROOTSAFE is
# defined in releasedefs.
TOOLROOTSAFE_O32 = _RLD_LIST=DEFAULT:$(TOOLROOT)/usr/lib/libtoolroot.so
TOOLROOTSAFE_64 = _RLD64_LIST=DEFAULT:$(TOOLROOT)/usr/lib64/libtoolroot.so
TOOLROOTSAFE_N32 = _RLDN32_LIST=DEFAULT:$(TOOLROOT)/usr/lib32/libtoolroot.so
#
# Flags to handle yacc and lex automatic dependency generation
# We also use this to place woff's that are specific to yacc and lex.
# These are all V4.X compiler warnings
# 1167 - pointer points outside of underlying object
# 1110 - statement is unreachable
# 1174 - label "XXX" was declared but never referenced
# 803,1685,1499 - ignore invalid woffs
#
YACCMKDEPFLAGS=-MDtarget $*.o -woff 1685,803,1499,1167,1110,1174
LEXMKDEPFLAGS=-MDtarget $*.o -woff 1685,803,1499,1167,1110,1174
#
# Include directory shorthands, used in CFLAGS and LDFLAGS components.
#
INCLDIR = $(ROOT)/usr/include
#
# Convenient command macros that include the flags macros.
#
# You should always invoke make in makefiles via $(MAKE), as make passes
# all command-line variables through the environment to sub-makes.
#
# Never use just $(CCF), etc. in rules that link executables; LDFLAGS
# needs to be included after your objects in the command line.
#
ASF = $(AS) $(ASFLAGS)
C++F = $(CXX) $(CXXFLAGS)
CXXF = $(C++F)
CCF = $(CC) $(CFLAGS)
F77F = $(F77) $(FFLAGS)
LDF = $(LD) $(LDFLAGS)
LEXF = $(LEX) $(LFLAGS)
PCF = $(PC) $(PFLAGS)
YACCF = $(YACC) $(YFLAGS)
#
# Releasedefs defines compiler tool versions on an ABI basis.
# We use that combined with OBJECT_STYLE to set some macros that can
# be used in multi-version makefiles
#
#if $(OBJECT_STYLE:M32*) != ""
VCC=$(VCC32)
VCXX=$(VCXX32)
VLD=$(VLD32)
#elif $(OBJECT_STYLE:M64*) != ""
VCC=$(VCC64)
VCXX=$(VCXX64)
VLD=$(VLD64)
#elif $(OBJECT_STYLE:MN32*) != ""
VCC=$(VCCN32)
VCXX=$(VCXXN32)
VLD=$(VLDN32)
#else
# This is of course what 'make' sets
VCC=
VCXX=
VLD=
#endif
#
# Rule macros for nonterminal makefiles that iterate over subdirectories,
# making the current target. Set *SUBDIRS to the relevant list of kids.
#
# Set NOSUBMESG to any value to suppress a warning that subdirectories
# are not present. This is useful with mandefs/rules
#
SUBDIR_MAKERULE= \
if test ! -d $$d; then \
if test "$(NOSUBMESG)" = "" ; then \
echo "SKIPPING $$d: No such directory."; \
fi \
else \
echo "\t(cd $$d; $(MAKE) $${RULE:=$@})"; \
(cd $$d; ${MAKE} $${RULE:=$@}); \
fi
SUBDIRS_MAKERULE= \
@for d in $(SUBDIRS); do $(SUBDIR_MAKERULE); done
HEADERS_SUBDIRS_MAKERULE= \
@for d in $(HEADERS_SUBDIRS); do $(SUBDIR_MAKERULE); done
EXPORTS_SUBDIRS_MAKERULE= \
@for d in $(EXPORTS_SUBDIRS); do $(SUBDIR_MAKERULE); done
#
# One problem with the above rules is that if a make fails, and -k is
# set, the entire for loop might stop. This is because make still can
# (and XPG requires it) exit with an error status if the -k option is set.
# This is an alternate rule for SUBDIRS when it is desired that -k keep
# working on the next SUBDIR if the previous one failed. Its not quite
# as compact a rule as the previous ones.
# A standard usage would be:
# default install $(COMMONTARGS): $(_FORCE)
# $(MAKE) __DORULE=$@ $(SUBDIRS)
# $(SUBDIRS): $(_FORCE)
# @$(NSUBDIR_MAKERULE)
NSUBDIR_MAKERULE= \
if test ! -d $@; then \
if test "$(NOSUBMESG)" = "" ; then \
echo "SKIPPING $@: No such directory."; \
fi \
else \
echo "\t(cd $@; $(MAKE) $(__DORULE))"; \
(cd $@; ${MAKE} $(__DORULE)); \
fi
#
# When CHECK_API is defined, have 7.2 compilers emit compressed
# function prototypes into the .MIPS.interfaces section of .o files
# destined for inclusion in libraries
#
#if defined(CHECK_API) && !defined(NO_CHECK_API)
LIBRARY_API_CHECK=-DEBUG:full_interface_check
#else
LIBRARY_API_CHECK=
#endif
#
# Library .c.o rule macros -- someday, cc -r will do the right thing and
# the G-number will be happily forgotten.
#
LIBRARY_AS_MAKERULE= \
$(ASF) $(LIBRARY_API_CHECK) -o $*.o $<
LIBRARY_CC_MAKERULE= \
$(CCF) $(LIBRARY_API_CHECK) -c $<
LIBRARY_CXX_MAKERULE= \
$(CXXF) $(LIBRARY_API_CHECK) -c $<
LIBRARY_C++_MAKERULE= \
$(C++F) $(LIBRARY_API_CHECK) -c $<
#
# The macro naming commonrules' always-unsatisfied target, which is useful
# in directory dependencies to guarantee that even directories having future
# mtimes due to timewarps will be "made".
#
_FORCE=$(COMMONPREF)_force
#
# Permit dependencies for Null-suffix targets
#
.MAKEOPTS: -N
#
# Convenience file list macros:
# - Commondefs defines the following lists: SOURCES, enumerating all
# source files; OBJECTS, the .o files derived from compilable source;
# and DIRT, which lists intermediates and temporary files to be
# removed by clean.
# - The including (parent) makefile may define source file lists for
# the standard suffixes: CFILES for .c, ASFILES for .s, YFILES for
# .y, etc. We combine all such lists into SOURCES. The including
# makefile need not define CFILES &c before including commondefs.
#
SOURCES=$(HFILES) $(ASFILES) $(C++FILES) $(CXXFILES) $(CFILES) $(EFILES) \
$(FFILES) $(LFILES) $(PFILES) $(RFILES) $(SHFILES) $(YFILES)
CXXO1=$(CXXFILES:.c++=.o) $(C++FILES:.c++=.o)
CXXO2=$(CXXO1:.cxx=.o)
CXXO3=$(CXXO2:.C=.o)
CXXOALL=$(CXXO3)
YO1=$(YFILES:.y=.o)
YO2=$(YO1:.yxx=.o)
YO3=$(YO2:.Y=.o)
YOALL=$(YO3)
LO1=$(LFILES:.l=.o)
LO2=$(LO1:.lxx=.o)
LO3=$(LO2:.L=.o)
LOALL=$(LO3)
OBJECTS=$(ASFILES:.s=.o) $(CXXOALL) $(CFILES:.c=.o) $(EFILES:.e=.o) \
$(FFILES:.f=.o) $(LOALL) $(PFILES:.p=.o) $(RFILES:.r=.o) \
$(YOALL)
#
# Makefiles should set LDIRT only
#
# Make include files that extend commondefs should set XDIRT for dirt
# generated by the extension. It should also provide an XfooDIRT macro for
# the benefit of any extensions to itself. The intent is that the user's
# Makefile will just worry about its own dirt.
#
DIRT=$(GDIRT) $(VDIRT) $(LDIRT) $(XDIRT)
GDIRT=*.[oue] a.out core lex.yy.[co] y.tab.[cho] $(_FORCE) ar.tmp.*
#
# This exitop should be used by those who are building the FTR database.
# The reason for this is that inst will sort a 'sort -u' on the exitops,
# so if all of them are identical, we only do the work once.
# A typical install line that uses the FTR_EXITOP_IDB should look similar
# to this:
#
# $(INSTALL) $(FTR_EXITOP_IDB) -idb $(IDB_TAG) -m 444 -F $(FTRDIR) sgidemos.ftr#
# IDB_TAG - is defined in the spec file for a given subsystem.
# FTRDIR - is the directory usr/lib/filetype/{install,system,default}
# sgidemos.ftr - is the ftr file that goes into FTRDIR.
#
FTR_EXITOP_IDB= -idb 'exitop( " \
if [ -r \$$rbase/usr/lib/filetype/Makefile ]; then \
chroot $$rbase /bin/sh -c \"cd /usr/lib/filetype; make > /dev/null\"; \
fi" )'
#
# Local definitions. These are used for debugging purposes. Make sure that
# the product builds properly without the local definitions, unless you check
# in the local definitions!
#
# To access a localdefs file outside the current directory, set LOCALDEFS on
# the command line, and likewise for localrules. Or you can have localdefs
# just sinclude the appropriate other include file.
#
LOCALDEFS = ./localdefs
LOCALRULES = ./localrules
sinclude $(LOCALDEFS)

View File

@@ -0,0 +1,106 @@
# Copyright 1990 Silicon Graphics, Inc. All rights reserved.
#
#ident "$Revision: 1.52 $"
#
# Common makefile rules.
#
# Notes:
# - After including $(ROOT)/usr/include/make/commondefs, a makefile may
# say ``include $(COMMONRULES)'' to get this file.
# - It is up to the including makefile to define a default rule before
# including $(COMMONRULES).
# - The parent makefile must define TARGETS in order for clobber to work.
# - If the parent makefile must overload the common targets with special
# rules (e.g. to perform recursive or subdirectory makes), then set
# COMMONPREF to some unique prefix before including $(COMMONRULES),
# and make sure that each common target depends on its prefixed name.
# For example, a makefile which passes common targets and install on
# to makes in subdirectories listed in DIRS might say
#
# COMMONPREF=xxx
# include $(COMMONRULES)
#
# $(COMMONTARGS) install: $(COMMONPREF)$$@
# @for d in $(DIRS); do \
# $(ECHO) "\tcd $$d; $(MAKE) $@"; \
# cd $$d; $(MAKE) $@; cd ..; \
# done
#
# Thus, all of the common rules plus install are passed to sub-makes
# *and* executed in the current makefile (as xxxclean, xxxclobber,
# xxxinstall, etc). SUBDIRS_MAKERULE in commondefs is a convenience
# macro that expands to the above loop.
#
#
# An always-unsatisfied target. The name is unlikely to occur in a file tree,
# but if _force existed in a make's current directory, this target would be
# always-satisfied and targets that depended on it would not be made.
#
$(_FORCE):
#
# File removal rules: there are three.
# - clean removes dirt
# - clobber removes targets, dirt, and Makedepend
# - rmtargets removes targets only
# One might 'make clean' in a large tree to reclaim disk space after targets
# are built, but before they are archived into distribution images on disk.
# One might 'make rmtargets' to remove badly-linked executables, and then
# run a 'make' to re-link the good objects.
#
$(COMMONPREF)clobber: $(COMMONPREF)clean $(COMMONPREF)rmtargets $(_FORCE)
rm -rf $(MKDEPFILE)
$(COMMONPREF)clean: $(_FORCE)
rm -rf $(DIRT)
$(COMMONPREF)rmtargets: $(_FORCE)
rm -rf $(TARGETS)
#
# Lint and C tags support.
#
$(COMMONPREF)fluff: $(_FORCE)
$(LINT) $(LINTFLAGS) $(CDEFS) $(CINCS) $(CFILES) $(LDLIBS)
CTAGS=ctags
$(COMMONPREF)tags: $(_FORCE)
rm -f tags
find . $(CTAGFILES) \
! -name '.*' ! -name 'llib-*' ! -name '*,v' \
$(CTAGFINDARGS) -print | \
sed 's:^\./::' | \
xargs $(CTAGS) -a $(CTAGOPTS)
if test -f tags; then \
sort -u +0 -1 -o tags tags; \
fi
ETAGS=etags
$(COMMONPREF)TAGS: $(_FORCE)
rm -f TAGS
find . $(CTAGFILES) \
! -name '.*' ! -name 'llib-*' ! -name '*,v' \
$(CTAGFINDARGS) -print | \
sed 's:^\./::' | \
xargs $(ETAGS) -a $(ETAGOPTS)
#
# A better version of smake's makelib.mk rule.
# XXX fix makelib.mk in next release and remove this rule.
#
MAKELIB: .USE .PRECIOUS
$(AR) c$(ARFLAGS) $(.TARGET) $(.OODATE)
rm -f $(.OODATE)
#
# Include the make dependency file if it exists.
#
sinclude $(MKDEPFILE)
#
# Local make rules
#
sinclude $(LOCALRULES)

View File

@@ -0,0 +1,19 @@
# Copyright 1998 Silicon Graphics, Inc. All rights reserved.
#
#ident "$Revision: 1.1 $"
#
# Common cording definitions.
# Rules file for cording. See notes in that file for more information.
CORDRULES=$(ROOT)/usr/include/make/cordrules
# There can be any number of cord feedback files, and they should be
# alphabetically arranged in order of importance, with the most important
# file first: libfoo.1.fb, libfoo.2.fb, ...
CORDFILES=$(BASELIBNAME)*.fb
# Allow cleanup of pre-cord libraries
LDIRT+=*.precord

View File

@@ -0,0 +1,33 @@
# Copyright 1998 Silicon Graphics, Inc. All rights reserved.
#
#ident "$Revision: 1.1 $"
#
# Cording rules for generating corded shared libraries.
#
# Notes:
# - After including $(ROOT)/usr/include/make/corddefs, a makefile may
# say ``include $(CORDRULES)'' to get this file.
# - This must be placed as the very last included rules file in the
# Makefile prior to the target definitions to allow it to override
# the standard .a.so rule.
# Rule to override normal .so creation to allow a cording stage
.a.so:
$(LD) \
$(.IMPSRC:M?*_32.a:S/$(.IMPSRC)/$(LDOPTS_32) $(LDDSOOPTS_32)/) \
$(.IMPSRC:M?*_32_M2.a:S/$(.IMPSRC)/$(LDOPTS_32_M2) $(LDDSOOPTS_32)/) \
$(.IMPSRC:M?*_32_abi.a:S/$(.IMPSRC)/$(LDOPTS_32_ABI) $(LDDSOOPTS_32_ABI)/) \
$(.IMPSRC:M?*_r32.a:S/$(.IMPSRC)/$(LDOPTS_R32) $(LDDSOOPTS_R32)/) \
$(.IMPSRC:M?*_n32.a:S/$(.IMPSRC)/$(LDOPTS_N32) $(LDDSOOPTS_N32)/) \
$(.IMPSRC:M?*_n32_M3.a:S/$(.IMPSRC)/$(LDOPTS_N32_M3) $(LDDSOOPTS_N32)/)\
$(.IMPSRC:M?*_n32_M4.a:S/$(.IMPSRC)/$(LDOPTS_N32_M4) $(LDDSOOPTS_N32)/)\
$(.IMPSRC:M?*_64.a:S/$(.IMPSRC)/$(LDOPTS_64) $(LDDSOOPTS_64)/) \
$(.IMPSRC:M?*_64_M3.a:S/$(.IMPSRC)/$(LDOPTS_64_M3) $(LDDSOOPTS_64)/) \
$(.IMPSRC:M?*_64_M4.a:S/$(.IMPSRC)/$(LDOPTS_64_M4) $(LDDSOOPTS_64)/) \
$(.IMPSRC:M?*_64_abi.a:S/$(.IMPSRC)/$(LDOPTS_64_ABI) $(LDDSOOPTS_64_ABI)/) \
$(.IMPSRC:M?*.a:N?*_64?*:N?*_32?*:N?*_n32?*:N?*_abi?*:N?*_r32?*:S/$(.IMPSRC)/$(LDOPTS_32) $(LDDSOOPTS_32)/) \
$(.IMPSRC) \
$(.IMPSRC:N?*_abi.a:S/$(.IMPSRC)/$(LDLIBS)/) \
-o $(.TARGET).precord
$(CORD) -o $(.TARGET) $(.TARGET).precord $(CORDFILES)

View File

@@ -0,0 +1,36 @@
#
# Common definitions for building ism idb's and images
#
#ident "$Revision: 1.12 $"
GENDIST= $(TOOLROOTSAFE) $(TOOLROOT)/usr/sbin/gendist
IDBJOIN= $(TOOLROOT)/usr/sbin/idbjoin
OFINALIDB= $(TOOLROOT)/usr/sbin/ofinalidb
OSPEC= $(TOOLROOT)/usr/sbin/ospec
IDBPROTO=$(TOOLROOTSAFE) $(TOOLROOT)/usr/sbin/idbproto
IDBINST= $(TOOLROOTSAFE) $(TOOLROOT)/usr/sbin/idbinst
GGENDISTFLAGS=-verbose
GENDISTFLAGS=$(VGENDISTFLAGS) $(LGENDISTFLAGS) $(GGENDISTFLAGS)
GIDBJOINFLAGS=
IDBJOINFLAGS=$(VIDBJOINFLAGS) $(LIDBJOINFLAGS) $(GIDBJOINFLAGS)
ISMCOMMONRULES=$(ROOT)/usr/include/make/ismcommonrules
# permit use of ismcommonrules even if user doesn't specify ALLIMAGES or SPEC
# If ALLIMAGES is reset from this default value then it is only possible to
# build the products that are enumerated in the ALLIMAGES list instead of
# all the products defined by the spec file.
# It only needs to be set during the period you need to build a proper subset
# of the set of products defined by the spec file.
ALLIMAGES=no_images_supplied
#
# Given the images names contruct appropriate wildcard versions for
# shell
#
SHELLIMAGES=$(ALLIMAGES:=.*)
# provide dirt macro (XISMDIRT) to any enclosing set of definitions
XDIRT = *.version *.sorted extra missing finalidb $(RAWIDB) $(ALLIMAGES) \
$(SHELLIMAGES) joinedidb dryrun $(XISMDIRT) words ofinalidb
include $(ROOT)/usr/include/make/commondefs
include $(ROOT)/usr/include/make/$(OVERLAYIMAGES)odefs

View File

@@ -0,0 +1,192 @@
#
# Commonrules to build idb's and images for an ism
#
#
# For an ism that doesn't have a rawidb idb
# set LIDBJOINFLAGS to -m
# In this case a zero length RAWIDB is required
#
#
# Targets:
# buildimages - make real images (an individual image can also be made)
# buildidbs - makes an external idb
# these idb(s) are the exported ones - the image names
# must correspond to the public exported names that the
# ism has published (and are used in the product
# defining spec files).
# The idb also must have full path names to the location
# of the objects
# buildism - old name for buildidbs
# version - create a version file
# startversion - create a version number in $(WORKAREA)/.version_number
# (and alpha number in $(WORKAREA)/.alpha_number
#
# Before including this file the following should be set:
# ALLIMAGES - names of images to be made - must correspond to
# product name(s) in spec file
# SPEC - spec file name
# RAWIDB - rawidb file name
# SRCIDB - src/checked in idb file name
#
# Macros you may wish to set
# BUILDER - (to 1 if project build, to 2 if build group build)
# TREE_ID - to an integer 1-9 to distinguish parallel OS efforts
# targeted to new hardware.
# It will default to the value of TREE_ID found in
# $(ROOT)/usr/include/make/releasedefs.
# PATCH_RELEASE - if creating a patch release (will default to first eight
# digits of $(WORKAREA)/.version_number)
# PATCH_NUM - patch number (sequences patch releases)
#
# Note that macros ALLIMAGES, SPEC, RAWIDB, and SRCIDB need only be set
# in the build/Makefile. Typically, one just uses the settings as
# provided via the ism template for the build/Makefile.
#
#
#ident "$Revision: 1.39 $"
.NOTPARALLEL:
include $(RELEASEDEFS)
include $(COMMONRULES)
IDBSAREA=../$(OVERLAYIMAGES)idbs
IMAGESAREA=../$(OVERLAYIMAGES)images
# this is old and shouldn't be used
ISMAREA=$(IDBSAREA)
SPECDFLT=$(TOOLROOT)/usr/sbin/specdflt
SPECPRODS=$(TOOLROOT)/usr/sbin/specprods
SPECEXTERN=awk -f $(TOOLROOT)/usr/lib/specextern.awk
# get the definition of the startversion target
include $(ROOT)/usr/include/make/startversion
$(BUILDIMGPREF)ospec:: $(_FORCE)
@VERSION=`cat $(VNUM)`; \
if [ "xx$(OVERLAYIMAGES)" != "xx" ]; then \
if [ `p_list -a|fgrep -x $(OVERLAYIMAGES)$(SPEC)|wc -l` = 0 ];then\
echo "Creating overlays spec file $(OVERLAYIMAGES)$(SPEC)";\
rm -f $(OVERLAYIMAGES)$(SPEC); \
$(OSPEC) $(SPEC) > $(OVERLAYIMAGES)$(SPEC); \
fi; \
fi
$(BUILDIMGPREF)buildimages: checkversion ofinalidb ospec $(FINALIDB) $(SPEC)
@if [ ! -d $(IMAGESAREA) ]; then mkdir $(IMAGESAREA); fi; \
(cd $(IMAGESAREA); for i in $(ALLIMAGES); do \
rm -f $${i}.* $${i}; done)
# next 14 lines replicated below
@if [ -r $(SPEC) ]; then \
USESPEC=$(SPEC); \
if [ "$(ALLIMAGES)" = "no_images_supplied" ]; then \
echo "\nderiving names of products to generate from file $(SPEC)\n"; \
USEALLIMAGES=`$(SPECPRODS) $$USESPEC`; \
else \
USEALLIMAGES='$(ALLIMAGES)'; \
fi; \
else \
echo "\nderiving file $(SPEC).dflt from file finalidb\n"; \
$(SPECDFLT) > $(SPEC).dflt;\
USESPEC=$(SPEC).dflt; \
USEALLIMAGES=`$(SPECPRODS) $$USESPEC`; \
fi; \
echo "$(GENDIST) $(GENDISTFLAGS) -all -root /"; \
echo "\t-source $(SRC) -idb $(OVERLAYIMAGES)finalidb"; \
echo "\t-spec $(OVERLAYIMAGES)$$USESPEC -dist $(IMAGESAREA) \
$$USEALLIMAGES";\
VERSION=`cat $(VNUM)` \
$(GENDIST) $(GENDISTFLAGS) -all -root / -source $(SRC) -idb \
$(OVERLAYIMAGES)finalidb -spec $(OVERLAYIMAGES)$$USESPEC \
-dist $(IMAGESAREA) $$USEALLIMAGES
#
# Generate an external idb - this is the internal idb (finalidb)
# run through gendist to convert the internal subsystem names to
# the external subsystem names (those specified in the spec file and
# published to the product build group).
# NOTE: buildism is old target - buildidb is prefered.
#
$(BUILDISMPREF)buildism:buildidbs
$(BUILDIDBPREF)buildidbs:$(SPEC) $(FINALIDB)
@if [ ! -d $(IDBSAREA) ]; then mkdir $(IDBSAREA); fi; \
(cd $(IDBSAREA); for i in $(ALLIMAGES); do \
rm -f $${i}.* $${i}; done)
# next 14 lines replicated above
@if [ -r $(SPEC) ]; then \
USESPEC=$(SPEC); \
if [ "$(ALLIMAGES)" = "no_images_supplied" ]; then \
echo "\nderiving names of products to generate from file $(SPEC)\n"; \
USEALLIMAGES=`$(SPECPRODS) $$USESPEC`; \
else \
USEALLIMAGES='$(ALLIMAGES)'; \
fi; \
else \
echo "\nderiving file $(SPEC).dflt from file $(RAWIDB)\n"; \
$(SPECDFLT) > $(SPEC).dflt;\
USESPEC=$(SPEC).dflt; \
USEALLIMAGES=`$(SPECPRODS) $$USESPEC`; \
fi;\
$(GENDIST) $(GENDISTFLAGS) -externidb -root / -source $(SRC) \
-idb $(FINALIDB) -spec $$USESPEC -dist \
$(IDBSAREA) $$USEALLIMAGES >dryrun 2>&1;\
$(SPECEXTERN) < $$USESPEC > $(IDBSAREA)/spec;\
ISMROOT=`pwd`;\
ISMROOT=`echo "$$ISMROOT/.." | sed -e 's/\/[^/]*\/\.\.//'`; \
cd $(IDBSAREA); for i in $$USEALLIMAGES; do \
[ ! -r $$i.idb ] && continue; \
nawk '{$$6=head"/"$$6;print}' head=$$ISMROOT < $$i.idb > $$i.$$$$;\
mv $$i.$$$$ $$i.idb; done
$(ALLIMAGES):
$(MAKE) ALLIMAGES=$@ buildimages
$(FINALPREF)$(FINALIDB): $(SRCIDB)
-rm -f joinedidb extra missing
@echo "\tSRCIDB = $(SRCIDB)"
@echo "\tRAWIDB = $(RAWIDB)"
@#gendist still likes things sorted on dstpath
@# use -o so makefile is restartable
@if [ -r $(SRCIDB) ]; then \
SIDBS=`echo $(SRCIDB) | tr ' ' ' ' | tr -s '' ' ' | \
sed -e 's/^/-s/' -e 's/ / -s/g'` ;\
$(IDBJOIN) $(IDBJOINFLAGS) $$SIDBS $(RAWIDB) joinedidb extra missing; \
LANG=C sort +4 -5 joinedidb -o $(FINALIDB); \
else \
echo "\nderiving file finalidb from file $(RAWIDB)\n"; \
LANG=C sort +4 -5 $(RAWIDB) -o $(FINALIDB); \
fi; \
if [ -r $(FINALIDB) -a "xx$(OVERLAYIMAGES)" != "xx" ]; then \
echo "Creating overlay $(OVERLAYIMAGES)finalidb file"; \
$(OFINALIDB) $(FINALIDB) > $(OVERLAYIMAGES)finalidb; \
fi
$(FINALPREF)ofinalidb::$(_FORCE) $(FINALIDB)
@if [ -r $(FINALIDB) -a "xx$(OVERLAYIMAGES)" != "xx" ]; then \
echo "Creating overlay $(OVERLAYIMAGES)finalidb file"; \
$(OFINALIDB) $(FINALIDB) > $(OVERLAYIMAGES)finalidb; \
fi
checkversion:$(_FORCE)
@if [ ! -r $(VNUM) ]; then \
echo "Use the startversion target to set your version number.";\
exit 1 ;\
else \
VERSION=`cat $(VNUM)` ;\
fi
# old target provided so that build doesn't break
checkalpha:$(_FORCE)
@echo "This target is no longer used."
@echo "Please modify your Makefile to remove it."
version:checkversion $(_FORCE)
@VERSION=`cat $(VNUM)` \
$(TOOLROOT)/usr/sbin/makeversion $(ISM_NAME).version
# ok if these not present, but do need their modification dates if they are
fake_target_so_not_empty $(SRCIDB) $(SPEC):
:

View File

@@ -0,0 +1,101 @@
#ident "$Revision: 1.8 $"
#
# commondefs for leaf makefiles in libraries
# Options etc particular to a version of the library are found in versiondefs
# The versiondefs file for the baseline source is in the baseline source
# directory, the versiondefs files for all other versions of the library
# are kept at the top level - the name is prefixed with the name of
# alternate version of the library minus the '.a' suffix
#
# DEPTH must be set to the top of version source before including this file
# TOP is set to the top of the entire library source.
#
# NOTE: definitions on versiondefs CANNOT override commondef definitions
# since versiondefs is included first. This is a change from 5.[0123]
#
# A subset of these definitions apply to single level/single version libs
#if defined(INCLUDEDATROOT)
TOP=
DEPTH=
# Since there is only 1 library - fill in LIBRARY variable
LIBRARY=$(BASELIB)
#else
TOP=$(DEPTH)/../
#
# pick up releasedefs to get compiler versions and default build parameters
#
# pick up version definitions - needs to be before commondefs to pick up
# OBJECT_STYLE
#
# finally pick up commondefs
#
include $(ROOT)/usr/include/make/releasedefs
#include <$(DEPTH)/versiondefs>
include $(ROOT)/usr/include/make/commondefs
#endif
# Ignored warnings list - override commondefs version which is too liberal
# The $(LWOFF) allows makefiles to set local warnings to ignore
# (note that a leading ',' with no whitespace is required).
#
# The ignored 3.XX compiler warnings are as followings:
#
# 803 - Ignored invalid warning number(s) in -woff option
# 826 - width of hex constant is smaller than size of type (int)
# 852 - can be const qualified (-wlint)
#
# The ignored 4.XX compiler warnings are as follows:
# 1048 - cast between pointer-to-object and pointer-to-function
# 1068 - integer conversion resulted in a change of sign
# 1499 - -woff arguments must be in the range ...
# 1508 - Missing (extern) declaration for weak name
# 1509 - Missing (extern) declaration for weak name XXX; xxx
# 1685 - invalid error number XXX
# 1692 - prototyped function redeclared without prototype
WOFF= -woff 1685,803,826,852,1048,1499,1508,1509,1692$(LWOFF)
#
# Options are split into 3 parts:
# global library $(LIBRARY_*) (set in $(TOP)/librarydefs)
# version specific $(VERSION_*) (set in versiondefs)
# subdir specific $(SUBDIR_*) (set in leaf Makefile)
#
# pick up global library definitions
# Use "<" so that we don't look in directory this file was found in
# ($(ROOT)/usr/include/make) we want to only look in the source dirs
#
#include <$(TOP)librarydefs>
LCDEFS=$(LIBRARY_CDEFS) $(VERSION_CDEFS) $(SUBDIR_CDEFS)
LCOPTS=$(LIBRARY_COPTS) $(VERSION_COPTS) $(SUBDIR_COPTS)
LCINCS=$(LIBRARY_CINCS) $(VERSION_CINCS) $(SUBDIR_CINCS)
LCXXDEFS=$(LIBRARY_CXXDEFS) $(VERSION_CXXDEFS) $(SUBDIR_CXXDEFS)
LCXXOPTS=$(LIBRARY_CXXOPTS) $(VERSION_CXXOPTS) $(SUBDIR_CXXOPTS)
LCXXINCS=$(LIBRARY_CXXINCS) $(VERSION_CXXINCS) $(SUBDIR_CXXINCS)
LC++DEFS=$(LIBRARY_C++DEFS) $(VERSION_C++DEFS) $(SUBDIR_C++DEFS)
LC++OPTS=$(LIBRARY_C++OPTS) $(VERSION_C++OPTS) $(SUBDIR_C++OPTS)
LC++INCS=$(LIBRARY_C++INCS) $(VERSION_C++INCS) $(SUBDIR_C++INCS)
LF77DEFS=$(LIBRARY_F77DEFS) $(VERSION_F77DEFS) $(SUBDIR_F77DEFS)
LF77OPTS=$(LIBRARY_F77OPTS) $(VERSION_F77OPTS) $(SUBDIR_F77OPTS)
LF77INCS=$(LIBRARY_F77INCS) $(VERSION_F77INCS) $(SUBDIR_F77INCS)
LPDEFS=$(LIBRARY_PDEFS) $(VERSION_PDEFS) $(SUBDIR_PDEFS)
LPOPTS=$(LIBRARY_POPTS) $(VERSION_POPTS) $(SUBDIR_POPTS)
LPINCS=$(LIBRARY_PINCS) $(VERSION_PINCS) $(SUBDIR_PINCS)
LASDEFS=$(LIBRARY_ASDEFS) $(VERSION_ASDEFS) $(SUBDIR_ASDEFS)
LASOPTS=$(LIBRARY_ASOPTS) $(VERSION_ASOPTS) $(SUBDIR_ASOPTS)
LASINCS=$(LIBRARY_ASINCS) $(VERSION_ASINCS) $(SUBDIR_ASINCS)
LLDOPTS=$(LIBRARY_LDOPTS) $(VERSION_LDOPTS) $(SUBDIR_LDOPTS)
LLDLIBS=$(LIBRARY_LDLIBS) $(VERSION_LDLIBS) $(SUBDIR_LDLIBS)
LIBLEAFRULES=$(ROOT)/usr/include/make/libleafrules
# get top level developer override options (these should set V* variables)
#sinclude <$(TOP)localdefs>

View File

@@ -0,0 +1,29 @@
#ident "$Revision: 1.5 $"
#
# library commonrules
# This is only included in leaf directories (those with source only)
# TOP must have been set to the relative path from the invoking
# directory to the top of the library source tree
#if !defined(INCLUDEDATROOT)
default!$(TOP)$(LIBRARY)
include $(COMMONRULES)
#endif
$(TOP)$(LIBRARY):$(TOP)$(LIBRARY)($(OBJECTS)) MAKELIB
.c.o:; $(LIBRARY_CC_MAKERULE)
.s.o:; $(LIBRARY_AS_MAKERULE)
#if defined(OBJECT_STYLE) && \
$(ALLSTYLES:S/$(OBJECT_STYLE)/GOT_ONE/:MGOT_ONE) == ""
.BEGIN:
@echo "OBJECT_STYLE variable (=$(OBJECT_STYLE)) set to unknown style"
@echo "Must be one of $(ALLSTYLES)"
exit 1
#endif
showlib!
@echo "$$(LIBRARY) = $(LIBRARY) $$(CFILES) = $(CFILES) $$(OBJECTS) = $(OBJECTS) $$(OBJECT_STYLE) = $(OBJECT_STYLE)"

View File

@@ -0,0 +1,278 @@
#
# $Revision: 1.18 $
#
# Commondefs for top level libraries
# libroot{defs,rules} suppport a general way to build single and multi-directory
# libraries with multiple versions
#
# Before including librootdefs the top level makefile must define:
#
# BASELIB - the name of the base archive (with the .a suffix)
# Where the source must live depends on the setting of ALTLIBS
# and MULTIDIR. If either are set, the source must live in
# a directory 'src'
# ALTLIBS - the names of any alternate versions of the library
# (with the .a suffix)
# The source for these will be created by tlinking from BASELIB
# to ALTLIBS (with the '.a' removed)
# MULTIDIR - set this ONLY if the library has multiple directories
# but NOT multiple versions
# PRIVATEFILES - set to a tlink -x option(s) to exclude certain files
# (if any) from being linked from BASELIB to ALTLIBS
#
# By default TARGETS is set here to be all the libraries and the shared version
# of all non-non_shared and non-abi libraries (this is based on
# looking at the trailing _ns.a or _abi.a). In addition any library
# name that has the string _noso_ in it won't have a shared verion made.
# To request that the ABI
# version of a library be added as a shared object, set the ABISO macro.
# To request that NO .so's get built - set the macro NOSO
#
# TARGETS can be added to:
# TARGETS+=lib.ln
# OR can be overridden if necessary:
# TARGETS=$(LIBS)
#
# Then define the default rule:
# default:$(TARGETS)
# And include the other needed rules:
# include ${LIBROOTRULES}
#
# Library Version Naming
# Consistent naming is necessary to obtain all that these rules can offer.
#
# Names should be some prefix followed by an underscore followed by one of
# the names in commondefs (e.g. _64_M3) followed '.a'
# Example: a library built for default 64 bit: libx_64.a
# Example: a library built for mips4 64 bit: libx_64_M4.a
# Example: a library built for mips3 n32 bit: libx_n32_M4.a
#
# Names of non-shared versions should end in _ns.a
# Example: a library built for 64 bit mips4, non-shared: libx_64_M4_ns.a
#
# Names of speciality libaries that shouldn't have .so's built for them
# should have the string _noso_ imbedded somewhere in them.
# Names of MIPS ABI libs should end in _32_abi.a. By default the .so version
# of these won't get built. Set ABISO macro to have the .so version
# added to TARGETS
BASELIBSRCDIR=src
LIBS=$(BASELIB) $(ALTLIBS)
LIBROOTRULES=$(ROOT)/usr/include/make/librootrules
# Common install locations. These can be overridden in the library Makefiles
# after including librootdefs
INSTINC=/usr/include
INSTDIR=/usr/lib
INSTDIR_NS=/usr/lib/nonshared
INSTDIR_32_ABI=/usr/lib/abi
INSTDIR_32=/usr/lib
INSTDIR_32_M2=/usr/lib
INSTDIR_32_NS=/usr/lib/nonshared
INSTDIR_32_M2_NS=/usr/lib/nonshared
INSTDIR_32_DEBUG =$(INSTDIR_32)/debug
INSTDIR_32_INTERNAL =$(INSTDIR_32)/internal
INSTDIR_64=/usr/lib64
INSTDIR_64_M3=/usr/lib64/mips3
INSTDIR_64_M4=/usr/lib64/mips4
INSTDIR_64_NS=/usr/lib64/nonshared
INSTDIR_64_M3_NS=/usr/lib64/mips3/nonshared
INSTDIR_64_M4_NS=/usr/lib64/mips4/nonshared
INSTDIR_64_ABI=/usr/lib64/abi
INSTDIR_64_DEBUG=$(INSTDIR_64)/debug
INSTDIR_64_M3_DEBUG=$(INSTDIR_64_M3)/debug
INSTDIR_64_M4_DEBUG=$(INSTDIR_64_M4)/debug
INSTDIR_64_INTERNAL=$(INSTDIR_64)/internal
INSTDIR_64_M3_INTERNAL=$(INSTDIR_64_M3)/internal
INSTDIR_64_M4_INTERNAL=$(INSTDIR_64_M4)/internal
INSTDIR_N32=/usr/lib32
INSTDIR_N32_M3=/usr/lib32/mips3
INSTDIR_N32_M4=/usr/lib32/mips4
INSTDIR_N32_NS=/usr/lib32/nonshared
INSTDIR_N32_M3_NS=/usr/lib32/mips3/nonshared
INSTDIR_N32_M4_NS=/usr/lib32/mips4/nonshared
INSTDIR_N32_DEBUG=$(INSTDIR_N32)/debug
INSTDIR_N32_M3_DEBUG=$(INSTDIR_N32_M3)/debug
INSTDIR_N32_M4_DEBUG=$(INSTDIR_N32_M4)/debug
INSTDIR_N32_INTERNAL=$(INSTDIR_N32)/internal
INSTDIR_N32_M3_INTERNAL=$(INSTDIR_N32_M3)/internal
INSTDIR_N32_M4_INTERNAL=$(INSTDIR_N32_M4)/internal
# obsolete
INSTABIDIR=$(INSTDIR_32_ABI)
INSTDSO=$(INSTDIR)
INSTNSDIR=$(INSTDIR_NS)
#
# Full install partial rules - including usage of the I_* macros to
# suppress installation
#
INST_32_ABI=$(I_32_ABI) $(INSTALL) -F $(INSTDIR_32_ABI)
INST_32=$(I_32) $(INSTALL) -F $(INSTDIR_32)
INST_32_M2=$(I_32_M2) $(INSTALL) -F $(INSTDIR_32_M2)
INST_32_NS=$(I_32) $(INSTALL) -F $(INSTDIR_32_NS)
INST_32_M2_NS=$(I_32_M2) $(INSTALL) -F $(INSTDIR_32_M2_NS)
INST_32_DEBUG=$(I_32) $(INSTALL) -F $(INSTDIR_32_DEBUG)
INST_32_INTERNAL=$(I_32) $(INSTALL) -F $(INSTDIR_32_INTERNAL)
INST_64=$(I_64) $(INSTALL) -F $(INSTDIR_64)
INST_64_M3=$(I_64_M3) $(INSTALL) -F $(INSTDIR_64_M3)
INST_64_M4=$(I_64_M4) $(INSTALL) -F $(INSTDIR_64_M4)
INST_64_NS=$(I_64) $(INSTALL) -F $(INSTDIR_64_NS)
INST_64_M3_NS=$(I_64_M3) $(INSTALL) -F $(INSTDIR_64_M3_NS)
INST_64_M4_NS=$(I_64_M4) $(INSTALL) -F $(INSTDIR_64_M4_NS)
INST_64_ABI=$(I_64_ABI) $(INSTALL) -F $(INSTDIR_64_ABI)
INST_64_DEBUG=$(I_64) $(INSTALL) -F $(INSTDIR_64_DEBUG)
INST_64_M3_DEBUG=$(I_64_M3) $(INSTALL) -F $(INSTDIR_64_M3_DEBUG)
INST_64_M4_DEBUG=$(I_64_M4) $(INSTALL) -F $(INSTDIR_64_M4_DEBUG)
INST_64_INTERNAL=$(I_64) $(INSTALL) -F $(INSTDIR_64_INTERNAL)
INST_64_M3_INTERNAL=$(I_64_M3) $(INSTALL) -F $(INSTDIR_64_M3_INTERNAL)
INST_64_M4_INTERNAL=$(I_64_M4) $(INSTALL) -F $(INSTDIR_64_M4_INTERNAL)
INST_N32=$(I_N32) $(INSTALL) -F $(INSTDIR_N32)
INST_N32_M3=$(I_N32_M3) $(INSTALL) -F $(INSTDIR_N32_M3)
INST_N32_M4=$(I_N32_M4) $(INSTALL) -F $(INSTDIR_N32_M4)
INST_N32_NS=$(I_N32) $(INSTALL) -F $(INSTDIR_N32_NS)
INST_N32_M3_NS=$(I_N32_M3) $(INSTALL) -F $(INSTDIR_N32_M3_NS)
INST_N32_M4_NS=$(I_N32_M4) $(INSTALL) -F $(INSTDIR_N32_M4_NS)
INST_N32_DEBUG=$(I_N32) $(INSTALL) -F $(INSTDIR_N32_DEBUG)
INST_N32_M3_DEBUG=$(I_N32_M3) $(INSTALL) -F $(INSTDIR_N32_M3_DEBUG)
INST_N32_M4_DEBUG=$(I_N32_M4) $(INSTALL) -F $(INSTDIR_N32_M4_DEBUG)
INST_N32_INTERNAL=$(I_N32) $(INSTALL) -F $(INSTDIR_N32_INTERNAL)
INST_N32_M3_INTERNAL=$(I_N32_M3) $(INSTALL) -F $(INSTDIR_N32_M3_INTERNAL)
INST_N32_M4_INTERNAL=$(I_N32_M4) $(INSTALL) -F $(INSTDIR_N32_M4_INTERNAL)
# include releasedefs && normal commondefs
include $(ROOT)/usr/include/make/releasedefs
include $(ROOT)/usr/include/make/commondefs
#
# The following macros can be used to turn on and off command lines
# based on target style
# Set PTARGETS to be an appropriate set of TARGETS based on the STYLES_TO_BUILD
# macro.
#
I_32_M2=\#
I_32=\#
I_32_ABI=\#
I_N32_M3=\#
I_N32_M4=\#
I_N32=\#
I_64_M3=\#
I_64_M4=\#
I_64=\#
I_64_ABI=\#
#
# for backward compatibility/sanity permit anything that doesn't match our
# naming conventions (gets libx.a)
#
PTARGETS+=$(LIBS:M?*.a:N?*_64?*:N?*_32?*:N?*_n32?*:N?*_abi?*:N?*_ns.a)
#if $(STYLES_TO_BUILD:M32) == "32"
I_32=
PTARGETS+=$(LIBS:M?*_32.a) $(LIBS:M?*_32_ns.a)
# for backward compatibility we really want to permit libx_ns.a
PTARGETS+=$(LIBS:M?*_ns.a:N?*_64?*:N?*_32?*:N?*_n32?*)
#endif
#if $(STYLES_TO_BUILD:M32_M2) == "32_M2"
I_32_M2=
PTARGETS+=$(LIBS:M?*_32_M2.a) $(LIBS:M?*_32_M2_ns.a)
#endif
#if $(STYLES_TO_BUILD:M32_ABI) == "32_ABI"
I_32_ABI=
PTARGETS+=$(LIBS:M?*_32_abi.a)
# for backward compatibility we really want to permit libx_abi.a
PTARGETS+=$(LIBS:M?*_abi.a:N?*_64?*:N?*_32?*:N?*_n32?*)
#endif
#if $(STYLES_TO_BUILD:MN32_M3) == "N32_M3"
I_N32_M3=
PTARGETS+=$(LIBS:M?*_n32_M3.a) $(LIBS:M?*_n32_M3_ns.a)
#endif
#if $(STYLES_TO_BUILD:MN32_M4) == "N32_M4"
I_N32_M4=
PTARGETS+=$(LIBS:M?*_n32_M4.a) $(LIBS:M?*_n32_M4_ns.a)
#endif
#if $(STYLES_TO_BUILD:MN32) == "N32"
I_N32=
PTARGETS+=$(LIBS:M?*_n32.a) $(LIBS:M?*_n32_ns.a)
#endif
#if $(STYLES_TO_BUILD:M64_M3) == "64_M3"
I_64_M3=
PTARGETS+=$(LIBS:M?*_64_M3.a) $(LIBS:M?*_64_M3_ns.a)
#endif
#if $(STYLES_TO_BUILD:M64_M4) == "64_M4"
I_64_M4=
PTARGETS+=$(LIBS:M?*_64_M4.a) $(LIBS:M?*_64_M4_ns.a)
#endif
#if $(STYLES_TO_BUILD:M64) == "64"
I_64=
# permit _64ns.a for backward compatibility...
PTARGETS+=$(LIBS:M?*_64.a) $(LIBS:M?*_64_ns.a) $(LIBS:M?*_64ns.a)
#endif
#if $(STYLES_TO_BUILD:M64_ABI) == "64_ABI"
I_64_ABI=
PTARGETS+=$(LIBS:M?*_64_abi.a)
#endif
TARGETS=$(PTARGETS)
# whatever targets there are - add all shared versions as DSOs
#if !defined(NOSO)
TARGETS+=$(PTARGETS:N?*_ns.a:N?*_64ns.a:N?*_abi.a:N?*_noso_?*:.a=.so)
#endif
# add .so's for abi libs if requested
#if defined(ABISO)
TARGETS+=$(PTARGETS:M?*_abi.a:.a=.so)
#endif
#if (defined(MULTIDIR) || (defined(ALTLIBS) && !empty(ALTLIBS)))
.NOTPARALLEL:
COMMONPREF=lib
SUBDIRS=$(BASELIBSRCDIR) $(ALTLIBS:.a=)
# DESCENDERS are subdirectories that will be descended into using a .EXEC
# rule so that their targets are not deemed out of date
DESCENDERS=$(BASELIBSRCDIR)DESCEND $(ALTLIBS:S/.a/DESCEND/g)
# base dir needs no special setup
NOSETUPDIRS=$(BASELIBSRCDIR)SETUPDIR
#endif
#
# If there are multiple versions, we set up macros to help duplicate
# (via tlink) the base library source
#
#if defined(ALTLIBS) && !empty(ALTLIBS)
.NOTPARALLEL:
# The alternate libraries need to be 'setup' (via tlink)
# never copy Makedepend!
LINKSOURCES=$(TLINK) -r -x '^.*\.[oai]$$' -x '^.*\.so$$' -x 'versiondefs' -x $(MKDEPFILE) $(PRIVATEFILES)
RMSOURCES=rm -fr $(ALTLIBS:.a=)
SETUPDIRS=$(ALTLIBS:S/.a/SETUPDIR/g)
#endif
#
# If we're a single level single version library, include libleaf{defs,rules}
#
#if !(defined(MULTIDIR) || (defined(ALTLIBS) && !empty(ALTLIBS)))
INCLUDEDATROOT=yes
include $(ROOT)/usr/include/make/libleafdefs
#endif

View File

@@ -0,0 +1,114 @@
#
# $Revision: 1.12 $
#
# Commonrules for library top level makefiles
# Handle:
# MULTIDIR - library has no source at top level, all source
# is under BASELIBSRCDIR (without the .a)
# ALTLIBS - library has alternate compilation forms
# this REQUIRES a multiple directory setup for source
#
.PRECIOUS:$(TARGETS)
#if (defined(MULTIDIR) || (defined(ALTLIBS) && !empty(ALTLIBS)))
$(BASELIB):$(BASELIBSRCDIR)DESCEND
$(ALTLIBS):$(.TARGET:S/.a/DESCEND/)
#
# By using a .EXEC target the fact that we descend doesn't automatically
# force the libraries logical mod time to change (thus causing things like
# .so libs that depend on the .a to rebuild)
#
$(DESCENDERS)!$(.TARGET:S/DESCEND/SETUPDIR/) .EXEC
cd $(.TARGET:S/DESCEND//); $(MAKE)
#
# get -n to work a bit - this will cause the tlinks to link even if -n
# is specified
#
.MAKE:$(DESCENDERS) $(SETUPDIRS)
# The base lib needs no setup
$(NOSETUPDIRS)!
# there are only targets at the top level
rmtargets!$(COMMONPREF)$$@
clobber!$(COMMONPREF)$$@
$(RMSOURCES)
$(SUBDIRS_MAKERULE)
clean!$(COMMONPREF)$$@
$(SUBDIRS_MAKERULE)
#
# handy rule to simply rebuild .a's that have .so's
#
dsos! $(LIBS:N?*ns.a:.a=.so)
#endif
#if defined(ALTLIBS) && !empty(ALTLIBS)
#
# We really want to tlink every time just to be sure, by using a .EXEC
# target we don't get penalized for this
#
$(SETUPDIRS)!.EXEC
$(LINKSOURCES) $(BASELIBSRCDIR) $(.TARGET:S/SETUPDIR//)
rm -f $(.TARGET:S/SETUPDIR//)/versiondefs
ln -sf ../$(.TARGET:S/SETUPDIR/versiondefs/) $(.TARGET:S/SETUPDIR//)/versiondefs
$(SUBDIRS_LINKRULE)
#endif
include ${COMMONRULES}
# add dependency on export files - this isn't quite correct since
# it means that ALL .a's and all so's depend on every export file ..
$(TARGETS):$(DSOEXPORTS) \
$(DSOEXPORTS_32) \
$(DSOEXPORTS_32_ABI) \
$(DSOEXPORTS_N32) \
$(DSOEXPORTS_64) \
$(DSOEXPORTS_64_ABI)
#
# Inference rule for creating a share object from a library.
#
.SUFFIXES: .a .so
#
# The real messy rule at the end is a backward compat rule
# Note that when building .so versions of ABI libs, we don't link
# against any other libraries - this is mainly because we can't
# link against libc.so (the abi version).
# At some point it might be necessary to permit linking against
# some DSO's while not linking against libc ...
#
.a.so:
$(LD) \
$(.IMPSRC:M?*_32.a:S/$(.IMPSRC)/$(LDOPTS_32) $(LDDSOOPTS_32)/) \
$(.IMPSRC:M?*_32_M2.a:S/$(.IMPSRC)/$(LDOPTS_32_M2) $(LDDSOOPTS_32)/) \
$(.IMPSRC:M?*_32_abi.a:S/$(.IMPSRC)/$(LDOPTS_32_ABI) $(LDDSOOPTS_32_ABI)/) \
$(.IMPSRC:M?*_r32.a:S/$(.IMPSRC)/$(LDOPTS_R32) $(LDDSOOPTS_R32)/) \
$(.IMPSRC:M?*_n32.a:S/$(.IMPSRC)/$(LDOPTS_N32) $(LDDSOOPTS_N32)/) \
$(.IMPSRC:M?*_n32_M3.a:S/$(.IMPSRC)/$(LDOPTS_N32_M3) $(LDDSOOPTS_N32)/)\
$(.IMPSRC:M?*_n32_M4.a:S/$(.IMPSRC)/$(LDOPTS_N32_M4) $(LDDSOOPTS_N32)/)\
$(.IMPSRC:M?*_64.a:S/$(.IMPSRC)/$(LDOPTS_64) $(LDDSOOPTS_64)/) \
$(.IMPSRC:M?*_64_M3.a:S/$(.IMPSRC)/$(LDOPTS_64_M3) $(LDDSOOPTS_64)/) \
$(.IMPSRC:M?*_64_M4.a:S/$(.IMPSRC)/$(LDOPTS_64_M4) $(LDDSOOPTS_64)/) \
$(.IMPSRC:M?*_64_abi.a:S/$(.IMPSRC)/$(LDOPTS_64_ABI) $(LDDSOOPTS_64_ABI)/) \
$(.IMPSRC:M?*.a:N?*_64?*:N?*_32?*:N?*_n32?*:N?*_abi?*:N?*_r32?*:S/$(.IMPSRC)/$(LDOPTS_32) $(LDDSOOPTS_32)/) \
$(.IMPSRC) \
$(.IMPSRC:N?*_abi.a:S/$(.IMPSRC)/$(LDLIBS)/) \
-o $(.TARGET)
#
# If we're a single level single version library,
# include libleaf{defs,rules}
#
#if !(defined(MULTIDIR) || (defined(ALTLIBS) && !empty(ALTLIBS)))
INCLUDEDATROOT=yes
include $(LIBLEAFRULES)
#endif

View File

@@ -0,0 +1 @@
FINALIDB=256pfinalidb

View File

@@ -0,0 +1 @@
FINALIDB=finalidb

View File

@@ -0,0 +1 @@
FINALIDB=finalidb

View File

@@ -0,0 +1,138 @@
# Every time we clone a new tree, i.e. every time you need to change
# the RELEASE macro, you will need to consider each of the macro's in this
# group. RELEASE_NUM must be < 214 and preserves the monotonicity of the
# inst version numbers. See man page for mkversionnum for more details.
# RELEASE_NAME is the human readable product name string for hardware
# specific releases. it must be empty (no spaces or anything) for the
# base release. It should match reasonably well the label printed on the CD
RELEASE=6.5
RELEASE_MAJOR=6
RELEASE_MINOR=5
RELEASE_MAINT=0
RELEASE_NUM=127
RELEASE_NAME=6.5.7m
#
# Default STYLE for binaries - this sets what the base level (i.e. no
# explicit makefile flags) binaries will be made up of. This defines
# both the ABI and ISA defaults.
#
# Note that 'make'-files (as opposed to 'smake'-files) will use
# DEF_CSTYLE and DEF_GLDOPTS - and OBJECT_STYLE will be set to
# DEF_OBJECT_STYLE - thus ALL 3 must agree for both make/smake-files
# to produce the same results.
# The 'DEF_GLDOPTS/DEF_CSTYLE' is for makefiles that have no specific
# ABI/ISA requirements
#
# If DEF_CSTYLE should change then LIB_LOCATION and ROOTRLDNAME should also
# reflect the change to the DEF_CSTYLE.
#
DEF_CSTYLE=$(CSTYLE_N32_M3)
DEF_GLDOPTS=$(GLDOPTS_N32_M3)
#
# LIB_LOCATION is for Makefile's who have hardcoded pathnames
# to a lib. For example,
# LLDLIBS=$(ROOT)/usr/lib/libw.a
# should be changed to ...
# LLDLIBS=$(ROOT)/usr/$(LIB_LOCATION)/libw.a
#
# This way when the default object style changes we only
# need to change it here.
#
LIB_LOCATION=lib32
#
# Set ROOTRLDNAME for the correct default object style.
#
ROOTRLDNAME=$(ROOTRLDNAME_N32)
#
# Define default OBJECT_STYLE - this can be changed to 'N32' to
# change ALL makefiles that don't explicitly set OBJECT_STYLE
# The '32_' and '64_' defines can be used in makefiles that need to
# compile both 32 and 64 bit versions but just want 1 of each and to
# pick up the current favorite.
# setting OBJECT_STYLE=$(DEF_32_OBJECT_STYLE) in a versiondefs file
# would permit it to be easily changed to compile N32.
#
DEF_OBJECT_STYLE=N32_M3
DEF_32_OBJECT_STYLE=N32_M3
DEF_64_OBJECT_STYLE=64
#
# default ISA's for 32, N32, and 64 bit programs
# If a makefile specifies OBJECT_STYLE={32, N32, 64} this is what they'll get
#
DEF_CSTYLE_32 = $(CSTYLE_32_M2)
DEF_CSTYLE_N32 = $(CSTYLE_N32_M3)
DEF_CSTYLE_64 = $(CSTYLE_64_M3)
DEF_GLDOPTS_32 = $(GLDOPTS_32_M2)
DEF_GLDOPTS_N32 = $(GLDOPTS_N32_M3)
DEF_GLDOPTS_64 = $(GLDOPTS_64_M3)
#
# For this release - which styles should be built? Built from the list in
# commondefs
#
STYLES_TO_BUILD=32 32_M2 32_ABI N32 N32_M3 N32_M4 64 64_M3 64_M4 64_ABI
#
# Turn on generation of api information for libraries built using the
# libcommondefs/libcommonrules conventions. To override this setting
# for a given library, add "NO_CHECK_API=1" to the appropriate
# versiondefs files
#
# (temporarily undefining CHECK_API pending 7.2+ linker fixes)
# CHECK_API=1
# this only needs to be changed when doing a hardware specific OS release.
# See man page for mkversionnum for more details.
TREE_ID=0
#
# Since different compiler suites have different options, makefiles
# can use the following to differentiate between them so a single source
# makefile can build for many ABIs using different toolroots
#
# C - possible values are:
# CFE - which is in the compiler 3.xx ucode release
# RAGNAROK - which is in the compiler 4.xx release
# MONGOOSE - compiler in 7.xx release
#
# C++ -
# CFRONT - in the 3.xx release uses ATT cfront translator
# NCC - in the 3.19 compiler release with irix 5.2+ - uses new
# Edison front end
# RAGNAROK - in the compiler 4.x release - uses same front end as
# the C compiler
# MONGOOSE - compiler in 7.xx release
# LD -
# RAGNAROK - in the compiler 4.x release (same for MONGOOSE)
# UCODE - in the 3.xx release
#
# We differentiate between different ABIs since that is often where
# one set of compilers gets ahead of the other(s)
#
# For smake builds only, we can specify an environment variable
# to enable MONGOOSE compilers
# This test is first so everything still defaults to RAGNAROK for make.
# Compiler values :
# VCC* == C compiler, VCXX* == C++ compiler
# -o32
VCC32=CFE
VCXX32=NCC
# -N32
VCCN32=MONGOOSE
VCXXN32=MONGOOSE
# -N64/64
VCC64=MONGOOSE
VCXX64=MONGOOSE
# LD - see above for comments
VLD32=RAGNAROK
VLDN32=RAGNAROK
VLD64=RAGNAROK

View File

@@ -0,0 +1,488 @@
# Rationales for an official so_locations file:
# 1) to save kernel space reserved for page table -- each active
# 4Meg of user virtual space requires 4K of kernel page table space;
# 2) to save kernel virtual space (tlb) required to map each page of
# page tables.
# 3) to give rqsall information to help it place all the libraries so
# that they quickstart.
#
# 1) Put all libraries that you think are likely to be linked by the same
# program in the same 4Meg segment. This saves kernel page table space
# and can potentially speed up the program.
#
# 2) Allow adequate space between 4Meg segments of non-related libraries
# so that redistribution of one ISM type does not mess up other ISMs.
#
# 3) All libraries should be listed. If packing isn't an issue
# then use the 'catch-all' range at the end.
# 4) There are 2 ways to pack - take a 4Mb chunk and have each .so
# specify the entire 4Mb range. ld(1) will do the packing.
# This has the advantage of dealing well with one or more
# libraries changing size - each build will straighten things out
# unless the total size gets too large. It has a few disadvantages:
# a) if you have more than one version of the library with the same
# soname (this file matches on soname), and one is alot
# large than the other, you can run into trouble if
# the smaller one is built first, then another library in the
# range is built, followed by the larger version. The larger
# version won't fit.
# b) if the libraries come from different isms and something goes
# wrong with the build, its more likely that libraries
# will collide.
# The second way is to create a separate range for each .so. This
# will guarentee no overlaps, but of course if the library grows
# too large ...
# 5) Don't put libs in here that aren't shipped - we'll run out of space!
#
# This file is used for both o32 and n32
#
# The range 0x0f800000-0x0fc00000 is reserved for system related libraries.
# rld heap (128K max) at 0x0fbe0000 (rld heap can grow beyond 0x0fc00000).
rld.heap \
:st = $range 0x0fbe0000, 0x00020000:\
:st = .data 0x0fbe0000, 0x00020000:\
# rld text (384 K max) at 0x0fb60000, data (128 K max) at 0x0fbc0000
# this is so that we can reserve this slot for rld.
rld \
:st = $range 0x0fb60000, 0x000080000:\
:st = .text 0x0fb60000, 0x00060000:\
:st = .data 0x0fbc0000, 0x00020000:\
#
# we explicitly set the text and data since all h*ll breaks out if
# we ever have data below text
#
libc.so.1 \
:st = $range 0x0fa00000, 0x000160000:\
:st = .text 0x0fa00000, 0x00140000:\
:st = .data 0x0fb40000, 0x00020000:\
libcurses.so \
:st = $range 0x0f9b0000, 0x000050000:
libadm.so \
:st = $range 0x0f980000, 0x000030000:
libcrypt.so \
:st = $range 0x0f960000, 0x000020000:
libdl.so \
:st = $range 0x0f940000, 0x000020000:
libgen.so \
:st = $range 0x0f920000, 0x000020000:
libmalloc.so \
:st = $range 0x0f900000, 0x000020000:
librpcsvc.so \
:st = $range 0x0f8e0000, 0x000020000:
libw.so \
:st = $range 0x0f8c0000, 0x000020000:
libC.so \
:st = $range 0x0f890000, 0x000030000:
libC.so.2 \
:st = $range 0x0ac00000, 0x00400000:\
libm.so \
:st = $range 0x0f830000, 0x000060000:
libmutex.so \
:st = $range 0x0f810000, 0x000020000:
# The range 0x0f400000-0x0f800000 is reserved for X libraries
libX11.so.1 \
:st = $range 0x0f400000, 0x400000:
libXt.so \
:st = $range 0x0f400000, 0x400000:
libXaw.so.2 \
:st = $range 0x0f400000, 0x400000:
libXmu.so \
:st = $range 0x0f400000, 0x400000:
libXext.so \
:st = $range 0x0f400000, 0x400000:
libXi.so \
:st = $range 0x0f400000, 0x400000:
libXpm.so.1 \
:st = $range 0x0f400000, 0x400000:
# The range 0x0e800000-0x0ec00000 is currently reserved for future expansion
# of the above X libraries.
reserv1 \
:st = $range 0x0e800000, 0x400000:
# The range 0x0f000000-0x0f400000 is reserved for libgl,libfm,libgltrace
# we give libgl its own space since it generates potentially lots of versions
libfm.so \
:st = $range 0x0f200000, 0x200000:
libgltrace.so \
:st = $range 0x0f160000, 0x0a0000:
libgl.so \
:st = $range 0x0f000000, 0x160000:
# The range 0x0ec00000-0x0f000000 is currently reserved for future expansion
# of the above gl and font manager libraries.
reserve2 \
:st = $range 0x0ec00000, 0x400000:
# The range 0x0e400000 - 0x0e800000 is reserved for libraires used by toto
libCadmin.so \
:st = $range 0x0e400000, 0x400000:
# The range 0x0dc00000 - 0x0e400000 is reserved for image libraries (IFL/IL)
libifl.so \
:st = $range 0x0dc00000, 0x800000:
libil.so \
:st = $range 0x0dc00000, 0x800000:
libilVk.so \
:st = $range 0x0dc00000, 0x800000:
libiflJFIF.so \
:st = $range 0x0dc00000, 0x800000:
libiflTIFF.so \
:st = $range 0x0dc00000, 0x800000:
libiflFIT.so \
:st = $range 0x0dc00000, 0x800000:
libiflGIF.so \
:st = $range 0x0dc00000, 0x800000:
libiflPNG.so \
:st = $range 0x0dc00000, 0x800000:
libiflSGI.so \
:st = $range 0x0dc00000, 0x800000:
libiflPPM.so \
:st = $range 0x0dc00000, 0x800000:
libiflPhotoCD.so \
:st = $range 0x0dc00000, 0x800000:
libiflRaw.so \
:st = $range 0x0dc00000, 0x800000:
libcifl.so \
:st = $range 0x0dc00000, 0x800000:
libcil.so \
:st = $range 0x0dc00000, 0x800000:
libiflAlias.so \
:st = $range 0x0dc00000, 0x800000:
libiflSOFTIMAGE.so \
:st = $range 0x0dc00000, 0x800000:
libilTCL.so \
:st = $range 0x0dc00000, 0x800000:
libiflYUV.so \
:st = $range 0x0dc00000, 0x800000:
libilMon.so \
:st = $range 0x0dc00000, 0x800000:
# The range 0x0d800000 - 0x0dc00000 is reserved for opengl/gl libraires
# see also 0x0a800000
# In order to prevent libGLcore from getting crowded out, we break the
# bottom 4MB into two 2MB pieces and give one to libGLcore.
libGL.so \
:st = $range 0x0d800000, 0x200000:
libGLcore.so \
:st = $range 0x0da00000, 0x200000:
# The range 0x0d400000 - 0x0d800000 is reserved for libraries used by toto
libvkSGI.so.1 \
:st = $range 0x0d400000, 0x400000:
libvkhelp.so.1 \
:st = $range 0x0d400000, 0x400000:
libvk.so.1 \
:st = $range 0x0d400000, 0x400000:
libvkmsg.so.1 \
:st = $range 0x0d400000, 0x400000:
libdesktopUtil.so \
:st = $range 0x0d400000, 0x400000:
libdesktopIcon.so \
:st = $range 0x0d400000, 0x400000:
libdesktopFileicon.so \
:st = $range 0x0d400000, 0x400000:
libvkwebhelp.so.1 \
:st = $range 0x0d400000, 0x400000:
libhelpmsg.so \
:st = $range 0x0d400000, 0x400000:
libdesktopGallery.so \
:st = $range 0x0d400000, 0x400000:
# tooltalk
libtt.so \
:st = $range 0x0d400000, 0x400000:
# The range 0x0d000000 - 0x0d400000 is reserved for dmedia libraries
libaudiofile.so \
:st = $range 0x0d000000, 0x400000:
libaudioutil.so \
:st = $range 0x0d000000, 0x400000:
libmidi.so \
:st = $range 0x0d000000, 0x400000:
libawareaudio.so \
:st = $range 0x0d000000, 0x400000:
libdmedia.so \
:st = $range 0x0d000000, 0x400000:
libmediaclient.so \
:st = $range 0x0d000000, 0x400000:
libaudio.so \
:st = $range 0x0d000000, 0x400000:
libvice.so \
:st = $range 0x0d000000, 0x400000:
libVkCapture.so \
:st = $range 0x0d000000, 0x400000:
# The range 0x0cc00000 - 0x0d000000 is reserved for il8n libraries
libwnn.so \
:st = $range 0x0cc00000, 0x400000:
libjgl.so \
:st = $range 0x0cc00000, 0x400000:
libXawI18n.so \
:st = $range 0x0cc00000, 0x400000:
# The double range 0x0c400000-0x0cc00000 is reserved for Inventor libraries.
# Note: n32 inventor is bigger than 1 block, but o32 fits.
libInventor.so.3 \
:st = $range 0x0c670000, 0x00590000:
libInventorXt.so.3 \
:st = $range 0x0c400000, 0x00270000:
# The range 0x0c000000 - 0x0c400000 is reserved for lesser used system libs
libpthread.so \
:st = $range 0x0c000000, 0x400000:
libudma.so \
:st = $range 0x0c000000, 0x400000:
libl.so \
:st = $range 0x0c000000, 0x400000:
libmediad.so \
:st = $range 0x0c000000, 0x400000:
libpkg.so \
:st = $range 0x0c000000, 0x400000:
libnls.so \
:st = $range 0x0c000000, 0x400000:
libmx.so \
:st = $range 0x0c000000, 0x400000:
libgrio.so \
:st = $range 0x0c000000, 0x400000:
libdm.so \
:st = $range 0x0c000000, 0x400000:
libirixpmda.so \
:st = $range 0x0c000000, 0x400000:
libabi.so \
:st = $range 0x0c000000, 0x400000:
libarray.so \
:st = $range 0x0c000000, 0x400000:
libdisk.so \
:st = $range 0x0c000000, 0x400000:
libdpipe.so \
:st = $range 0x0c000000, 0x400000:
libnanothread.so \
:st = $range 0x0c000000, 0x400000:
librsvp.so \
:st = $range 0x0c000000, 0x400000:
libAS.so \
:st = $range 0x0c000000, 0x400000:
libprio.so \
:st = $range 0x0c000000, 0x400000:
libperfex.so \
:st = $range 0x0c000000, 0x400000:
libdprof.so \
:st = $range 0x0c000000, 0x400000:
libdplace.so \
:st = $range 0x0c000000, 0x400000:
libfetchop.so \
:st = $range 0x0c000000, 0x400000:
# The range 0x0bc00000 - 0x0c000000 is reserved for video libraries
libvl.so \
:st = $range 0x0bc00000, 0x400000:
Sirius.so \
:st = $range 0x0bc00000, 0x400000:
SiriusVL.so \
:st = $range 0x0bc00000, 0x400000:
vino.so \
:st = $range 0x0bc00000, 0x400000:
ev1.so \
:st = $range 0x0bc00000, 0x400000:
sv1.so \
:st = $range 0x0bc00000, 0x400000:
cl_cosmo.so \
:st = $range 0x0bc00000, 0x400000:
cosmo.so \
:st = $range 0x0bc00000, 0x400000:
# The range 0x0b800000 - 0x0bc00000 is reserved for less-used Motif librairies
libMrm.so.1 \
:st = $range 0x0b800000, 0x400000:
libUil.so.1 \
:st = $range 0x0b800000, 0x400000:
# The range 0x0b400000 - 0x0b800000 is reserved for SVR4 net libraries
libnsl.so \
:st = $range 0x0b400000, 0x400000:
libsocket.so \
:st = $range 0x0b400000, 0x400000:
nis.so \
:st = $range 0x0b400000, 0x400000:
resolv.so \
:st = $range 0x0b400000, 0x400000:
straddr.so \
:st = $range 0x0b400000, 0x400000:
tcpip.so \
:st = $range 0x0b400000, 0x400000:
# The range 0x0b000000 - 0x0b400000 is reserved for motif libraries
libXm.so.1 \
:st = $range 0x0b000000, 0x400000:
libSgm.so.1 \
:st = $range 0x0b000000, 0x400000:
# The range 0x0ac00000 - 0x0b000000 is reserved for other compiler libs
libexc.so \
:st = $range 0x0ac00000, 0x400000:
libftn.so \
:st = $range 0x0ac00000, 0x400000:
libfpe.so \
:st = $range 0x0ac00000, 0x400000:
libfastm.so \
:st = $range 0x0ac00000, 0x400000:
libmp.so \
:st = $range 0x0ac00000, 0x400000:
libcomplex.so \
:st = $range 0x0ac00000, 0x400000:
libm43.so \
:st = $range 0x0ac00000, 0x400000:
libCsup.so \
:st = $range 0x0ac00000, 0x400000:
# The range 0x0a800000 - 0x0ac00000 is reserved for other OpenGL libraries
libGLS.so \
:st = $range 0x0a800000, 0x400000:
libGLC.so \
:st = $range 0x0a800000, 0x400000:
libGLU.so \
:st = $range 0x0a800000, 0x400000:
libFL.so \
:st = $range 0x0a800000, 0x400000:
# The range 0x0a000000 - 0x0a800000 is reserved for cmplrs
libftn90.so \
:st = $range 0x0a000000, 0x800000:
libfortran.so \
:st = $range 0x0a000000, 0x800000:
libffio.so \
:st = $range 0x0a000000, 0x800000:
# Catch-all range
# If a .so is shipped, and its not in one of the above ranges - place it
# here. This is also where we place $start_address (for SGI build)
# so that any non-spec'd .so's will be placed somewhere in here.
# This range is from 0x02000000 -> 0x0a000000 - 128Mb.
libmd.so \
:st = $range 0x02000000, 0x08000000:
libmalloc_cv.so \
:st = $range 0x02000000, 0x08000000:
libMMmalloc.so \
:st = $range 0x02000000, 0x08000000:
libogldebug.so \
:st = $range 0x02000000, 0x08000000:
liblim.so \
:st = $range 0x02000000, 0x08000000:
libgd.so \
:st = $range 0x02000000, 0x08000000:
libwebviewer.so.1 \
:st = $range 0x02000000, 0x08000000:
libwio.so.1 \
:st = $range 0x02000000, 0x08000000:
libwioutil.so.1 \
:st = $range 0x02000000, 0x08000000:
libcwio.so.1 \
:st = $range 0x02000000, 0x08000000:
libwwwhelp.so \
:st = $range 0x02000000, 0x08000000:
libsgihelp.so \
:st = $range 0x02000000, 0x08000000:
libshowcaseui.so \
:st = $range 0x02000000, 0x08000000:
libshowcase_shareext.so \
:st = $range 0x02000000, 0x08000000:
libshowcase3d.so \
:st = $range 0x02000000, 0x08000000:
libcl.so \
:st = $range 0x02000000, 0x08000000:
libdmc.so \
:st = $range 0x02000000, 0x08000000:
libdn.so \
:st = $range 0x02000000, 0x08000000:
libsnmp.so \
:st = $range 0x02000000, 0x08000000:
libX11.so.2 \
:st = $range 0x02000000, 0x08000000:
libblas.so \
:st = $range 0x02000000, 0x08000000:
libblas_mp.so \
:st = $range 0x02000000, 0x08000000:
libufm.so \
:st = $range 0x02000000, 0x08000000:
libMediaViewer.so \
:st = $range 0x02000000, 0x08000000:
libfxplugmgr.so \
:st = $range 0x02000000, 0x08000000:
libfxplugutils.so \
:st = $range 0x02000000, 0x08000000:
libmpi.so \
:st = $range 0x02000000, 0x08000000:
libsma.so \
:st = $range 0x02000000, 0x08000000:
libpvm3.so \
:st = $range 0x02000000, 0x08000000:
libpvm3-i8.so \
:st = $range 0x02000000, 0x08000000:
libst.so \
:st = $range 0x02000000, 0x08000000:
# tcl libs
libOratcl.so \
:st = $range 0x02000000, 0x08000000:
libSybtcl.so \
:st = $range 0x02000000, 0x08000000:
libitcl.so \
:st = $range 0x02000000, 0x08000000:
libtclObjSrv.so \
:st = $range 0x02000000, 0x08000000:
libtkGLXAux.so \
:st = $range 0x02000000, 0x08000000:
libtkGLX.so \
:st = $range 0x02000000, 0x08000000:
libexpectk.so \
:st = $range 0x02000000, 0x08000000:
libtclMotif.so \
:st = $range 0x02000000, 0x08000000:
libexpect.so \
:st = $range 0x02000000, 0x08000000:
libtkX.so \
:st = $range 0x02000000, 0x08000000:
libtclX.so \
:st = $range 0x02000000, 0x08000000:
libtcl.so \
:st = $range 0x02000000, 0x08000000:
libpvtcl.so \
:st = $range 0x02000000, 0x08000000:
# Performance Co-Pilot libraries and PMDAs
libpcp.so.1 \
:st = $range 0x02000000, 0x08000000:
libpcp_lite.so.1 \
:st = $range 0x02000000, 0x08000000:
libpcp_pmda.so \
:st = $range 0x02000000, 0x08000000:
libpcp_wio.so \
:st = $range 0x02000000, 0x08000000:
libpcp_wioutil.so \
:st = $range 0x02000000, 0x08000000:
libpcp_socks.so \
:st = $range 0x02000000, 0x08000000:
pmda_pmcd.so \
:st = $range 0x02000000, 0x08000000:
pmda_proc.so \
:st = $range 0x02000000, 0x08000000:
pmda_environ.so \
:st = $range 0x02000000, 0x08000000:
libvkpcp.so \
:st = $range 0x02000000, 0x08000000:
# All DSO's need to be below 0x10000000 (start of data/heap). This is so
# that we don't use up valuable heap/stack space by fragmenting
# the address space. So we pile them all in below 0x0a000000.
$start_address=0x0a000000

View File

@@ -0,0 +1,272 @@
# Rationales for an official so_locations file:
#
# See the /usr/lib/so_locations file for a complete rundown. For 64 bits
# the packing issue really isn't important since each 'segment' maps 64Mb.
# So, to make this all easier, we define rld/libc and simply carve out a large
# segment for everyone else...
#
# rld heap (128K max) at 0x000000000fbe0000 (rld heap can grow beyond 0x000000000fc00000).
rld.heap \
:st = $range 0x000000000fbe0000, 0x0000000000020000:\
:st = .data 0x00000000fbe0000, 0x0000000000020000:\
# this reserves space for rld
rld \
:st = $range 0x000000000fb50000, 0x0000000000080000:\
:st = .text 0x000000000fb50000, 0x0000000000070000:\
:st = .data 0x000000000fbc0000, 0x0000000000020000:\
#
# we explicitly set the text and data since all h*ll breaks out if
# we ever have data below text
#
libc.so.1 \
:st = $range 0x000000000d980000, 0x00000000001d0000:\
:st = .text 0x000000000d980000, 0x00000000001a0000:\
:st = .data 0x000000000fb20000, 0x0000000000030000:\
#
# Catch-all range. All other libraries go in this 217Mb range
#
# 0x0000000002000000->0x000000000d980000
#
# IRIX libraries
#
libcurses.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libnsl.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libsocket.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
librpcsvc.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libgen.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libmalloc.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libw.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libm.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libmutex.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libpthread.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libC.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libarray.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
liblim.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libl.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libcrypt.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libgrio.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libudma.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libabi.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libtt.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libirixpmda.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libdm.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libfetchop.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libdisk.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libdpipe.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libnanothread.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
librsvp.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libAS.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libprio.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libperfex.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libdplace.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libdprof.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libmpi.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libsma.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libpvm3.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libpvm3-i8.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libst.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
#
# X libraries
#
libX11.so.1 \
:st = $range 0x0000000002000000, 0x000000000b980000:
libXt.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libXaw.so.2 \
:st = $range 0x0000000002000000, 0x000000000b980000:
libXmu.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libXext.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libXi.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libXpm.so.1 \
:st = $range 0x0000000002000000, 0x000000000b980000:
#
# Motif
#
libXm.so.1 \
:st = $range 0x0000000002000000, 0x000000000b980000:
libMrm.so.1 \
:st = $range 0x0000000002000000, 0x000000000b980000:
libUil.so.1 \
:st = $range 0x0000000002000000, 0x000000000b980000:
#
# Open GL
#
libGL.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libGLcore.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libGLU.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libGLS.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libGLC.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libFL.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libogldebug.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libufm.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
#
# Desktop
#
libCadmin.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libSgm.so.1 \
:st = $range 0x0000000002000000, 0x000000000b980000:
libdesktopFileicon.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libvk.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libvkhelp.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libvk.so.1 \
:st = $range 0x0000000002000000, 0x000000000b980000:
libvkhelp.so.1 \
:st = $range 0x0000000002000000, 0x000000000b980000:
libvkmsg.so.1 \
:st = $range 0x0000000002000000, 0x000000000b980000:
libvkSGI.so.1 \
:st = $range 0x0000000002000000, 0x000000000b980000:
libvkwebhelp.so.1 \
:st = $range 0x0000000002000000, 0x000000000b980000:
libhelpmsg.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
#
# Compilers
#
libMMmalloc.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libcomplex.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libexc.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libfastm.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libfpe.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libm43.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libmp.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libftn90.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libftn.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libmx.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libC.so.2 \
:st = $range 0x0000000002000000, 0x000000000b980000:
libCsup.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libblas.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libblas_mp.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libfortran.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libffio.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
#
# Etc.
#
libInventor.so.3 \
:st = $range 0x0000000002000000, 0x000000000b980000:
libInventorXt.so.3 \
:st = $range 0x0000000002000000, 0x000000000b980000:
#
# Performance Co-Pilot libraries and PMDAs
#
libpcp.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libpcp_lite.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libpcp_wio.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libpcp_wioutil.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libpcp_socks.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
pmda_pmcd.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
pmda_proc.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
pmda_environ.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
#
# Digital Media libraries
#
libaudiofile.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libaudioutil.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libmidi.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libawareaudio.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libdmedia.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libaudio.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
libmediaclient.so \
:st = $range 0x0000000002000000, 0x000000000b980000:
# Other libraries to follow
# We pick the following number since that is the default starting
# point for mmap() - which will allocate upwards, and ld will allocate
# downwards.
# Do not change the following line
# Non SGI libraries should be below 0x0000004000000000 (1/4Tb)
$start_address=0x0000004000000000

View File

@@ -0,0 +1,146 @@
#
# Startversion target - generate version number (and alpha number) in a
# standard fashion
# Input
# - TOOLROOT macro is set to point to tools to use for this build.
# - mkversionnum and showversionnum available in $(TOOLROOT). These
# are part of the buildtools ism
# - include $(ROOT)/usr/include/make/releasedefs at the same level you
# include this file. This provides the definition of the
# TREE_ID and RELEASE_NUM macros
# - The WORKAREA environment variable pointing to a writable directory.
# Typically, this is a ptools workarea containing one or more
# ISMs. The version number generated applies to all of these
# ISMs.
# - set the following macros as needed
# BUILDER - (to 1 if project build, to 2 if build group build)
# defaults to 0 (developer build).
# TREE_ID - to an integer 1-9 to distinguish parallel OS efforts
# targeted to new hardware.
# It will default to the value of TREE_ID found in
# $(ROOT)/usr/include/make/releasedefs.
# PATCH_RELEASE - if creating a patch release (will default to first eight
# digits of $(WORKAREA)/.version_number)
# PATCH_NUM - patch number (sequences patch releases)
# VNUM_OVERRIDE - a ten digit version number to be directly used.
# This option is provided as a hook and should rarely if ever be
# used.
# Output
# - $(WORKAREA)/.version_number - the ten digit version number
# - $(WORKAREA)/.alpha_number - the alpha number portion of the
# version number
# Algorithm
#
# If PATCH_NUM is set then a patch release version number is generated.
# Else if VNUM_OVERRIDE is set then it will be used as the version number.
# Else a regular version number is generated.
#
# Patch version number
#
# first eight digit are PATCH_RELEASE if it is set.
# Else first eight digits of $(WORKAREA)/.version_number.
# It is and error for both PATCH_RELEASE and
# $(WORKAREA)/.version_number to be unset.
#
# last two digits are 30 + (PATCH_NUM mod 70).
# first eight digits generated above are (potentially)
# modified by adding PATCH_NUM/70 (this should rarely happen).
#
# Regular version number
#
# first three digits are RELEASE_NUM.
#
# next five digits are the number of hours since
# January 1, 1993 and are generated by the mkversionnum
# command.
#
# next digit is BUILDER.
#
# last digit is TREE_ID.
#
# Alpha number
# is the fourth thru eighth digits from the version number
# generated by the above steps. These five digits are the alpha
# number portion of the version number and are the number of
# hours since Jan 1, 1993.
#
#ident "$Revision: 1.8 $"
VNUM=$(WORKAREA)/.version_number
ANUM=$(WORKAREA)/.alpha_number
MKVERSIONNUM=$(TOOLROOT)/usr/sbin/mkversionnum
SHOWVERSIONNUM=$(TOOLROOT)/usr/sbin/showversionnum
# The file where the .o file with the ident string lives.
# Build this into all files, by building with RLS_ID_OBJECT=${V_IDENTFILE}
# in the environment. The cc driver automatically passes this to ld
## if set, as the last item on the ld line. No problem for standalone
# because all standalone (coff) programs use ld rather than the driver.
# variable constructed so the 3.18 (late alpha) ld recognizes the file
# as "PIC-neutral", so it can be used with shared and -non_shared
# binaries. Written so both ident and what show a meaningful string on
# all resulting binaries.
# This one definitely uses the TOOLROOT compiler; do not use $(CCF)
# because this may be included in Makefiles that do not define it.
V_IDENTFILE=${WORKAREA}/.identfile.o
V_IDENTFILE_64=${WORKAREA}/.ident_64.o
V_IDENTFILE_N32=${WORKAREA}/.ident_n32.o
# want this for the basic system release number for V_IDENTFILE
sinclude $(ROOT)/usr/include/make/releasedefs
startversion:
@if [ "$(WORKAREA)" = "" ]; then \
echo "You must set the WORKAREA environment variable"; \
exit 1; \
fi
@if [ "$(PATCH_NUM)" ]; then \
if [ "$(PATCH_RELEASE)" ]; then \
newvnum=`$(MKVERSIONNUM) -P "$(PATCH_RELEASE)" \
-p "$(PATCH_NUM)"` ; \
else \
patrel=`cat $(VNUM)`; \
newvnum=`$(MKVERSIONNUM) -P "$$patrel" -p "$(PATCH_NUM)"`;\
fi; \
else \
newvnum=`$(MKVERSIONNUM) -r "$(RELEASE_NUM)" -b "$(BUILDER)" \
-t "$(TREE_ID)" -f "$(VNUM_OVERRIDE)"` ; \
fi; \
echo "$$newvnum" > $(VNUM); \
echo "$$newvnum" | sed -e "s/...\(.....\)../\1/" > $(ANUM); \
$(SHOWVERSIONNUM) $$newvnum
#
#
@rm -f ${V_IDENTFILE}*
@echo 'const char __Release_ID[] = "@(#)\$$'Header: IRIX ${RELEASE}:`cat ${VNUM}` built `date +%D` at `hostname`:$$ROOT $$'";' > ${V_IDENTFILE}.c
@${TOOLROOT}/usr/bin/cc -mips1 -c ${V_IDENTFILE}.c -o ${V_IDENTFILE}
@echo Revision information that will go into all binaries is:
@ident ${V_IDENTFILE} 2>&1 | sed '/:$$/d'
@if [ "$$RLS_ID_OBJECT" != ${V_IDENTFILE} ]; then \
echo Warning: You do not have \$$RLS_ID_OBJECT set to ${V_IDENTFILE} in your environment ;\
echo If you do not do so, you will not get the o32bit ident string in the build;\
fi
#
#
@rm -f ${V_IDENTFILE_64}*
@echo 'const char __Release_ID[] = "@(#)$$'Header: IRIX ${RELEASE}:`cat ${VNUM}` built `date +%D` at `hostname`:$$ROOT $$'";' > ${V_IDENTFILE_64}.c
@echo 'static const char *p = __Release_ID;' >> ${V_IDENTFILE_64}.c
@${TOOLROOT}/usr/bin/cc -64 -mips3 -cckr -c ${V_IDENTFILE_64}.c -o ${V_IDENTFILE_64}
@if [ "$$RLS_ID_OBJECT64" != ${V_IDENTFILE_64} ]; then \
echo Warning: You do not have \$$RLS_ID_OBJECT64 set to ${V_IDENTFILE_64} in your environment ;\
echo If you do not do so, you will not get the 64bit ident string in the build;\
fi
#
#
@rm -f ${V_IDENTFILE_N32}*
@echo 'const char __Release_ID[] = "@(#)$$'Header: IRIX ${RELEASE}:`cat ${VNUM}` built `date +%D` at `hostname`:$$ROOT $$'";' > ${V_IDENTFILE_N32}.c
@echo 'static const char *p = __Release_ID;' >> ${V_IDENTFILE_N32}.c
@${TOOLROOT}/usr/bin/cc -n32 -mips3 -cckr -c ${V_IDENTFILE_N32}.c -o ${V_IDENTFILE_N32}
@if [ "$$RLS_ID_OBJECTN32" != ${V_IDENTFILE_N32} ]; then \
echo Warning: You do not have \$$RLS_ID_OBJECTN32 set to ${V_IDENTFILE_N32} in your environment ;\
echo If you do not do so, you will not get the n32bit ident string in the build;\
fi

125
eoe/include/malloc.h Normal file
View File

@@ -0,0 +1,125 @@
/**************************************************************************
* *
* Copyright (C) 1989-1994 Silicon Graphics, Inc. *
* *
* These coded instructions, statements, and computer programs contain *
* unpublished proprietary information of Silicon Graphics, Inc., and *
* are protected by Federal copyright law. They may not be disclosed *
* to third parties or copied or duplicated in any form, in whole or *
* in part, without the prior written consent of Silicon Graphics, Inc. *
* *
**************************************************************************/
/* Copyright (c) 1984 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ifndef __MALLOC_H__
#define __MALLOC_H__
#ifdef __cplusplus
extern "C" {
#endif
#ident "$Revision: 1.43 $"
#include <standards.h>
/* Definitions for malloc(3X) and amalloc(3P) routines */
/* Commands for mallopt(), amallopt() */
#define M_MXFAST 1 /* set size of blocks to be fast */
#define M_NLBLKS 2 /* set number of block in a holding block */
#define M_GRAIN 3 /* set number of sizes mapped to one, for
* small blocks */
#define M_KEEP 4 /* retain contents of block after a free until
* another allocation */
#define M_BLKSZ 5 /* minimum amount of memory by which to
* grow when sbrk'ing more memory */
#define M_MXCHK 6 /* maximum number of blocks to check before
* giving up and calling sbrk() */
#define M_FREEHD 7 /* Free blocks go to head (tail) of free list */
#define M_CRLOCK 8 /* make the arena MP safe - allocating
* a lock, etc. (amallopt only)
*/
#define M_DEBUG 100 /* turn on arena checking */
/* NOTE: the following options only work with special versions of malloc */
#define M_LOG 101 /* turn on/off malloc/realloc/free logging */
#define M_LOGFILE 102 /* set the file to use for logging */
#define M_LOGDEPTH 103 /* set the maximum stack depth */
#define M_CLRONFREE 104 /* clear block on free */
/* Flags for acreate(3P) */
#define MEM_SHARED 0x0001 /* region is shared and should be
* protected with locks */
#define MEM_NOAUTOGROW 0x0004 /* arena is not an autogrow area */
#if (defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS))
#include <sgidefs.h>
#include <stddef.h>
/* Structure filled by mallinfo(), amallinfo() */
struct mallinfo {
__scint_t arena; /* total space in arena */
__scint_t ordblks; /* number of ordinary blocks */
__scint_t smblks; /* number of small blocks */
__scint_t hblks; /* number of holding blocks */
__scint_t hblkhd; /* space in holding block headers */
__scint_t usmblks; /* space in small blocks in use */
__scint_t fsmblks; /* space in free small blocks */
__scint_t uordblks; /* space in ordinary blocks in use */
__scint_t fordblks; /* space in free ordinary blocks */
__scint_t keepcost; /* cost of enabling keep option */
};
#if _SGIAPI
/*
* Locking macro for mallocs
* ALL malloc replacements must provide for single threading.
*
* The underlying malloc lock is automatically initialized when
* a process does an initial sproc(2).
*/
#include <ulocks.h>
extern int __us_rsthread_malloc;
extern int __libc_lockmalloc(void);
extern int __libc_unlockmalloc(void);
#define __LOCK_MALLOC() __us_rsthread_malloc ? __libc_lockmalloc() : 1
#define __UNLOCK_MALLOC() __us_rsthread_malloc ? __libc_unlockmalloc() : 0
#endif /* _SGIAPI */
extern void * calloc(size_t, size_t);
extern void * malloc(size_t);
extern void free(void *);
extern void * realloc(void *, size_t);
extern int mallopt(int, int);
extern struct mallinfo mallinfo(void);
/* additional libmalloc entry points */
extern void *recalloc(void *, size_t, size_t);
extern size_t mallocblksize(void *);
extern void *memalign(size_t, size_t);
/* AMALLOC(3P) */
extern void * acreate(void *, size_t, int, void *,
void * (*)(size_t, void *));
extern void afree(void *, void *);
extern void *arealloc(void *, size_t, void *);
extern void *arecalloc(void *, size_t, size_t, void *);
extern void *amalloc(size_t, void *);
extern void *acalloc(size_t, size_t, void *);
extern struct mallinfo amallinfo(void *);
extern int amallopt(int, int, void *);
extern void adelete(void *);
extern size_t amallocblksize(void *, void *);
extern void *amemalign(size_t, size_t, void *);
#endif /* (_LANGUAGE_C || _LANGUAGE_C_PLUS_PLUS) */
#ifdef __cplusplus
}
#endif
#endif /* !__MALLOC_H__ */

443
eoe/include/mdbm.h Normal file
View File

@@ -0,0 +1,443 @@
/*
* mdbm - ndbm work-alike hashed database library based on sdbm which is
* based on Per-Aake Larson's Dynamic Hashing algorithms.
* BIT 18 (1978).
*
* sdbm Copyright (c) 1991 by Ozan S. Yigit (oz@nexus.yorku.ca)
*
* Modifications that:
* . Allow 64 bit sized databases,
* . used mapped files & allow multi reader/writer access,
* . move directory into file, and
* . use network byte order for db data structures.
* are:
* mdbm Copyright (c) 1995, 1996 by Larry McVoy, lm@sgi.com.
* mdbm Copyright (c) 1996 by John Schimmel, jes@sgi.com.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose and without fee is hereby granted,
* provided that the above copyright notice appear in all copies and that
* both that copyright notice and this permission notice appear in
* supporting documentation.
*
* This file is provided AS IS with no warranties of any kind. The author
* shall have no liability with respect to the infringement of copyrights,
* trade secrets or any patents by this file or any part thereof. In no
* event will the author be liable for any lost revenue or profits or
* other special, indirect and consequential damages.
*/
#ifndef __MDBM_H_
#define __MDBM_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/types.h>
#if 1
#include <netinet/in.h>
#else
#define htons(a) (a) /* for now */
#define ntohs(a) (a) /* for now */
#define htonl(a) (a) /* for now */
#define ntohl(a) (a) /* for now */
#endif
#define htonll(a) (a) /* for now */
#define ntohll(a) (a) /* for now */
/*
* File format.
*
* The database is divided up into m_psize "pages". The pages do not have
* to be the same size as the system operating page size, but it is a good
* idea to make one a multiple of the other. The database won't create
* pages smaller that 256 bytes. Datums must fit on a single page so you
* probably don't want to change this. We default to 4K page size if no
* blocksize is specified at create time. The page size can't be bigger
* than 64K because we use 16 bit offsets in the pages.
*
* Page types. The first page is special. It contains the database header,
* as well as the first set of directory bits. The directory bits occupy
* 8 bytes
*
* The point of putting the directory in the first page was to provide for
* a very small memory footprint for small databases; this allows this code
* to be used as a generic hashing package.
*
* After the database reaches a size where the directory will no longer fit
* in the 8 bytes of the first page, the data & directory are grown by
* doubling its previous size. The directory is copied to the end of data
* area. The default page get you to to a terabyte (2^40) database before
* copying becomes a problem.
*
* Page format:
* +--------+----------+----------+
* | key | data | key |
* +--------+--+-------+----------+
* | data | - - - -----> |
* +-----------+------------------+
* | F R E E A R E A |
* +-----------+---------+--------+
* | <------ | datoff | keyoff |
* +--------+--+-----+---+--------+
* | datoff | keyoff | n | genlock|
* +--------+--------+---+--------+
*
* The genlock is a 32 bit per page generation count and lock. The low
* order bit is treated as a write lock.
*
* We hide our own data in a page by making keyoff == 0. We do not allow
* 0 length keys as a result.
* Suppose we have a 1024 byte page, the header is 16 bytes, the directory
* is 8 bytes. ( i.e total is 16 + 8 = 24 bytes )
*
* Page 0 looks like
* +--------+-----+----+----------+
* | 13 bytes header (never moves)|
* | 8 bytes for directory |
* +--------+-----+----+----------+
* | F R E E A R E A |
* +--------+----+---+---+--------+
* | | 24 | 0 | 2 | genlock|
* +--------+----+---+---+--------+
* ^^^
* this signifies a zero length key */
#define _SPLTMAX 10 /* maximum allowed splits */
/* for a single insertion */
#define _INTERNAL (64*1024-1)
/*
* Types.
*/
#ifndef uchar
# define uchar unsigned char
#endif
#ifndef int16
# define int16 short
#endif
#ifndef uint16
# define uint16 unsigned short
#endif
#ifndef int32
# define int32 int
#endif
#ifndef uint32
# define uint32 unsigned int
#endif
#ifndef int64
# ifdef _LONGLONG
# define int64 long long
# else
# define int64 __long_long
# endif
#endif
#ifndef uint64
# ifdef _LONGLONG
# define uint64 unsigned long long
# else
# define uint64 unsigned __long_long
# endif
#endif
/*
* This is the header for the database. Keep it small.
* The values are in network byte order.
*/
typedef struct {
uint32 mh_magic; /* header magic number */
uint16_t mh_version; /* mdbm version number */
uint8_t mh_npgshift; /* # of pages is 1<< this*/
uint8_t mh_pshift; /* page size is 1<< this*/
uint8_t mh_max_npgshift; /* for bounded size db */
uint8_t mh_dbflags; /* flags */
uint8_t mh_dbflags2; /* more flags */
uint8_t mh_dataformat; /* user settable db format id */
uint32 mh_lockspace; /* a place to stick a lock */
int8_t mh_minp_level; /* first level a page apear */
uint8_t mh_hashfunc; /* see values below */
} MDBM_hdr; /* MDBM version 1 header */
#ifndef _DATUM_DEFINED
typedef struct {
char *dptr;
int dsize;
} datum;
#define _DATUM_DEFINED
#endif
typedef struct {
datum key;
datum val;
} kvpair;
typedef struct mdbm_genlock {
uint32 genlock; /* current value of the lock */
int pageno; /* page number of the address */
uint32 flags; /* flags about this lock */
char *page; /* address of page */
struct mdbm_genlock *prev; /* previous held genlock */
} mdbm_genlock_t;
/*
* In memory handle structure. Fields are duplicated from the
* header so that we don't have to byte swap on each access.
*/
struct mdbm {
char *m_db; /* database itself */
char *m_dir; /* directory bits */
int m_fd; /* database file descriptor */
char *m_file; /* file name */
int m_level; /* current level */
int m_amask; /* alignment mask */
uint32 m_max_free; /* max free area per page*/
int m_toffset; /* offset to top of page */
uint64 m_curbit; /* XXX - current bit number */
uint64 m_last_hash; /* last hash value */
uint64 m_pageno; /* last page fetched */
uint8_t m_npgshift; /* # of pages is 1<< this*/
uint8_t m_pshift; /* page size is 1<<this */
int m_kino; /* last key fetched from m_page */
int m_next; /* for getnext */
uint16_t m_flags; /* status/error flags, see below */
int (*m_shake)(struct mdbm *, datum, datum, void *);
/* "shake" function */
uint64 (*m_hash)(unsigned char *, int);
/* hash function */
mdbm_genlock_t *locks; /* Internal page locks */
};
typedef struct mdbm MDBM;
#define _MDBM_RDONLY (1<<0) /* data base open read-only */
#define _MDBM_IOERR (1<<1) /* data base I/O error */
#define _MDBM_LOCKING (1<<2) /* lock on read/write */
#define _MDBM_SYNC (1<<3) /* msync all writes */
#define _MDBM_REPAIR (1<<4) /* Doing the repairs on the database */
#define _MDBM_MEMCHECK (1<<5) /* Require on the fly memory checking */
#define _Mdbm_rdonly(db) ((db)->m_flags & _MDBM_RDONLY)
#define _Mdbm_sync(db) ((db)->m_flags & _MDBM_SYNC)
#define _Mdbm_repair(db) ((db)->m_flags & _MDBM_REPAIR)
#define _Mdbm_memcheck(db) ((db)->m_flags & _MDBM_MEMCHECK)
#define _Exhash(db, item) ((db)->m_hash((uchar *)item.dptr, item.dsize))
/*
** mdbm flags for the mh_dbflags field
*/
#define _MDBM_ALGN16 0x1
#define _MDBM_ALGN32 0x3 /* Implies ALGN16 */
#define _MDBM_ALGN64 0x7 /* Implies ALGN32 */
#define _MDBM_PERFECT 0x8 /* perfectly balanced tree */
#define _MDBM_INVALID 0x10 /* a writer has marked the database invalid */
#define _MDBM_CHAIN 0x20 /* Do bucket chaining */
#define _MDBM_MEMCHECK_REQUIRED 0x40 /* require memcheck for all accesses */
/*
** mdbm flags for the mh_dbflags2 field
** (none yet)
*/
#define DB_HDR(db) ((MDBM_hdr *)((db)->m_db))
#define _Mdbm_perfect(db) (DB_HDR(db)->mh_dbflags & _MDBM_PERFECT)
#define _Mdbm_alnmask(db) ((db)->m_amask)
#define _Mdbm_invalid(db) (DB_HDR(db)->mh_dbflags & _MDBM_INVALID)
#define _Mdbm_chaining(db) (DB_HDR(db)->mh_dbflags & _MDBM_CHAIN)
#define mdbm_dataformat(db) (DB_HDR(db)->mh_dataformat)
#define MDBM_PAGE_SIZE(db) (1<<(db)->m_pshift)
#define MDBM_CHAIN_SIZE(db) ((MDBM_PAGE_SIZE(db)) / 4)
#define MDBM_NUMBER_PAGES(db) (1<<(db)->m_npgshift)
/*
* flags to mdbm_store, mdbm_pre_split, etc.
*
* Flags understood by mdbm_open have to be compatable with open flags
* defined in <sys/fcntl.h>
*/
#define MDBM_INSERT 0x0 /* mdbm_store */
#define MDBM_REPLACE 0x1 /* mdbm_store */
#define MDBM_CHAIN_NULL 0x2 /* mdbm_chain_store */
#define MDBM_ALLOC_SPACE 0x80000 /* mdbm_pre_split, mdbm_open */
#define MDBM_REPAIR 0x100000 /* mdbm_open */
#define MDBM_MEMCHECK 0x200000 /* mdbm_open */
/*
** Hash functions
*/
#define MDBM_HASH_CRC32 0 /* table based 32bit crc */
#define MDBM_HASH_EJB 1 /* from hsearch */
#define MDBM_HASH_PHONG 2 /* congruential hash */
#define MDBM_HASH_OZ 3 /* from sdbm */
#define MDBM_HASH_TOREK 4 /* from Berkeley db */
#define MDBM_HASH_FNV 5 /* very good for small keys */
#define MDBM_HASH_LAST 5
/*
* Page size range supported. You don't want to make it smaller and
* you can't make it bigger - the offsets in the page are 16 bits.
*/
#define MDBM_MINPAGE 7 /* 2^7 = 128 */
#define MDBM_MAXPAGE 16 /* 2^16 = (64*1024) = 65536 */
#define MDBM_PAGESIZ 12 /* 2^12 = 4096 */
/*
* Magic number which is also a version number. If the database format
* changes then we need another magic number.
*/
/* #define _MDBM_MAGIC 0x01023962 */ /* obsolete version 0 mdbm file */
#define _MDBM_MAGIC 0x6d64626d /* hex for "mdbm" */
#define _MDBM_VERSION 0x1
/*
* Bitfields used by mdbm_check and mdbm_repair
*/
#define MDBM_CHECK_REPAIR (1<<0) /* Passed to repair, cause a check
to happen and the results will
be repaired */
#define MDBM_CHECK_ERR (1<<1) /* An error occured in processing.
errno will be set */
/* Unrepariable Errors */
#define MDBM_CHECK_EXIST (1<<8) /* Check for the existance of the
mdbm file */
#define MDBM_CHECK_MAGIC (1<<16) /* Make sure that the magic number
is OK */
#define MDBM_CHECK_VERSION (1<<17) /* Make sure that we have a
suppored MDBM version number */
#define MDBM_CHECK_HASH (1<<18) /* Check to see if the hash is
valid (In a database */
#define MDBM_CHECK_SIZE (1<<19) /* Make sure the database size
matches the database pagesize
and number of pages */
#define MDBM_CHECK_INO (1<<27) /* Check to see if all a entries
refer to valid storage */
/* Errors Repairable in the current MDBM file */
#define MDBM_CHECK_INVALID (1<<24) /* Check the invalid bit */
#define MDBM_CHECK_LOCKSPACE (1<<25) /* Check the global ABI lockspace */
#define MDBM_CHECK_GENLOCK (1<<26) /* Check all page locks */
/* Internally use set of flags */
#define MDBM_CHECK_CONTROL (MDBM_CHECK_REPAIR | \
MDBM_CHECK_ERR)
/* Common sets of flags */
#define MDBM_CHECK_INPLACE (MDBM_CHECK_INVALID | \
MDBM_CHECK_LOCKSPACE | \
MDBM_CHECK_GENLOCK)
#define MDBM_CHECK_NEWFILE 0
#define MDBM_CHECK_REPAIRABLE (MDBM_CHECK_INPLACE | \
MDBM_CHECK_NEWFILE)
#define MDBM_CHECK_REP_NEVER (MDBM_CHECK_EXIST | \
MDBM_CHECK_MAGIC | \
MDBM_CHECK_VERSION | \
MDBM_CHECK_HASH | \
MDBM_CHECK_SIZE)
#define MDBM_CHECK_REP_TRY (MDBM_CHECK_INO)
#define MDBM_CHECK_UNREPAIRABLE (MDBM_CHECK_REP_NEVER | \
MDBM_CHECK_REP_TRY)
/* Commonly used sets of MDBM_CHECK macros */
#define MDBM_CHECK_ALL (MDBM_CHECK_REPAIRABLE | \
MDBM_CHECK_UNREPAIRABLE)
#define MDBM_CHECK_REPAIR_ALL (MDBM_CHECK_ALL | \
MDBM_CHECK_REPAIR)
/*
* mdbm interface in libc
*/
extern MDBM * mdbm_open(char *, int, mode_t, int);
extern void mdbm_close(MDBM *);
extern datum mdbm_fetch(MDBM *, kvpair);
extern int mdbm_delete(MDBM *, datum);
extern int mdbm_store(MDBM *, datum, datum, int);
extern kvpair mdbm_first(MDBM *, kvpair);
extern datum mdbm_firstkey(MDBM *, datum);
extern kvpair mdbm_next(MDBM *, kvpair);
extern datum mdbm_nextkey(MDBM *, datum);
extern void mdbm_sync(MDBM *);
extern void mdbm_close_fd(MDBM *);
extern int mdbm_invalidate(MDBM *);
extern int mdbm_sethash(MDBM *, int);
/*
* mdbm interface in libmdbm
*/
extern void mdbm_elem_per_page(MDBM *, int *);
extern void mdbm_bytes_per_page(MDBM *, int *);
extern int mdbm_lock(MDBM *);
extern int mdbm_unlock(MDBM *);
extern int mdbm_pre_split(MDBM *, uint64, int);
extern int mdbm_set_alignment(MDBM *, int);
extern int mdbm_limit_size(MDBM *, uint64, int (*func)(struct mdbm *, datum, datum, void *));
extern int mdbm_set_dataformat(MDBM *, uint8_t);
/*
** for info on optional symbols, see /usr/include/optional_sym.h>
#pragma optional mdbm_set_dataformat
*/
/*
* mdbm_chain interface in libmdbm
*/
extern int mdbm_set_chain(MDBM *);
extern datum mdbm_chain_fetch(MDBM *, kvpair);
extern kvpair mdbm_chain_first(MDBM *, kvpair);
extern kvpair mdbm_chain_next(MDBM *, kvpair);
extern int mdbm_chain_store(MDBM *, datum, datum, int);
extern int mdbm_chain_delete(MDBM *, datum);
extern datum mdbm_chainP_fetch(MDBM *, kvpair);
extern kvpair mdbm_chainP_first(MDBM *, kvpair);
extern kvpair mdbm_chainP_next(MDBM *, kvpair);
extern int mdbm_chainP_store(MDBM *, datum, datum, int);
extern int mdbm_chainP_delete(MDBM *, datum);
/*
#pragma optional mdbm_chainP_fetch
#pragma optional mdbm_chainP_first
#pragma optional mdbm_chainP_next
#pragma optional mdbm_chainP_store
#pragma optional mdbm_chainP_delete
*/
/*
* mdbm_atomic interface in libmdbm
*/
extern datum mdbm_test_and_set(MDBM *, kvpair, datum);
extern int mdbm_compare_and_swap(MDBM *, datum, datum, datum);
extern int mdbm_compare_and_delete(MDBM *, datum, datum);
extern int mdbm_atomic_begin(MDBM *, datum, mdbm_genlock_t *);
extern int mdbm_atomic_end(MDBM *);
/*
#pragma optional mdbm_test_and_set
#pragma optional mdbm_compare_and_swap
#pragma optional mdbm_compare_and_delete
#pragma optional mdbm_atomic_begin
#pragma optional mdbm_atomic_end
*/
/*
* mdbm_check interface in libmdbm
*/
extern uint32 mdbm_check(char *, uint32);
extern uint32 mdbm_repair(char *, uint32);
/*
#pragma optional mdbm_check
#pragma optional mdbm_repair
*/
#ifndef NULL
# define NULL 0L
#endif
#ifdef __cplusplus
}
#endif
#endif /* __MDBM_H_ */

274
eoe/include/mediaclient.h Normal file
View File

@@ -0,0 +1,274 @@
/*-*-C-*-******************************************************************
* *
* Copyright (C) 1995, Silicon Graphics, Inc. *
* *
* These coded instructions, statements, and computer programs contain *
* unpublished proprietary information of Silicon Graphics, Inc., and *
* are protected by Federal copyright law. They may not be disclosed *
* to third parties or copied or duplicated in any form, in whole or *
* in part, without the prior written consent of Silicon Graphics, Inc. *
* *
**************************************************************************/
#ifndef mediaclient_included
#define mediaclient_included
/*
* This is the media client interface. The basic idea is that a
* client creates a port to monitor a system's removable media
* devices, then at asynchronous intervals it is notified that the
* system's device state has changed.
*
* A system's state has three parts: volumes, devices and partitions.
* A volume is the backing store behind a (potential) file system.
* A device is a hardware device such as a CD-ROM drive.
* A partition is a section of a device's media that may be part of a volume.
*
* Each volume is made up of one or more partitions. Each device, if
* its media is present, has zero or more partitions. Each partition
* is part of exactly one device.
*/
#include <sys/invent.h> /* for inventory_t, __uint64_t */
#include <sys/time.h> /* for time_t */
#if defined(__cplusplus)
extern "C" {
#endif
# define MC_IX_WHOLE -1 /* partition index for whole disk */
/* device formats, aka types. */
# define MC_FMT_RAW "raw" /* raw data */
# define MC_FMT_EFS "efs" /* SGI Extent File System */
# define MC_FMT_XFS "xfs" /* SGI "x" File System */
# define MC_FMT_DOS "dos" /* Microsoft DOS filesystem */
# define MC_FMT_HFS "hfs" /* Apple Hierarchical File System */
# define MC_FMT_ISO9660 "iso9660" /* ISO std. 9660 (CD-ROM) */
# define MC_FMT_MUSIC "music" /* Audio (DAT) */
# define MC_FMT_CDDA "cdda" /* Compact Disc Digital Audio */
/* Subformats. In (mc_volume *)->mcv_subformat. */
# define MC_SBFMT_PHOTOCD "photocd"/* Photo CD */
# define MC_SBFMT_INST "inst" /* SGI installation volume */
# define MC_DEV_NOTIGNORED (1 << 0)
# define MC_DEV_SUSPENDED (1 << 1)
/* MC_VOL_FORCE_UNMOUNT is used to overload a boolean (mcv_mounted)
* to indicate as part of MCE_FORCEUNMOUNT events which volume is
* going to be unmounted.
*/
# define MC_VOL_FORCEUNMOUNT (1 << 1)
typedef int mc_bool_t;
typedef void *mc_closure_t;
typedef void *mc_port_t;
typedef struct mc_device mc_device_t;
typedef struct mc_partition mc_partition_t;
typedef struct mc_system mc_system_t;
typedef struct mc_volume mc_volume_t;
typedef struct mc_event mc_event_t;
typedef struct mc_what_next mc_what_next_t;
struct mc_system {
unsigned int mcs_n_volumes; /* number of volumes in system */
unsigned int mcs_n_devices; /* number of devices in system */
unsigned int mcs_n_parts; /* number of partitions in system */
mc_volume_t *mcs_volumes; /* ptr to array of volumes */
mc_device_t *mcs_devices; /* ptr to array of devices */
mc_partition_t *mcs_partitions; /* ptr to array of partitions */
};
struct mc_volume {
char *mcv_label; /* volume label, if any */
char *mcv_fsname; /* e.g., /dev/dsk/dks... */
char *mcv_dir; /* mount point */
char *mcv_type; /* volume type (format), MC_FMT_xxx */
char *mcv_subformat; /* volume subformat, MC_SBFMT_xxx */
char *mcv_mntopts; /* mount options */
mc_bool_t mcv_mounted; /* is volume mounted? */
mc_bool_t mcv_exported; /* is volume exported? */
unsigned int mcv_nparts; /* number of partition ptrs */
mc_partition_t **mcv_parts; /* points to array of part. ptrs */
};
struct mc_device {
char *mcd_name; /* device's short name */
char *mcd_fullname; /* device's printable name */
char *mcd_ftrname; /* device's name as used in FTRs */
char *mcd_devname; /* name of some special file that
refers to device. */
inventory_t mcd_invent; /* device's H/W inventory record */
mc_bool_t mcd_monitored; /* is mediad monitoring it? */
/* Actually, mcd_monitored is two flag bits, MC_DEV_NOTIGNORED
* and MC_DEV_SUSPENDED. It's declared as a bool for
* pseudocompatibility with IRIX 6.3.
*/
mc_bool_t mcd_media_present; /* is media present? */
mc_bool_t mcd_write_protected; /* is device write-locked? */
mc_bool_t mcd_shared; /* is device shared? */
unsigned int mcd_nparts; /* number of partition ptrs */
mc_partition_t **mcd_parts; /* points to array of part. ptrs */
};
struct mc_partition {
mc_device_t *mcp_device; /* device of which this is part */
char *mcp_format; /* partition format, MC_FMT_xxx */
int mcp_index; /* partition # or MC_IX_WHOLE */
unsigned int mcp_sectorsize;/* size of sector in bytes */
__uint64_t mcp_sector0; /* starting sector number */
__uint64_t mcp_nsectors; /* number of sectors in part. */
};
typedef enum mc_event_type {
MCE_NO_EVENT, /* no event. */
MCE_NO_DEVICES, /* no devices in system */
MCE_CONFIG, /* device config changed */
/* Device events */
MCE_INSERTION, /* media was inserted in device */
MCE_EJECTION, /* media was ejected from device */
MCE_SUSPEND, /* monitoring was suspended */
MCE_RESUME, /* monitoring was resumed */
/* Volume events */
MCE_MOUNT, /* volume was mounted */
MCE_DISMOUNT, /* volume was dismounted */
MCE_EXPORT, /* volume was exported */
MCE_UNEXPORT, /* volume was unexported */
MCE_FORCEUNMOUNT /* forced dismount pending */
} mc_event_type_t;
struct mc_event {
mc_event_type_t mce_type;
int mce_volume;
int mce_device;
};
/*
* An mc_port is the object through which everything is accessed.
*
* mc_create_port() creates a port and returns an opaque pointer
* to it. Pass in the IP address of the host to be monitored
* (INADDR_LOOPBACK from <netinet/in.h> to monitor the local system)
* and a callback function. The function is called whenever
* the system's media state changes.
*
* mc_destroy_port() destroys a port and all its resources.
* N.B., if the application has allocated resources on mc's
* behalf, e.g., timeouts or selection mask bits, it's the app's
* job to clean those up.
*
* mc_execute() should be called at various times. Call it once
* after creating an mc_port. It returns an mc_what_next
* structure describing when it should be called again.
* mc_what_next specifies that mc_execute should be called when a
* file descriptor is readable or writable (as determined by
* select(2)) or after a timeout of some number of seconds'
* duration.
*
* mc_system_state() returns an mc_system structure describing
* the current state of that system. It may be called at any
* time. It returns NULL if mediad on that system has not yet
* been reached.
*
* The mc_port will contact mediad on the given machine. If the
* machine is down, or if mediad is not responding, the mc_port
* will repeatedly try to connect. Once it connects, it will
* receive messages from mediad asynchronously. For these
* reasons, it needs scheduling support from the application.
*/
typedef void (*mc_event_proc_t)(mc_port_t,
mc_closure_t,
const mc_event_t *);
typedef enum mc_what {
MC_IDLE, /* never seen */
MC_INPUT, /* wait for input */
MC_OUTPUT, /* wait for output */
MC_TIMEOUT /* wait for timeout */
} mc_what_t;
typedef enum mc_failure_code {
MCF_SUCCESS, /* no problem, man! */
MCF_SYS_ERROR, /* system error - check errno */
MCF_NO_HOST, /* can't contact host */
MCF_NO_MEDIAD, /* can't contact mediad */
MCF_INPUT_ERROR /* error parsing an event */
} mc_failure_code_t;
struct mc_what_next {
mc_what_t mcwn_what; /* N.B. MC_IDLE never seen */
int mcwn_fd; /* descriptor for select */
time_t mcwn_seconds; /* timeout duration */
mc_failure_code_t mcwn_failcode;
};
mc_port_t mc_create_port(__uint32_t IPaddress,
mc_event_proc_t, mc_closure_t);
void mc_destroy_port(mc_port_t);
/*
* register to receive "forced unmount" events before getting killed
* via fuser -k
*/
void mc_forced_unmounts(mc_port_t);
const mc_what_next_t *mc_execute(mc_port_t);
const mc_system_t *mc_system_state(mc_port_t);
/*
* An alternate way to connect to mediad is to use mc_port_connect().
* mc_port_connect blocks until it has connected to mediad, then
* it returns the descriptor on which the caller should block
* on input. The caller would look like this.
*
* mc_port_t p = mc_create_port(whatever...);
* int fd = mc_port_connect(p);
* // ...
* // live a full, happy life,
* // and select on fd for reading for as long as mc_execute()
* // returns MC_INPUT
* // ...
* mc_destroy_port(p);
*
* If mediad is not running or is not accepting connections when
* mc_port_connect is * called, mc_port_connect returns -1.
*/
int mc_port_connect(mc_port_t);
/*
* Convenience functions.
*
* mc_dup_system() duplicates an mc_system and all its subordinate
* structures. Think of it as a copy constructor.
*
* mc_destroy_system() destroys an mc_system returned by mc_dup_system().
*/
mc_system_t *mc_dup_system(const mc_system_t *);
void mc_destroy_system(mc_system_t *);
#if defined(__cplusplus)
} // end extern "C"
#endif
#ifdef JOKE
/*
* mc_system, mc_device, mc_partition, and mc_volume are registered
* trademarks of McDonald's, Inc.
*/
#endif /* JOKE */
#endif /* !mediaclient_included */

109
eoe/include/memory.h Normal file
View File

@@ -0,0 +1,109 @@
#ifndef __MEMORY_H__
#define __MEMORY_H__
#ifdef __cplusplus
extern "C" {
#endif
#ident "$Revision: 1.8 $"
/*
*
* Copyright 1992, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */
/* Copyright (c) 1988 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
/* UNIX System Laboratories, Inc. */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
/* from stddef.h */
#if !defined(_SIZE_T) && !defined(_SIZE_T_)
#define _SIZE_T
#if (_MIPS_SZLONG == 32)
typedef unsigned int size_t;
#endif
#if (_MIPS_SZLONG == 64)
typedef unsigned long size_t;
#endif
#endif
#if defined(__cplusplus) && \
defined(_MIPS_SIM) && _MIPS_SIM != _MIPS_SIM_ABI32 && \
defined(_COMPILER_VERSION) && (_COMPILER_VERSION >= 720) && \
defined(__LIBC_OVERLOAD__) && __LIBC_OVERLOAD__
#define __cpp_string_h
#else
#undef __cpp_string_h
#endif
extern void *memccpy(void *, const void *, int, size_t);
#ifndef __cpp_string_h
extern void *memchr(const void *, int, size_t);
#endif /* __cpp_string_h */
extern void *memcpy(void *, const void *, size_t);
extern void *memset(void *, int, size_t);
extern int memcmp(const void *, const void *, size_t);
#ifdef __INLINE_INTRINSICS
/* The functions made intrinsic here can be activated by adding the
** option -D__INLINE_INTRINSICS
*/
#if (defined(_COMPILER_VERSION) && (_COMPILER_VERSION >= 721))
#pragma intrinsic (memcpy)
#pragma intrinsic (memset)
#endif /* COMPILER_VERSION >= 721 */
#endif /* __INLINE_INTRINSICS */
#ifdef __cplusplus
}
#endif
#if defined(__cpp_string_h) && !defined(__sgi_cpp_memchr_defined)
#define __sgi_cpp_memchr_defined
/* In C++, five of the functions from the C string library, one of
* which is memchr, are replaced by overloaded pairs. (Overloaded on
* const.) In each case, there is no semantic difference between the
* C function and the C++ functions. We handle this by declaring the
* C version in an internal namespace; each C++ version just turns
* around and calls the C version, performing whatever const
* manipulations are necessary. Note that this trick only works
* because a namespace doesn't appear in the mangled name of an extern
* "C" function. Extern "C" names aren't mangled.
*/
namespace __sgilib {
extern "C" {
extern void *memchr(const void *, int, size_t);
}
}
inline const void* memchr(const void* s, int c, size_t n) {
return __sgilib::memchr(s, c, n);
}
inline void* memchr(void* s, int c, size_t n) {
return __sgilib::memchr(s, c, n);
}
#endif /* __cpp_string_h && !__sgi_cpp_memchr_defined */
#undef __cpp_string_h
#endif /* !__MEMORY_H__ */

211
eoe/include/mls.h Normal file
View File

@@ -0,0 +1,211 @@
/**************************************************************************
* *
* Copyright (C) 1990, Silicon Graphics, Inc. *
* *
* These coded instructions, statements, and computer programs contain *
* unpublished proprietary information of Silicon Graphics, Inc., and *
* are protected by Federal copyright law. They may not be disclosed *
* to third parties or copied or duplicated in any form, in whole or *
* in part, without the prior written consent of Silicon Graphics, Inc. *
* *
**************************************************************************/
#ifndef _MLS_DOT_H_
#define _MLS_DOT_H_
#ifdef __cplusplus
extern "C" {
#endif
#ident "$Revision: 1.23 $"
#include <sys/types.h>
#include <sys/mac_label.h>
#include <shadow.h>
#include <clearance.h>
/* constant define for mlsfile type */
#define MAC_LABEL 0 /* labels file */
#define MAC_MSEN_TYPE 1 /* msentypes file */
#define MAC_LEVEL 2 /* levels file */
#define MAC_CATEGORY 3 /* categorys file */
#define MAC_MINT_TYPE 4 /* minttypes file */
#define MAC_GRADE 5 /* grades file */
#define MAC_DIVISION 6 /* divisions file */
#define MAX_MLSFILES 7 /* total 7 files above */
#define MAC_MIN_ENT 1 /* minumim value for entity database type */
#define MAC_MAX_ENT 7 /* maximum value for entity database type */
#define MAC_MAX_DEFAULT 26 /* maximum internal msentype and minttype */
#define WITHOUT_LEVEL 0 /* msen type don't need level, category */
#define WITHOUT_GRADE 0 /* mint type don't need grade, division */
#define WITHOUT_LVLGRD 0 /* don't need level,grade,category, division */
#define NEED_LEVEL 1 /* msen type need level, category */
#define NEED_GRADE 1 /* mint type need grade, division */
#define NEED_LVLGRD 1 /* need level, cat or grade, division */
#define INVALID_TYPE -1 /* no such msen or mint type value */
#define MAX_MLS_NAME_LEN 128 /* max string length for a field name */
#define MAX_MLS_LINE_LEN 512 /* max line length for a entry */
#define INVALID_ENTRY_VALUE 65535
/* binary mls database file path */
#define LABEL_DB_PATH "/etc/mac_label"
#define LABEL_DB "lbldb_bin"
/* Error returns from mac_label_devs */
#define MAC_LD_DEVL_FOPEN -1 /* couldn't open device list file */
#define MAC_LD_GETPLABEL -2 /* couldn't get current plabel value */
#define MAC_LD_SETPLABEL -3 /* couldn't set plabel to system hi */
#define MAC_LD_RESETPLABEL -4 /* couldn't restore original plabel */
#define MAC_LD_SOME_FAIL -5 /* couldn't relabel some devices */
#define MAC_LD_ALL_FAIL -6 /* couldn't relabel any devices */
#define MAC_LD_KMEM_ERR -7 /* error reading /dev/kmem */
/* constant defines for mac_invalid error code return */
#define VALID_MAC_LABEL 0 /* valid mac label indication */
#define NULL_MAC_LABEL 1 /* mac label pointer is a NULL */
#define INVALID_MSENTYPE 2 /* msentype value is not valid */
#define INVALID_MINTTYPE 3 /* minttype value is not valid */
#define INVALID_MSEN_ASSOC 4 /* level and category present when not
allowed, or level, category missing
when it is required */
#define INVALID_MINT_ASSOC 5 /* grade and division present when not
allowed, or grade,division missing
when it is required */
#define INVALID_SET_FORMAT 6 /* category or division set has duplicate
numbers or not in ascending order */
#define INVALID_SET_COUNT 7 /* category set and division set total is
out of range */
#define TAB_CHAR 0x09
/* constant define for mac_labeltostr() flag argument */
#define COMP_ONLY 0
#define NAME_OR_COMP 1
#define NAME_ONLY 2
/*
* structure for sorting category set and division set value
*/
typedef struct valueent {
unsigned short value; /* category or division value */
struct valueent *next; /* pointer to next entry */
struct valueent *prev; /* pointer to prev entry */
}VALUEENT;
typedef struct valuelist {
VALUEENT *head;
VALUEENT *tail;
}VALUELIST;
/*
* minttype, grade and division entry
*/
typedef struct dbent {
int value; /* data field value */
char *name; /* pointer to data field name */
struct dbent *next;
struct dbent *prev;
}DBENT;
/*
* structure for label/component string entry
*/
typedef struct lbldbent {
char *name; /* pointer to label name string */
char *comp; /* pointer to label component string */
struct lbldbent *next;
}LBLDBENT;
/*
* structure to build entry list for label/component string
*/
typedef struct lbldblist {
struct lbldbent *head; /* head of entry list */
struct lbldbent *tail; /* tail of entry list */
}LBLDBLIST;
/* structure for loadin msentype, level, category, minttype, grade and
* division entry information into binary file
*/
typedef struct db_bin_ent {
unsigned short value;
unsigned short strlen;
char name[MAX_MLS_NAME_LEN];
}DB_BIN_ENT;
/* structure for loadin msentype, level, category, minttype, grade and
* division header information into binary file
*/
typedef struct db_bin_hdr {
int db_type; /* database type */
int entry_total; /* total entry count */
int entries_bytes; /* total entry bytes */
}DB_BIN_HDR;
/* structure for loading label name and label component string header
* information into binary file
*/
typedef struct lbldb_bin_hdr {
int entry_total; /* total entry count */
int entries_bytes; /* total entry bytes */
}LBLDB_BIN_HDR;
/*
* structure for loading label name and label component string into
* binary file
*/
typedef struct lbldb_bin_ent {
unsigned short strlen; /* string length */
unsigned short lblsize; /* mac label size */
char name[MAX_MLS_NAME_LEN]; /* label name string */
mac_label label; /* mac label */
}LBLDB_BIN_ENT;
/*
* structure to store the entry information from reading the db binary
* file
*/
typedef struct dbinfo {
DB_BIN_ENT *list;
int entry_total;
}DBINFO;
/*
* structure to store the entry information from reading the lbldb binary
* file
*/
typedef struct lbldbinfo {
LBLDB_BIN_ENT *list;
int entry_total;
}LBLDBINFO;
/*
* global variables used for Trusted IRIX/B library functions
*/
extern LBLDB_BIN_HDR __mac_lhead; /* header for labelname binary file */
extern DB_BIN_HDR __mac_dhead[]; /* header for entity binary file */
extern int __mls_entry_total[]; /* total entry for each db file */
extern int __mac_bad_label_entry; /* bad label entry in labelnames */
extern int __mac_db_error; /* bad entity entry in mlsfiles */
extern DBINFO __mac_db[]; /* binary entity database */
extern LBLDBINFO __mac_lbldb; /* binary label database */
extern int mac_label_devs (char *, mac_label *, uid_t);
#ifdef __cplusplus
}
#endif
#endif /* _MLS_DOT_H_ */

155
eoe/include/mntent.h Normal file
View File

@@ -0,0 +1,155 @@
#ifndef __MNTENT_H__
#define __MNTENT_H__
#ident "$Revision: 1.47 $"
/*
*
* Copyright 1992, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
/* @(#)mntent.h 1.3 88/05/20 4.0NFSSRC SMI; from SMI 1.13 99/01/06 */
#include <stdio.h>
/*
* File system table, see mntent (5)
*
* Used by dump, mount, umount, swap, fsck, df, ...
*
* EFS quota files are always named "quotas", so if type is "rq",
* then use concatenation of mnt_dir and "quotas" to locate
* quota file. This doesn't apply to XFS.
*/
#define MNTTAB "/etc/fstab"
#define MOUNTED "/etc/mtab"
#define MNTMAXSTR 256
#include <sys/fsid.h>
#define MNTTYPE_EFS FSID_EFS /* extent filesystem */
#define MNTTYPE_NFS FSID_NFS /* network file system */
#define MNTTYPE_NFS2 FSID_NFS2 /* network file system V2 */
#define MNTTYPE_NFS3 FSID_NFS3 /* network file system V3.0 */
#define MNTTYPE_SOCKET FSID_SOCKET /* socket pseudo-filesystem */
#define MNTTYPE_DBG FSID_DBG /* debug (proc) pseudo-filesystem */
#define MNTTYPE_PROC FSID_PROCFS /* proc file system */
#define MNTTYPE_PIPE FSID_COM /* pipe pseudo-filesystem */
#define MNTTYPE_CACHEFS FSID_CACHEFS /* cache file system */
#define MNTTYPE_XFS FSID_XFS /* SGI XFS file system */
#define MNTTYPE_HWGFS FSID_HWGFS /* Hardware graph file system */
#define MNTTYPE_MFS "mfs" /* mfs filesystem - ClearCase */
#define MNTTYPE_PC "pc" /* IBM PC (MSDOS) file system */
#define MNTTYPE_SWAP "swap" /* swap file system */
#define MNTTYPE_IGNORE "ignore" /* No type specified; ignore entry */
#define MNTTYPE_AUTOFS FSID_AUTOFS /* automount file system */
#define MNTTYPE_LOFS FSID_LOFS /* loopback file system */
#define MNTTYPE_DOS "dos" /* MS-DOS file system (SGI) */
#define MNTTYPE_FD FSID_FD /* /dev/fd file system */
#define MNTTYPE_AFS "afs" /* Andrew File System */
#define MNTTYPE_RAWDATA "rawdata" /* raw partition used for data */
#define MNTOPT_RO "ro" /* read only */
#define MNTOPT_RW "rw" /* read/write */
#define MNTOPT_NOSUID "nosuid" /* disallow setuid program execution */
#define MNTOPT_NODEV "nodev" /* disallow access to device files */
#define MNTOPT_NOAUTO "noauto" /* hide entry from mount -a */
#define MNTOPT_GRPID "grpid" /* SysV-compatible group-id on create */
#define MNTOPT_REMOUNT "remount" /* change options on previous mount */
#define MNTOPT_RAW "raw" /* raw device name */
#define MNTOPT_FSCK "fsck" /* fsck by default */
#define MNTOPT_NOFSCK "nofsck" /* do not fsck */
#define MNTOPT_SOFT "soft" /* soft mount */
#define MNTOPT_HARD "hard" /* hard mount */
#define MNTOPT_NOINTR "nointr" /* disallow interrupts on hard mount */
#define MNTOPT_NOAC "noac" /* don't cache nfs attributes */
#define MNTOPT_PORT "port" /* server IP port number */
#define MNTOPT_RETRANS "retrans" /* set number of request retries */
#define MNTOPT_RSIZE "rsize" /* set read size (bytes) */
#define MNTOPT_WSIZE "wsize" /* set write size (bytes) */
#define MNTOPT_TIMEO "timeo" /* set initial timeout (1/10 sec) */
#define MNTOPT_ACTIMEO "actimeo" /* attr cache timeout (sec) */
#define MNTOPT_ACREGMIN "acregmin" /* min ac timeout for reg files (sec) */
#define MNTOPT_ACREGMAX "acregmax" /* max ac timeout for reg files (sec) */
#define MNTOPT_ACDIRMIN "acdirmin" /* min ac timeout for dirs (sec) */
#define MNTOPT_ACDIRMAX "acdirmax" /* max ac timeout for dirs (sec) */
#define MNTOPT_PRIVATE "private" /* mount nfs single-client tree */
#define MNTOPT_SHORTUID "shortuid" /* don't allow writes by uids>0xffff */
#define MNTOPT_SYMTTL "symttl" /* symlink cache time-to-live */
#define MNTOPT_SWPLO "swplo" /* first block(512 byte) to use */
#define MNTOPT_LENGTH "length" /* # 512 byte blocks */
#define MNTOPT_MAXLENGTH "maxlength" /* max # 512 byte blocks to grow to */
#define MNTOPT_VLENGTH "vlength" /* virtual # 512 byte blocks */
#define MNTOPT_PRI "pri" /* priority of device */
#define MNTOPT_EAG "eag" /* extended attributes (plan G) */
#define MNTOPT_NOMTAB "nomtab" /* do not make an entry into mtab */
#define MNTOPT_LOGBUFS "logbufs" /* number of XFS log buffers */
#define MNTOPT_LOGBSIZE "logbsize" /* size of XFS log buffers */
#define MNTOPT_DMI "dmi" /* DMI enabled (XFS only) */
#define MNTOPT_QUOTA "quota" /* disk quotas */
#define MNTOPT_NOQUOTA "noquota" /* no quotas */
#define MNTOPT_UQUOTA "uquota" /* user quota enabled (XFS only) */
#define MNTOPT_PQUOTA "pquota" /* project quota enabled (XFS only) */
#define MNTOPT_UQUOTANOENF "uqnoenforce"/* user quota limit enforcement */
#define MNTOPT_PQUOTANOENF "pqnoenforce"/* project quota limit enforcement */
#define MNTOPT_QUOTANOENF "qnoenforce" /* same as uqnoenforce */
#define MNTOPT_MRQUOTA "mrquota" /* don't turnoff if SB has quotas on */
#define MNTOPT_WSYNC "wsync" /* safe-mode nfs compatible mount */
#define MNTOPT_ASYNCNLM "asyncnlm" /* async NLM test calls */
#define MNTOPT_NOATIME "noatime" /* don't modify access times on reads */
#define MNTOPT_INO64 "ino64" /* force inodes into 64-bit range */
#define MNTOPT_NOALIGN "noalign" /* turn off stripe alignment */
#define MNTOPT_SUNIT "sunit" /* data volume stripe unit */
#define MNTOPT_SWIDTH "swidth" /* data volume stripe width */
#define MNTOPT_VERS "vers" /* nfs protocol version */
#define MNTOPT_PROTO "proto" /* udp/tcp protocol specifier */
#define MNTOPT_DEFXATTR "defxattr" /* use default values for
system attributes */
#define MNTOPT_NODEFXATTR "nodefxattr" /* don't use default values for
system attributes */
#define MNTOPT_DOXATTR "doxattr" /* tell server to trust us with
attributes */
#define MNTOPT_NORECOVERY "norecovery" /* don't run XFS recovery */
#define MNTOPT_SHARED "shared" /* shared XFS mount */
#define MNTOPT_BIOSIZE "biosize" /* log2 of preferred buffered io size */
#define MNTOPT_OSYNCISDSYNC "osyncisdsync" /* o_sync == o_dsync on this fs */
#define MNTINFO_DEV "dev" /* device number of the mounted file system */
#define MNTINFO_LOFSID "lofsid" /* id for mounted loopback file system */
struct mntent {
char *mnt_fsname; /* name of mounted file system */
char *mnt_dir; /* file system path prefix */
char *mnt_type; /* MNTTYPE_* */
char *mnt_opts; /* MNTOPT* */
int mnt_freq; /* dump frequency, in days */
int mnt_passno; /* pass number on parallel fsck */
};
#ifdef __cplusplus
extern "C" {
#endif
FILE *setmntent(const char *, const char *);
struct mntent *getmntent(FILE *);
int addmntent(FILE *, const struct mntent *);
char *hasmntopt(const struct mntent *, const char *);
int getmntany(FILE *, struct mntent *, const struct mntent *);
int endmntent(FILE *);
int delmntent(const char *, struct mntent *);
#ifdef __cplusplus
}
#endif
#endif /* !__MNTENT_H__ */

68
eoe/include/mon.h Normal file
View File

@@ -0,0 +1,68 @@
#ifndef __MON_H__
#define __MON_H__
#ifdef __cplusplus
extern "C" {
#endif
#ident "$Revision: 1.16 $"
/*
*
* Copyright 1992, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */
/* Copyright (c) 1988 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
/* UNIX System Laboratories, Inc. */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
struct hdr {
char *lpc;
char *hpc;
int nfns;
};
struct cnt {
char *fnpc;
long mcnt;
};
typedef unsigned short WORD;
typedef unsigned short _WORD; /* XXX */
#define _SUSPEND_PROF 0
#define _RESUME_PROF 1
#define _NEW_PROF_PHASE 2
#define MON_OUT "mon.out"
#define MPROGS0 (150 * sizeof(WORD)) /* 300 for pdp11, 600 for 32-bits */
#define MSCALE0 4
#ifndef NULL
#define NULL 0L
#endif
extern void monitor(int (*)(), int (*)(), WORD *, int, int);
extern void monstartup(int (*)(), int (*)());
extern void moncontrol(int);
#ifdef __cplusplus
}
#endif
#endif /* !__MON_H__ */

50
eoe/include/monetary.h Normal file
View File

@@ -0,0 +1,50 @@
#ifndef _MONETARY_H
#define _MONETARY_H
#ifdef __cplusplus
extern "C" {
#endif
#ident "$Revision: 1.4 $"
/*
*
* Copyright 1995, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
#if !defined(_SIZE_T) && !defined(_SIZE_T_)
#define _SIZE_T
#if (_MIPS_SZLONG == 32)
typedef unsigned int size_t;
#endif
#if (_MIPS_SZLONG == 64)
typedef unsigned long size_t;
#endif
#endif
#ifndef _SSIZE_T
#define _SSIZE_T
#if (_MIPS_SZLONG == 32)
typedef int ssize_t;
#endif
#if (_MIPS_SZLONG == 64)
typedef long ssize_t;
#endif
#endif
extern ssize_t strfmon(char *, size_t, const char *, ...);
#ifdef __cplusplus
}
#endif
#endif /*_MONETARY_H*/

165
eoe/include/mountinfo.h Normal file
View File

@@ -0,0 +1,165 @@
/* Copyright 1995, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
#if !defined(MOUNTINFO_H)
#define MOUNTINFO_H
#if defined(__cplusplus)
extern "C" {
#endif
/* mountinfo.h
*
* Header for disk volume/partition check routines
*/
#include <diskinvent.h>
#include <stdio.h>
/* test if dev indicates a logical volume */
#define mnt_is_logical_vol(d) (major(d) == XLV_MAJOR)
/* the part check struct:
Each partition with a list pointer to track all partitions on a device
*/
typedef struct mnt_partition_entry_s {
dev_t device; /* device we're associated with */
int start_lbn; /* starting logical block number */
int end_lbn; /* ending logical block */
struct mnt_device_entry_s *devptr; /* point back to our device entry */
} mnt_partition_entry_t;
typedef struct mnt_partition_table_s {
struct mnt_device_entry_s *dev_entry; /* vol header entry */
char ptable_loaded; /* flag ptable loaded? */
mnt_partition_entry_t ptable[NPARTAB];
struct mnt_partition_table_s *next;
} mnt_partition_table_t;
#define MNT_OWNER_NONE 0
#define MNT_OWNER_XLV 1
#define MNT_OWNER_XFS 2
#define MNT_OWNER_SWAP 3
#define MNT_OWNER_EFS 4
#define MNT_OWNER_RAW 5
#define MNT_OWNER_DEL 6
#define MNT_OWNER_UNKNOWN 6
#define MNT_DEV_MISSING_NONE 0x0
#define MNT_DEV_MISSING_BLOCK 0x1
#define MNT_DEV_MISSING_RAW 0x2
#define MNT_DEV_MISSING_BOTH 0x3
#define MNT_DEV_MISMATCH 0x4
typedef struct mnt_device_entry_s {
char valid; /* is this entry a valid device */
char mounted; /* is this device mounted (in use) */
char dev_missing; /* char or block dev missing */
char ptable_loaded; /* has the part table been loaded? */
/* if char dev missing, pathname points to tmp */
/* this file needs to be removed */
char pathname[DSK_DEVNAME_MAX]; /* pathname to raw dev */
int owner;
dev_t owner_dev;
mnt_partition_entry_t *part; /* pointer to the partition info */
struct mnt_device_entry_s *next;
} mnt_device_entry_t;
/* conflict collections */
typedef struct mnt_plist_s {
int done;
int count;
int causes;
struct mnt_plist_entry_s *head;
struct mnt_plist_entry_s *walk;
struct mnt_plist_return_s *ret;
} mnt_plist_t;
typedef struct mnt_plist_entry_s {
int sequence;
mnt_partition_entry_t *ptable;
int part;
int cause;
struct mnt_plist_entry_s *next;
} mnt_plist_entry_t;
#define MNT_CAUSE_NONE 0x00
#define MNT_CAUSE_MOUNTED 0x01 /* partition already mounted */
#define MNT_CAUSE_OVERLAP 0x02 /* partitions overlap */
#define MNT_CAUSE_NODEV 0x04 /* no /dev/rdsk /dev/dsk entry */
#define MNT_CAUSE_UNUSED 0x08 /* unallocated partition */
#define MNT_CAUSE_MULTIMOUNT 0x10 /* multiple owners */
#define MNT_CAUSE_LVOL_OWNED 0x20 /* owned by logical vol */
#define MNT_CAUSE__END 0x40 /* last entry */
#define MNT_PLIST_RETURN_VER 1
typedef struct mnt_plist_return_s {
int version; /* which version of this struct */
int sequence; /* sequence number for this conflict */
char *pathname; /* device pathname */
dev_t dev; /* our dev_t */
int dev_missing; /* chr/blk dev missing flags */
mnt_partition_entry_t *ptable; /* owner ptable */
int part_num; /* which partition in table */
int start_lbn; /* starting block */
int end_lbn; /* ending block */
int owner; /* which type of dev owns us? */
char mounted; /* is partition mounted? Multiple? */
dev_t owner_dev; /* dev_t of device that owns us */
int cause; /* what caused this entry */
} mnt_plist_return_t;
#define MNT_CHECK_STATE_MAGIC 0xb1eed
typedef struct mnt_check_state_s {
int magic;
mnt_partition_table_t *partition_list;
mnt_device_entry_t *device_list;
mnt_plist_t *conflict_list;
} mnt_check_state_t;
/* prototypes */
int mnt_causes_test(mnt_check_state_t *, int);
void mnt_causes_show(mnt_check_state_t *, FILE *, char *);
void mnt_plist_walk_clear(mnt_check_state_t *);
mnt_plist_return_t *mnt_plist_walk_next(mnt_check_state_t *);
void mnt_plist_walk_reset(mnt_check_state_t *);
int mnt_plist_walk_count(mnt_check_state_t *);
void mnt_plist_show(mnt_check_state_t *, FILE *, char *);
int mnt_find_missing_dev_entries(mnt_check_state_t *);
int mnt_find_unmounted_partitions(mnt_check_state_t *);
int mnt_find_existing_mount_conflicts(mnt_check_state_t *);
int mnt_find_mount_conflicts(mnt_check_state_t *, char *);
/* XXXsbarr put this back when we have a generic char dev_t to block dev_t
routine
int mnt_find_dev_mount_conflicts(mnt_check_state_t *, dev_t);
*/
int mnt_find_mounted_partitions(mnt_check_state_t *, char *);
int mnt_find_dev_mounted_partitions(mnt_check_state_t *, dev_t);
int mnt_check_init(mnt_check_state_t **);
int mnt_check_end(mnt_check_state_t *);
int mnt_check_and_mark_mounted(mnt_check_state_t *, char *);
char *mnt_string_cause(int);
char *mnt_string_owner(int);
#if defined(__cplusplus)
}
#endif
#endif

58
eoe/include/mqueue.h Normal file
View File

@@ -0,0 +1,58 @@
/*
* Copyright 1995, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Lanthesaws of the United States.
*/
#ident "$Id: mqueue.h,v 1.6 1997/11/15 03:36:01 joecd Exp $"
#ifndef __MQUEUE_H__
#define __MQUEUE_H__
#ifdef __cplusplus
extern "C" {
#endif
/*
* Interface definition file for POSIX 1003.1b message passing
*/
#include <sys/signal.h>
typedef __psint_t mqd_t;
typedef struct mq_attr {
long mq_flags;
long mq_maxmsg;
long mq_msgsize;
long mq_curmsgs;
} mq_attr_t;
#if _SGIAPI
/* This definition is not for application use */
#define _MQ_SGI_PRIO_MAX 32
#endif /* _SGIAPI */
mqd_t mq_open(const char *, int, ...);
int mq_close(mqd_t);
int mq_unlink(const char *);
int mq_send(mqd_t , const char *, size_t, unsigned int);
ssize_t mq_receive(mqd_t, char *, size_t, unsigned int *);
int mq_notify(mqd_t, const struct sigevent *);
int mq_setattr(mqd_t, const struct mq_attr *, struct mq_attr *);
int mq_getattr(mqd_t, struct mq_attr *);
#ifdef __cplusplus
}
#endif
#endif /* __MQUEUE_H__ */

80
eoe/include/mutex.h Normal file
View File

@@ -0,0 +1,80 @@
/**************************************************************************
* *
* Copyright (C) 1986-1993 Silicon Graphics, Inc. *
* *
* These coded instructions, statements, and computer programs contain *
* unpublished proprietary information of Silicon Graphics, Inc., and *
* are protected by Federal copyright law. They may not be disclosed *
* to third parties or copied or duplicated in any form, in whole or *
* in part, without the prior written consent of Silicon Graphics, Inc. *
* *
**************************************************************************/
#ifndef __MUTEX_H__
#define __MUTEX_H__
#ident "$Revision: 1.3 $"
#include <sgidefs.h>
#ifdef __cplusplus
extern "C" {
#endif
#define test_and_set (*__test_and_set)
#define test_then_and (*__test_then_and)
#define test_then_nand (*__test_then_nand)
#define test_then_not (*__test_then_not)
#define test_then_nor (*__test_then_nor)
#define test_then_xor (*__test_then_xor)
#define test_then_or (*__test_then_or)
#define test_then_add (*__test_then_add)
#define add_then_test (*__add_then_test)
#define atomic_set (void)(*__test_and_set)
#define test_and_set32 (*__test_and_set32)
#define test_then_and32 (*__test_then_and32)
#define test_then_nand32 (*__test_then_nand32)
#define test_then_not32 (*__test_then_not32)
#define test_then_nor32 (*__test_then_nor32)
#define test_then_xor32 (*__test_then_xor32)
#define test_then_or32 (*__test_then_or32)
#define test_then_add32 (*__test_then_add32)
#define add_then_test32 (*__add_then_test32)
#define atomic_set32 (void)(*__test_and_set32)
extern unsigned long test_and_set(unsigned long *, unsigned long);
extern unsigned long test_then_and(unsigned long *, unsigned long);
extern unsigned long test_then_nand(unsigned long *, unsigned long);
extern unsigned long test_then_not(unsigned long *, unsigned long);
extern unsigned long test_then_nor(unsigned long *, unsigned long);
extern unsigned long test_then_xor(unsigned long *, unsigned long);
extern unsigned long test_then_or(unsigned long *, unsigned long);
extern unsigned long test_then_add(unsigned long *, unsigned long);
extern unsigned long add_then_test(unsigned long *, unsigned long);
extern unsigned long atomic_op(
unsigned long (*)(unsigned long *, unsigned long),
unsigned long *, unsigned long);
extern __uint32_t test_and_set32(__uint32_t *, __uint32_t);
extern __uint32_t test_then_and32(__uint32_t *, __uint32_t);
extern __uint32_t test_then_nand32(__uint32_t *, __uint32_t);
extern __uint32_t test_then_not32(__uint32_t *, __uint32_t);
extern __uint32_t test_then_nor32(__uint32_t *, __uint32_t);
extern __uint32_t test_then_xor32(__uint32_t *, __uint32_t);
extern __uint32_t test_then_or32(__uint32_t *, __uint32_t);
extern __uint32_t test_then_add32(__uint32_t *, __uint32_t);
extern __uint32_t add_then_test32(__uint32_t *, __uint32_t);
extern __uint32_t atomic_op32(
__uint32_t (*)(__uint32_t *, __uint32_t),
__uint32_t *, __uint32_t);
/* ABI version */
extern int _test_and_set(int *, int);
extern int is_mips2(void);
#ifdef __cplusplus
}
#endif
#endif

282
eoe/include/ndbm.h Normal file
View File

@@ -0,0 +1,282 @@
#ifndef __NDBM_H__
#define __NDBM_H__
#ident "$Revision: 1.22 $"
/*
*
* Copyright 1992-1997 Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
* the contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to restrictions
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
* rights reserved under the Copyright Laws of the United States.
*/
/*
* Copyright (c) 1983 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* @(#)ndbm.h 5.1 (Berkeley) 5/30/85
*/
#include <sys/types.h>
#include <sgidefs.h>
/*
* Hashed key data base library.
*/
#ifdef __cplusplus
extern "C" {
#endif
#define _PBLKSIZ 1024
#define _DBLKSIZ 4096
typedef struct {
int dbm_dirf; /* open directory file */
int dbm_pagf; /* open page file */
int dbm_flags; /* flags, see below */
long dbm_maxbno; /* last ``bit'' in dir file */
long dbm_bitno; /* current bit number */
long dbm_hmask; /* hash mask */
long dbm_blkptr; /* current block for dbm_nextkey */
int dbm_keyptr; /* current key for dbm_nextkey */
long dbm_blkno; /* current page to read/write */
long dbm_pagbno; /* current page in pagbuf */
char dbm_pagbuf[_PBLKSIZ]; /* page file block buffer */
long dbm_dirbno; /* current block in dirbuf */
char dbm_dirbuf[_DBLKSIZ]; /* directory file block buffer */
} DBM;
#if _LFAPI
#if (_MIPS_SIM != _MIPS_SIM_ABI64)
typedef struct {
int dbm_dirf; /* open directory file */
int dbm_pagf; /* open page file */
int dbm_flags; /* flags, see below */
/* LINTED long long */
__int64_t dbm_maxbno; /* last ``bit'' in dir file */
/* LINTED long long */
__int64_t dbm_bitno; /* current bit number */
/* LINTED long long */
__int64_t dbm_hmask; /* hash mask */
/* LINTED long long */
__int64_t dbm_blkptr; /* current block for dbm_nextkey */
int dbm_keyptr; /* current key for dbm_nextkey */
/* LINTED long long */
__int64_t dbm_blkno; /* current page to read/write */
/* LINTED long long */
__int64_t dbm_pagbno; /* current page in pagbuf */
char dbm_pagbuf[_PBLKSIZ]; /* page file block buffer */
/* LINTED long long */
__int64_t dbm_dirbno; /* current block in dirbuf */
char dbm_dirbuf[_DBLKSIZ]; /* directory file block buffer */
} DBM64;
#else /* (_MIPS_SIM != _MIPS_SIM_ABI64) */
typedef DBM DBM64;
#endif /* (_MIPS_SIM != _MIPS_SIM_ABI64) */
#endif /* _SGIAPI */
#define _DBM_RDONLY 0x1 /* data base open read-only */
#define _DBM_IOERR 0x2 /* data base I/O error */
#if _SGIAPI
/*
* These values limit the size of the hashing mask used by DBM
* so that we can actually store the blocks to which we hash.
* The constraint is that _DBM_MAXHASH * _PBLKSIZ must be less
* than the maximum file size.
*/
#define DBM_MAXHASH64 0x1fffffffffffffLL
#if (_MIPS_SIM != _MIPS_SIM_ABI64)
#define DBM_MAXHASH 0x1fffffL
#else
#define DBM_MAXHASH DBM_MAXHASH64
#endif
#define PBLKSIZ _PBLKSIZ
#define DBLKSIZ _DBLKSIZ
#define dbm_rdonly(db) ((db)->dbm_flags & _DBM_RDONLY)
/* for flock(2) and fstat(2) */
#define dbm_dirfno(db) ((db)->dbm_dirf)
#define dbm_pagfno(db) ((db)->dbm_pagf)
#endif /* _SGIAPI */
typedef struct {
void *dptr;
size_t dsize;
} datum;
/*
* flags to dbm_store()
*/
#define DBM_INSERT 0
#define DBM_REPLACE 1
DBM *dbm_open(const char *, int, mode_t);
void dbm_close(DBM *);
int dbm_error(DBM *);
int dbm_clearerr(DBM *);
#define dbm_error(__db) ((__db)->dbm_flags & _DBM_IOERR)
/* use this one at your own risk! */
#define dbm_clearerr(__db) ((__db)->dbm_flags &= ~_DBM_IOERR)
#if _LFAPI
DBM64 *dbm_open64(const char *, int, mode_t);
void dbm_close64(DBM64 *);
int dbm_clearerr64(DBM64 *);
int dbm_error64(DBM64 *);
#define dbm_error64(__db) ((__db)->dbm_flags & _DBM_IOERR)
/* use this one at your own risk! */
#define dbm_clearerr64(__db) ((__db)->dbm_flags &= ~_DBM_IOERR)
#endif /* _LFAPI */
/*
* NOTE: Application software should NOT program to the _XXX interfaces.
*/
datum _dbm_fetch(DBM *, datum);
datum _dbm_firstkey(DBM *);
datum _dbm_nextkey(DBM *);
int _dbm_delete(DBM *, datum);
int _dbm_store(DBM *, datum, datum, int);
#if _SGIAPI
long _dbm_forder(DBM *, datum);
datum _dbm_fetch64(DBM64 *, datum);
datum _dbm_firstkey64(DBM64 *);
datum _dbm_nextkey64(DBM64 *);
/* LINTED long long */
#if !((_MIPS_SIM == _MIPS_SIM_ABI64) && defined(_DBM_INTERNAL))
__int64_t _dbm_forder64(DBM64 *, datum);
#endif
int _dbm_delete64(DBM64 *, datum);
int _dbm_store64(DBM64 *, datum, datum, int);
#endif /* _SGIAPI */
#ifndef _DBM_INTERNAL
#if (_MIPS_SIM != _MIPS_SIM_ABI64)
datum dbm_fetch(DBM *, datum);
datum dbm_firstkey(DBM *);
datum dbm_nextkey(DBM *);
int dbm_delete(DBM *, datum);
int dbm_store(DBM *, datum, datum, int);
#if _SGIAPI
long dbm_forder(DBM *, datum);
datum dbm_fetch64(DBM64 *, datum);
datum dbm_firstkey64(DBM64 *);
datum dbm_nextkey64(DBM64 *);
/* LINTED long long */
__int64_t dbm_forder64(DBM64 *, datum);
int dbm_delete64(DBM64 *, datum);
int dbm_store64(DBM64 *, datum, datum, int);
#endif /* _SGIAPI */
#else /* (_MIPS_SIM != _MIPS_SIM_ABI64) */
/*REFERENCED*/
static datum
dbm_fetch(DBM *db, datum key)
{
return _dbm_fetch(db, key);
}
/*REFERENCED*/
static datum
dbm_firstkey(DBM *db)
{
return _dbm_firstkey(db);
}
/*REFERENCED*/
static datum
dbm_nextkey(DBM *db)
{
return _dbm_nextkey(db);
}
/*REFERENCED*/
static int
dbm_delete(DBM *db, datum key)
{
return _dbm_delete(db, key);
}
/*REFERENCED*/
static int
dbm_store(DBM *db, datum key, datum dat, int replace)
{
return _dbm_store(db, key, dat, replace);
}
/*REFERENCED*/
#if _SGIAPI
static long
dbm_forder(DBM *db, datum key)
{
return _dbm_forder(db, key);
}
/*REFERENCED*/
static datum
dbm_fetch64(DBM64 *db, datum key)
{
return _dbm_fetch64(db, key);
}
/*REFERENCED*/
static datum
dbm_firstkey64(DBM64 *db)
{
return _dbm_firstkey64(db);
}
/*REFERENCED*/
static datum
dbm_nextkey64(DBM64 *db)
{
return _dbm_nextkey64(db);
}
/*REFERENCED*/
/* LINTED long long */
static __int64_t
dbm_forder64(DBM64 *db, datum key)
{
return _dbm_forder64(db, key);
}
/*REFERENCED*/
static int
dbm_delete64(DBM64 *db, datum key)
{
return _dbm_delete64(db, key);
}
/*REFERENCED*/
static int
dbm_store64(DBM64 *db, datum key, datum dat, int replace)
{
return _dbm_store64(db, key, dat, replace);
}
#endif /* _SGIAPI */
#endif /* (_MIPS_SIM != _MIPS_SIM_ABI64) */
#endif /* _DBM_INTERNAL */
#ifdef __cplusplus
}
#endif
#endif /* !__NDBM_H__ */

Some files were not shown because too many files have changed in this diff Show More