diff options
author | damico <none@none> | 2007-06-25 13:13:44 -0700 |
---|---|---|
committer | damico <none@none> | 2007-06-25 13:13:44 -0700 |
commit | 672986541be54a7a471bb088e60780c37e371d7e (patch) | |
tree | eb30f192e612713a7d07694b6edfd5e4090b27b1 /usr/src/cmd/sgs | |
parent | e534d837fba90a706cc1f8f00151d8427b608cb1 (diff) | |
download | illumos-joyent-672986541be54a7a471bb088e60780c37e371d7e.tar.gz |
PSARC 2005/420 Movement of /usr/ccs/bin utilities to /usr/bin
6319687 Move ON utilties in /usr/ccs/bin to /usr/bin
--HG--
rename : usr/src/cmd/sgs/whatdir/common/whatdir.c => deleted_files/usr/src/cmd/sgs/whatdir/common/whatdir.c
rename : usr/src/cmd/sgs/lex/common/ldefs.c => usr/src/cmd/sgs/lex/common/ldefs.h
Diffstat (limited to 'usr/src/cmd/sgs')
71 files changed, 604 insertions, 857 deletions
diff --git a/usr/src/cmd/sgs/Makefile.com b/usr/src/cmd/sgs/Makefile.com index 7944654db2..07d05b93b4 100644 --- a/usr/src/cmd/sgs/Makefile.com +++ b/usr/src/cmd/sgs/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -38,10 +38,6 @@ sparc_ARCH = sparc ARCH = $($(MACH)_ARCH) -ROOTCCSBIN64 = $(ROOTCCSBIN)/$(MACH64) -ROOTCCSBINPROG64 = \ - $(PROG:%=$(ROOTCCSBIN64)/%) - # Establish any global flags. # Setting DEBUG = -DDEBUG (or "make DEBUG=-DDEBUG ...") enables ASSERT() diff --git a/usr/src/cmd/sgs/Makefile.targ b/usr/src/cmd/sgs/Makefile.targ index f43cd7c737..08d8a79f8f 100644 --- a/usr/src/cmd/sgs/Makefile.targ +++ b/usr/src/cmd/sgs/Makefile.targ @@ -20,12 +20,25 @@ # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" # +# Standard install rules +# The VAR_SGSBIN and VAR_SGSBIN64 install rules included here are applicable +# to Solaris 10 and earlier releases. For post Solaris 10 releases, the +# standard ROOTBIN and ROOTBIN64 rules defined in ../Makefile.cmd are used. +# The new rules here are included to allow for easier backporting. Making +# the appropriate updates in ./Makefile.var, will allow the SGS components +# to be installed in /usr/ccs/bin rather than the current /usr/bin. +# +$(VAR_SGSBIN)/%: % + $(INS.file) + +$(VAR_SGSBIN64)/%: % + $(INS.file) ################################################################################ # diff --git a/usr/src/cmd/sgs/Makefile.var b/usr/src/cmd/sgs/Makefile.var index b056b67def..7832e0dfd8 100644 --- a/usr/src/cmd/sgs/Makefile.var +++ b/usr/src/cmd/sgs/Makefile.var @@ -31,7 +31,9 @@ # pre-processor flags, linker flags are different among the releases. This # file is used to specify such flags. # -# This file is included by the ./Makefile.com. +# This file is included by ./Makefile.com, but may also be included directly +# in the case where the utility is relying on the contents of +# ../../Makefile.com. # # This file should be the only file which is different among the presently # maintained release workspaces and the files that generate the link-editors @@ -123,13 +125,12 @@ VAR_POUND_3= $(POUND_SIGN) # # VAR_AVLDIR - directory to find avl.c in. # -# The avl.c is under usr/src/common/avl in Solaris10 (and later), but -# in earlier releases it is not present (problem to be solved). +# The avl.c file is under usr/src/common/avl in Solaris 10 (and later), +# but in earlier releases it is not present (problem to be solved). # -# -# The avl.h and avl_impl.h are under usr/src/uts/common/sys in Solaris10 -# (and later). They are under usr/src/cmd/sgs/tools/common/sys in -# Solaris 9 and earlier. +# The avl.h and avl_impl.h files are under usr/src/uts/common/sys in +# Solaris 10 (and later). They are under usr/src/cmd/sgs/tools/common/sys +# in Solaris 9 and earlier. # # For Solaris 9 and earlier releases, we will have our own copy of the # files avl.c, avl.h and avl_impl.h until these files are back ported into @@ -141,12 +142,29 @@ VAR_AVLINCDIR= # # VAR_DTRDIR - directory to find dtrace_data.c in. # -# The dtrace_data.c is under usr/src/common/dtrace in Solaris 11 (and later), -# but in earlier releases was maintained as separate files under sgs/rtld. +# In Solaris 10 and earlier releases, dtrace_data.c was maintained as separate +# files under sgs/rtld. This file is now under usr/src/common/dtrace. # VAR_DTRDIR= $(SRCBASE)/common/dtrace # +# VAR_SGSBINPROG +# +# For Solaris 10 and earlier releases, the SGS components were installed in +# /usr/ccs/bin. These components are now installed in /usr/bin with associated +# symbolic links for compatibility. For previous behavior, set the VAR_SGSBIN* +# variables to the appropriate ROOTCCSBIN* rule and set the VAR_SGSCCSLINK* +# rules to null. +# +VAR_SGSBIN= $(ROOTBIN) +VAR_SGSBINPROG= $(ROOTPROG) +VAR_SGSBIN64= $(ROOTBIN64) +VAR_SGSBINPROG64= $(ROOTPROG64) + +VAR_SGSCCSLINK= $(ROOTCCSBINLINK) +VAR_SGSCCSLINK64= $(ROOTCCSBINLINK64) + +# # ld # VAR_LD_NATIVE_LLDLIBS= diff --git a/usr/src/cmd/sgs/ar/Makefile.targ b/usr/src/cmd/sgs/ar/Makefile.targ index 161914f65e..99d04310f9 100644 --- a/usr/src/cmd/sgs/ar/Makefile.targ +++ b/usr/src/cmd/sgs/ar/Makefile.targ @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -22,7 +21,7 @@ # #ident "%Z%%M% %I% %E% SMI" # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. objs/%.o \ @@ -39,7 +38,7 @@ delete: $(RM) $(PROG) install \ -package: all $(ROOTCCSBINPROG) $(ROOTXPG4PROG) +package: all $(ROOTPROG) $(ROOTXPG4PROG) $(ROOTCCSBINLINK) catalog: $(POFILE) diff --git a/usr/src/cmd/sgs/dump/Makefile.com b/usr/src/cmd/sgs/dump/Makefile.com index b7a8290a36..6da02c7a10 100644 --- a/usr/src/cmd/sgs/dump/Makefile.com +++ b/usr/src/cmd/sgs/dump/Makefile.com @@ -20,7 +20,7 @@ # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -38,10 +38,6 @@ SRCS= $(COMOBJS:%.o=../common/%.c) OBJS = $(COMOBJS) .PARALLEL: $(OBJS) - -ROOTCCSBIN64= $(ROOTCCSBIN)/$(MACH64) -ROOTCCSBINPROG64= $(PROG:%=$(ROOTCCSBIN64)/%) - CPPFLAGS += -D__EXTENSIONS__ LLDFLAGS = '$(LDPASS)-R$$ORIGIN/../../lib' LLDFLAGS64 = '$(LDPASS)-R$$ORIGIN/../../../lib/$(MACH64)' diff --git a/usr/src/cmd/sgs/dump/Makefile.targ b/usr/src/cmd/sgs/dump/Makefile.targ index bcfbfbf2f1..a4f899781c 100644 --- a/usr/src/cmd/sgs/dump/Makefile.targ +++ b/usr/src/cmd/sgs/dump/Makefile.targ @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -33,13 +33,10 @@ $(PROG): $(OBJS) $(LINK.c) $(OBJS) -o $@ $(LDLIBS) $(POST_PROCESS) -$(ROOTCCSBIN64)/%: % - $(INS.file) - all: $(PROG) package \ -install: all $(ROOTCCSBINPROG) +install: all $(VAR_SGSBINPROG) $(VAR_SGSCCSLINK) clean: $(RM) $(OBJS) $(CLEANFILES) diff --git a/usr/src/cmd/sgs/dump/amd64/Makefile b/usr/src/cmd/sgs/dump/amd64/Makefile index 1510a43625..145d0bdac5 100644 --- a/usr/src/cmd/sgs/dump/amd64/Makefile +++ b/usr/src/cmd/sgs/dump/amd64/Makefile @@ -20,7 +20,7 @@ # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -35,7 +35,8 @@ ELFLIBDIR = $(ELFLIBDIR64) DEMLIB = $(DEMLIB64) CONVLIBDIR = $(CONVLIBDIR64) -ROOTCCSBINPROG= $(ROOTCCSBINPROG64) +VAR_SGSBINPROG= $(VAR_SGSBINPROG64) +VAR_SGSCCSLINK= $(VAR_SGSCCSLINK64) include ../Makefile.targ include ../../Makefile.sub.64 @@ -43,4 +44,4 @@ include ../../Makefile.sub.64 lint: $(LINTOUT64) $(SGSLINTOUT) install \ -package: $(ROOTCCSBINPROG64) +package: $(VAR_SGSBINPROG64) diff --git a/usr/src/cmd/sgs/dump/sparcv9/Makefile b/usr/src/cmd/sgs/dump/sparcv9/Makefile index 1510a43625..2fdcd4cc51 100644 --- a/usr/src/cmd/sgs/dump/sparcv9/Makefile +++ b/usr/src/cmd/sgs/dump/sparcv9/Makefile @@ -20,7 +20,7 @@ # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -35,7 +35,8 @@ ELFLIBDIR = $(ELFLIBDIR64) DEMLIB = $(DEMLIB64) CONVLIBDIR = $(CONVLIBDIR64) -ROOTCCSBINPROG= $(ROOTCCSBINPROG64) +VAR_SGSBINPROG= $(VAR_SGSBINPROG64) +VAR_SGSCCSLINK= $(VAR_SGSCCSLINK64) include ../Makefile.targ include ../../Makefile.sub.64 @@ -43,4 +44,4 @@ include ../../Makefile.sub.64 lint: $(LINTOUT64) $(SGSLINTOUT) install \ -package: $(ROOTCCSBINPROG64) +package: $(VAR_SGSBINPROG64) diff --git a/usr/src/cmd/sgs/elfdump/Makefile.targ b/usr/src/cmd/sgs/elfdump/Makefile.targ index 8f87f82964..7d19007e97 100644 --- a/usr/src/cmd/sgs/elfdump/Makefile.targ +++ b/usr/src/cmd/sgs/elfdump/Makefile.targ @@ -20,7 +20,7 @@ # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -46,9 +46,6 @@ $(PROG): $(OBJS) $(MAPFILE) $(LINK.c) -o $@ $(OBJS) $(LDLIBS) $(POST_PROCESS) -$(ROOTCCSBIN64)/%: % - $(INS.file) - all: $(PROG) clean: @@ -57,8 +54,8 @@ clean: delete: $(RM) $(PROG) -install \ -package: all $(ROOTCCSBINPROG) +package \ +install: all $(VAR_SGSBINPROG) $(VAR_SGSCCSLINK) .PARALLEL: $(LINTOUT32) $(LINTOUT64) diff --git a/usr/src/cmd/sgs/elfdump/amd64/Makefile b/usr/src/cmd/sgs/elfdump/amd64/Makefile index 8f39ca01c6..906b6b6754 100644 --- a/usr/src/cmd/sgs/elfdump/amd64/Makefile +++ b/usr/src/cmd/sgs/elfdump/amd64/Makefile @@ -20,7 +20,7 @@ # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -36,10 +36,11 @@ LDDBGLIBDIR = $(LDDBGLIBDIR64) CONVLIBDIR = $(CONVLIBDIR64) LINTFLAGS64 += $(VAR_LINTFLAGS64) -ROOTCCSBINPROG= $(ROOTCCSBINPROG64) +VAR_SGSBINPROG= $(VAR_SGSBINPROG64) +VAR_SGSCCSLINK= $(VAR_SGSCCSLINK64) include ../Makefile.targ include ../../Makefile.sub.64 install \ -package: $(ROOTCCSBINPROG64) +package: $(VAR_SGSBINPROG64) diff --git a/usr/src/cmd/sgs/elfdump/sparcv9/Makefile b/usr/src/cmd/sgs/elfdump/sparcv9/Makefile index 8f39ca01c6..a15f2caf82 100644 --- a/usr/src/cmd/sgs/elfdump/sparcv9/Makefile +++ b/usr/src/cmd/sgs/elfdump/sparcv9/Makefile @@ -20,7 +20,7 @@ # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -36,10 +36,12 @@ LDDBGLIBDIR = $(LDDBGLIBDIR64) CONVLIBDIR = $(CONVLIBDIR64) LINTFLAGS64 += $(VAR_LINTFLAGS64) -ROOTCCSBINPROG= $(ROOTCCSBINPROG64) +VAR_SGSBINPROG= $(VAR_SGSBINPROG64) +VAR_SGSCCSLINK= $(VAR_SGSCCSLINK64) include ../Makefile.targ include ../../Makefile.sub.64 install \ -package: $(ROOTCCSBINPROG64) +package: $(VAR_SGSBINPROG64) + diff --git a/usr/src/cmd/sgs/error/i386/Makefile b/usr/src/cmd/sgs/error/i386/Makefile index 2c9d6980c4..6eea425308 100644 --- a/usr/src/cmd/sgs/error/i386/Makefile +++ b/usr/src/cmd/sgs/error/i386/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -22,7 +21,7 @@ # #ident "%Z%%M% %I% %E% SMI" # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # cmd/sgs/error/i386/Makefile @@ -55,7 +54,7 @@ $(PROG): $(OBJS) $(LINK.c) $(OBJS) -o $@ $(LDLIBS) $(POST_PROCESS) -install: all $(ROOTCCSBINPROG) +install: all $(ROOTPROG) $(ROOTCCSBINLINK) clean: $(RM) $(OBJS) $(CLEANFILES) diff --git a/usr/src/cmd/sgs/error/sparc/Makefile b/usr/src/cmd/sgs/error/sparc/Makefile index 0137a2f053..c23aa20069 100644 --- a/usr/src/cmd/sgs/error/sparc/Makefile +++ b/usr/src/cmd/sgs/error/sparc/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -22,7 +21,7 @@ # #ident "%Z%%M% %I% %E% SMI" # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # cmd/sgs/error/sparc/Makefile @@ -55,7 +54,7 @@ $(PROG): $(OBJS) $(LINK.c) $(OBJS) -o $@ $(LDLIBS) $(POST_PROCESS) -install: all $(ROOTCCSBINPROG) +install: all $(ROOTPROG) $(ROOTCCSBINLINK) clean: $(RM) $(OBJS) $(CLEANFILES) diff --git a/usr/src/cmd/sgs/gprof/Makefile.com b/usr/src/cmd/sgs/gprof/Makefile.com index 1da864ff7f..ea7ef91f28 100644 --- a/usr/src/cmd/sgs/gprof/Makefile.com +++ b/usr/src/cmd/sgs/gprof/Makefile.com @@ -2,10 +2,9 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. + # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions @@ -22,7 +21,7 @@ # # ident "%Z%%M% %I% %E% SMI" # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # cmd/sgs/gprof/Makefile.com @@ -32,12 +31,10 @@ include ../../../Makefile.cmd COMOBJS= gprof.o arcs.o dfn.o lookup.o calls.o \ printgprof.o printlist.o readelf.o -WHATOBJS= whatdir.o -OBJS= $(COMOBJS) $(WHATOBJS) +OBJS= $(COMOBJS) BLURBS= gprof.callg.blurb gprof.flat.blurb -SRCS= $(COMOBJS:%.o=../common/%.c) \ - $(WHATOBJS:%.o=../../whatdir/common/%.c) +SRCS= $(COMOBJS:%.o=../common/%.c) INCLIST= -I../common -I../../include -I../../include/$(MACH) DEFLIST= -DELF_OBJ -DELF @@ -48,16 +45,10 @@ LDLIBS += ../../sgsdemangler/`mach`/libdemangle.a LINTFLAGS += $(LDLIBS) CLEANFILES += $(LINTOUT) -ROOTCCSBLURB= $(BLURBS:%=$(ROOTCCSBIN)/%) - -$(ROOTCCSBLURB) := FILEMODE= 444 +ROOTLIBBLURB= $(BLURBS:%=$(ROOTSHLIBCCS)/%) -$(ROOTCCSBIN)/%: ../common/% - $(INS.file) +$(ROOTLIBBLURB) := FILEMODE= 444 %.o: ../common/%.c $(COMPILE.c) $< - -%.o: ../../whatdir/common/%.c - $(COMPILE.c) $< .PARALLEL: $(OBJS) diff --git a/usr/src/cmd/sgs/gprof/common/gprof.h b/usr/src/cmd/sgs/gprof/common/gprof.h index 627d513e17..e62ddaf45c 100644 --- a/usr/src/cmd/sgs/gprof/common/gprof.h +++ b/usr/src/cmd/sgs/gprof/common/gprof.h @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,7 +20,7 @@ */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -129,8 +128,8 @@ char *gmonname; /* * blurbs on the flat and graph profiles. */ -#define FLAT_BLURB "/gprof.flat.blurb" -#define CALLG_BLURB "/gprof.callg.blurb" +#define FLAT_BLURB "/usr/share/lib/ccs/gprof.flat.blurb" +#define CALLG_BLURB "/usr/share/lib/ccs/gprof.callg.blurb" /* * a raw arc, diff --git a/usr/src/cmd/sgs/gprof/common/printgprof.c b/usr/src/cmd/sgs/gprof/common/printgprof.c index e9a20fc634..a9f9a724d6 100644 --- a/usr/src/cmd/sgs/gprof/common/printgprof.c +++ b/usr/src/cmd/sgs/gprof/common/printgprof.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,7 +20,7 @@ */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -33,7 +32,6 @@ #include <stdlib.h> #include "gprof.h" -extern int find_run_directory(char *, char *, char *, char **, char *); void print_demangled_name(int, nltype *); void striped_name(char *, nltype **); @@ -852,23 +850,10 @@ printblurb(char *blurbname) { FILE *blurbfile; int input; - char blurb_directory[MAXPATHLEN]; - char cwd[MAXPATHLEN]; - cwd[0] = '.'; - cwd[1] = '\0'; - - if (find_run_directory(prog_name, cwd, blurb_directory, - NULL, getenv("PATH")) != 0) { - (void) fprintf(stderr, "Error in finding run directory."); - return; - } else { - (void) strcat(blurb_directory, blurbname); - } - - blurbfile = fopen(blurb_directory, "r"); + blurbfile = fopen(blurbname, "r"); if (blurbfile == NULL) { - perror(blurb_directory); + perror(blurbname); return; } @@ -929,7 +914,7 @@ does_clash(nltype **nlp, int ndx, int nnames) * same as next (if there's one) ? */ if ((ndx < (nnames - 1)) && - (strcmp(nlp[ndx]->name, nlp[ndx+1]->name) == 0)) { + (strcmp(nlp[ndx]->name, nlp[ndx+1]->name) == 0)) { return (TRUE); } @@ -972,7 +957,7 @@ printindex() for (mi = &modules; mi; mi = mi->next) { for (index = 0; index < mi->nname; index++) { if (zflag == 0 && (mi->nl[index]).ncall == 0 && - (mi->nl[index]).time == 0) { + (mi->nl[index]).time == 0) { continue; } @@ -1019,18 +1004,18 @@ printindex() if (j < nnames) { if (does_clash(namesortnlp, - j, nnames)) { + j, nnames)) { (void) printf( "%6.6s %*d:%-*.*s", - peterbuffer, - IDFMT(nlp->module->id), - nlp->module->id, - NMFMT(nlp->module->id), - NMFMT(nlp->module->id), - nlp->name); + peterbuffer, + IDFMT(nlp->module->id), + nlp->module->id, + NMFMT(nlp->module->id), + NMFMT(nlp->module->id), + nlp->name); } else { - (void) printf("%6.6s %-19.19s", - peterbuffer, nlp->name); + (void) printf("%6.6s %-19.19s", + peterbuffer, nlp->name); } } else { (void) printf("%6.6s ", peterbuffer); diff --git a/usr/src/cmd/sgs/gprof/i386/Makefile b/usr/src/cmd/sgs/gprof/i386/Makefile index 560c2ab0a7..5941dcc975 100644 --- a/usr/src/cmd/sgs/gprof/i386/Makefile +++ b/usr/src/cmd/sgs/gprof/i386/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -22,7 +21,8 @@ # #ident "%Z%%M% %I% %E% SMI" # -# Copyright (c) 1993,1997 by Sun Microsystems, Inc. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. # # cmd/sgs/gprof/i386/Makefile # @@ -37,6 +37,6 @@ LDLIBS += -lelf all: $(PROG) -install: all .WAIT $(ROOTCCSBINPROG) $(ROOTCCSBLURB) +install: all .WAIT $(ROOTPROG) $(ROOTLIBBLURB) $(ROOTCCSBINLINK) include ../Makefile.targ diff --git a/usr/src/cmd/sgs/gprof/sparc/Makefile b/usr/src/cmd/sgs/gprof/sparc/Makefile index db8eb0262b..06333269b1 100644 --- a/usr/src/cmd/sgs/gprof/sparc/Makefile +++ b/usr/src/cmd/sgs/gprof/sparc/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -22,8 +21,8 @@ # #ident "%Z%%M% %I% %E% SMI" # -# Copyright (c) 1993,1997,2001 by Sun Microsystems, Inc. -# All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. # # cmd/sgs/gprof/sparc/Makefile @@ -39,7 +38,7 @@ LDLIBS += -lelf all: $(PROG) -install: all .WAIT $(ROOTCCSBINPROG) $(ROOTCCSBLURB) +install: all .WAIT $(ROOTPROG) $(ROOTLIBBLURB) $(ROOTCCSBINLINK) include ../Makefile.targ diff --git a/usr/src/cmd/sgs/lari/Makefile b/usr/src/cmd/sgs/lari/Makefile index c762b2bb66..64e275975c 100644 --- a/usr/src/cmd/sgs/lari/Makefile +++ b/usr/src/cmd/sgs/lari/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -22,7 +21,7 @@ # # ident "%Z%%M% %I% %E% SMI" # -# Copyright 2003 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. PROG= lari @@ -43,10 +42,7 @@ $(PROG): $(PSRC) $(CHMOD) +x $@ install \ -package: $(ROOTCCSBINPROG) - -$(ROOTCCSBIN)/%:% - $(INS.file) +package: all $(VAR_SGSBINPROG) $(VAR_SGSCCSLINK) clean: $(RM) $(PROG) diff --git a/usr/src/cmd/sgs/ld/Makefile.com b/usr/src/cmd/sgs/ld/Makefile.com index c320940984..bfb3c79767 100644 --- a/usr/src/cmd/sgs/ld/Makefile.com +++ b/usr/src/cmd/sgs/ld/Makefile.com @@ -68,9 +68,6 @@ SGSMSGFLAGS += -h $(BLTDEFS) -d $(BLTDATA) -m $(BLTMESG) -n ld_msg SRCS= $(MACHOBJS:%.o=%.c) $(COMOBJS:%.o=../common/%.c) $(BLTDATA) LINTSRCS= $(SRCS) ../common/lintsup.c -ROOTCCSBIN= $(ROOT)/usr/ccs/bin -ROOTCCSBINPROG= $(PROG:%=$(ROOTCCSBIN)/%) - CLEANFILES += $(BLTFILES) FILEMODE= 0755 diff --git a/usr/src/cmd/sgs/ld/Makefile.targ b/usr/src/cmd/sgs/ld/Makefile.targ index ec797edcbc..debb091dae 100644 --- a/usr/src/cmd/sgs/ld/Makefile.targ +++ b/usr/src/cmd/sgs/ld/Makefile.targ @@ -28,8 +28,8 @@ all: $(PROG) -install \ -package: all $(ROOTCCSBINPROG) +package \ +install: all $(VAR_SGSBINPROG) $(VAR_SGSCCSLINK) %.o: ../common/%.c $(COMPILE.c) $< @@ -37,12 +37,6 @@ package: all $(ROOTCCSBINPROG) $(PROG): $(MAPFILES) -$(ROOTCCSBIN)/%: % - $(INS.file) - -$(ROOTCCSBIN64)/%: % - $(INS.file) - clean: $(RM) $(OBJS) $(CLEANFILES) diff --git a/usr/src/cmd/sgs/ld/amd64/Makefile b/usr/src/cmd/sgs/ld/amd64/Makefile index 0fc37d2f27..80b7029540 100644 --- a/usr/src/cmd/sgs/ld/amd64/Makefile +++ b/usr/src/cmd/sgs/ld/amd64/Makefile @@ -20,7 +20,7 @@ # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -33,13 +33,13 @@ ELFLIBDIR = $(ELFLIBDIR64) LDDBGLIBDIR = $(LDDBGLIBDIR64) CONVLIBDIR = $(CONVLIBDIR64) +VAR_SGSBINPROG= $(VAR_SGSBINPROG64) +VAR_SGSCCSLINK= $(VAR_SGSCCSLINK64) + VAR_LD_LLDFLAGS = \ $(VAR_LD_LLDFLAGS64) .KEEP_STATE: -ROOTCCSBINPROG = \ - $(ROOTCCSBINPROG64) - include ../Makefile.targ include ../../Makefile.sub.64 diff --git a/usr/src/cmd/sgs/ld/sparcv9/Makefile b/usr/src/cmd/sgs/ld/sparcv9/Makefile index 0fc37d2f27..dda1b9ce13 100644 --- a/usr/src/cmd/sgs/ld/sparcv9/Makefile +++ b/usr/src/cmd/sgs/ld/sparcv9/Makefile @@ -20,7 +20,7 @@ # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -33,13 +33,13 @@ ELFLIBDIR = $(ELFLIBDIR64) LDDBGLIBDIR = $(LDDBGLIBDIR64) CONVLIBDIR = $(CONVLIBDIR64) +VAR_SGSBINPROG= $(VAR_SGSBINPROG64) +VAR_SGSCCSLINK= $(VAR_SGSCCSLINK64) + VAR_LD_LLDFLAGS = \ $(VAR_LD_LLDFLAGS64) .KEEP_STATE: -ROOTCCSBINPROG = \ - $(ROOTCCSBINPROG64) - include ../Makefile.targ include ../../Makefile.sub.64 diff --git a/usr/src/cmd/sgs/lex/Makefile.com b/usr/src/cmd/sgs/lex/Makefile.com index 7e498ee7d1..3969587e2c 100644 --- a/usr/src/cmd/sgs/lex/Makefile.com +++ b/usr/src/cmd/sgs/lex/Makefile.com @@ -19,15 +19,14 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" # MACHOBJS= main.o sub1.o sub2.o sub3.o header.o parser.o -WHATOBJS= whatdir.o -POBJECTS= $(MACHOBJS) $(WHATOBJS) +POBJECTS= $(MACHOBJS) POBJS= $(POBJECTS:%=objs/%) LIBRARY= libl.a @@ -50,7 +49,6 @@ C99MODE= $(C99_ENABLE) # from objects # SRCS= $(MACHOBJS:%.o=../common/%.c) \ - $(WHATOBJS:%.o=../../whatdir/common/%.c) \ $(LIBOBJS:%.o=../common/%.c) LIBS = $(DYNLIB) $(LINTLIB) @@ -77,9 +75,10 @@ LINTFLAGS= -ax LINTPOUT= lintp.out $(LINTLIB):= LINTFLAGS = -nvx -$(ROOTCCSBINPROG):= FILEMODE = 0555 +$(ROOTPROG):= FILEMODE = 0555 + +ROOTFORMS= $(FORMS:%=$(ROOTSHLIBCCS)/%) -ROOTFORMS= $(FORMS:%=$(ROOTCCSBIN)/%) ROOTLINTDIR= $(ROOTLIBDIR) ROOTLINT= $(LINTSRCS:../common/%=$(ROOTLINTDIR)/%) diff --git a/usr/src/cmd/sgs/lex/Makefile.targ b/usr/src/cmd/sgs/lex/Makefile.targ index 41d7fcaf0a..9948d78dc0 100644 --- a/usr/src/cmd/sgs/lex/Makefile.targ +++ b/usr/src/cmd/sgs/lex/Makefile.targ @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -29,9 +29,6 @@ $(PROG): objs .WAIT $(POBJS) $(LINK.c) $(POBJS) -o $@ $(LDLIBS) $(POST_PROCESS) -$(ROOTCCSBIN)/%: ../common/% - $(INS.file) - # conditional assignment of default permissions for the installed # DYNLIB/DYNLIBCCC. Set here and in Makefile.mach, instead of Makefile.lib, # because ROOTLIBDIR may be changed in the including makefile after it has @@ -78,10 +75,6 @@ objs/%_w.o pics/%_w.o objs/%_e.o pics/%_e.o: ../common/%.c $(COMPILE.c) -o $@ $< $(POST_PROCESS_O) -objs/%.o pics/%.o: ../../whatdir/common/%.c - $(COMPILE.c) -o $@ $< - $(POST_PROCESS_O) - objs/%.o pics/%.o: ../common/%.c $(COMPILE.c) -o $@ $< $(POST_PROCESS_O) diff --git a/usr/src/cmd/sgs/lex/common/header.c b/usr/src/cmd/sgs/lex/common/header.c index 4b3f6a2d04..4430f7b4ea 100644 --- a/usr/src/cmd/sgs/lex/common/header.c +++ b/usr/src/cmd/sgs/lex/common/header.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,8 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. - * All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -30,7 +28,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "ldefs.c" +#include "ldefs.h" static void rhd1(void); static void chd1(void); @@ -167,12 +165,12 @@ chd1(void) (void) fprintf(fout, "#ifndef __cplusplus\n"); (void) fprintf(fout, "%s%d%s\n", "# define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):getwc(yyin))==", - ctable['\n'], + ctable['\n'], "?(yylineno++,yytchar):yytchar)==EOF?0:yytchar)"); (void) fprintf(fout, "#else\n"); (void) fprintf(fout, "%s%d%s\n", "# define lex_input() (((yytchar=yysptr>yysbuf?U(*--yysptr):getwc(yyin))==", - ctable['\n'], + ctable['\n'], "?(yylineno++,yytchar):yytchar)==EOF?0:yytchar)"); (void) fprintf(fout, "#endif\n"); (void) fprintf(fout, @@ -203,12 +201,12 @@ chd1(void) (void) fprintf(fout, "#ifndef __cplusplus\n"); (void) fprintf(fout, "%s%d%s\n", "# define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):getc(yyin))==", - ctable['\n'], + ctable['\n'], "?(yylineno++,yytchar):yytchar)==EOF?0:yytchar)"); (void) fprintf(fout, "#else\n"); (void) fprintf(fout, "%s%d%s\n", "# define lex_input() (((yytchar=yysptr>yysbuf?U(*--yysptr):getc(yyin))==", - ctable['\n'], + ctable['\n'], "?(yylineno++,yytchar):yytchar)==EOF?0:yytchar)"); (void) fprintf(fout, "#endif\n"); fprintf(fout, "#define ECHO fprintf(yyout, \"%%s\",yytext)\n"); @@ -239,10 +237,10 @@ chd1(void) (void) fprintf(fout, "wchar_t * yywtext = yy_twbuf;\n"); (void) fprintf(fout, - "int yytextsz = YYLMAX;\n"); + "int yytextsz = YYLMAX;\n"); (void) fprintf(fout, "#ifndef YYTEXTSZINC\n"); (void) fprintf(fout, - "#define YYTEXTSZINC 100\n"); + "#define YYTEXTSZINC 100\n"); (void) fprintf(fout, "#endif\n"); } } else { @@ -263,10 +261,10 @@ chd1(void) (void) fprintf(fout, "char * yytext = yy_tbuf;\n"); (void) fprintf(fout, - "int yytextsz = YYLMAX;\n"); + "int yytextsz = YYLMAX;\n"); (void) fprintf(fout, "#ifndef YYTEXTSZINC\n"); (void) fprintf(fout, - "#define YYTEXTSZINC 100\n"); + "#define YYTEXTSZINC 100\n"); (void) fprintf(fout, "#endif\n"); } } @@ -372,7 +370,8 @@ statistics(void) { (void) fprintf(errorf, "%d/%d nodes(%%e), %d/%d positions(%%p), %d/%d (%%n), %ld transitions,\n", - tptr, treesize, nxtpos-positions, maxpos, stnum + 1, nstates, rcount); + tptr, treesize, nxtpos-positions, maxpos, stnum + 1, nstates, + rcount); (void) fprintf(errorf, "%d/%d packed char classes(%%k), ", pcptr-pchar, pchlen); if (optim) diff --git a/usr/src/cmd/sgs/lex/common/ldefs.c b/usr/src/cmd/sgs/lex/common/ldefs.h index 93056be176..b94134fcfa 100644 --- a/usr/src/cmd/sgs/lex/common/ldefs.c +++ b/usr/src/cmd/sgs/lex/common/ldefs.h @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,14 +19,16 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. - * All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#ifndef _LDEFS_H +#define _LDEFS_H + #pragma ident "%Z%%M% %I% %E% SMI" #include <stdio.h> @@ -186,7 +187,6 @@ extern int casecount; extern int chset; /* 1 = CHR set modified */ extern FILE *fin, *fout, *fother, *errorf; extern int fptr; -extern char *ratname, *cname; extern int prev; /* previous input character */ extern int pres; /* present input character */ extern int peek; /* next input character */ @@ -282,3 +282,5 @@ int mn0(int a); int dupl(int n); extern int isArray; /* XCU4: for %array %pointer */ + +#endif /* _LDEFS_H */ diff --git a/usr/src/cmd/sgs/lex/common/main.c b/usr/src/cmd/sgs/lex/common/main.c index 1227a94fc6..ec62d9f93a 100644 --- a/usr/src/cmd/sgs/lex/common/main.c +++ b/usr/src/cmd/sgs/lex/common/main.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,8 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. - * All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -39,11 +37,6 @@ #include <limits.h> static wchar_t L_INITIAL[] = {'I', 'N', 'I', 'T', 'I', 'A', 'L', 0}; - -char run_directory[PATH_MAX]; -char current_work_directory[PATH_MAX]; -extern int find_run_directory(char *, char *, char *, char **, char *); - static void get1core(void); static void free1core(void); static void get2core(void); @@ -224,30 +217,14 @@ main(int argc, char **argv) #ifdef DEBUG free3core(); #endif - if (path == NULL) { - current_work_directory[0] = '.'; - current_work_directory[1] = '\0'; - if (find_run_directory(sargv[0], - current_work_directory, - run_directory, - (char **)0, - getenv("PATH")) != 0) { - (void) fprintf(stderr, - "Error in finding run directory. Using default %s\n", - current_work_directory); - path = current_work_directory; - } else { - path = run_directory; - } - } if (handleeuc) { if (ratfor) error("Ratfor is not supported by -w or -e option."); - (void) strcat(path, "/nceucform"); + path = EUCNAME; } else - (void) strcat(path, ratfor ? "/nrform" : "/ncform"); + path = ratfor ? RATNAME : CNAME; fother = fopen(path, "r"); if (fother == NULL) @@ -370,5 +347,5 @@ void yyerror(char *s) { (void) fprintf(stderr, - "\"%s\":line %d: Error: %s\n", sargv[optind], yyline, s); + "\"%s\":line %d: Error: %s\n", sargv[optind], yyline, s); } diff --git a/usr/src/cmd/sgs/lex/common/once.h b/usr/src/cmd/sgs/lex/common/once.h index 343299aa20..014ca00b17 100644 --- a/usr/src/cmd/sgs/lex/common/once.h +++ b/usr/src/cmd/sgs/lex/common/once.h @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,17 +19,19 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. - * All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#ifndef _ONCE_H +#define _ONCE_H + #pragma ident "%Z%%M% %I% %E% SMI" -#include "ldefs.c" +#include "ldefs.h" /* once.c */ /* because of external definitions, this code should occur only once */ @@ -72,14 +73,9 @@ int peek = '\n'; /* next input character */ CHR *pushptr = pushc; CHR *slptr = slist; -#ifndef CNAME -#define CNAME "./ncform" -#endif -#ifndef RATNAME -#define RATNAME "./nrform" -#endif -char *cname = CNAME; -char *ratname = RATNAME; +#define CNAME "/usr/share/lib/ccs/ncform" +#define RATNAME "/usr/share/lib/ccs/nrform" +#define EUCNAME "/usr/share/lib/ccs/nceucform" int ccount = 1; int casecount = 1; @@ -158,3 +154,5 @@ Boolean handleeuc = FALSE; Boolean widecio = FALSE; int isArray = 1; /* XCU4: for %array %pointer */ + +#endif /* _ONCE_H */ diff --git a/usr/src/cmd/sgs/lex/common/parser.y b/usr/src/cmd/sgs/lex/common/parser.y index f636e5eca2..c1d73ad796 100644 --- a/usr/src/cmd/sgs/lex/common/parser.y +++ b/usr/src/cmd/sgs/lex/common/parser.y @@ -3,9 +3,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -22,8 +21,7 @@ */ %} /* - * Copyright 2005 Sun Microsystems, Inc. - * All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -59,7 +57,7 @@ void yyerror(char *); %left '*' '+' '?' %{ -#include "ldefs.c" +#include "ldefs.h" #define YYSTYPE union _yystype_ union _yystype_ diff --git a/usr/src/cmd/sgs/lex/common/sub1.c b/usr/src/cmd/sgs/lex/common/sub1.c index e5fc89d2f6..60e8fa9a0c 100644 --- a/usr/src/cmd/sgs/lex/common/sub1.c +++ b/usr/src/cmd/sgs/lex/common/sub1.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,8 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. - * All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -30,7 +28,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "ldefs.c" +#include "ldefs.h" #include <limits.h> /* @@ -51,10 +49,10 @@ getl(CHR *p) if (t >= &p[BUF_SIZ]) error("definitions too long"); if (c == ' ' || c == '\t') { - if (!blank) { - blank = 1; - u = t; - } + if (!blank) { + blank = 1; + u = t; + } } else blank = 0; @@ -165,7 +163,7 @@ int alpha(int c) { return ('a' <= c && c <= 'z' || - 'A' <= c && c <= 'Z'); + 'A' <= c && c <= 'Z'); } int @@ -202,7 +200,8 @@ scopy(CHR *s, CHR *t) { CHR *i; i = t; - while (*i++ = *s++); + while (*i++ = *s++) + /* EMPTY */; } /* @@ -241,7 +240,8 @@ slength(CHR *s) int n; CHR *t; t = s; - for (n = 0; *t++; n++); + for (n = 0; *t++; n++) + /* EMPTY */; return (n); } @@ -289,12 +289,12 @@ ctrans(CHR **ss) int dd; warning("\\x is ANSI C hex escape"); if (digit((dd = *++*ss)) || - ('a' <= dd && dd <= 'f') || - ('A' <= dd && dd <= 'F')) { + ('a' <= dd && dd <= 'f') || + ('A' <= dd && dd <= 'F')) { c = 0; while (digit(dd) || - ('A' <= dd && dd <= 'F') || - ('a' <= dd && dd <= 'f')) { + ('A' <= dd && dd <= 'F') || + ('a' <= dd && dd <= 'f')) { if (digit(dd)) c = c*16 + dd - '0'; else if (dd >= 'a') @@ -340,7 +340,7 @@ cclinter(int sw) if (i) { for (j = 1; j < ncg; j++) { if ((symbol[j] && cindex[j] != i) || - (!symbol[j] && cindex[j] == i)) + (!symbol[j] && cindex[j] == i)) break; } } @@ -401,12 +401,12 @@ usescape(int c) case 'x': { int dd; if (digit((dd = gch())) || - ('A' <= dd && dd <= 'F') || - ('a' <= dd && dd <= 'f')) { + ('A' <= dd && dd <= 'F') || + ('a' <= dd && dd <= 'f')) { c = 0; while (digit(dd) || - ('A' <= dd && dd <= 'F') || - ('a' <= dd && dd <= 'f')) { + ('A' <= dd && dd <= 'F') || + ('a' <= dd && dd <= 'f')) { if (digit(dd)) c = c*16 + dd - '0'; else if (dd >= 'a') @@ -414,8 +414,8 @@ usescape(int c) else c = c*16 + 10 + dd - 'A'; if (!digit(peek) && - !('A' <= peek && peek <= 'F') && - !('a' <= peek && peek <= 'f')) + !('A' <= peek && peek <= 'F') && + !('a' <= peek && peek <= 'f')) break; dd = gch(); } @@ -467,7 +467,7 @@ cpycom(CHR *p) (void) fprintf(fout, "\n# line %d\n", yyline); else (void) fprintf(fout, - "\n# line %d \"%s\"\n", yyline, sargv[optind]); + "\n# line %d \"%s\"\n", yyline, sargv[optind]); (void) putc(*t++, fout); (void) putc(*t++, fout); @@ -489,7 +489,8 @@ cpycom(CHR *p) while (c == '*') { (void) putc((char)c, fout); if ((c = gch()) == '/') { - while ((c = gch()) == ' ' || c == '\t'); + while ((c = gch()) == ' ' || c == '\t') + /* EMPTY */; if (!space(c)) error("unacceptable statement"); prev = '\n'; @@ -521,7 +522,7 @@ cpyact(void) (void) fprintf(fout, "\n# line %d\n", yyline); else (void) fprintf(fout, - "\n# line %d \"%s\"\n", yyline, sargv[optind]); + "\n# line %d \"%s\"\n", yyline, sargv[optind]); while (!eof) { c = gch(); @@ -566,7 +567,7 @@ cpyact(void) if ((c = gch()) == '/') { (void) putc('/', fout); while ((c = gch()) == ' ' || - c == '\t' || c == '\n') + c == '\t' || c == '\n') (void) putwc(c, fout); goto swt; } @@ -631,7 +632,7 @@ gch(void) if (no_input) { if (!yyline) error("Cannot read from -- %s", - sargv[optind]); + sargv[optind]); if (optind < sargc-1) { yyline = 0; if (fin != stdin) @@ -639,7 +640,7 @@ gch(void) fin = fopen(sargv[++optind], "r"); if (fin == NULL) error("Cannot open file -- %s", - sargv[optind]); + sargv[optind]); peek = getwc(fin); } else break; @@ -667,7 +668,7 @@ mn2(int a, int d, int c) if (tptr >= treesize) { tptr++; error("Parse tree too big %s", - (treesize == TREESIZE ? "\nTry using %e num" : "")); + (treesize == TREESIZE ? "\nTry using %e num" : "")); } if (d >= treesize) { error("Parse error"); @@ -714,7 +715,7 @@ mn1(int a, int d) if (tptr >= treesize) { tptr++; error("Parse tree too big %s", - (treesize == TREESIZE ? "\nTry using %e num" : "")); + (treesize == TREESIZE ? "\nTry using %e num" : "")); } name[tptr] = a; left[tptr] = d; @@ -757,7 +758,7 @@ mn0(int a) if (tptr >= treesize) { tptr++; error("Parse tree too big %s", - (treesize == TREESIZE ? "\nTry using %e num" : "")); + (treesize == TREESIZE ? "\nTry using %e num" : "")); } name[tptr] = a; @@ -893,8 +894,8 @@ sect1dump(void) allprint(i); (void) putchar(' '); iswprint(ctable[i]) ? - (void) putwc(ctable[i], stdout) : - (void) printf("%d", ctable[i]); + (void) putwc(ctable[i], stdout) : + (void) printf("%d", ctable[i]); (void) putchar('\n'); } } @@ -917,7 +918,7 @@ treedump(void) for (t = 0; t < tptr; t++) { (void) printf("%4d ", t); parent[t] ? (void) printf("p=%4d", parent[t]) : - (void) printf(" "); + (void) printf(" "); (void) printf(" "); if (!ISOPERATOR(name[t])) { allprint(name[t]); diff --git a/usr/src/cmd/sgs/lex/common/sub2.c b/usr/src/cmd/sgs/lex/common/sub2.c index 722a789d08..4f7ea0aa0b 100644 --- a/usr/src/cmd/sgs/lex/common/sub2.c +++ b/usr/src/cmd/sgs/lex/common/sub2.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,8 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. - * All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -30,7 +28,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "ldefs.c" +#include "ldefs.h" static void add(int **array, int n); static void follow(int v); @@ -80,8 +78,9 @@ cfoll(int v) for (j = 1; j < ncg; j++) if (symbol[j]) { for (k = 0; p + k < pcptr; k++) - if (cindex[j] == *(p + k)) - break; + if (cindex[j] == + *(p + k)) + break; if (p + k >= pcptr) *pcptr++ = cindex[j]; } @@ -163,7 +162,7 @@ add(int **array, int n) if (nxtpos >= positions+maxpos) error( "Too many positions %s", - (maxpos == MAXPOS ? "\nTry using %p num" : "")); + (maxpos == MAXPOS ? "\nTry using %p num" : "")); } static void @@ -367,8 +366,9 @@ cgoto(void) q = (CHR *)left[curpos]; while (*q) { for (j = 1; j < ncg; j++) - if (cindex[j] == *q) - symbol[j] = TRUE; + if (cindex[j] == *q) + symbol[j] = + TRUE; q++; } break; @@ -384,7 +384,7 @@ cgoto(void) default: warning( "bad switch cgoto %d state %d", - curpos, s); + curpos, s); break; #endif } @@ -420,8 +420,8 @@ cgoto(void) if (stnum+1 >= nstates) { stnum++; error("Too many states %s", - (nstates == NSTATES ? - "\nTry using %n num":"")); + (nstates == NSTATES ? + "\nTry using %n num":"")); } add(state, ++stnum); #ifdef DEBUG @@ -465,8 +465,8 @@ nextstate(int s, int c) curpos = *pos++; j = name[curpos]; if ((!ISOPERATOR(j)) && j == c || - j == RSTR && c == right[curpos] || - j == RCCL && member(c, (CHR *) left[curpos])) { + j == RSTR && c == right[curpos] || + j == RCCL && member(c, (CHR *) left[curpos])) { f = foll[curpos]; number = *f; newpos = f+1; @@ -549,7 +549,7 @@ packtrans(int st, CHR *tch, int *tst, int cnt, int tryit) } else { fprintf(stderr, "lex`sub2`packtran: tch[%d] out of bounds (%d)\n", - i, tch[i]); + i, tch[i]); } } for (i = 0; i < cnt; i++) { @@ -577,7 +577,7 @@ packtrans(int st, CHR *tch, int *tst, int cnt, int tryit) if (temp[i] != -1) { cwork[k] = i; swork[k++] = - (temp[i] == -2 ? -1 : temp[i]); + (temp[i] == -2 ? -1 : temp[i]); } cwork[k] = 0; #ifdef PC @@ -623,8 +623,8 @@ packtrans(int st, CHR *tch, int *tst, int cnt, int tryit) } /* ach[j] == nchar[p] */ if (ast[j] != nexts[++p] || - ast[j] == -1 || - (cpackflg[st] && ach[j] != match[ach[j]])) + ast[j] == -1 || + (cpackflg[st] && ach[j] != match[ach[j]])) diff++; j++; } @@ -645,7 +645,7 @@ packtrans(int st, CHR *tch, int *tst, int cnt, int tryit) #ifdef DEBUG if (debug) (void) printf("select st %d for st %d diff %d\n", - cmin, st, cval); + cmin, st, cval); #endif #ifdef PS if (cmin != -1) { /* if we can use st cmin */ @@ -671,8 +671,8 @@ packtrans(int st, CHR *tch, int *tst, int cnt, int tryit) } /* ach[j] == nchar[p-1] */ if (ast[j] != nexts[p] || - ast[j] == -1 || - (cpackflg[st] && ach[j] != match[ach[j]])) { + ast[j] == -1 || + (cpackflg[st] && ach[j] != match[ach[j]])) { k++; nchar[nptr] = ach[j]; nexts[++nptr] = ast[j]; @@ -708,7 +708,7 @@ nopack: if (nptr > ntrans) error( "Too many transitions %s", - (ntrans == NTRANS ? "\nTry using %a num" : "")); + (ntrans == NTRANS ? "\nTry using %a num" : "")); } #ifdef DEBUG @@ -841,8 +841,9 @@ acompute(int s) for (i = 0; i < k; i++) if (temp[i] != 0) { ratfor ? - fprintf(fout, "data vstop(%d)/%d/\n", aptr, temp[i]) : - fprintf(fout, "%d,\n", temp[i]); + fprintf(fout, "data vstop(%d)/%d/\n", + aptr, temp[i]) : + fprintf(fout, "%d,\n", temp[i]); #ifdef DEBUG if (debug) (void) printf("%d ", temp[i]); @@ -851,8 +852,8 @@ acompute(int s) } for (i = 0; i < n; i++) { /* copy fall back actions - all neg */ ratfor ? - fprintf(fout, "data vstop(%d)/%d/\n", aptr, neg[i]) : - fprintf(fout, "%d,\n", neg[i]); + fprintf(fout, "data vstop(%d)/%d/\n", aptr, neg[i]) : + fprintf(fout, "%d,\n", neg[i]); aptr++; #ifdef DEBUG if (debug) @@ -864,7 +865,7 @@ acompute(int s) (void) putchar('\n'); #endif ratfor ? fprintf(fout, "data vstop (%d)/0/\n", aptr) : - fprintf(fout, "0, \n"); + fprintf(fout, "0, \n"); aptr++; } @@ -955,7 +956,7 @@ layout(void) if (debug) (void) printf( "bot,top %d, %d startup begins %d\n", - bot, top, startup); + bot, top, startup); #endif if (chset) { do { @@ -971,7 +972,7 @@ layout(void) #if DEBUG if (debug) (void) printf(" startup will be %d\n", - startup); + startup); #endif /* have found place */ for (j = bot; j <= top; j++) { @@ -979,7 +980,7 @@ layout(void) if (ctable[nchar[j]] <= 0) (void) printf( "j %d nchar %d ctable.nch %d\n", - j, nchar[j], ctable[nchar[k]]); + j, nchar[j], ctable[nchar[k]]); verify[k] = i + 1; /* state number + 1 */ advance[k] = nexts[j+1]+1; if (yytop < k) @@ -1111,7 +1112,7 @@ layout(void) for (i = 0; i < casecount; i += 8) { for (j = 0; j < 8; j++) (void) fprintf(fout, "%d,", i+j < NACTIONS ? - extra[i+j] : 0); + extra[i+j] : 0); (void) putc('\n', fout); } (void) fprintf(fout, "0};\n"); @@ -1179,7 +1180,7 @@ bprint(char *a, char *s, int n) k = i+j; if (k < n) (void) fprintf(fout, - ", %s (%d)/%d/", s, k, a[k]); + ", %s (%d)/%d/", s, k, a[k]); } (void) putc('\n', fout); } diff --git a/usr/src/cmd/sgs/lex/common/sub3.c b/usr/src/cmd/sgs/lex/common/sub3.c index b42d18f33c..652b4dc71b 100644 --- a/usr/src/cmd/sgs/lex/common/sub3.c +++ b/usr/src/cmd/sgs/lex/common/sub3.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,8 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. - * All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -43,7 +41,7 @@ #include <stdlib.h> #include <widec.h> #include <search.h> -#include "ldefs.c" +#include "ldefs.h" /* * "lchar" stands for linearized character. It is a variant of @@ -138,17 +136,17 @@ remch(wchar_t c) */ if (!handleeuc) { if (!isascii(c)) - if (iswprint(c)) - warning( + if (iswprint(c)) + warning( "Non-ASCII character '%wc' in pattern; use -w or -e lex option.", c); - else warning( + else warning( "Non-ASCII character of value %#x in pattern; use -w or -e lex option.", c); /* In any case, we don't need to construct ncgidtbl[]. */ return; } lsearch(&lc, yycgidtbl, - (size_t *)&ncgidtbl, sizeof (lchar), cmplc); + (size_t *)&ncgidtbl, sizeof (lchar), cmplc); } void @@ -214,14 +212,16 @@ yycgid(wchar_t c) while (last >= 0) { int i = (first+last)/2; if (lc == yycgidtbl[i]) - return (2*i); /* lc exactly matches an element. */ + return (2*i); /* lc exactly matches an element. */ else if (yycgidtbl[i] < lc) { - if (lc < yycgidtbl[i+1]) - return (2*i+1); /* lc is in between two elements. */ + if (lc < yycgidtbl[i+1]) { + /* lc is in between two elements */ + return (2*i+1); + } else - first = i + 1; + first = i + 1; } else - last = i - 1; + last = i - 1; } error( "system error in yycgid():binary search failed for c=0x%04x\n", c); @@ -243,20 +243,21 @@ repbycgid(void) c = name[i]; if (!ISOPERATOR(c)) { /* If not an operator, it must be a char. */ - name[i] = yycgid((wchar_t)c); /* So replace it. */ + name[i] = yycgid((wchar_t)c); /* So replace it. */ #ifdef DEBUG - if (debug) { - printf("name[%d]:'%c'->%d;\n", i, c, name[i]); - } + if (debug) { + printf("name[%d]:'%c'->%d;\n", i, c, name[i]); + } #endif } else if (c == RSTR) { c = right[i]; right[i] = yycgid((wchar_t)c); #ifdef DEBUG - if (debug) { - printf( - "name[%d].right:'%c'->%d;\n", i, c, right[i]); - } + if (debug) { + printf( + "name[%d].right:'%c'->%d;\n", + i, c, right[i]); + } #endif } else if ((c == RCCL) || (c == RNCCL)) { CHR cc, *s; @@ -308,7 +309,7 @@ repbycgid(void) low = yycgid(*s++); high = yycgid(*s++); for (i = low; i <= high; ++i) - setsymbol(i); + setsymbol(i); } else { setsymbol(yycgid(cc)); } @@ -318,12 +319,12 @@ repbycgid(void) s = ccptr; m = 0; for (j = 0; j < ncg; ++j) - if (symbol[j]) { - ccltoken[m++] = (CHR)j; + if (symbol[j]) { + ccltoken[m++] = (CHR)j; #ifdef DEBUG - if (debug) printf("%d, ", j); + if (debug) printf("%d, ", j); #endif - } + } #ifdef DEBUG if (debug) printf("}\n"); @@ -333,13 +334,14 @@ repbycgid(void) while (ccp < ccptr && scomp(ccltoken, ccp) != 0) ccp++; if (ccp < ccptr) { /* character class found in ccl */ - left[i] = (int)ccp; + left[i] = (int)ccp; } else { /* not in ccl, add it */ - left[i] = (int)ccptr; - scopy(ccltoken, ccptr); - ccptr += slength(ccltoken) + 1; - if (ccptr > ccl + CCLSIZE) - error("Too many large character classes"); + left[i] = (int)ccptr; + scopy(ccltoken, ccptr); + ccptr += slength(ccltoken) + 1; + if (ccptr > ccl + CCLSIZE) + error( + "Too many large character classes"); } cclinter(c == RCCL); } else if (c == DOT) { @@ -361,7 +363,8 @@ repbycgid(void) } *ccptr++ = 0; if (ccptr > ccl + CCLSIZE) - error("Too many large character classes"); + error( + "Too many large character classes"); } /* Mimic mn1(RCCL,psave)... */ name[i] = RCCL; diff --git a/usr/src/cmd/sgs/lex/i386/Makefile b/usr/src/cmd/sgs/lex/i386/Makefile index 50b02f1fd5..c8f395edfa 100644 --- a/usr/src/cmd/sgs/lex/i386/Makefile +++ b/usr/src/cmd/sgs/lex/i386/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 1993,2003 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -40,7 +39,7 @@ all: $(PROG) all_lib: $(LIBS) -install: all $(ROOTCCSBINPROG) $(ROOTFORMS) +install: all $(ROOTPROG) $(ROOTFORMS) $(ROOTCCSBINLINK) install_lib: all_lib $(ROOTLIBS) $(ROOTLINKS) $(DYNLINKLIB) $(ROOTLINT) diff --git a/usr/src/cmd/sgs/lex/sparc/Makefile b/usr/src/cmd/sgs/lex/sparc/Makefile index 8baef54a03..6d8f3eb2ed 100644 --- a/usr/src/cmd/sgs/lex/sparc/Makefile +++ b/usr/src/cmd/sgs/lex/sparc/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 1993,2003 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -40,7 +39,7 @@ all: $(PROG) all_lib: $(LIBS) -install: all $(ROOTCCSBINPROG) $(ROOTFORMS) +install: all $(ROOTPROG) $(ROOTFORMS) $(ROOTCCSBINLINK) install_lib: all_lib $(ROOTLIBS) $(ROOTLINKS) $(DYNLINKLIB) $(ROOTLINT) diff --git a/usr/src/cmd/sgs/lorder/Makefile b/usr/src/cmd/sgs/lorder/Makefile index 6799aa44cb..f50cab7252 100644 --- a/usr/src/cmd/sgs/lorder/Makefile +++ b/usr/src/cmd/sgs/lorder/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,24 +19,26 @@ # CDDL HEADER END # # -#ident "%Z%%M% %I% %E% SMI" +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. # -# Copyright (c) 1993 by Sun Microsystems, Inc. +#ident "%Z%%M% %I% %E% SMI" # # cmd/sgs/lorder/Makefile # PROG= lorder -SRCS= $(PROG:%=%.sh +SRCS= $(PROG:%=%.sh) -include ../../Makefile.cmd +include $(SRC)/cmd/Makefile.cmd +include $(SRC)/cmd/sgs/Makefile.com .KEEP_STATE: all: $(PROG) -install: all $(ROOTCCSBINPROG) +install: all $(VAR_SGSBINPROG) $(VAR_SGSCCSLINK) clean: diff --git a/usr/src/cmd/sgs/m4/i386/Makefile b/usr/src/cmd/sgs/m4/i386/Makefile index 9020a9d2bb..2e71ec1a26 100644 --- a/usr/src/cmd/sgs/m4/i386/Makefile +++ b/usr/src/cmd/sgs/m4/i386/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,12 +19,11 @@ # CDDL HEADER END # # -#ident "%Z%%M% %I% %E% SMI" -# -# Copyright 2005 Sun Microsystems, Inc. -# All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +#ident "%Z%%M% %I% %E% SMI" +# # cmd/sgs/m4/i386/Makefile # @@ -33,6 +31,7 @@ PROG= m4 XPG4PROG= m4 include ../../../Makefile.cmd +include ../../../sgs/Makefile.var COBJS= m4.o m4ext.o m4macs.o @@ -79,7 +78,7 @@ $(XPG4OBJS): m4objs.xpg4 m4objs m4objs.xpg4: -@mkdir -p $@ -install: all $(ROOTCCSBINPROG) $(ROOTXPG4PROG) +install: all $(VAR_SGSBINPROG) $(ROOTXPG4PROG) $(VAR_SGSCCSLINK) clean: $(RM) $(ALLOBJS) $(CLEANFILES) diff --git a/usr/src/cmd/sgs/m4/sparc/Makefile b/usr/src/cmd/sgs/m4/sparc/Makefile index 43ecaf72a1..8673dd163a 100644 --- a/usr/src/cmd/sgs/m4/sparc/Makefile +++ b/usr/src/cmd/sgs/m4/sparc/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,12 +19,11 @@ # CDDL HEADER END # # -#ident "%Z%%M% %I% %E% SMI" -# -# Copyright 2005 Sun Microsystems, Inc. -# All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +#ident "%Z%%M% %I% %E% SMI" +# # cmd/sgs/m4/sparc/Makefile # @@ -33,6 +31,7 @@ PROG= m4 XPG4PROG= m4 include ../../../Makefile.cmd +include ../../../sgs/Makefile.var COBJS= m4.o m4ext.o m4macs.o @@ -79,8 +78,7 @@ $(XPG4OBJS): m4objs.xpg4 m4objs m4objs.xpg4: -@mkdir -p $@ -install: all $(ROOTCCSBINPROG) $(ROOTXPG4PROG) - +install: all $(VAR_SGSBINPROG) $(ROOTXPG4PROG) $(VAR_SGSCCSLINK) clean: $(RM) $(ALLOBJS) $(CLEANFILES) diff --git a/usr/src/cmd/sgs/mcs/Makefile.com b/usr/src/cmd/sgs/mcs/Makefile.com index 8ba93d5404..6a093dedd2 100644 --- a/usr/src/cmd/sgs/mcs/Makefile.com +++ b/usr/src/cmd/sgs/mcs/Makefile.com @@ -20,7 +20,7 @@ # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -29,7 +29,7 @@ PROG= mcs STRIPFILE= strip -ROOTLINKS= $(ROOTCCSBIN)/$(STRIPFILE) +ROOTLINKS= $(VAR_SGSBIN)/$(STRIPFILE) include $(SRC)/cmd/Makefile.cmd include $(SRC)/cmd/sgs/Makefile.com diff --git a/usr/src/cmd/sgs/mcs/Makefile.targ b/usr/src/cmd/sgs/mcs/Makefile.targ index d81393ab30..7188496dd5 100644 --- a/usr/src/cmd/sgs/mcs/Makefile.targ +++ b/usr/src/cmd/sgs/mcs/Makefile.targ @@ -20,17 +20,20 @@ # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" # +ROOTSTRIPFILEPROG= $(STRIPFILE:%=$(ROOTCCSBIN)/%) +ROOTSTRIPFILEPROG64= $(STRIPFILE:%=$(ROOTCCSBIN64)/%) + %.o: ../common/%.c $(COMPILE.c) $< $(POST_PROCESS_O) -all: $(PROG) +all: $(PROG) $(STRIPFILE) clean: $(RM) $(CLEANFILES) @@ -38,20 +41,25 @@ clean: delete: $(RM) $(PROG) -install \ -package: all $(ROOTCCSBINPROG) $(ROOTLINKS) - lint: $(LINTOUT32) $(SGSLINTOUT) $(PROG): $(OBJS) $(LINK.c) -o $@ $(OBJS) $(LDLIBS) $(POST_PROCESS) -$(ROOTLINKS): $(ROOTCCSBINPROG) +$(STRIPFILE): + +$(ROOTLINKS): $(VAR_SGSBINPROG) $(RM) $@ - $(LN) $(ROOTCCSBINPROG) $@ + $(LN) $(VAR_SGSBINPROG) $@ + +$(STRIPSYMLINK): $(RM) $(ROOTSTRIPFILEPROG) + $(SYMLINK) ../../bin/$(STRIPFILE) $(ROOTSTRIPFILEPROG) + +$(STRIPSYMLINK64): $(RM) $(ROOTSTRIPFILEPROG64) + $(SYMLINK) ../../bin/$(MACH)/$(STRIPFILE) $(ROOTSTRIPFILEPROG64) -$(ROOTCCSBIN64)/%: % +$(ROOTBIN64)/%: % $(INS.file) include $(SRC)/cmd/Makefile.targ diff --git a/usr/src/cmd/sgs/mcs/amd64/Makefile b/usr/src/cmd/sgs/mcs/amd64/Makefile index 6e1ae1b3c0..5b40ec0893 100644 --- a/usr/src/cmd/sgs/mcs/amd64/Makefile +++ b/usr/src/cmd/sgs/mcs/amd64/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -37,8 +36,13 @@ ELFLIBDIR= $(ELFLIBDIR64) LINTFLAGS64 += $(VAR_LINTFLAGS64) -ROOTCCSBINPROG= $(ROOTCCSBINPROG64) -ROOTLINKS= $(ROOTCCSBIN64)/$(STRIPFILE) +ROOTLINKS= $(VAR_SGSBIN64)/$(STRIPFILE) +VAR_SGSBINPROG= $(VAR_SGSBINPROG64) + +install \ +package: all $(VAR_SGSBINPROG64) $(ROOTLINKS) $(VAR_SGSCCSLINK64) + $(RM) $(ROOTSTRIPFILEPROG64) + $(SYMLINK) ../../../bin/$(MACH64)/$(STRIPFILE) $(ROOTSTRIPFILEPROG64) include ../Makefile.targ include ../../Makefile.sub.64 diff --git a/usr/src/cmd/sgs/mcs/i386/Makefile b/usr/src/cmd/sgs/mcs/i386/Makefile index 0955bc546b..139cc7b7fa 100644 --- a/usr/src/cmd/sgs/mcs/i386/Makefile +++ b/usr/src/cmd/sgs/mcs/i386/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -22,11 +21,16 @@ # #ident "%Z%%M% %I% %E% SMI" # -# Copyright (c) 1996 by Sun Microsystems, Inc. -# All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. include ../Makefile.com .KEEP_STATE: include ../Makefile.targ + +install \ +package: all $(VAR_SGSBINPROG) $(ROOTLINKS) $(VAR_SGSCCSLINK) + $(RM) $(ROOTSTRIPFILEPROG) + $(SYMLINK) ../../bin/$(STRIPFILE) $(ROOTSTRIPFILEPROG) diff --git a/usr/src/cmd/sgs/mcs/sparc/Makefile b/usr/src/cmd/sgs/mcs/sparc/Makefile index 0955bc546b..9ace90197f 100644 --- a/usr/src/cmd/sgs/mcs/sparc/Makefile +++ b/usr/src/cmd/sgs/mcs/sparc/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -22,11 +21,17 @@ # #ident "%Z%%M% %I% %E% SMI" # -# Copyright (c) 1996 by Sun Microsystems, Inc. -# All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. include ../Makefile.com .KEEP_STATE: include ../Makefile.targ + +install \ +package: all $(VAR_SGSBINPROG) $(ROOTLINKS) $(VAR_SGSCCSLINK) + $(RM) $(ROOTSTRIPFILEPROG) + $(SYMLINK) ../../bin/$(STRIPFILE) $(ROOTSTRIPFILEPROG) + diff --git a/usr/src/cmd/sgs/mcs/sparcv9/Makefile b/usr/src/cmd/sgs/mcs/sparcv9/Makefile index 51526c7b52..29d44b58f0 100644 --- a/usr/src/cmd/sgs/mcs/sparcv9/Makefile +++ b/usr/src/cmd/sgs/mcs/sparcv9/Makefile @@ -2,10 +2,9 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. + # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions @@ -20,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 1998-2003 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -37,8 +36,13 @@ ELFLIBDIR= $(ELFLIBDIR64) LINTFLAGS64 += $(VAR_LINTFLAGS64) -ROOTCCSBINPROG= $(ROOTCCSBINPROG64) -ROOTLINKS= $(ROOTCCSBIN64)/$(STRIPFILE) +ROOTLINKS= $(VAR_SGSBIN64)/$(STRIPFILE) +VAR_SGSBINPROG= $(VAR_SGSBINPROG64) + +install \ +package: all $(VAR_SGSBINPROG64) $(ROOTLINKS) $(VAR_SGSCCSLINK64) + $(RM) $(ROOTSTRIPFILEPROG64) + $(SYMLINK) ../../../bin/$(MACH64)/$(STRIPFILE) $(ROOTSTRIPFILEPROG64) include ../Makefile.targ include ../../Makefile.sub.64 diff --git a/usr/src/cmd/sgs/nm/amd64/Makefile b/usr/src/cmd/sgs/nm/amd64/Makefile index d869a6235f..949114f3d0 100644 --- a/usr/src/cmd/sgs/nm/amd64/Makefile +++ b/usr/src/cmd/sgs/nm/amd64/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -64,7 +64,7 @@ $(PROG): $(OBJS) ../../sgsdemangler/amd64/libdemangle.a $(POST_PROCESS) package \ -install: all $(ROOTCCSBINPROG64) +install: all $(VAR_SGSBINPROG64) $(VAR_SGSCCSLINK64) clean: $(RM) $(OBJS) $(CLEANFILES) diff --git a/usr/src/cmd/sgs/nm/i386/Makefile b/usr/src/cmd/sgs/nm/i386/Makefile index 5b51da057e..a129cd5840 100644 --- a/usr/src/cmd/sgs/nm/i386/Makefile +++ b/usr/src/cmd/sgs/nm/i386/Makefile @@ -21,7 +21,7 @@ # # ident "%Z%%M% %I% %E% SMI" # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # cmd/sgs/nm/i386/Makefile @@ -87,7 +87,7 @@ objs.xpg4: -@mkdir -p $@ package \ -install: all $(ROOTCCSBINPROG) $(ROOTXPG4PROG) +install: all $(VAR_SGSBINPROG) $(ROOTXPG4PROG) $(VAR_SGSCCSLINK) clean: $(RM) $(OBJS) $(XPG4OBJS) $(CLEANFILES) diff --git a/usr/src/cmd/sgs/nm/sparc/Makefile b/usr/src/cmd/sgs/nm/sparc/Makefile index 1933f53c42..a8ec896cb2 100644 --- a/usr/src/cmd/sgs/nm/sparc/Makefile +++ b/usr/src/cmd/sgs/nm/sparc/Makefile @@ -21,7 +21,7 @@ # # ident "%Z%%M% %I% %E% SMI" # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # cmd/sgs/nm/sparc/Makefile @@ -86,7 +86,7 @@ objs.xpg4: -@mkdir -p $@ package \ -install: all $(ROOTCCSBINPROG) $(ROOTXPG4PROG) +install: all $(VAR_SGSBINPROG) $(ROOTXPG4PROG) $(VAR_SGSCCSLINK) clean: $(RM) $(OBJS) $(XPG4OBJS) $(CLEANFILES) diff --git a/usr/src/cmd/sgs/nm/sparcv9/Makefile b/usr/src/cmd/sgs/nm/sparcv9/Makefile index 0d5b102aa7..b7f224b267 100644 --- a/usr/src/cmd/sgs/nm/sparcv9/Makefile +++ b/usr/src/cmd/sgs/nm/sparcv9/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -67,7 +67,7 @@ $(PROG): $(OBJS) ../../sgsdemangler/sparcv9/libdemangle.a $(POST_PROCESS) package \ -install: all $(ROOTCCSBINPROG64) +install: all $(VAR_SGSBINPROG64) $(VAR_SGSCCSLINK64) clean: $(RM) $(OBJS) $(CLEANFILES) diff --git a/usr/src/cmd/sgs/packages/common/prototype_com b/usr/src/cmd/sgs/packages/common/prototype_com index 1e54b683a2..50cef0c8c6 100644 --- a/usr/src/cmd/sgs/packages/common/prototype_com +++ b/usr/src/cmd/sgs/packages/common/prototype_com @@ -71,13 +71,20 @@ f none $SGSDIR/usr/bin/sotruss=usr/bin/sotruss 755 root bin f none $SGSDIR/usr/bin/whocalls=usr/bin/whocalls 755 root bin d none $SGSDIR/usr/ccs 755 root bin d none $SGSDIR/usr/ccs/bin 755 root bin -f none $SGSDIR/usr/ccs/bin/dump=usr/ccs/bin/dump 0555 root bin -f none $SGSDIR/usr/ccs/bin/elfdump=usr/ccs/bin/elfdump 0555 root bin -f none $SGSDIR/usr/ccs/bin/lari=usr/ccs/bin/lari 0555 root bin -f none $SGSDIR/usr/ccs/bin/ld=usr/ccs/bin/ld 755 root bin -f none $SGSDIR/usr/ccs/bin/nm=usr/ccs/bin/nm 0555 root bin -f none $SGSDIR/usr/ccs/bin/mcs=usr/ccs/bin/mcs 0555 root bin -l none $SGSDIR/usr/ccs/bin/strip=../../../usr/ccs/bin/mcs +f none $SGSDIR/usr/bin/dump=usr/bin/dump 0555 root bin +s none $SGSDIR/usr/ccs/bin/dump=../../bin/dump +f none $SGSDIR/usr/bin/elfdump=usr/bin/elfdump 0555 root bin +s none $SGSDIR/usr/ccs/bin/elfdump=../../bin/elfdump +f none $SGSDIR/usr/bin/lari=usr/bin/lari 0555 root bin +s none $SGSDIR/usr/ccs/bin/lari=../../bin/lari +f none $SGSDIR/usr/bin/ld=usr/bin/ld 755 root bin +s none $SGSDIR/usr/ccs/bin/ld=../../bin/ld +f none $SGSDIR/usr/bin/nm=usr/bin/nm 0555 root bin +s none $SGSDIR/usr/ccs/bin/nm=../../bin/nm +f none $SGSDIR/usr/bin/mcs=usr/bin/mcs 0555 root bin +s none $SGSDIR/usr/ccs/bin/mcs=../../bin/mcs +l none $SGSDIR/usr/bin/strip=./mcs +s none $SGSDIR/usr/ccs/bin/strip=../../bin/strip d none $SGSDIR/usr/include 755 root bin f none $SGSDIR/usr/include/dlfcn.h=usr/include/dlfcn.h 644 root bin f none $SGSDIR/usr/include/libelf.h=usr/include/libelf.h 644 root bin diff --git a/usr/src/cmd/sgs/packages/common/prototype_i386 b/usr/src/cmd/sgs/packages/common/prototype_i386 index b0c191514a..99ad8d802d 100644 --- a/usr/src/cmd/sgs/packages/common/prototype_i386 +++ b/usr/src/cmd/sgs/packages/common/prototype_i386 @@ -55,12 +55,18 @@ f none $SGSDIR/usr/bin/amd64/crle=usr/bin/amd64/crle 555 root bin f none $SGSDIR/usr/bin/amd64/moe=usr/bin/amd64/moe 555 root bin f none $SGSDIR/usr/bin/amd64/pvs=usr/bin/amd64/pvs 555 root bin d none $SGSDIR/usr/ccs/bin/amd64 755 root bin -f none $SGSDIR/usr/ccs/bin/amd64/dump=usr/ccs/bin/amd64/dump 0555 root bin -f none $SGSDIR/usr/ccs/bin/amd64/elfdump=usr/ccs/bin/amd64/elfdump 0555 root bin -f none $SGSDIR/usr/ccs/bin/amd64/ld=usr/ccs/bin/amd64/ld 755 root bin -f none $SGSDIR/usr/ccs/bin/amd64/nm=usr/ccs/bin/amd64/nm 0555 root bin -f none $SGSDIR/usr/ccs/bin/amd64/mcs=usr/ccs/bin/amd64/mcs 0555 root bin -l none $SGSDIR/usr/ccs/bin/amd64/strip=../../../../usr/ccs/bin/amd64/mcs +f none $SGSDIR/usr/bin/amd64/dump=usr/bin/amd64/dump 0555 root bin +s none $SGSDIR/usr/ccs/bin/amd64/dump=../../../bin/amd64/dump +f none $SGSDIR/usr/bin/amd64/elfdump=usr/bin/amd64/elfdump 0555 root bin +s none $SGSDIR/usr/ccs/bin/amd64/elfdump=../../../bin/amd64/elfdump +f none $SGSDIR/usr/bin/amd64/ld=usr/bin/amd64/ld 755 root bin +s none $SGSDIR/usr/ccs/bin/amd64/ld=../../../bin/amd64/ld +f none $SGSDIR/usr/bin/amd64/nm=usr/bin/amd64/nm 0555 root bin +s none $SGSDIR/usr/ccs/bin/amd64/nm=../../../bin/amd64/nm +f none $SGSDIR/usr/bin/amd64/mcs=usr/bin/amd64/mcs 0555 root bin +s none $SGSDIR/usr/ccs/bin/amd64/mcs=../../../bin/amd64/mcs +l none $SGSDIR/usr/bin/amd64/strip=./mcs +s none $SGSDIR/usr/ccs/bin/amd64/strip=../../../bin/amd64/strip !include prototype_i386_ext_usr_lib d none $SGSDIR/usr/lib/link_audit/amd64 755 root bin s none $SGSDIR/usr/lib/link_audit/64=amd64 diff --git a/usr/src/cmd/sgs/packages/common/prototype_sparc b/usr/src/cmd/sgs/packages/common/prototype_sparc index 92d45bafc3..05314a74ae 100644 --- a/usr/src/cmd/sgs/packages/common/prototype_sparc +++ b/usr/src/cmd/sgs/packages/common/prototype_sparc @@ -55,12 +55,18 @@ f none $SGSDIR/usr/bin/sparcv9/crle=usr/bin/sparcv9/crle 555 root bin f none $SGSDIR/usr/bin/sparcv9/moe=usr/bin/sparcv9/moe 555 root bin f none $SGSDIR/usr/bin/sparcv9/pvs=usr/bin/sparcv9/pvs 555 root bin d none $SGSDIR/usr/ccs/bin/sparcv9 755 root bin -f none $SGSDIR/usr/ccs/bin/sparcv9/dump=usr/ccs/bin/sparcv9/dump 0555 root bin -f none $SGSDIR/usr/ccs/bin/sparcv9/elfdump=usr/ccs/bin/sparcv9/elfdump 0555 root bin -f none $SGSDIR/usr/ccs/bin/sparcv9/ld=usr/ccs/bin/sparcv9/ld 755 root bin -f none $SGSDIR/usr/ccs/bin/sparcv9/nm=usr/ccs/bin/sparcv9/nm 0555 root bin -f none $SGSDIR/usr/ccs/bin/sparcv9/mcs=usr/ccs/bin/sparcv9/mcs 0555 root bin -l none $SGSDIR/usr/ccs/bin/sparcv9/strip=../../../../usr/ccs/bin/sparcv9/mcs +f none $SGSDIR/usr/bin/sparcv9/dump=usr/bin/sparcv9/dump 0555 root bin +s none $SGSDIR/usr/ccs/bin/sparcv9/dump=../../../bin/sparcv9/dump +f none $SGSDIR/usr/bin/sparcv9/elfdump=usr/bin/sparcv9/elfdump 0555 root bin +s none $SGSDIR/usr/ccs/bin/sparcv9/elfdump=../../../bin/sparcv9/elfdump +f none $SGSDIR/usr/bin/sparcv9/ld=usr/bin/sparcv9/ld 755 root bin +s none $SGSDIR/usr/ccs/bin/sparcv9/ld=../../../bin/sparcv9/ld +f none $SGSDIR/usr/bin/sparcv9/nm=usr/bin/sparcv9/nm 0555 root bin +f none $SGSDIR/usr/ccs/bin/sparcv9/nm=../../../bin/sparcv9/nm 0555 root bin +f none $SGSDIR/usr/bin/sparcv9/mcs=usr/bin/sparcv9/mcs 0555 root bin +f none $SGSDIR/usr/ccs/bin/sparcv9/mcs=../../../bin/sparcv9/mcs 0555 root bin +l none $SGSDIR/usr/bin/sparcv9/strip=./mcs +s none $SGSDIR/usr/ccs/bin/sparcv9/strip=../../../bin/sparcv9/strip f none $SGSDIR/usr/lib/ld.so=usr/lib/ld.so 755 root bin !include prototype_sparc_ext_usr_lib d none $SGSDIR/usr/lib/link_audit/sparcv9 755 root bin diff --git a/usr/src/cmd/sgs/prof/i386/Makefile b/usr/src/cmd/sgs/prof/i386/Makefile index daa45ec8cc..47ecdbdc3f 100644 --- a/usr/src/cmd/sgs/prof/i386/Makefile +++ b/usr/src/cmd/sgs/prof/i386/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -22,7 +21,7 @@ # # ident "%Z%%M% %I% %E% SMI" # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # cmd/sgs/prof/i386/Makefile @@ -60,7 +59,7 @@ $(PROG): $(OBJS) $(LINK.c) $(OBJS) -o $@ $(LDLIBS) $(POST_PROCESS) -install: all $(ROOTCCSBINPROG) +install: all $(ROOTPROG) $(ROOTCCSBINLINK) clean: $(RM) $(OBJS) $(CLEANFILES) diff --git a/usr/src/cmd/sgs/prof/sparc/Makefile b/usr/src/cmd/sgs/prof/sparc/Makefile index 4ea5a3ff0e..c0d3e5f517 100644 --- a/usr/src/cmd/sgs/prof/sparc/Makefile +++ b/usr/src/cmd/sgs/prof/sparc/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -22,7 +21,7 @@ # # ident "%Z%%M% %I% %E% SMI" # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # cmd/sgs/prof/sparc/Makefile @@ -60,7 +59,7 @@ $(PROG): $(OBJS) $(LINK.c) $(OBJS) -o $@ $(LDLIBS) $(POST_PROCESS) -install: all $(ROOTCCSBINPROG) +install: all $(ROOTPROG) $(ROOTCCSBINLINK) clean: $(RM) $(OBJS) $(CLEANFILES) diff --git a/usr/src/cmd/sgs/ranlib/Makefile b/usr/src/cmd/sgs/ranlib/Makefile index 98fc0478c7..fbc5a469fd 100644 --- a/usr/src/cmd/sgs/ranlib/Makefile +++ b/usr/src/cmd/sgs/ranlib/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,14 +19,14 @@ # CDDL HEADER END # # -# Copyright (c) 1995 by Sun Microsystems, Inc. -# All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. # #ident "%Z%%M% %I% %E% SMI" PROG= ranlib -SRCS= $(PROG:%=%.sh +SRCS= $(PROG:%=%.sh) include ../../Makefile.cmd @@ -35,7 +34,7 @@ include ../../Makefile.cmd all: $(PROG) -install: all $(ROOTCCSBINPROG) +install: all $(ROOTPROG) $(ROOTCCSBINLINK) clean: diff --git a/usr/src/cmd/sgs/size/amd64/Makefile b/usr/src/cmd/sgs/size/amd64/Makefile index 27b3f087ef..15f835c026 100644 --- a/usr/src/cmd/sgs/size/amd64/Makefile +++ b/usr/src/cmd/sgs/size/amd64/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -48,9 +47,6 @@ CLEANFILES += $(LINTOUT) %.o: ../common/%.c $(COMPILE.c) $< -$(ROOTCCSBIN64)/%: % - $(INS.file) - .KEEP_STATE: all: $(PROG) @@ -60,7 +56,7 @@ $(PROG): $(OBJS) $(POST_PROCESS) package \ -install: all $(ROOTCCSBINPROG64) +install: all $(ROOTPROG64) $(ROOTCCSBINLINK64) clean: $(RM) $(OBJS) $(CLEANFILES) diff --git a/usr/src/cmd/sgs/size/i386/Makefile b/usr/src/cmd/sgs/size/i386/Makefile index d2eb9a8457..678a3680ac 100644 --- a/usr/src/cmd/sgs/size/i386/Makefile +++ b/usr/src/cmd/sgs/size/i386/Makefile @@ -2,10 +2,9 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions @@ -22,7 +21,8 @@ # #ident "%Z%%M% %I% %E% SMI" # -# Copyright (c) 1998 by Sun Microsystems, Inc. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. # # cmd/sgs/size/i386/Makefile # @@ -64,7 +64,7 @@ $(PROG): $(OBJS) $(POST_PROCESS) package \ -install: all $(ROOTCCSBINPROG) +install: all $(ROOTPROG) $(ROOTCCSBINLINK) clean: $(RM) $(OBJS) $(CLEANFILES) diff --git a/usr/src/cmd/sgs/size/sparc/Makefile b/usr/src/cmd/sgs/size/sparc/Makefile index c83419936d..b4c7bad0b8 100644 --- a/usr/src/cmd/sgs/size/sparc/Makefile +++ b/usr/src/cmd/sgs/size/sparc/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -22,7 +21,8 @@ # #ident "%Z%%M% %I% %E% SMI" # -# Copyright (c) 1998 by Sun Microsystems, Inc. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. # # cmd/sgs/size/sparc/Makefile # @@ -66,7 +66,7 @@ $(PROG): $(OBJS) $(POST_PROCESS) package \ -install: all $(ROOTCCSBINPROG) +install: all $(ROOTPROG) $(ROOTCCSBINLINK) clean: $(RM) $(OBJS) $(CLEANFILES) diff --git a/usr/src/cmd/sgs/size/sparcv9/Makefile b/usr/src/cmd/sgs/size/sparcv9/Makefile index 4ecf48e973..1fa04a3271 100644 --- a/usr/src/cmd/sgs/size/sparcv9/Makefile +++ b/usr/src/cmd/sgs/size/sparcv9/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 1998-2003 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -50,9 +49,6 @@ CLEANFILES += $(LINTOUT) %.o: ../common/%.c $(COMPILE.c) $< -$(ROOTCCSBIN64)/%: % - $(INS.file) - .KEEP_STATE: all: $(PROG) @@ -62,7 +58,7 @@ $(PROG): $(OBJS) $(POST_PROCESS) package \ -install: all $(ROOTCCSBINPROG64) +install: all $(ROOTPROG64) $(ROOTCCSBINLINK64) clean: $(RM) $(OBJS) $(CLEANFILES) diff --git a/usr/src/cmd/sgs/symorder/Makefile b/usr/src/cmd/sgs/symorder/Makefile index 55f2c27c8f..a076b7507d 100644 --- a/usr/src/cmd/sgs/symorder/Makefile +++ b/usr/src/cmd/sgs/symorder/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -22,8 +21,8 @@ # #ident "%Z%%M% %I% %E% SMI" # -# Copyright (c) 1996 by Sun Microsystems, Inc. -# All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. # # cmd/sgs/symorder/Makefile @@ -37,7 +36,7 @@ include ../../Makefile.cmd all: $(PROG) -install: all $(ROOTCCSBINPROG) +install: all $(ROOTPROG) $(ROOTCCSBINLINK) clean \ clobber \ diff --git a/usr/src/cmd/sgs/tsort/i386/Makefile b/usr/src/cmd/sgs/tsort/i386/Makefile index 958cd7f155..decaae7b87 100644 --- a/usr/src/cmd/sgs/tsort/i386/Makefile +++ b/usr/src/cmd/sgs/tsort/i386/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -23,7 +22,7 @@ #ident "%Z%%M% %I% %E% SMI" # # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # cmd/sgs/tsort/i386/Makefile @@ -57,7 +56,7 @@ $(PROG): $(OBJS) $(LINK.c) $(OBJS) -o $@ $(LDLIBS) $(POST_PROCESS) -install: all $(ROOTCCSBINPROG) +install: all $(ROOTPROG) $(ROOTCCSBINLINK) clean: $(RM) $(OBJS) $(CLEANFILES) diff --git a/usr/src/cmd/sgs/tsort/sparc/Makefile b/usr/src/cmd/sgs/tsort/sparc/Makefile index 9a996ed31b..0708d4ef15 100644 --- a/usr/src/cmd/sgs/tsort/sparc/Makefile +++ b/usr/src/cmd/sgs/tsort/sparc/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -23,7 +22,7 @@ #ident "%Z%%M% %I% %E% SMI" # # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # cmd/sgs/tsort/sparc/Makefile @@ -57,7 +56,7 @@ $(PROG): $(OBJS) $(LINK.c) $(OBJS) -o $@ $(LDLIBS) $(POST_PROCESS) -install: all $(ROOTCCSBINPROG) +install: all $(ROOTPROG) $(ROOTCCSBINLINK) clean: $(RM) $(OBJS) $(CLEANFILES) diff --git a/usr/src/cmd/sgs/unifdef/i386/Makefile b/usr/src/cmd/sgs/unifdef/i386/Makefile index 83a5c0548e..cda2605807 100644 --- a/usr/src/cmd/sgs/unifdef/i386/Makefile +++ b/usr/src/cmd/sgs/unifdef/i386/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -22,9 +21,8 @@ # #ident "%Z%%M% %I% %E% SMI" # -# Copyright 2005 Sun Microsystems, Inc. -# All rights reserved. -# Use is subject to license terms. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. # # cmd/sgs/unifdef/i386/Makefile # @@ -56,7 +54,7 @@ $(PROG): $(OBJS) $(LINK.c) $(OBJS) -o $@ $(LDLIBS) $(POST_PROCESS) -install: all $(ROOTCCSBINPROG) +install: all $(ROOTPROG) $(ROOTCCSBINLINK) clean: $(RM) $(OBJS) $(CLEANFILES) diff --git a/usr/src/cmd/sgs/unifdef/sparc/Makefile b/usr/src/cmd/sgs/unifdef/sparc/Makefile index e8ef7ec07d..cdcd2d38f5 100644 --- a/usr/src/cmd/sgs/unifdef/sparc/Makefile +++ b/usr/src/cmd/sgs/unifdef/sparc/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -22,7 +21,7 @@ # #ident "%Z%%M% %I% %E% SMI" # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # cmd/sgs/unifdef/sparc/Makefile @@ -55,7 +54,7 @@ $(PROG): $(OBJS) $(LINK.c) $(OBJS) -o $@ $(LDLIBS) $(POST_PROCESS) -install: all $(ROOTCCSBINPROG) +install: all $(ROOTPROG) $(ROOTCCSBINLINK) clean: $(RM) $(OBJS) $(CLEANFILES) diff --git a/usr/src/cmd/sgs/whatdir/common/whatdir.c b/usr/src/cmd/sgs/whatdir/common/whatdir.c deleted file mode 100644 index 7ff33e8db4..0000000000 --- a/usr/src/cmd/sgs/whatdir/common/whatdir.c +++ /dev/null @@ -1,188 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright (c) 1991 by Sun Microsystems, Inc. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* This tools finds the run directory of for the argument - * supplied, returning 0 and printing the directory if successful - * else returning 1 and printing an error message to stderr - */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <sys/param.h> -#include <sys/stat.h> -#include <errno.h> -#include <unistd.h> - -static int resolve(char *,char* ,char *, char **); -static int check_if_exec(char *); -int find_run_directory(char *, char *, char *, char **, char *); - - -/* resolve - check for specified file in specified directory - * sets up dir, following symlinks. - * returns zero for success, or - * -1 for error (with errno set properly) - * *indir; search directory - * *cmd; search for name - * *dir; directory buffer - * **run; resultion name ptr ptr - * - */ -static int -resolve (char *indir, char *cmd, char *dir, char **run) -{ - char *p; - int rv = -1; - int sll; - char symlink[MAXPATHLEN + 1]; - - do { - errno = ENAMETOOLONG; - if ((size_t) strlen (indir) + (size_t) strlen (cmd) + 2 > MAXPATHLEN) - break; - - (void) sprintf(dir, "%s/%s", indir, cmd); - if (check_if_exec(dir) != 0) /* check if dir is an executable */ - { - break; /* Not an executable program */ - } - - while ((sll = readlink (dir, symlink, MAXPATHLEN)) >= 0) { - symlink[sll] = 0; - if (*symlink == '/') - strcpy (dir, symlink); - else - (void) sprintf (strrchr (dir, '/'), "/%s", symlink); - } - if (errno != EINVAL) - break; - - p = strrchr (dir, '/'); - *p++ = 0; - if (run) /* user wants resolution name */ - *run = p; - rv = 0; /* complete, with success! */ - - /* CONSTCOND */ - } while (0); - - return rv; -} - -/* This routine checks to see if a given filename is an executable or not. - Logically similar to the csh statement : if ( -x $i && ! -d $i ) - */ -static int -check_if_exec(char *file) -{ - struct stat stb; - if (stat(file, &stb) < 0) { - return ( -1); - } - if (S_ISDIR(stb.st_mode)) { - return (-1); - } - if (!(stb.st_mode & S_IEXEC)) { - return ( -1); - } - return (0); -} - -/* find_run_directory - find executable file in PATH - * PARAMETERS: - * cmd filename as typed by user - * cwd where to return working directory - * dir where to return program's directory - * run where to return final resolution name - * path user's path from environment - * RETURNS: - * returns zero for success, - * -1 for error (with errno set properly). - * BUGS: - * Under the Bourne shell, the input parameters may be - * insufficient since the shell maintains its own path variable. - * See BugId 1069862. - */ -int -find_run_directory (char *cmd, char *cwd, char *dir, char **run, char *path) -{ - int rv = 0; - char *f, *s; - char *tmp_path; - - if (!cmd || !*cmd || !cwd || !dir) { - errno = EINVAL; /* stupid arguments! */ - return -1; - } - if (!path || !*path) /* missing or null path */ - path = "."; /* assume sanity */ - - tmp_path = (char *) malloc(strlen(path)+1); - if (tmp_path == NULL) { - errno = EINVAL; - return -1; - } - - if (*cwd != '/') - if (!(getcwd (cwd, MAXPATHLEN))) - return -1; /* cant get working directory */ - - f = strrchr (cmd, '/'); - - if (dir) { /* user wants program directory */ - rv = -1; - if (*cmd == '/') /* absname given */ - rv = resolve ("", cmd + 1, dir, run); - else if (f) /* relname given */ - rv = resolve (cwd, cmd, dir, run); - else { /* from searchpath */ - strcpy(tmp_path,path); - f = tmp_path; - rv = -1; - errno = ENOENT; /* errno gets this if path empty */ - while (*f && (rv < 0)) { - s = f; - while (*f && (*f != ':')) - ++f; - if (*f) - *f++ = 0; - if (*s == '/') - rv = resolve (s, cmd, dir, run); - else { - char abuf[MAXPATHLEN]; - - (void) sprintf (abuf, "%s/%s", cwd, s); - rv = resolve (abuf, cmd, dir, run); - } - } - } - } - free(tmp_path); - return rv; -} - diff --git a/usr/src/cmd/sgs/yacc/Makefile.com b/usr/src/cmd/sgs/yacc/Makefile.com index 3beb4021fb..6b70a103ec 100644 --- a/usr/src/cmd/sgs/yacc/Makefile.com +++ b/usr/src/cmd/sgs/yacc/Makefile.com @@ -19,15 +19,14 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" # COMOBJS= y1.o y2.o y3.o y4.o -WHATOBJS= whatdir.o -POBJECTS= $(COMOBJS) $(WHATOBJS) +POBJECTS= $(COMOBJS) POBJS= $(POBJECTS:%=objs/%) OBJECTS= libmai.o libzer.o @@ -44,7 +43,6 @@ SRCDIR = ../common # from objects # SRCS= $(COMOBJS:%.o=../common/%.c) \ - $(WHATOBJS:%.o=../../whatdir/common/%.c) \ $(OBJECTS:%.o=../common/%.c) LIBS = $(DYNLIB) $(LINTLIB) @@ -68,9 +66,10 @@ CFLAGS += $(CCVERBOSE) CFLAGS64 += $(CCVERBOSE) $(LINTLIB):= LINTFLAGS = -nvx -$(ROOTCCSBINPROG):= FILEMODE = 0555 +$(ROOTPROG):= FILEMODE = 0555 + +ROOTYACCPAR= $(YACCPAR:%=$(ROOTSHLIBCCS)/%) -ROOTYACCPAR= $(YACCPAR:%=$(ROOTCCSBIN)/%) ROOTLINTDIR= $(ROOTLIBDIR) ROOTLINT= $(LINTSRCS:../common/%=$(ROOTLINTDIR)/%) diff --git a/usr/src/cmd/sgs/yacc/Makefile.targ b/usr/src/cmd/sgs/yacc/Makefile.targ index 5f909b5291..10d3374c24 100644 --- a/usr/src/cmd/sgs/yacc/Makefile.targ +++ b/usr/src/cmd/sgs/yacc/Makefile.targ @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -29,9 +29,6 @@ $(PROG): objs .WAIT $(POBJS) $(LINK.c) $(POBJS) -o $@ $(LDLIBS) $(POST_PROCESS) -$(ROOTCCSBIN)/%: ../common/% - $(INS.file) - # conditional assignment of default permissions for the installed # DYNLIB/DYNLIBCCC. Set here and in Makefile.mach, instead of Makefile.lib, # because ROOTLIBDIR may be changed in the including makefile after it has @@ -78,9 +75,6 @@ objs/%.o pics/%.o: ../common/%.c $(COMPILE.c) -o $@ $< $(POST_PROCESS_O) -objs/%.o pics/%.o: ../../whatdir/common/%.c - $(COMPILE.c) -o $@ $< - # install rule for lint library target $(ROOTLINTDIR)/%: ../common/% $(INS.file) diff --git a/usr/src/cmd/sgs/yacc/common/dextern.h b/usr/src/cmd/sgs/yacc/common/dextern.h index 844b87d551..20d44fea43 100644 --- a/usr/src/cmd/sgs/yacc/common/dextern.h +++ b/usr/src/cmd/sgs/yacc/common/dextern.h @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -325,7 +324,7 @@ extern char *parser; #endif #ifndef PARSER -#define PARSER "/usr/ccs/lib/yaccpar" +#define PARSER "/usr/share/lib/ccs/yaccpar" #endif #ifdef __cplusplus diff --git a/usr/src/cmd/sgs/yacc/common/y1.c b/usr/src/cmd/sgs/yacc/common/y1.c index 666c95ba27..78bf9eb4c6 100644 --- a/usr/src/cmd/sgs/yacc/common/y1.c +++ b/usr/src/cmd/sgs/yacc/common/y1.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -108,11 +107,6 @@ static int *pempty; /* vector of nonterminals nontrivially */ /* deriving e */ extern int nprodsz; -static char *sav_argv0; -char run_directory[MAXPATHLEN]; -char current_work_directory[MAXPATHLEN]; -extern int find_run_directory(char *, char *, char *, char **, char *); - int main(int argc, char *argv[]) { @@ -122,7 +116,6 @@ main(int argc, char *argv[]) #endif (void) textdomain(TEXT_DOMAIN); - sav_argv0 = argv[0]; setup(argc, argv); /* initialize and read productions */ TBITSET = NWORDS(ntoksz*LKFACTOR); tbitset = NWORDS(ntokens*LKFACTOR); @@ -176,7 +169,7 @@ mktbls() */ #define INIT_LSIZE nnontersz*LKFACTOR tmp_lset = (int *) - calloc((size_t)(TBITSET * (INIT_LSIZE+1)), sizeof (int)); + calloc((size_t)(TBITSET * (INIT_LSIZE+1)), sizeof (int)); if (tmp_lset == NULL) /* * TRANSLATION_NOTE -- This is a message from yacc. @@ -198,7 +191,7 @@ mktbls() * For wsets */ tmp_lset = (int *) - calloc((size_t)(TBITSET * (nnontersz+1)), sizeof (int)); + calloc((size_t)(TBITSET * (nnontersz+1)), sizeof (int)); if (tmp_lset == NULL) error(gettext( "could not allocate lookset array")); @@ -251,30 +244,6 @@ others() int c, i, j; int tmpline; - /* This routine has been "stolen" from the driver */ - if (parser == NULL) { - current_work_directory[0] = '.'; - current_work_directory[1] = '\0'; - if (find_run_directory(sav_argv0, - current_work_directory, - run_directory, - (char **)0, - getenv("PATH")) != 0) { -/* - * TRANSLATION_NOTE -- This is a message from yacc. - * This message is passed to warning() function. - * This warning is issued when yacc could not find - * the directory where the parser is. - */ - (void) warning(0, gettext( - "Error in finding run directory. Using default")); - parser = PARSER; - } else { - strcat(run_directory, "/yaccpar"); - parser = run_directory; - } - } - finput = fopen(parser, "r"); if (finput == NULL) /* @@ -285,7 +254,7 @@ others() */ error(gettext( "cannot find parser %s"), - parser); + parser); warray(L"yyr1", levprd, nprod); @@ -342,9 +311,9 @@ others() (void) fclose(faction); if (gen_lines) fprintf(ftable, - "\n# line\t%d \"%s\"", - tmpline, - parser); + "\n# line\t%d \"%s\"", + tmpline, + parser); ZAPFILE(ACTNAME); c = getwc(finput); } @@ -462,31 +431,31 @@ summary() { if (foutput != NULL) { (void) fprintf(foutput, - "\n%d/%d terminals, %d/%d nonterminals\n", - ntokens, ntoksz, nnonter, nnontersz); + "\n%d/%d terminals, %d/%d nonterminals\n", + ntokens, ntoksz, nnonter, nnontersz); (void) fprintf(foutput, - "%d/%d grammar rules, %d/%d states\n", - nprod, nprodsz, nstate, nstatesz); + "%d/%d grammar rules, %d/%d states\n", + nprod, nprodsz, nstate, nstatesz); (void) fprintf(foutput, "%d shift/reduce, %d reduce/reduce conflicts reported\n", - zzsrconf, zzrrconf); + zzsrconf, zzrrconf); (void) fprintf(foutput, - "%d/%d working sets used\n", zzcwp, wsetsz); + "%d/%d working sets used\n", zzcwp, wsetsz); (void) fprintf(foutput, - "memory: states,etc. %" PRIdPTR - "/%d, parser %" PRIdPTR "/%d\n", - mem-tracemem, new_memsize, - memp-amem, new_actsize); + "memory: states,etc. %" PRIdPTR + "/%d, parser %" PRIdPTR "/%d\n", + mem-tracemem, new_memsize, + memp-amem, new_actsize); (void) fprintf(foutput, - "%d/%d distinct lookahead sets\n", nlset, lsetsize); + "%d/%d distinct lookahead sets\n", nlset, lsetsize); (void) fprintf(foutput, - "%d extra closures\n", zzclose - 2*nstate); + "%d extra closures\n", zzclose - 2*nstate); (void) fprintf(foutput, - "%d shift entries, %d exceptions\n", zzacent, zzexcp); + "%d shift entries, %d exceptions\n", zzacent, zzexcp); (void) fprintf(foutput, - "%d goto entries\n", zzgoent); + "%d goto entries\n", zzgoent); (void) fprintf(foutput, - "%d entries saved by goto default\n", zzgobest); + "%d entries saved by goto default\n", zzgobest); } if (zzsrconf != 0 || zzrrconf != 0) { /* @@ -497,7 +466,7 @@ summary() * this message means in English. */ (void) fprintf(stderr, gettext( - "\nconflicts: ")); + "\nconflicts: ")); if (zzsrconf) (void) fprintf(stderr, "%d shift/reduce", zzsrconf); if (zzsrconf && zzrrconf) @@ -530,7 +499,7 @@ error(char *s, ...) * passed to error() function. */ (void) fprintf(stderr, gettext( - "command line: fatal: ")); + "command line: fatal: ")); else { (void) fprintf(stderr, "\"%s\", ", infile); /* @@ -539,8 +508,8 @@ error(char *s, ...) * passed to error() function. */ (void) fprintf(stderr, gettext( - "line %d: fatal: "), - lineno); + "line %d: fatal: "), + lineno); } (void) vfprintf(stderr, s, ap); (void) fprintf(stderr, "\n"); @@ -572,7 +541,7 @@ warning(int flag, char *s, ...) * passed to warning() function. */ (void) fprintf(stderr, gettext( - "warning: ")); + "warning: ")); else /* * TRANSLATION_NOTE -- This is a message from yacc. @@ -580,8 +549,8 @@ warning(int flag, char *s, ...) * passed to warning() function. */ (void) fprintf(stderr, gettext( - "line %d: warning: "), - lineno); + "line %d: warning: "), + lineno); (void) vfprintf(stderr, s, ap); (void) fprintf(stderr, "\n"); va_end(ap); @@ -687,7 +656,7 @@ cpres() */ error(gettext( "undefined nonterminal: %ws"), - nontrst[i].name); + nontrst[i].name); } } pres[i] = ptrpy; @@ -708,7 +677,7 @@ cpres() */ error(gettext( "internal Yacc error: pyield %d"), - ptrpy-&pyield[nprod]); + ptrpy-&pyield[nprod]); } static int indebug = 0; @@ -745,7 +714,7 @@ cpfir() for (s = pres[i]; s < t; ++s) { for (p = *s; (ch = (*p-NTBASE)) >= 0; ++p) { changes |= setunion(wsets[i].ws.lset, - wsets[ch].ws.lset); + wsets[ch].ws.lset); if (!pempty[ch]) break; } @@ -794,8 +763,7 @@ state(int c) size1 = p2 - p1; /* size of state */ for (i = (c >= NTBASE) ? ntstates[c-NTBASE] : tstates[c]; - i != 0; - i = mstates[i]) { + i != 0; i = mstates[i]) { /* get ith state */ q1 = pstate[i]; q2 = pstate[i+1]; @@ -933,7 +901,7 @@ cempty() */ error(gettext( "nonterminal %ws never derives any token string"), - nontrst[i].name); + nontrst[i].name); } } @@ -958,8 +926,8 @@ again: /* not known to be empty */ if (pempty[*prdptr[i]-NTBASE] == WHOKNOWS) { for (p = prdptr[i]+1; - *p >= NTBASE && pempty[*p-NTBASE] == EMPTY; - ++p); + *p >= NTBASE && pempty[*p-NTBASE] == EMPTY; ++p) + /* EMPTY */; /* we have a nontrivially empty nonterminal */ if (*p < 0) { pempty[*prdptr[i]-NTBASE] = EMPTY; @@ -1028,8 +996,8 @@ stagen() NTLOOP(j) { if (temp1[j]) (void) fprintf(foutput, - "%ws %d, ", nontrst[j].name, - temp1[j]); + "%ws %d, ", nontrst[j].name, + temp1[j]); } (void) fprintf(foutput, "\n"); } @@ -1105,13 +1073,13 @@ closure(int i) } /* nonterminal symbol */ (void) setunion(clset.lset, - pfirst[ch-NTBASE]->lset); + pfirst[ch-NTBASE]->lset); if (!pempty[ch-NTBASE]) break; } if (ch <= 0) (void) setunion(clset.lset, - v->ws.lset); + v->ws.lset); } } @@ -1128,7 +1096,7 @@ closure(int i) if (nolook) goto nexts; if (setunion(v->ws.lset, - clset.lset)) + clset.lset)) v->flag = work = 1; goto nexts; } @@ -1144,7 +1112,7 @@ closure(int i) work = 1; SETLOOP(k) wsets[cwp].ws.lset[k] = - clset.lset[k]; + clset.lset[k]; } WSBUMP(cwp); nexts:; @@ -1210,7 +1178,7 @@ exp_lkst() lookbase = lkst; lsetsize += LSETSIZE; tmp_lset = (int *) - calloc((size_t)(TBITSET * (lsetsize-LSETSIZE)), sizeof (int)); + calloc((size_t)(TBITSET * (lsetsize-LSETSIZE)), sizeof (int)); if (tmp_lset == NULL) /* * TRANSLATION_NOTE -- This is a message from yacc. @@ -1254,7 +1222,7 @@ exp_wsets() wsetsz += WSETSIZE; tmp_lset = (int *) - calloc((size_t)(TBITSET * (wsetsz-WSETSIZE)), sizeof (int)); + calloc((size_t)(TBITSET * (wsetsz-WSETSIZE)), sizeof (int)); if (tmp_lset == NULL) /* * TRANSLATION_NOTE -- This is a message from yacc. @@ -1290,14 +1258,14 @@ exp_states() nstatesz += NSTATES; pstate = (ITEM **) - realloc((char *)pstate, sizeof (ITEM *)*(nstatesz+2)); + realloc((char *)pstate, sizeof (ITEM *)*(nstatesz+2)); mstates = (int *)realloc((char *)mstates, sizeof (int)*nstatesz); defact = (int *)realloc((char *)defact, sizeof (int)*nstatesz); tystate = (int *)realloc((char *)tystate, sizeof (int)*nstatesz); indgo = (int *)realloc((char *)indgo, sizeof (int)*nstatesz); if ((*pstate == NULL) || (tystate == NULL) || (defact == NULL) || - (indgo == NULL) || (mstates == NULL)) + (indgo == NULL) || (mstates == NULL)) /* * TRANSLATION_NOTE -- This is a message from yacc. * This message is passed to error() function. diff --git a/usr/src/cmd/sgs/yacc/common/y2.c b/usr/src/cmd/sgs/yacc/common/y2.c index b58f1a56cd..c7ea63a22b 100644 --- a/usr/src/cmd/sgs/yacc/common/y2.c +++ b/usr/src/cmd/sgs/yacc/common/y2.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -61,7 +60,7 @@ char *infile; /* input file name */ static int numbval; /* value of an input number */ static int toksize = NAMESIZE; static wchar_t *tokname; /* input token name */ -char *parser = NULL; /* location of common parser */ +char *parser = PARSER; /* location of common parser */ static void finact(void); static wchar_t *cstash(wchar_t *); @@ -998,7 +997,7 @@ defin(int t, wchar_t *s) * Do not translate \\x, ANSI C. */ (void) warning(1, gettext( - "\\x is ANSI C hex escape")); + "\\x is ANSI C hex escape")); if (iswxdigit(s[i])) while (iswxdigit(s[i])) { int tmpval; @@ -1029,9 +1028,9 @@ defin(int t, wchar_t *s) * This message is passed to error() function. * Do not translate \\xnnnnnnnn and %#x. */ - error(gettext( - " \\xnnnnnnnn exceed %#x"), - LWCHAR_MAX); + error(gettext( + " \\xnnnnnnnn exceed %#x"), + LWCHAR_MAX); if (val == 0) /* * TRANSLATION_NOTE -- This is a message from yacc. @@ -1066,28 +1065,29 @@ defout() if (*cp == L' ') /* literals */ { (void) fprintf(fdebug, "\t\"%ws\",\t%d,\n", - tokset[i].name + 1, tokset[i].value); + tokset[i].name + 1, tokset[i].value); continue; /* was cp++ */ } for (; (c = *cp) != 0; ++cp) { if (iswlower(c) || iswupper(c) || - iswdigit(c) || c == L'_') /* EMPTY */; + iswdigit(c) || c == L'_') + /* EMPTY */; else goto nodef; - } + } (void) fprintf(fdebug, - "\t\"%ws\",\t%d,\n", tokset[i].name, - tokset[i].value); + "\t\"%ws\",\t%d,\n", tokset[i].name, + tokset[i].value); (void) fprintf(ftable, - "# define %ws %d\n", tokset[i].name, - tokset[i].value); + "# define %ws %d\n", tokset[i].name, + tokset[i].value); if (fdefine != NULL) (void) fprintf(fdefine, - "# define %ws %d\n", - tokset[i].name, - tokset[i].value); + "# define %ws %d\n", + tokset[i].name, + tokset[i].value); nodef:; } @@ -1128,7 +1128,7 @@ begin: case L'<': /* get, and look up, a type name (union member name) */ i = 0; while ((c = getwc(finput)) != L'>' && - c != EOF && c != L'\n') { + c != EOF && c != L'\n') { tokname[i] = c; if (++i >= toksize) exp_tokname(); @@ -1192,19 +1192,19 @@ begin: numbval = c - L'0'; base = (c == L'0') ? 8 : 10; for (c = getwc(finput); - iswdigit(c); - c = getwc(finput)) { + iswdigit(c); + c = getwc(finput)) { numbval = numbval*base + c - L'0'; } (void) ungetwc(c, finput); return (NUMBER); } else if (iswlower(c) || iswupper(c) || - c == L'_' || c == L'.' || - c == L'$') { + c == L'_' || c == L'.' || + c == L'$') { i = 0; while (iswlower(c) || iswupper(c) || - iswdigit(c) || c == L'_' || - c == L'.' || c == L'$') { + iswdigit(c) || c == L'_' || + c == L'.' || c == L'$') { tokname[i] = c; if (reserve && iswupper(c)) tokname[i] = towlower(c); @@ -1243,8 +1243,8 @@ begin: if (!wscmp(tokname, L"union")) return (UNION); error(gettext( - "invalid escape, or illegal reserved word: %ws"), - tokname); + "invalid escape, or illegal reserved word: %ws"), + tokname); } /* look ahead to distinguish IDENTIFIER from C_IDENTIFIER */ @@ -1279,9 +1279,9 @@ fdtype(int t) v = TYPE(toklev[t]); if (v <= 0) error(gettext( - "must specify type for %ws"), - (t >= NTBASE) ? nontrst[t-NTBASE].name: - tokset[t].name); + "must specify type for %ws"), + (t >= NTBASE) ? nontrst[t-NTBASE].name: + tokset[t].name); return (v); } @@ -1325,7 +1325,7 @@ cpyunion() (void) fprintf(ftable, "#ifdef __cplusplus\n\tYYSTYPE\n#endif\n"); if (fdefine) (void) fprintf(fdefine, - "#ifdef __cplusplus\n\tYYSTYPE\n#endif\n"); + "#ifdef __cplusplus\n\tYYSTYPE\n#endif\n"); level = 0; for (;;) { @@ -1467,7 +1467,8 @@ swt: s = 1; tok = -1; argument = 1; - while ((c = getwc(finput)) == L' ' || c == L'\t') /* NULL */; + while ((c = getwc(finput)) == L' ' || c == L'\t') + /* NULL */; if (c == L'<') { /* type description */ (void) ungetwc(c, finput); if (gettok() != TYPENAME) @@ -1487,7 +1488,7 @@ swt: if (tok < 0) tok = fdtype(*prdptr[nprod]); (void) fprintf(faction, - ".%ws", typeset[tok]); + ".%ws", typeset[tok]); } goto loop; } @@ -1516,10 +1517,12 @@ swt: else id_sw = 0; while ((c = getwc(finput)) == L' ' || - c == L'\t') /* NULL */; + c == L'\t') + /* NULL */; if (c == L'#') { while ((c = getwc(finput)) == L' ' || - c == L'\t') /* NULL */; + c == L'\t') + /* NULL */; if (iswdigit(c)) { m = 0; while (iswdigit(c)) { @@ -1543,7 +1546,7 @@ swt: if (prdptr[nprod][i] == t) if (++same == argument) { (void) fprintf(faction, - "yypvt[-%d]", offset-i); + "yypvt[-%d]", offset-i); if (ntypes) { if (tok < 0) tok = @@ -1568,7 +1571,7 @@ swt: */ warning(1, gettext( "Illegal character '$' in Ansi C symbol: %ws$%ws."), - id_name, tokname); + id_name, tokname); if (id_sw == 1) --nnonter; @@ -1592,8 +1595,8 @@ swt: * Do not translate $%d. */ error(gettext( - "Illegal use of $%d"), - j + offset); + "Illegal use of $%d"), + j + offset); } (void) fprintf(faction, "yypvt[-%d]", -j); if (ntypes) { /* put out the proper tag */ @@ -1604,12 +1607,12 @@ swt: * Do not translate $%d. */ error(gettext( - "must specify type of $%d"), - j + offset); + "must specify type of $%d"), + j + offset); if (tok < 0) tok = fdtype(prdptr[nprod][j+offset]); (void) fprintf(faction, - ".%ws", typeset[tok]); + ".%ws", typeset[tok]); } goto swt; } @@ -1806,7 +1809,7 @@ lrprnt() /* print out the left and right hand sides */ */ idx2 = wslen(rhstext)*2; p = m_rhs = (wchar_t *) - malloc((idx2 + 1)*sizeof (wchar_t)); + malloc((idx2 + 1)*sizeof (wchar_t)); if (m_rhs == NULL) /* * TRANSLATION_NOTE -- This is a message from yacc. @@ -1829,7 +1832,7 @@ lrprnt() /* print out the left and right hand sides */ int tmp_l = idx2-1; int cnt = 0; while (tmp_l >= 0 && - rhstext[tmp_l] == '\\') { + rhstext[tmp_l] == '\\') { cnt++; tmp_l--; } @@ -1864,17 +1867,17 @@ static void beg_debug() /* dump initial sequence for fdebug file */ { (void) fprintf(fdebug, - "typedef struct\n"); + "typedef struct\n"); (void) fprintf(fdebug, - "#ifdef __cplusplus\n\tyytoktype\n"); + "#ifdef __cplusplus\n\tyytoktype\n"); (void) fprintf(fdebug, "#endif\n{\n"); (void) fprintf(fdebug, - "#ifdef __cplusplus\nconst\n#endif\n"); + "#ifdef __cplusplus\nconst\n#endif\n"); (void) fprintf(fdebug, "char *t_name; int t_val; } yytoktype;\n"); (void) fprintf(fdebug, - "#ifndef YYDEBUG\n#\tdefine YYDEBUG\t%d", gen_testing); + "#ifndef YYDEBUG\n#\tdefine YYDEBUG\t%d", gen_testing); (void) fprintf(fdebug, "\t/*%sallow debugging */\n#endif\n\n", - gen_testing ? " " : " don't "); + gen_testing ? " " : " don't "); (void) fprintf(fdebug, "#if YYDEBUG\n\nyytoktype yytoks[] =\n{\n"); } @@ -1885,7 +1888,7 @@ end_toks() /* finish yytoks array, get ready for yyred's strings */ (void) fprintf(fdebug, "\t\"-unknown-\",\t-1\t/* ends search */\n"); (void) fprintf(fdebug, "};\n\n"); (void) fprintf(fdebug, - "#ifdef __cplusplus\nconst\n#endif\n"); + "#ifdef __cplusplus\nconst\n#endif\n"); (void) fprintf(fdebug, "char * yyreds[] =\n{\n"); (void) fprintf(fdebug, "\t\"-no such reduction-\",\n"); } @@ -1910,7 +1913,7 @@ exp_tokname() { toksize += NAMESIZE; tokname = (wchar_t *) - realloc((char *)tokname, sizeof (wchar_t) * toksize); + realloc((char *)tokname, sizeof (wchar_t) * toksize); } @@ -1927,7 +1930,7 @@ exp_prod() prdptr = (int **) realloc((char *)prdptr, sizeof (int *) * (nprodsz+2)); levprd = (int *) realloc((char *)levprd, sizeof (int) * (nprodsz+2)); had_act = (wchar_t *) - realloc((char *)had_act, sizeof (wchar_t) * (nprodsz+2)); + realloc((char *)had_act, sizeof (wchar_t) * (nprodsz+2)); for (i = nprodsz-NPROD; i < nprodsz+2; ++i) had_act[i] = 0; @@ -1983,7 +1986,7 @@ exp_nonterm() nnontersz += NNONTERM; nontrst = (NTSYMB *) - realloc((char *)nontrst, sizeof (TOKSYMB) * nnontersz); + realloc((char *)nontrst, sizeof (TOKSYMB) * nnontersz); if (nontrst == NULL) /* * TRANSLATION_NOTE -- This is a message from yacc. @@ -2088,5 +2091,5 @@ put_prefix_define(char *pre) for (i = 0; syms[i]; i++) fprintf(ftable, "#define\tyy%s\t%s%s\n", - syms[i], pre, syms[i]); + syms[i], pre, syms[i]); } diff --git a/usr/src/cmd/sgs/yacc/i386/Makefile b/usr/src/cmd/sgs/yacc/i386/Makefile index 363908e330..fdbb679a38 100644 --- a/usr/src/cmd/sgs/yacc/i386/Makefile +++ b/usr/src/cmd/sgs/yacc/i386/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -39,7 +38,7 @@ all: $(PROG) all_lib: $(LIBS) -install: all $(ROOTCCSBINPROG) $(ROOTYACCPAR) +install: all $(ROOTPROG) $(ROOTYACCPAR) $(ROOTCCSBINLINK) install_lib: all_lib $(ROOTLIBS) $(ROOTLINKS) $(DYNLINKLIB) $(ROOTLINT) diff --git a/usr/src/cmd/sgs/yacc/sparc/Makefile b/usr/src/cmd/sgs/yacc/sparc/Makefile index 415c7feaa1..45fbcb22f9 100644 --- a/usr/src/cmd/sgs/yacc/sparc/Makefile +++ b/usr/src/cmd/sgs/yacc/sparc/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 1993,2003 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -40,7 +39,7 @@ all: $(PROG) all_lib: $(LIBS) -install: all $(ROOTCCSBINPROG) $(ROOTYACCPAR) +install: all $(ROOTPROG) $(ROOTYACCPAR) $(ROOTCCSBINLINK) install_lib: all_lib $(ROOTLIBS) $(ROOTLINKS) $(DYNLINKLIB) $(ROOTLINT) |