Newsgroups: fj.sys.news
Path: galaxy.trc.rwcp.or.jp!coconuts.jaist!wnoc-tyo-news!wnoc-sfc-news!sfc-keio-news!kusumoto
From: kusumoto@sfc.keio.ac.jp (KUSUMOTO Hiroyuki)
Subject: Re: AMD compilation on NEWS OS 6.1.1
In-Reply-To: fwataru@yk.metocean.co.jp's message of 24 Oct 1996 16:55:19 +0900
Message-ID: <KUSUMOTO.96Oct24192353@ccn16.sfc.keio.ac.jp>
Sender: news@sfc.keio.ac.jp
Nntp-Posting-Host: ccn16.sfc.keio.ac.jp
Organization: Keio University Shonan Fujisawa Campus, Kanagawa Japan
References: <ky4pw28vlso.fsf@nssun20-1.yk.metocean.co.jp>
Date: Thu, 24 Oct 1996 10:24:52 GMT
Lines: 535
Xref: galaxy.trc.rwcp.or.jp fj.sys.news:3390
X-originally-archived-at: http://galaxy.rwcp.or.jp/text/cgi-bin/newsarticle2?ng=fj.sys.news&nb=3390&hd=a
X-reformat-date: Mon, 18 Oct 2004 15:18:22 +0900
X-reformat-comment: Tabs were expanded into 4 column tabstops by the Galaxy's archiver. See http://katsu.watanabe.name/ancientfj/galaxy-format.html for more info.


In article <ky4pw28vlso.fsf@nssun20-1.yk.metocean.co.jp> fwataru@yk.metocean.co.jp (FUKUDA Wataru) writes:

>>$BJ!ED!w?7F|K\5$>]3$MN$G$9!#(B
>>
>>
>>$BC/$+(B NEWS OS 6.x $B>e$G(B amd $B$N%3%s%Q%$%k$K@.8y$5$l$?J}$O$$$i$C$7$c$$$^$;(B
>>$B$s$+!)(B NEWS OS 4.x $B$OI8=`$G%5%]!<%H$5$l$F$$$k$h$&$G$9$,!"(B6.x $B$K$D$$$F(B
>>$B$O!"$I$N$h$&$K%3%s%Q%$%k$r9T$C$?$i$$$$$N$+J,$+$j$^$;$s!#(B
>>
>>$BEvJ}$N4D6-$O!"(BNWS-4000 + NEWS OS 6.1.1 $B$G$9!#(B
>>
>>$B>pJs!"%Q%C%AEy$$$?$@$1$?$i9,$$$G$9!#(B


amd920824upl90 $B$KBP$7$F$&$A$G;H$C$F$$$k%U%!%$%k$G$9!%(B
config directory $B$N2<$K$*$$$F!$8e$O%5%]!<%H$5$l$F$$$k(BOS$B$HF1MM$K%3%s%Q(B
$B%$%k$G$-$^$9!%(B

$B$/$9$b$H(B

---------------------------------------------
#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create:
#os-type
#Makefile.news6
#os-news6.h
# This archive created: Thu Oct 24 19:21:33 1996
export PATH; PATH=/bin:/usr/bin:$PATH
if test -f 'os-type'
then
echo shar: "will not over-write existing file 'os-type'"
else
cat << \SHAR_EOF > 'os-type'
#!/bin/sh
#
# Copyright (c) 1989 Jan-Simon Pendry
# Copyright (c) 1989 Imperial College of Science, Technology & Medicine
# Copyright (c) 1989 The Regents of the University of California.
# All rights reserved.
#
# This code is derived from software contributed to Berkeley by
# Jan-Simon Pendry at Imperial College, London.
#
# 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.
#
#%W% (Berkeley) %G%
#
# $Id: os-type,v 5.2.2.3 1992/08/27 10:18:36 jsp Exp $
#

#
# Take a pot-shot at your os type
#
echo "#... No OS= option specified; dynamically determining OS type" >&2

PATH=/bin:/usr/bin:/usr/ucb

#
# First try poking around in /etc/motd
#

case "`exec 2>/dev/null; head -2 /etc/motd`" in
*"Sun UNIX 4.2 Release 3."*)OS=sos3;;
*"SunOS Release 4."*)OS=sos4;;
*"SunOS 4."*)OS=sos4;;
*"SunOS 5."*)OS=sos5;;
*"Solaris 2."*)OS=sos5;;
*"HP-UX on the HP"*)OS=hpux;;
*"Ultrix V2."*)OS=u2_2;;
*"Ultrix V3."*)OS=u3_0;;
*"Ultrix-32 V3."*)OS=u3_0;;
*"Ultrix Worksystem V2."*)OS=u3_0;;
*"ULTRIX V4.3"*)OS=u4_3;;
*"ULTRIX V4.2"*)OS=u4_2;;
*"Ultrix 4.2"*)OS=u4_2;;
*"ULTRIX V4."*)OS=u4_0;;
*"OSF/1"*)OS=osf1;;
*"HLH OTS Version 1."*)OS=hlh42;;
*"RISC iX release 1."*)OS=riscix;;
*"FPX 4."*)OS=fpx4;;
*"HCX/UX"*)OS=hcx;;
*"OSF/1"*)OS=osf1;;
*"BSDI BSD/386 1.1"*)OS=bsdi11;;
*"NetBSD"*)OS=NetBSD;;
*"4.4 BSD UNIX"*)OS=bsd44;;
*"4.3 BSD Reno UNIX"*)OS=bsd44;;
*"4.3 BSD UNIX"*)if [ -f /etc/minidisk ]; then
OS=acis43
elif [ -f /sbin/nfsiod ]; then
OS=bsd44# prototype
else
OS=xinu43
fi;;
*"Alliant Concentrix"*)OS=concentrix;;
*"Umax 4.3"*)OS=umax43;;
*"NEWS-OS Release 4"*)OS=news4;;
esac

if [ -z "${OS}" ]; then

echo "#checking to see what /bin/uname will tell me " >&2

if [ -f /bin/uname ]; then
OS_TMP=`/bin/uname -a`
elif [ -f /usr/bin/uname ]; then
OS_TMP=`/usr/bin/uname -a`
fi

case "$OS_TMP" in
        *IRIX*6.*) OS=irix6
;;
        *IRIX*5.*) OS=irix5
;;
        *IRIX*4.*) OS=irix4
;;
        *IRIX*3.*) OS=irix3
;;
SunOS*4.*) OS=sos4
;;
# sigh this works only for AT&T svr4 on a 386 box.
# uname doesn't provice an os on the os/
*4.0*386/AT) OS=svr4
;;
SINIX*5) OS=svr4
;;
aoi*4.*) OS=aoi
;;
riscix" "*) OS=riscix
;;
*[Ll]inux*) OS=linux
;; 
        *NEWS-OS*6.*) OS=news6
esac
fi

if [ -z "${OS}" ]; then
#
# Well, that didn't work so apply some heuristics
# to the filesystem name space...
#
echo "#... inspecting File system ..." >&2
if [ -d /usr/src/uts/mips ]; then
OS=riscos
elif [ -f /etc/comply ]; then
OS=utek
elif [ -d /usr/lib/methods -o -d /etc/methods ]; then
OS=aix3
elif [ -d /opt/SUNWdiag ]; then
 OS=sos5
  # Bull. this will work on almost any system including AT&T svr4
  #elif [ -f /usr/bin/cat ]; then
  #OS=sos4
elif [ -f /etc/nd ]; then
OS=sos3
elif [ -f /etc/elcsd ]; then
echo "#... Ultrix - assuming U4.0 ..." >&2
OS=u4_0
elif [ -f /hp-ux ]; then
OS=hpux
elif [ -f /etc/ttylocal ]; then
OS=xinu43
elif [ -d /NextApps ]; then
OS=next
elif [ -f /mach ]; then
if [ -f /usr/mach3/bin/mach3 -a /usr/mach3/bin/mach3 ]; then
OS=mach3
else
OS=mach2
fi
elif [ -f /mach ]; then
OS=mach2
elif [ -f /etc/minidisk ]; then
OS=acis43
elif [ -f /etc/toolboxdaemon ]; then
OS=aux
elif [ -f /386bsd ]; then
OS=386bsd 
elif [ -f /etc/bad144 ]; then
OS=bsd43
elif [ -f /sbin/nfsiod ]; then
OS=bsd44
elif [ -d /vrm ]; then
OS=aix2
elif [ -f /bin/pyr ] && /bin/pyr; then
OS=pyrOSx
elif [ -f /etc/gl/ucode ]; then
OS=irix3
elif [ -f /usr/gfx/ucode -o -d /usr/gfx/ucode ]; then
# /usr/gfx/ucode is a directory under IRIX 4.0.5 
OS=irix4
elif [ -f /stellix ]; then
OS=stellix
else
case "`(sh ../config/arch)2>/dev/null`" in
ibm032)    OS=acis43;;
aviion)    OS=dgux;;
ccur*)   OS=rtu`uname -r | cut -f1 -d.`;;
mc*)   OS=rtu`uname -r | cut -f1 -d.`;;
i386)   OS=isc3;;
ix386)   OS=isc3;;
vax)   OS=bsd43;;
*)   OS=unknown;;
esac
fi
fi

echo "#... OS appears to be \"${OS}\"" >&2
echo "${OS}"
exit 0
SHAR_EOF
fi
if test -f 'Makefile.news6'
then
echo shar: "will not over-write existing file 'Makefile.news6'"
else
cat << \SHAR_EOF > 'Makefile.news6'
#
# Copyright (c) 1990 Jan-Simon Pendry
# Copyright (c) 1990 Imperial College of Science, Technology & Medicine
# Copyright (c) 1990 The Regents of the University of California.
# All rights reserved.
#
# This code is derived from software contributed to Berkeley by
# Jan-Simon Pendry at Imperial College, London.
#
# 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
#
#%W% (Berkeley) %G%
#
# Makefile.news6 1996/01/05
#

##
## Makefile add-on for NEWS-OS 6.x
##

CC = /usr/bin/cc
SYSCC = /usr/bin/cc
SYSLIB = -lnsl -lsocket
SHAR_EOF
fi
if test -f 'os-news6.h'
then
echo shar: "will not over-write existing file 'os-news6.h'"
else
cat << \SHAR_EOF > 'os-news6.h'
/*
 * Copyright (c) 1989 Jan-Simon Pendry
 * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
 * Copyright (c) 1989 The Regents of the University of California.
 * All rights reserved.
 *
 * This code is derived from software contributed to Berkeley by
 * Jan-Simon Pendry at Imperial College, London.
 *
 * 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.
 *
 *%W% (Berkeley) %G%
 *
 * os-news6.h 1996/01/04
 *
 * SunOS 5.0 definitions for Amd (automounter).  Port by Erez Zadok
 * <ezk@cs.columbia.edu> and James Tanis <jtt@cs.columbia.edu>.
 *
 * Sony NEWS-OS Release 6.x (RISC) definitions for Amd (automounter)
 */

/*
 * Set this macro for further use in amd.  (Solaris is not pure SYSV or BSD,
 * so I may need to special-case based on this macro.)  GCC seems to define
 * __svr4__ so that's what I'll be using.  Erez Zadok <ezk@cs.columbia.edu>.
 */
#ifndef __svr4__
#define __svr4__
#endif /* __svr4__ */

/*
 * Does the compiler grok void *
 */
#defineVOIDP

/*
 * Which version of the Sun RPC library we are using
 * This is the implementation release number, not
 * the protocol revision number.
 */
#defineRPC_4

/*
 * Which version of the NFS interface are we using.
 * This is the implementation release number, not
 * the protocol revision number.
 */
#defineNFS_4

/*
 * Byte ordering
 */
#undef ARCH_ENDIAN
#define ARCH_ENDIAN "big"

/*
 * Needed to get correct value of MAXHOSTNAMELEN
 */
#include <netdb.h>

/*
 * Declarations of {set,get,end}netconfig{,ent} functions.
 */
#ifdef __STDC__
#include <sys/netconfig.h>
#else
extern void *setnetconfig();
extern struct netconfig *getnetconfig();
extern struct netconfig *getnetconfigent();
#endif /* __STDC__ */

/*
 * Needed for a lot of the code ported to pure TLI,
 * especially for host name/number mapping.
 */
#ifdef __svr4__
#include <netdir.h>
#endif /* __svr4__ */

/*
 * No mntent on news6 (NEWS-OS 6.x).  We write our own.
 */
#undefMNTENT_HDR
#defineMNTENT_HDR <sys/mntent.h>
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 */
/* longmnt_time; */
/* shortmnt_ro; */
};
#undef READ_MTAB_FROM_FILE
#define READ_MTAB_SVR4_STYLE
#define NEED_MNTOPT_PARSER

/*
 * For struct nfs_args
 */
#include <sys/types.h>  /* needed for caddr_t in mount.h */
#define NFSCLIENT
#include <nfs/mount.h>
#undef NFSCLIENT

/*
 * Types of mounts (type argument to mount(2) syscall.)  Note that the man
 * page is incorrect by saying that the type argument to mount(2) is an
 * integer.  I confirmed that the type is (char *) by using "truss" and
 * <sys/vfs.h>.  
 */
#include <sys/fstyp.h>
#define MOUNT_TYPE_UFSsysfs(GETFSIND, "ufs")
#define MOUNT_TYPE_NFSsysfs(GETFSIND, "nfs")

/*
 * Type of a file handle
 */
#undef NFS_FH_TYPE
#defineNFS_FH_TYPEcaddr_t

/*
 * How to copy an address into an NFS filehandle
 */
#undef NFS_SA_DREF
#defineNFS_SA_DREF(dst, src) { \
(dst).addr->buf = (char *) (src); \
(dst).addr->len = sizeof(struct sockaddr_in); \
(dst).addr->maxlen = sizeof(struct sockaddr_in); \
}

/*
 * UDPMSGSIZE defined in rpc/clnt_soc.h
 */
# ifndef UDPMSGSIZE
#  define UDPMSGSIZE 8800
# endif /* UDPMSGSIZE */

/*
 * Type of the third argument ("in") to some svc_*args() RPC functions, such
 * as svc_getargs().
 */
#undef SVC_IN_ARGS_TYPE
#define SVC_IN_ARGS_TYPE caddr_t

/*
 * Name of Mount Table File (normally /etc/mtab)
 */
#define MOUNTED MNTTAB

/*
 * Map from MS_* to M_* mount options
 */
#define M_RDONLY MS_RDONLY
#define M_NOSUID MS_NOSUID

/*
 * has /usr/include/dirent.h
 */
#undef DIRENT
#define DIRENT

/*
 * How to mount(2) and umount(2).
 */
#define MOUNT_HELPER_SOURCE "mount_svr4.c"
#undef MOUNT_TRAP
#define MOUNT_TRAP(type, mnt, flags, mnt_data) \
mount_svr4(mnt->mnt_fsname, mnt->mnt_dir, flags, type, mnt_data)
#undef UNMOUNT_TRAP
#define UNMOUNT_TRAP(mnt)umount(mnt->mnt_dir)

/*
 * To get definition of struct ufs_args.
 */
#define UFS_HDR "misc-svr4.h"

/*
 * In NEWS-OS 6.x, _seterr_reply was renamed __seterr_reply (?!)
 */
#define _seterr_reply __seterr_reply

/*
 * For "purity" of svr4 port, use its own signal routines...
 */
#ifndef SYS5_SIGNALS
#define SYS5_SIGNALS
#endif /* SYS5_SIGNALS */

/*
 * os has plock()
 */
#defineHAS_PLOCK

/*
 * Making sure HAS_STRDUP is defined is needed for <fsinfo/fsinfo.h>
 */
#define HAS_STRDUP

/*
 * netdb.h does not have _PATH_NETWORKS
 */
#define _PATH_NETWORKS  "/etc/networks"
SHAR_EOF
fi
exit 0
#End of shell archive
