backout 6795209/6392640: breaks sparc build
authorjmcp <James.McPherson@Sun.COM>
Thu, 30 Apr 2009 20:04:06 -0700
changeset 9521 b061a79d3d1a
parent 9520 017f1b58f68b
child 9522 9c28fbb74089
backout 6795209/6392640: breaks sparc build
usr/src/cmd/audio/utilities/Makefile
usr/src/cmd/bnu/grades.c
usr/src/cmd/bnu/uucico.c
usr/src/cmd/bnu/uucp.c
usr/src/cmd/bnu/uux.c
usr/src/cmd/dfs.cmds/general/general.c
usr/src/cmd/fm/fmd/common/fmd_mdb.c
usr/src/cmd/fmli/menu/mcurrent.c
usr/src/cmd/fmli/menu/stmenu.c
usr/src/cmd/fmli/oh/if_form.c
usr/src/cmd/fmli/oh/if_init.c
usr/src/cmd/fmli/oh/scram.c
usr/src/cmd/fmli/oh/slk.c
usr/src/cmd/fmli/qued/multiline.c
usr/src/cmd/ldapcachemgr/cachemgr.c
usr/src/cmd/mailx/hdr/glob.h
usr/src/cmd/mdb/common/libstand/ctime.c
usr/src/cmd/mdb/common/mdb/mdb_lex.l
usr/src/cmd/pcmciad/pcmciad.c
usr/src/cmd/pg/pg.c
usr/src/cmd/rpcgen/rpc_main.c
usr/src/cmd/saf/extern.h
usr/src/cmd/saf/structs.h
usr/src/cmd/sgs/nm/common/nm.c
usr/src/cmd/sgs/size/common/process.c
usr/src/cmd/tar/tar.c
usr/src/cmd/ttymon/tmextern.h
usr/src/cmd/ttymon/tmstruct.h
usr/src/cmd/ttymon/ttymon.c
usr/src/cmd/vi/port/ex_voper.c
usr/src/cmd/vi/port/exrecover.c
usr/src/cmd/ypcmd/ypupdated/rpc.ypupdated.c
usr/src/lib/libbsm/auditxml
usr/src/lib/libbsm/common/adt_xlate.h
usr/src/lib/libc/port/stdio/getpass.c
usr/src/lib/libcurses/screen/tgetch.c
usr/src/lib/libnisdb/db_headers.h
usr/src/lib/libnisdb/db_index_c.x
usr/src/lib/libnisdb/db_mindex_c.x
usr/src/lib/libnsl/dial/callers.c
usr/src/lib/libnsl/dial/conn.c
usr/src/lib/libnsl/rpc/svc_vc.c
usr/src/lib/libresolv/res_gethost.c
usr/src/lib/libvolmgt/common/volmgt_on_private.c
usr/src/lib/pam_modules/sample/sample_acct_mgmt.c
usr/src/ucblib/libucb/i386/sys/signal.c
usr/src/uts/common/fs/smbclnt/smbfs/smbfs.h
usr/src/uts/common/io/pcmcia/pcmem.c
usr/src/uts/common/io/ppm/ppm.c
usr/src/uts/common/io/sfe/sfe.c
usr/src/uts/common/nfs/nfs.h
usr/src/uts/common/os/kmem.c
usr/src/uts/common/os/sunpm.c
usr/src/uts/common/rpc/rpcmod.c
usr/src/uts/common/sys/exec.h
usr/src/uts/common/sys/fs/autofs.h
usr/src/uts/common/sys/fs/dv_node.h
usr/src/uts/common/sys/fs/fifonode.h
usr/src/uts/common/sys/fs/hsfs_impl.h
usr/src/uts/common/sys/fs/lofs_info.h
usr/src/uts/common/sys/fs/namenode.h
usr/src/uts/common/sys/fs/pc_node.h
usr/src/uts/common/sys/fs/tmpnode.h
usr/src/uts/common/sys/fs/ufs_inode.h
usr/src/uts/common/sys/mode.h
usr/src/uts/common/sys/socketvar.h
usr/src/uts/common/syscall/lwp_sobj.c
--- a/usr/src/cmd/audio/utilities/Makefile	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/cmd/audio/utilities/Makefile	Thu Apr 30 20:04:06 2009 -0700
@@ -19,9 +19,11 @@
 # CDDL HEADER END
 #
 #
-# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
+#
 # Makefile for C++ Audio Library (libAudio.a) 
 
 include ../../Makefile.cmd
@@ -36,7 +38,7 @@
 
 LINTFLAGS += -m -v -u
 
-AR=     /usr/ccs/bin/ar
+AR=     /usr/ccs/bin/ar cq
 RANLIB= /usr/ccs/bin/ranlib
 RM=     /usr/bin/rm -f
 
@@ -86,7 +88,7 @@
 
 $(libaudio): $(COBJS) $(CCOBJS)
 	$(RM) -f $@
-	$(AR) cq $@ $(COBJS) $(CCOBJS)
+	$(AR) $@ $(COBJS) $(CCOBJS)
 	test ! -f $(RANLIB) || $(RANLIB) $@
 
 clean:
--- a/usr/src/cmd/bnu/grades.c	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/cmd/bnu/grades.c	Thu Apr 30 20:04:06 2009 -0700
@@ -2,8 +2,9 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * 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.
@@ -22,10 +23,12 @@
 /*	  All Rights Reserved  	*/
 
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
+ * Copyright (c) 2000 by Sun Microsystems, Inc.
+ * All rights reserved.
  */
 
+#ident	"%Z%%M%	%I%	%E% SMI"	/* from SVR4 bnu:grades.c 1.7 */
+
 #include "uucp.h"
 #include <grp.h>
 
@@ -311,8 +314,6 @@
 	return(SUCCESS);
 }
 
-static void lcase();
-
 /*
  * jsize - determines whether if a job is small enough to
  * 	   be placed in the appropiate queue.
@@ -335,6 +336,7 @@
 #define ONE_K (1024)
 #define ONE_MEG ((1024)*(1024))
 
+	static void lcase();
 	char rest[SMBUF];
 	char msg[BUFSIZ], *p;
 
@@ -551,6 +553,7 @@
 #define G_GRP "group"
 #define G_NGRP "non-group"
 
+	static void lcase();
 	char actn[SMBUF];
 	char ufld[SMBUF];
 	char msg[BUFSIZ];
--- a/usr/src/cmd/bnu/uucico.c	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/cmd/bnu/uucico.c	Thu Apr 30 20:04:06 2009 -0700
@@ -2,8 +2,9 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * 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.
@@ -19,7 +20,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -27,6 +28,8 @@
 /*	  All Rights Reserved  	*/
 
 
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
+
 /*
 
  * uucp file transfer program:
@@ -76,8 +79,6 @@
 
 extern char *Mytype;
 
-static char *pskip();
-
 int
 main(argc, argv, envp)
 int argc;
@@ -86,6 +87,7 @@
 {
 
 	extern void intrEXIT(), onintr(), timeout();
+	static char *pskip();
 	extern void setservice();
 #ifndef ATTSVR3
 	void setTZ();
--- a/usr/src/cmd/bnu/uucp.c	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/cmd/bnu/uucp.c	Thu Apr 30 20:04:06 2009 -0700
@@ -2,8 +2,9 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * 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.
@@ -19,13 +20,15 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
 /*	  All Rights Reserved  	*/
 
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
+
 #include "uucp.h"
 
 /*
@@ -469,7 +472,6 @@
 	exit(code);
 }
 
-static FILE *syscfile();
 /*
  * generate copy files for s1!f1 -> s2!f2
  *	Note: only one remote machine, other situations
@@ -483,6 +485,7 @@
 char *s1, *f1, *s2, *f2;
 {
 	FILE *cfp;
+	static FILE *syscfile();
 	struct stat stbuf, stbuf1;
 	int type, statret;
 	char dfile[NAMESIZE];
--- a/usr/src/cmd/bnu/uux.c	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/cmd/bnu/uux.c	Thu Apr 30 20:04:06 2009 -0700
@@ -2,8 +2,9 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * 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.
@@ -19,7 +20,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -27,6 +28,8 @@
 /*	  All Rights Reserved  	*/
 
 
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
+
 #include "uucp.h"
 
 #define SHORTBUF 64
@@ -58,7 +61,6 @@
 char Sgrade[NAMESIZE];
 void cleanup();
 static void usage();
-static void onintr();
 
 /*
  *	uux
@@ -71,6 +73,7 @@
 {
 	char *jid();
 	FILE *fprx = NULL, *fpc = NULL, *fpd = NULL, *fp = NULL;
+	static void onintr();
 	int cfileUsed = 0;	/*  >0 if commands put in C. file flag  */
 	int cflag = 0;		/* if > 0 make local copy of files to be sent */
 	int nflag = 0;		/* if != 0, do not request error notification */
--- a/usr/src/cmd/dfs.cmds/general/general.c	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/cmd/dfs.cmds/general/general.c	Thu Apr 30 20:04:06 2009 -0700
@@ -2,8 +2,9 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * 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.
@@ -23,10 +24,12 @@
 
 
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
+
 /*
  *	generic interface to dfs commands.
  *
@@ -54,7 +57,6 @@
 				/* cmd name, -o, opts, (char *)0 terminator */
 
 static char *getfs();
-static int invalid();
 void perror();
 
 int
@@ -62,6 +64,7 @@
 int argc;
 char **argv;
 {
+	static int invalid();
 	extern char *optarg;
 	extern int optind;
 	FILE *dfp;		/* fp for dfs list */
--- a/usr/src/cmd/fm/fmd/common/fmd_mdb.c	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/cmd/fm/fmd/common/fmd_mdb.c	Thu Apr 30 20:04:06 2009 -0700
@@ -1167,11 +1167,11 @@
 	return (DCMD_OK);
 }
 
-static int fcf_sec(uintptr_t, uint_t, int, const mdb_arg_t *);
 /*ARGSUSED*/
 static int
 fcf_sec_one(uintptr_t addr, void *ignored, uint_t *secp)
 {
+	static int fcf_sec(uintptr_t, uint_t, int, const mdb_arg_t *);
 
 	mdb_printf("%3d ", (*secp)++);
 	(void) fcf_sec(addr, DCMD_ADDRSPEC | DCMD_LOOP, 0, NULL);
--- a/usr/src/cmd/fmli/menu/mcurrent.c	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/cmd/fmli/menu/mcurrent.c	Thu Apr 30 20:04:06 2009 -0700
@@ -2,8 +2,9 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * 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.
@@ -19,13 +20,15 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 1997 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
 /*	  All Rights Reserved  	*/
 
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
+
 #include	<stdio.h>
 #include	<curses.h>
 #include	"wish.h"
@@ -89,8 +92,6 @@
 	return SUCCESS;
 }
 
-static void	menu_show();
-
 void
 menu_index(m, newindex, hcols)
 register struct menu	*m;
@@ -109,6 +110,7 @@
 	int	scol;
 	int	sind;
 	struct menu_line	ml;
+	static void	menu_show();
 
 	vt_ctl(m->vid, CTGETSIZ, &rows, &cols);
 	huse = min(m->hwidth, cwidth = (cols - 1) / m->ncols);
--- a/usr/src/cmd/fmli/menu/stmenu.c	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/cmd/fmli/menu/stmenu.c	Thu Apr 30 20:04:06 2009 -0700
@@ -2,8 +2,9 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * 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.
@@ -20,13 +21,15 @@
  */
 
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
 /*	  All Rights Reserved  	*/
 
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
+
 #include	<stdio.h>
 #include	<ctype.h>
 #include	"wish.h"
@@ -526,9 +529,6 @@
 	curstring = NULL;
 }
 
-static void strtolower();
-static int  nocase_strncmp();
-
 static int
 menu_match(m, s, n, t)
 register struct menu	*m;
@@ -540,6 +540,8 @@
 	register int	start;
 	register int	count;
 	register char	*p;
+	static void strtolower();
+	static int  nocase_strncmp();
 	char badmatch[PATHSIZ];
 
 	start = m->index;
--- a/usr/src/cmd/fmli/oh/if_form.c	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/cmd/fmli/oh/if_form.c	Thu Apr 30 20:04:06 2009 -0700
@@ -2,8 +2,9 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * 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.
@@ -20,7 +21,7 @@
  */
 
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -28,6 +29,8 @@
 /*	  All Rights Reserved  	*/
 
 
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
+
 #include	<ctype.h>
 #include	<stdio.h>
 #include	<string.h>
@@ -977,8 +980,6 @@
     return(FAIL);
 }
 
-static int chk_page();
-
 /*
  * CHK_FORM returns the actual number of the FIRST field that
  * is invalid ....
@@ -988,6 +989,7 @@
 {
     register int n, page, fldnum;
     int savefield, savepage, retval;
+    static int chk_page();
 
     /*
      * Save current form page/field
--- a/usr/src/cmd/fmli/oh/if_init.c	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/cmd/fmli/oh/if_init.c	Thu Apr 30 20:04:06 2009 -0700
@@ -2,8 +2,9 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * 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.
@@ -20,13 +21,15 @@
  */
 
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
 /*	Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
 /*	  All Rights Reserved  	*/
 
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
+
 #include	<stdio.h>
 #include	<curses.h>
 #include	<string.h>
@@ -224,9 +227,6 @@
 static int settoggle();
 static struct fm_mn Inits;
 
-static char *set_default();
-static int center_it();
-
 /*
 ** Front-end to parser(), which sets up defaults.
 */
@@ -236,6 +236,8 @@
 {
 	register int i, numslks;
 	char  *permmsg, *get_def();
+	static char *set_default();
+	static int center_it();
 	static int free_inits = FALSE;
 	int sbutton;
 	FILE *fp;
--- a/usr/src/cmd/fmli/oh/scram.c	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/cmd/fmli/oh/scram.c	Thu Apr 30 20:04:06 2009 -0700
@@ -2,8 +2,9 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * 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.
@@ -20,7 +21,7 @@
  */
 
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -28,6 +29,8 @@
 /*	  All Rights Reserved  	*/
 
 
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
+
 #include <curses.h>
 #define	_SYS_TERMIO_H		/* sys/termio.h is included by curses.h */
 #include <fcntl.h>
@@ -66,7 +69,6 @@
 static int unpack();
 static int keysave();
 static int keyvalid();
-static void regetkey();
 
 /*
  *	scram -- Scramble an object and pack all its parts into an OEU package
@@ -75,6 +77,7 @@
 scram(file)
 register char *file;
 {
+	static void regetkey();
 
 	strcpy(Keyprompt, "Please enter scramble key: ");
 	strcpy(Srcfile, file);
@@ -121,6 +124,7 @@
 {
 	struct ott_entry *entry, *path_to_ott();
 	struct stat buf;
+	static void regetkey();
 
 	if (t == TOK_CANCEL)
 		return (SUCCESS);
@@ -339,7 +343,7 @@
 		n = m + m;
 		tempstr[0] = Keycheck[n];
 		tempstr[1] = Keycheck[n+1];
-		buf[m] = (int)strtol(tempstr, NULL, 16);
+		buf[m] = (int) strtol(tempstr, NULL, 16);
 	}
 
 	if (cryptit(buf) == FAIL)
@@ -367,7 +371,7 @@
 	unsigned int left, right;
 	time_t clock;	/* EFT abs k16 */
 
-	clock = time((time_t *)0);	/* EFT abs k16 */
+	clock = time((time_t *) 0);	/* EFT abs k16 */
 	right = clock & 0177;
 	buf[0] = right;
 
--- a/usr/src/cmd/fmli/oh/slk.c	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/cmd/fmli/oh/slk.c	Thu Apr 30 20:04:06 2009 -0700
@@ -2,8 +2,9 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * 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.
@@ -19,13 +20,15 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
 /*	  All Rights Reserved  	*/
 
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
+
 /* microsecond delay timer not available before SVR4.0   abs k18 */
 #ifdef PRE_SVR4_COMPILE
 #define DO_NOT_DELAY		
@@ -501,8 +504,6 @@
 
 #define REDEFINED(x)	 ((x).label && (*((x).label) != '\0' || (x).tok < 0))
 
-static  void	showslks();
-
 /*
  * SETSLKS will make "slks" the currently displayed SLKS
  */
@@ -512,6 +513,7 @@
 int flag;
 {
 	register int	i, more_slks;
+	static  void	showslks();
 
 #ifdef _DEBUG
 	_debug(stderr, "in setslk!\n");
--- a/usr/src/cmd/fmli/qued/multiline.c	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/cmd/fmli/qued/multiline.c	Thu Apr 30 20:04:06 2009 -0700
@@ -2,8 +2,9 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * 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.
@@ -18,11 +19,6 @@
  *
  * CDDL HEADER END
  */
-/*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-    
 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
 /*	  All Rights Reserved  	*/
 
@@ -31,6 +27,7 @@
  * Copyright  (c) 1985 AT&T
  *	All Rights Reserved
  */
+#ident	"%Z%%M%	%I%	%E% SMI"       /* SVr4.0 1.11 */
 
 #include <stdio.h>
 #include <ctype.h>
@@ -42,7 +39,6 @@
 
 static token _fixed();
 static token _virtual();
-static int emptyrow();
 
 #define SCROLLSIZE	((Cfld->rows - 2 <= 0) ? 1 : Cfld->rows - 2)
 #define HALFSIZE	(int)(Cfld->rows / 2)
@@ -62,6 +58,7 @@
 {
 	register token rettok;
 	register int col;
+	static int emptyrow();
 
 	rettok = TOK_NOP;
 	switch (tok) {
--- a/usr/src/cmd/ldapcachemgr/cachemgr.c	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/cmd/ldapcachemgr/cachemgr.c	Thu Apr 30 20:04:06 2009 -0700
@@ -270,8 +270,6 @@
 	(void) mutex_unlock(&create_lock);
 }
 
-static void		client_killserver();
-
 int
 main(int argc, char ** argv)
 {
@@ -284,6 +282,7 @@
 	struct stat		buf;
 	sigset_t		myset;
 	struct sigaction	sighupaction;
+	static void		client_killserver();
 	int			debug_level = 0;
 
 	/* setup for localization */
--- a/usr/src/cmd/mailx/hdr/glob.h	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/cmd/mailx/hdr/glob.h	Thu Apr 30 20:04:06 2009 -0700
@@ -2,8 +2,9 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * 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.
@@ -21,9 +22,10 @@
 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
 /*	  All Rights Reserved  	*/
 
+
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
+ * Copyright (c) 1998 by Sun Microsystems, Inc.
+ * All rights reserved.
  */
 
 /*
@@ -36,8 +38,7 @@
  * contributors.
  */
 
-#ifndef	_HDR_GLOB_H
-#define	_HDR_GLOB_H
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
 
 /*
  * mailx -- a modified version of a University of California at Berkeley
@@ -68,6 +69,7 @@
 extern int		exitflg;	/* -e for mail test */
 extern NODE		*fplist;	/* ???? */
 extern struct grouphead	*groups[];	/* Pointer to active groups */
+extern struct hdr	header[];	/* Known header types */
 extern int		hflag;		/* Sequence number for network -h */
 extern char		homedir[];	/* Name of home directory */
 extern char		host[];		/* ???? */
@@ -80,7 +82,7 @@
 extern int		lexnumber;	/* Number of TNUMBER from scan() */
 extern char		lexstring[];	/* String from TSTRING, scan() */
 extern int		loading;	/* Loading user definitions */
-extern char		*lockname;	/* named used for /var/mail locking */
+extern char		*lockname;	/* named used for locking in /var/mail */
 extern char		*maildir;	/* directory for mail files */
 extern char		mailname[];	/* Name of /var/mail system mailbox */
 extern off_t		mailsize;	/* Size of system mailbox */
@@ -110,7 +112,7 @@
 extern int		readonly;	/* Will be unable to rewrite file */
 extern int		regretp;	/* Pointer to TOS of regret tokens */
 extern int		regretstack[];	/* Stack of regretted tokens */
-extern struct ignore	*retain[HSHSIZE]; /* Pointer to retained fields */
+extern struct ignore	*retain[HSHSIZE];/* Pointer to retained fields */
 extern char		*rflag;		/* -r address for network */
 extern int		rmail;		/* Being called as rmail */
 extern int		sawcom;		/* Set after first command */
@@ -141,5 +143,3 @@
  */
 extern char		*optarg;
 extern int		optind;
-
-#endif /* _HDR_GLOB_H */
--- a/usr/src/cmd/mdb/common/libstand/ctime.c	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/cmd/mdb/common/libstand/ctime.c	Thu Apr 30 20:04:06 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -9,6 +9,8 @@
  * specifies the terms and conditions for redistribution.
  */
 
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
+
 /*
  * This localtime is a modified version of offtime from libc, which does not
  * bother to figure out the time zone from the kernel, from environment
@@ -147,8 +149,6 @@
 #define	dysize(A) (((A)%4)? 365: 366)
 #define	CBUFSIZ 26
 
-static char *ct_numb();
-
 /*
  * POSIX.1c standard version of the function asctime_r.
  * User gets it via static asctime_r from the header file.
@@ -159,6 +159,7 @@
 	const char *Date = "Day Mon 00 00:00:00 1900\n";
 	const char *Day  = "SunMonTueWedThuFriSat";
 	const char *Month = "JanFebMarAprMayJunJulAugSepOctNovDec";
+	static char *ct_numb();
 	const char *ncp;
 	const int *tp;
 	char *cp;
--- a/usr/src/cmd/mdb/common/mdb/mdb_lex.l	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/cmd/mdb/common/mdb/mdb_lex.l	Thu Apr 30 20:04:06 2009 -0700
@@ -5,8 +5,9 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * 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.
@@ -21,10 +22,12 @@
  *
  * CDDL HEADER END
  *
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
+
 #include <sys/types.h>
 #include <sys/isa_defs.h>
 
@@ -54,7 +57,7 @@
  * to shut the linker up.
  */
 #ifdef _KMDB
-FILE __iob[_NFILE];
+static FILE __iob[_NFILE];
 #endif
 
 /*
--- a/usr/src/cmd/pcmciad/pcmciad.c	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/cmd/pcmciad/pcmciad.c	Thu Apr 30 20:04:06 2009 -0700
@@ -19,10 +19,12 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
+
 /*
  *  PCMCIA User Daemon
  *	This is a newer daemon than the original version.
@@ -1302,7 +1304,6 @@
 
 static void unmount_media(long, char *);
 static void signal_vold(long, char *);
-static void makepdir();
 int volmgt_running();
 char *media_findname(char *);
 
@@ -1314,6 +1315,7 @@
 static void
 meminit()
 {
+	static void makepdir();
 
 #ifndef	lint
 	mutex_lock(&meminit_lock);
@@ -1577,7 +1579,6 @@
 	return (found ? namebuf : NULL);
 }
 
-static void	start_unmount(char *, char *);
 /*
  * unmount_media - Unmount PCMCIA media file system
  *
@@ -1588,6 +1589,7 @@
 static void
 unmount_media(long socket, char *device_type)
 {
+	static void	start_unmount(char *, char *);
 	static FILE	*fp = NULL;
 	struct mnttab	mnt;
 	const char	*nvp;
@@ -1642,9 +1644,6 @@
 	(void) fclose(fp);
 }
 
-static int	req_vold_umount(char *);
-static int	do_umount(char *);
-
 /*
  * start_unmount - Start to unmount mounting directory
  *
@@ -1654,6 +1653,8 @@
 static void
 start_unmount(char *mnt_special, char *mnt_mountp)
 {
+	static int	req_vold_umount(char *);
+	static int	do_umount(char *);
 	int		err = 0;
 
 	/*
@@ -1882,15 +1883,14 @@
 
 }
 
-static void		wr_to_pipe(char *, char *, int);
-static const char	*get_rdsk_path(char *);
-
 /*
  * signal_vold - tell vold that a new path has been added
  */
 static void
 signal_vold(long socket, char *device)
 {
+	static void		wr_to_pipe(char *, char *, int);
+	static const char	*get_rdsk_path(char *);
 	const char		*rpath;
 
 
--- a/usr/src/cmd/pg/pg.c	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/cmd/pg/pg.c	Thu Apr 30 20:04:06 2009 -0700
@@ -20,13 +20,15 @@
  */
 
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
 /*	  All Rights Reserved  	*/
 
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
+
 #include <signal.h>
 #include <setjmp.h>
 #include <sys/types.h>
@@ -857,6 +859,7 @@
 	int state = 0;
 	int width, length;
 	char multic[MB_LEN_MAX];
+	static	int	readch();
 	int 	len;
 
 	(void) fixterm();
--- a/usr/src/cmd/rpcgen/rpc_main.c	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/cmd/rpcgen/rpc_main.c	Thu Apr 30 20:04:06 2009 -0700
@@ -546,19 +546,6 @@
 
 	/* put in a typedef for quadprecision. Only with Cflag */
 
-	/*
-	 * declaration of struct rpcgen_table must go before
-	 *  the definition of arrays like *_1_table[]
-	 */
-	if (tblflag) {
-		f_print(fout, rpcgen_table_dcl1);
-		if (tirpcflag)
-			f_print(fout, rpcgen_table_proc);
-		else
-			f_print(fout, rpcgen_table_proc_b);
-		f_print(fout, rpcgen_table_dcl2);
-	}
-
 	tell = ftell(fout);
 
 	/* print data definitions */
@@ -610,6 +597,13 @@
 
 	if (extend && tell == ftell(fout)) {
 		(void) unlink(outfilename);
+	} else if (tblflag) {
+		f_print(fout, rpcgen_table_dcl1);
+		if (tirpcflag)
+			f_print(fout, rpcgen_table_proc);
+		else
+			f_print(fout, rpcgen_table_proc_b);
+		f_print(fout, rpcgen_table_dcl2);
 	}
 
 	if (Cflag) {
--- a/usr/src/cmd/saf/extern.h	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/cmd/saf/extern.h	Thu Apr 30 20:04:06 2009 -0700
@@ -2,8 +2,9 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * 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.
@@ -22,14 +23,14 @@
 /*	  All Rights Reserved  	*/
 
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
 #ifndef	_EXTERN_H
 #define	_EXTERN_H
 
-#include "structs.h"
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
 
 #ifdef	__cplusplus
 extern "C" {
@@ -68,7 +69,7 @@
 extern	struct	sactab	*findpm();
 
 extern	char	*trim();
-extern	char	*pstate(uchar_t);
+extern	char	*pstate(unchar);
 extern	char	*nexttok();
 extern	char	**mkargv();
 extern	char	*make_tempname();
--- a/usr/src/cmd/saf/structs.h	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/cmd/saf/structs.h	Thu Apr 30 20:04:06 2009 -0700
@@ -2,8 +2,9 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * 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.
@@ -18,20 +19,17 @@
  *
  * CDDL HEADER END
  */
-/*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
 /*	  All Rights Reserved  	*/
 
 
-#ifndef	_STRUCTS_H
-#define	_STRUCTS_H
+#ident	"%Z%%M%	%I%	%E% SMI"       /* SVr4.0 1.5*/
+
 
-#include <sac.h>
-#include "misc.h"
+/*
+ * REQUIRES: sac.h misc.h
+ */
+
 
 /*
  * error messages
@@ -79,19 +77,17 @@
  * defn's for sc_sstate, sc_pstate, and sc_lstate
  */
 
-#define	NOTRUNNING	0	/* PM not running */
-#define	STARTING	1	/* PM starting, must be same as PM_STARTING */
-#define	ENABLED		2	/* PM enabled, must be same as PM_ENABLED */
-#define	DISABLED	3	/* PM disabled, must be same as PM_DISABLED */
-#define	STOPPING	4	/* PM stopping, must be same as PM_STOPPING */
-#define	FAILED		5	/* PM has failed */
-#define	UNKNOWN		6	/* in recovery, state unknown */
+# define NOTRUNNING	0	/* PM not running */
+# define STARTING	1	/* PM is starting, must be same as PM_STARTING */
+# define ENABLED	2	/* PM is enabled, must be same as PM_ENABLED */
+# define DISABLED	3	/* PM is disabled, must be same as PM_DISABLED */
+# define STOPPING	4	/* PM is stopping, must be same as PM_STOPPING */
+# define FAILED		5	/* PM has failed */
+# define UNKNOWN	6	/* in recovery, state unknown */
 
 /*
  * defn's for sc_flags
  */
 
-#define	D_FLAG	0x1
-#define	X_FLAG	0x2
-
-#endif /* _STRUCTS_H */
+# define D_FLAG	0x1
+# define X_FLAG	0x2
--- a/usr/src/cmd/sgs/nm/common/nm.c	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/cmd/sgs/nm/common/nm.c	Thu Apr 30 20:04:06 2009 -0700
@@ -646,14 +646,6 @@
 	} /* end while */
 }
 
-static void print_header(int);
-#ifndef XPG4
-static void print_with_uflag(SYM *, char *);
-#endif
-static void print_with_pflag(int, Elf *, unsigned int, SYM *, char *);
-static void print_with_Pflag(int, Elf *, unsigned int, SYM *);
-static void print_with_otherflags(int, Elf *, unsigned int,
-		SYM *, char *);
 /*
  * Print the symbol table according to the flags that were
  * set, if any.  Input is an opened ELF file, the section name,
@@ -678,7 +670,15 @@
 		8,		/* FMT_T_HEX */
 		11,		/* FMT_T_OCT */
 	};
+	static void print_header(int);
 	int ndigits;
+#ifndef XPG4
+	static void print_with_uflag(SYM *, char *);
+#endif
+	static void print_with_pflag(int, Elf *, unsigned int, SYM *, char *);
+	static void print_with_Pflag(int, Elf *, unsigned int, SYM *);
+	static void print_with_otherflags(int, Elf *, unsigned int,
+	    SYM *, char *);
 
 	/*
 	 * Determine # of digits to use for each numeric value.
--- a/usr/src/cmd/sgs/size/common/process.c	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/cmd/sgs/size/common/process.c	Thu Apr 30 20:04:06 2009 -0700
@@ -2,8 +2,9 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * 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.
@@ -18,16 +19,13 @@
  *
  * CDDL HEADER END
  */
-/*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-   
 /*	Copyright (c) 1988 AT&T	*/
 /*	Copyright (c) 1989 AT&T	*/
 /*	  All Rights Reserved  	*/
 
 
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
+
 /* UNIX HEADER */
 #include <stdio.h>
 
@@ -62,7 +60,6 @@
 	"%lld + %lld + %lld = %lld\n"
 };
 
-static void	process_phdr(Elf *elf, GElf_Half num);
 
 void
 process(Elf * elf)
@@ -95,6 +92,7 @@
 	int		notfirst = 0;
 	int		i;
 	char		*name = 0;
+	static void	process_phdr(Elf *elf, GElf_Half num);
 
 /*
  * If there is a program header and the -f flag requesting section infor-
--- a/usr/src/cmd/tar/tar.c	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/cmd/tar/tar.c	Thu Apr 30 20:04:06 2009 -0700
@@ -19,7 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -34,6 +34,8 @@
  * under license from the Regents of the University of California.
  */
 
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
+
 #include <unistd.h>
 #include <sys/types.h>
 #include <sys/param.h>
@@ -4709,8 +4711,6 @@
 
 /* Has file been modified since being put into archive? If so, return > 0. */
 
-static off_t	lookup(char *);
-
 static int
 checkupdate(char *arg)
 {
@@ -4718,6 +4718,7 @@
 	time_t	mtime;
 	long nsecs;
 	off_t seekp;
+	static off_t	lookup(char *);
 
 	rewind(tfile);
 	if ((seekp = lookup(arg)) < 0)
--- a/usr/src/cmd/ttymon/tmextern.h	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/cmd/ttymon/tmextern.h	Thu Apr 30 20:04:06 2009 -0700
@@ -26,10 +26,9 @@
 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
 /*	  All Rights Reserved  	*/
 
-#ifndef	_TMEXTERN_H
-#define	_TMEXTERN_H
 
-#include "tmstruct.h"
+#ifndef	__TMEXTERN_H
+#define	__TMEXTERN_H
 
 #ifdef	__cplusplus
 extern "C" {
@@ -175,4 +174,4 @@
 }
 #endif
 
-#endif	/* _TMEXTERN_H */
+#endif	/* __TMEXTERN_H */
--- a/usr/src/cmd/ttymon/tmstruct.h	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/cmd/ttymon/tmstruct.h	Thu Apr 30 20:04:06 2009 -0700
@@ -2,8 +2,9 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * 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.
@@ -18,17 +19,11 @@
  *
  * CDDL HEADER END
  */
-/*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
 /*	  All Rights Reserved  	*/
 
 
-#ifndef	_TMSTRUCT_H
-#define	_TMSTRUCT_H
+#ident	"%Z%%M%	%I%	%E% SMI"	/* SVr4.0 1.4	*/
 
 /*
  * /etc/ttydefs structure
@@ -81,34 +76,32 @@
  *	valid flags for p_flags field of pmtab
  */
 #define	X_FLAG	0x1	/* port/service disabled 		*/
-#define	U_FLAG  0x2	/* create utmp entry for the service 	*/
+#define U_FLAG  0x2	/* create utmp entry for the service 	*/
 
 /*
  *	valid flags for p_ttyflags field of pmtab
  */
-#define	C_FLAG	0x1	/* invoke service on carrier		*/
-#define	H_FLAG	0x2	/* hangup the line			*/
-#define	B_FLAG	0x4	/* bi-directional line			*/
-#define	R_FLAG	0x8	/* do wait_read				*/
-#define	I_FLAG	0x10	/* initialize only			*/
+#define C_FLAG	0x1	/* invoke service on carrier		*/
+#define H_FLAG	0x2	/* hangup the line			*/
+#define B_FLAG	0x4	/* bi-directional line			*/
+#define R_FLAG	0x8	/* do wait_read				*/
+#define I_FLAG	0x10	/* initialize only			*/
 
 /*
  *	autobaud enabled flag
  */
-#define	A_FLAG	0x20	/* autobaud flag			*/
+#define A_FLAG	0x20	/* autobaud flag			*/
 
 /*
  *	values for p_status field of pmtab
  */
-#define	NOTVALID	0	/* entry is not valid		*/
-#define	VALID		1	/* entry is valid		*/
-#define	CHANGED		2	/* entry is valid but changed 	*/
-#define	GETTY		3	/* entry is for ttymon express	*/
+#define		NOTVALID	0	/* entry is not valid		*/
+#define		VALID		1	/* entry is valid		*/
+#define		CHANGED		2	/* entry is valid but changed 	*/
+#define		GETTY		3	/* entry is for ttymon express	*/
 
 #define	ALLOC_PMTAB \
 	((struct pmtab *)calloc((unsigned)1, \
-		(unsigned)sizeof (struct pmtab)))
+		(unsigned)sizeof(struct pmtab)))
 
 #define	PNULL	((struct pmtab *)NULL)
-
-#endif /* _TMSTRUCT_H */
--- a/usr/src/cmd/ttymon/ttymon.c	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/cmd/ttymon/ttymon.c	Thu Apr 30 20:04:06 2009 -0700
@@ -265,8 +265,6 @@
 	Initialized = TRUE;
 }
 
-static	void	free_defs();
-
 /*
  *	open_all - open devices in pmtab if the entry is
  *	         - valid, fd = 0, and pid = 0
@@ -276,6 +274,7 @@
 {
 	struct	pmtab	*tp;
 	int	check_modtime;
+	static	void	free_defs();
 	sigset_t cset;
 	sigset_t tset;
 
--- a/usr/src/cmd/vi/port/ex_voper.c	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/cmd/vi/port/ex_voper.c	Thu Apr 30 20:04:06 2009 -0700
@@ -2,8 +2,9 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * 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.
@@ -19,7 +20,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -31,6 +32,8 @@
  * Copyright (c) 1981 Regents of the University of California
  */
 
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
+
 #include "ex.h"
 #include "ex_tty.h"
 #include "ex_vis.h"
@@ -53,8 +56,6 @@
 
 unsigned char	vscandir[2] =	{ '/', 0 };
 
-static int get_addr();
-
 /*
  * Decode an operator/operand type command.
  * Eventually we switch to an operator subroutine in ex_vops.c.
@@ -83,6 +84,7 @@
 	int mouse_x;
 	int mouse_y;
 	int oline;
+	static int get_addr();
 /* #endif PTR_ADDRESSES */
 
 	moveop = vmove, deleteop = (int (*)())vdelete;
@@ -226,8 +228,8 @@
 		if (i) {
 			if (vlinfo[i - 1].vdepth > 1) {
 				mouse_x += WCOLS * (mouse_y -
-				    (vlinfo[i].vliny -
-				    (vlinfo[i - 1].vdepth - 1)));
+					(vlinfo[i].vliny -
+					(vlinfo[i - 1].vdepth - 1)));
 			}
 		}
 		else
@@ -743,7 +745,7 @@
 		vmoving = 0;
 		wcursor = d == '`' ? ncols[c - 'a'] : 0;
 		if (opf == vmove && (wdot != dot ||
-		    (d == '`' && wcursor != cursor)))
+			(d == '`' && wcursor != cursor)))
 			markDOT();
 		if (wcursor) {
 			vsave();
--- a/usr/src/cmd/vi/port/exrecover.c	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/cmd/vi/port/exrecover.c	Thu Apr 30 20:04:06 2009 -0700
@@ -2,8 +2,9 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * 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.
@@ -19,7 +20,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
 */
 
@@ -29,6 +30,8 @@
 
 /* Copyright (c) 1981 Regents of the University of California */
 
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
+
 #include <stdio.h>	/* BUFSIZ: stdio = 1024, VMUNIX = 1024 */
 #ifndef TRACE
 #undef	NULL
@@ -829,8 +832,6 @@
 
 static int intrupt;
 
-static void catch();
-
 unsigned char *
 mypass(prompt)
 unsigned char	*prompt;
@@ -841,6 +842,7 @@
 	int c;
 	static unsigned char pbuf[9];
 	void	(*sig)(); 
+	static void catch();
 
 	setbuf(stdin, (char*)NULL);
 	sig = signal(SIGINT, catch);
--- a/usr/src/cmd/ypcmd/ypupdated/rpc.ypupdated.c	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/cmd/ypcmd/ypupdated/rpc.ypupdated.c	Thu Apr 30 20:04:06 2009 -0700
@@ -19,10 +19,12 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
+
 /*
  * NIS update service
  */
@@ -56,7 +58,6 @@
 void detachfromtty();
 
 static int addr2netname(char *, SVCXPRT *);
-static int issock();
 
 int insecure;
 extern SVCXPRT *svctcp_create(int, uint_t, uint_t);
@@ -68,6 +69,7 @@
 	char *argv[];
 {
 	char *cmd;
+	static int issock();
 	int connmaxrec = RPC_MAXDATASIZE;
 	struct stat filestat;
 
--- a/usr/src/lib/libbsm/auditxml	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/lib/libbsm/auditxml	Thu Apr 30 20:04:06 2009 -0700
@@ -20,7 +20,7 @@
 # CDDL HEADER END
 #
 #
-# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
 
@@ -556,6 +556,7 @@
 extern	void	${pfx_adt}_preload(au_event_t, adt_event_data_t *);
 
 extern adt_translation_t *${pfx_adt}_xlate_table[];
+extern struct msg_text ${pfx_adt}_msg_text[];
 
 #endif
 
--- a/usr/src/lib/libbsm/common/adt_xlate.h	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/lib/libbsm/common/adt_xlate.h	Thu Apr 30 20:04:06 2009 -0700
@@ -319,8 +319,6 @@
 	int	ml_offset;
 };
 
-extern struct msg_text adt_msg_text[];
-
 extern void adt_write_syslog(const char *, int);
 extern void adt_token_open(struct adt_event_state *);
 extern int adt_token_close(struct adt_event_state *);
--- a/usr/src/lib/libc/port/stdio/getpass.c	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/lib/libc/port/stdio/getpass.c	Thu Apr 30 20:04:06 2009 -0700
@@ -20,13 +20,15 @@
  */
 
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
 /*	Copyright (c) 1988 AT&T	*/
 /*	  All Rights Reserved  	*/
 
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
+
 #pragma weak _getpass = getpass
 #pragma weak _getpassphrase = getpassphrase
 
@@ -64,8 +66,6 @@
 	return ((char *)__getpass(prompt, MAXPASSWD));
 }
 
-	static void catch(int);
-
 static char *
 __getpass(const char *prompt, int size)
 {
@@ -76,6 +76,7 @@
 	FILE	*fi;
 	char *pbuf = tsdalloc(_T_GETPASS, MAXPASSWD + 1, NULL);
 	struct sigaction act, osigint, osigtstp;
+	static void catch(int);
 
 	if (pbuf == NULL ||
 	    (fi = fopen("/dev/tty", "r+F")) == NULL)
--- a/usr/src/lib/libcurses/screen/tgetch.c	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/lib/libcurses/screen/tgetch.c	Thu Apr 30 20:04:06 2009 -0700
@@ -2,8 +2,9 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * 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.
@@ -19,7 +20,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -36,6 +37,8 @@
  * contributors.
  */
 
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
+
 /*LINTLIBRARY*/
 
 #include	"curses_inc.h"
@@ -111,7 +114,7 @@
 
 		/* Check for arrow and function keys */
 		if (interpret && cur_term->funckeystarter[inp])
-			collapse = _getkey(interpret - 1, &inp);
+		    collapse = _getkey(interpret - 1, &inp);
 	}
 
 	/* Collapse the input queue to remove the escape */
@@ -173,9 +176,6 @@
 extern	char	*_asciify();
 #endif	/* DEBUG */
 
-static int get_xterm_mouse(int, int *);
-static void _map_button(chtype *);
-
 /*
  * This algorithm is a "learning" algorithm. The premise is
  * that keys used once are like to be used again and again.
@@ -192,8 +192,8 @@
 	int		key, num_keys = cur_term->_ksz;
 	int		i;
 	chtype		*inputQ = cur_term->_input_queue;
-	char		*chars_onQ = &(cur_term->_chars_on_queue);
-	char		flag = cur_term->funckeystarter[*inp];
+	char		*chars_onQ = &(cur_term->_chars_on_queue),
+			flag = cur_term->funckeystarter[*inp];
 	int		first, collapse = 1;
 
 
@@ -221,7 +221,7 @@
 				if (*chars_onQ == i) {
 					(*chars_onQ)++;
 					inputQ[i] = (blockpeek) ?
-					    _pk() : _fpk();
+						_pk() : _fpk();
 					switch ((int)inputQ[i]) {
 					case -2:
 			/*
@@ -266,6 +266,7 @@
 			if (kp[key]->_keyval == KEY_MOUSE) {
 				MOUSE_STATUS old_mouse;
 				int rc;
+				static int get_xterm_mouse(int, int *);
 
 				old_mouse = Mouse_status;
 
@@ -338,6 +339,7 @@
 			    (MOUSE_Y_POS == LINES) &&
 			    (SP->slk != (SLK_MAP *) NULL) &&
 			    (SP->_map_mbe_to_key  != 0)) {
+				static void _map_button(chtype *);
 				_map_button(inp);
 			}
 
@@ -544,15 +546,15 @@
 	/* restore the user alarms */
 	(void) signal(SIGALRM, oldsig);
 	if (sig_caught && oldalarm > 1)
-		oldalarm--;
+	    oldalarm--;
 	(void) alarm(oldalarm);
 	if (rc == 1)			/* got a character */
-		return (c);
+	    return (c);
 	else
-		if (sig_caught)		/* timed out */
-			return (-2);
-		else			/* EOF or got interrupted */
-			return (-1);
+	    if (sig_caught)		/* timed out */
+		return (-2);
+	    else			/* EOF or got interrupted */
+		return (-1);
 }
 #else	/* FIONREAD */
 /*
--- a/usr/src/lib/libnisdb/db_headers.h	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/lib/libnisdb/db_headers.h	Thu Apr 30 20:04:06 2009 -0700
@@ -2,8 +2,9 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * 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.
@@ -21,10 +22,12 @@
 /*
  *	db_headers.h
  *
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
+
 #ifndef _DB_HEADERS_H
 #define	_DB_HEADERS_H
 
@@ -33,16 +36,7 @@
 #include <stdlib.h>
 #include <setjmp.h>
 
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
 extern int verbose;
-
-#ifdef  __cplusplus
-}
-#endif
-
 extern jmp_buf dbenv;
 
 #define	FATAL(msg, fcode) \
--- a/usr/src/lib/libnisdb/db_index_c.x	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/lib/libnisdb/db_index_c.x	Thu Apr 30 20:04:06 2009 -0700
@@ -2,8 +2,9 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * 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.
@@ -21,10 +22,12 @@
 /*
  *	db_index_c.x
  *
- *  Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ *  Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  *  Use is subject to license terms.
  */
 
+%#pragma ident	"%Z%%M%	%I%	%E% SMI"
+
 #if RPC_HDR
 %#ifndef _DB_INDEX_H
 %#define _DB_INDEX_H
@@ -98,7 +101,7 @@
 %  void init( db_key_desc * );
 %
 %/* Moves an index from an xdr index */
-%  db_status move_xdr_db_index(db_index *orig);
+%  db_status db_index::move_xdr_db_index(db_index *orig);
 %
 %/* Dumps this index to named file. */
 %  int dump( char *);
--- a/usr/src/lib/libnisdb/db_mindex_c.x	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/lib/libnisdb/db_mindex_c.x	Thu Apr 30 20:04:06 2009 -0700
@@ -2,8 +2,9 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * 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.
@@ -21,10 +22,12 @@
 /*
  *	db_mindex_c.x
  *
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
+%#pragma ident	"%Z%%M%	%I%	%E% SMI"
+
 #if RPC_HDR
 %#ifndef _DB_MINDEX_H
 %#define _DB_MINDEX_H
@@ -263,7 +266,7 @@
 %
 % /* Delete the given list of results; used when no longer interested in 
 %    the results of the first/next query that returned this list.     */
-%  db_status reset_next( db_next_index_desc *orig );
+%  db_status db_mindex::reset_next( db_next_index_desc *orig );
 %
 %/* Return all entries within table.  Returns the answer by
 %   setting the pointer 'rp' to point to the list of answers.
--- a/usr/src/lib/libnsl/dial/callers.c	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/lib/libnsl/dial/callers.c	Thu Apr 30 20:04:06 2009 -0700
@@ -23,10 +23,12 @@
 /*	  All Rights Reserved	*/
 
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
+
 #include "mt.h"
 #include "uucp.h"
 
@@ -162,9 +164,6 @@
 static uint_t saved_mode;
 static char saved_dcname[20];
 
-static int pop_push(int);
-static void setdevcfg(char *, char *);
-static void ttygenbrk(int);
 /*
  * processdev - Process a line from the Devices file
  *
@@ -179,9 +178,12 @@
 	struct caller	*ca;
 	char *args[D_MAX+1], dcname[20];
 	char **sdev;
+	static int pop_push(int);
+	static void setdevcfg(char *, char *);
 	int nullfd;
 	char *phonecl;			/* clear phone string */
 	char phoneex[2*(MAXPH+2)];	/* expanded phone string */
+	static void ttygenbrk(int);
 	struct termio tty_orig;
 	int ret_orig = -1;
 
@@ -228,7 +230,7 @@
 		 */
 		if (*dev[D_LINE] != '/') {
 			(void) snprintf(dcname, sizeof (dcname),
-			    "/dev/%s", dev[D_LINE]);
+							"/dev/%s", dev[D_LINE]);
 		} else {
 			(void) strcpy(dcname, dev[D_LINE]);
 		}
@@ -274,7 +276,7 @@
 			if (fcntl(dcf, F_SETFL,
 			    (fcntl(dcf, F_GETFL, 0) & ~O_NDELAY)) < 0) {
 				DEBUG(7, "clear O_NDELAY failed, errno %d\n",
-				    errno);
+								errno);
 				Uerror = SS_DEVICE_FAILED;
 				goto bad;
 			}
@@ -391,11 +393,6 @@
 }
 
 #define	MAXLINE	512
-
-static void dialreset(void);
-#ifndef SMALL
-static char *currdial(void);
-#endif
 /*
  * Get the information about the dialer.
  * gdial(type, arps, narps)
@@ -412,6 +409,10 @@
 {
 	static char *info;	/* dynamically allocated MAXLINE */
 	int na;
+	static void dialreset(void);
+#ifndef SMALL
+	static char *currdial(void);
+#endif
 
 	DEBUG(2, "gdial(%s) called\n", type);
 	if (info == NULL) {
@@ -428,11 +429,11 @@
 		if ((na = getargs(info, arps, narps)) == 0)
 			continue;
 		if (EQUALS(arps[0], type)) {
-			DEBUG(5, "Trying caller script '%s'", type);
-			DEBUG(5, " from '%s'.\n", currdial());
-			dialreset();
-			bsfix(arps);
-			return (na);
+		    DEBUG(5, "Trying caller script '%s'", type);
+		    DEBUG(5, " from '%s'.\n", currdial());
+		    dialreset();
+		    bsfix(arps);
+		    return (na);
 		}
 	}
 	DEBUG(1, "%s not found in Dialers file\n", type);
@@ -459,7 +460,6 @@
 #define	CONNECT_ATTEMPTS	3
 #define	TFREE(p, type)	if ((p)) (void) t_free((char *)(p), (type))
 
-static struct netbuf	*stoa(char *, struct netbuf *);
 /*
  * returns fd to remote uucp daemon
  */
@@ -475,11 +475,12 @@
 	struct t_info	tinfo;
 	struct t_call	*sndcall = 0, *rcvcall = 0;
 
+	static struct netbuf	*stoa(char *, struct netbuf *);
 
 	if (dev[D_LINE][0] != '/') {
 		/*	dev holds device name relative to /dev	*/
 		(void) snprintf(devname, sizeof (devname),
-		    "/dev/%s", dev[D_LINE]);
+							"/dev/%s", dev[D_LINE]);
 	} else {
 		/*	dev holds full path name of device	*/
 		(void) strcpy(devname, dev[D_LINE]);
@@ -559,11 +560,11 @@
 	 */
 
 	DEBUG(5, "t_connect to addr \"%s\"\n",
-	    strecpy(addrbuf, dev[D_ARG], "\\"));
+		strecpy(addrbuf, dev[D_ARG], "\\"));
 
 	if (dev[D_ARG][0] == '\\' && (dev[D_ARG][1] == 'x' ||
-	    dev[D_ARG][1] == 'X' || dev[D_ARG][1] == 'o' ||
-	    dev[D_ARG][1] == 'O')) {
+			dev[D_ARG][1] == 'X' || dev[D_ARG][1] == 'o' ||
+			dev[D_ARG][1] == 'O')) {
 		if (stoa(dev[D_ARG], &(sndcall->addr)) == NULL) {
 			DEBUG(5, "tlicall: stoa failed\n%s", "");
 			logent("tlicall", "string-to-address failed");
@@ -577,7 +578,7 @@
 		}
 	} else {
 		for (i = j = 0; i < BUFSIZ && dev[D_ARG][i] != NULLCHAR;
-		    ++i, ++j) {
+								++i, ++j) {
 			if (dev[D_ARG][i] == '\\' && dev[D_ARG][i+1] == 'N') {
 				addrbuf[j] = NULLCHAR;
 				++i;
--- a/usr/src/lib/libnsl/dial/conn.c	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/lib/libnsl/dial/conn.c	Thu Apr 30 20:04:06 2009 -0700
@@ -2,8 +2,9 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * 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.
@@ -23,10 +24,12 @@
 /*	  All Rights Reserved	*/
 
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
+
 #include "mt.h"
 #include "uucp.h"
 static char _ProtoSys[40];	/* protocol string from Systems file entry */
@@ -77,12 +80,12 @@
  * When a failure occurs, Uerror is set.
  */
 
-static void sysreset(void);
 static int
 conn(char *system)
 {
 	int nf, fn = FAIL;
 	char *flds[F_MAX+1];
+	static void sysreset(void);
 
 	CDEBUG(4, "conn(%s)\n", system);
 	Uerror = 0;
@@ -93,7 +96,7 @@
 			continue;
 		if (EQUALS(Progname, "uucico")) {
 			if (chat(nf - F_LOGIN, flds + F_LOGIN, fn, "", "") ==
-			    SUCCESS) {
+								SUCCESS) {
 				sysreset();
 				return (fn); /* successful return */
 			}
@@ -118,8 +121,6 @@
 	return (FAIL);
 }
 
-static void devreset(void);
-
 /*
  * getto - connect to remote machine
  *
@@ -136,12 +137,13 @@
 	int dcf = -1;
 	int reread = 0;
 	int tries = 0;	/* count of call attempts - for limit purposes */
+	static void devreset(void);
 
 	CDEBUG(1, "Device Type %s wanted\n", flds[F_TYPE]);
 	Uerror = 0;
 	while (tries < TRYCALLS) {
 		if ((status = rddev(flds[F_TYPE], dev, devbuf, D_MAX)) ==
-		    FAIL) {
+								FAIL) {
 			if (tries == 0 || ++reread >= TRYCALLS)
 				break;
 			devreset();
@@ -191,7 +193,7 @@
 		dev[D_CLASS] = flds[F_CLASS];
 		return (SUCCESS);
 	} else if (EQUALS(flds[F_CLASS], "Any") ||
-	    EQUALS(flds[F_CLASS], dev[D_CLASS]))
+					EQUALS(flds[F_CLASS], dev[D_CLASS]))
 		return (SUCCESS);
 	else
 		return (FAIL);
@@ -215,7 +217,7 @@
 
 	while (getdevline(buf, BUFSIZ)) {
 		if (buf[0] == ' ' || buf[0] == '\t' || buf[0] == '\n' ||
-		    buf[0] == '\0' || buf[0] == '#')
+					buf[0] == '\0' || buf[0] == '#')
 			continue;
 		na = getargs(buf, dev, devcount);
 		ASSERT(na >= D_CALLER, "BAD LINE", buf, na);
@@ -312,7 +314,7 @@
 			continue;
 		/* check if requested Mytype device type */
 		if ((Mytype != CNULL) &&
-		    (!EQUALSN(flds[F_TYPE], Mytype, strlen(Mytype)))) {
+			    (!EQUALSN(flds[F_TYPE], Mytype, strlen(Mytype)))) {
 			DEBUG(7, "Skipping entry in '%s'", currsys());
 			DEBUG(7, " - type (%s) not wanted.\n", flds[F_TYPE]);
 			continue;
@@ -553,8 +555,8 @@
 	CDEBUG(4, "Received hangup\n%s", "");
 
 	if (clear_hup(dcf) != SUCCESS) {
-		CDEBUG(4, "Unable to clear hup on device\n%s", "");
-		return (FAIL);
+	    CDEBUG(4, "Unable to clear hup on device\n%s", "");
+	    return (FAIL);
 	}
 	return (SUCCESS);
 }
@@ -674,7 +676,7 @@
 			case 'm':	/* no modem control - clear CLOCAL */
 				FLUSH();
 				CDEBUG(5, ")\n%s CLOCAL ",
-				    (*sptr == 'M' ? "set" : "clear"));
+					(*sptr == 'M' ? "set" : "clear"));
 				if ((*Ioctl)(fn, TCGETA, &ttybuf) != 0) {
 					/*EMPTY*/
 					CDEBUG(5,
@@ -874,7 +876,7 @@
 				s++;
 
 			if ((sscanf(s, "%d-%d", &t__low, &t__high) < 2) ||
-			    (t__low == t__high))
+							(t__low == t__high))
 				return (1);
 
 			/* 0000 crossover? */
--- a/usr/src/lib/libnsl/rpc/svc_vc.c	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/lib/libnsl/rpc/svc_vc.c	Thu Apr 30 20:04:06 2009 -0700
@@ -20,7 +20,7 @@
  */
 
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -32,6 +32,8 @@
  * California.
  */
 
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
+
 /*
  * Server side for Connection Oriented RPC.
  *
@@ -662,8 +664,6 @@
 	return (xprt);
 }
 
-static void do_accept();
-
 /*
  * This routine is called by svc_getreqset(), when a packet is recd.
  * The listener process creates another end point on which the actual
@@ -679,6 +679,7 @@
 	struct cf_rendezvous *r;
 	char *tpname = NULL;
 	char devbuf[256];
+	static void do_accept();
 
 /* LINTED pointer alignment */
 	r = (struct cf_rendezvous *)xprt->xp_p1;
--- a/usr/src/lib/libresolv/res_gethost.c	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/lib/libresolv/res_gethost.c	Thu Apr 30 20:04:06 2009 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -16,6 +16,8 @@
  *
  */
 
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
+
 #include <sys/param.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
@@ -222,8 +224,6 @@
 	}
 }
 
-static struct hostent *_gethtbyname();
-
 struct hostent *
 res_gethostbyname(name)
 	char *name;
@@ -232,6 +232,7 @@
 	register char *cp;
 	int n;
 	struct hostent *hp, *gethostdomain();
+	static struct hostent *_gethtbyname();
 
 	/*
 	 * disallow names consisting only of digits/dots, unless
@@ -262,8 +263,6 @@
 	return (getanswer(&buf, n, 0));
 }
 
-static struct hostent *_gethtbyaddr();
-
 static struct hostent *
 _getrhbyaddr(addr, len, type)
 	char *addr;
@@ -273,6 +272,7 @@
 	querybuf buf;
 	register struct hostent *hp;
 	char qbuf[MAXDNAME];
+	static struct hostent *_gethtbyaddr();
 
 	if (type != AF_INET)
 		return ((struct hostent *) NULL);
--- a/usr/src/lib/libvolmgt/common/volmgt_on_private.c	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/lib/libvolmgt/common/volmgt_on_private.c	Thu Apr 30 20:04:06 2009 -0700
@@ -19,10 +19,12 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
+
 /*
  * routines in this module are meant to be called by other libvolmgt
  * routines only
@@ -54,8 +56,6 @@
 #define	NULL_PATH		"/dev/null"
 
 
-static int	vol_getmntdev(FILE *, struct mnttab *, dev_t,
-			    struct dk_cinfo *);
 
 /*
  * This is an ON Consolidation Private interface.
@@ -72,6 +72,8 @@
 int
 _dev_mounted(char *path)
 {
+	static int	vol_getmntdev(FILE *, struct mnttab *, dev_t,
+			    struct dk_cinfo *);
 	int		fd = -1;
 	struct dk_cinfo	info;
 	static FILE 	*fp = NULL;		/* mnttab file pointer */
@@ -121,9 +123,6 @@
 }
 
 
-static int	call_unmount_prog(int, int, char *, int, char *,
-			    char *);
-static int	get_media_info(char *, char **, int *, char **);
 /*
  * This is an ON Consolidation Private interface.
  *
@@ -134,6 +133,9 @@
 int
 _dev_unmount(char *path)
 {
+	static int	call_unmount_prog(int, int, char *, int, char *,
+			    char *);
+	static int	get_media_info(char *, char **, int *, char **);
 	char		*bn = NULL;		/* block name */
 	char		*mtype = NULL;		/* media type */
 	char		*spcl = NULL;		/* special dev. path */
@@ -158,7 +160,7 @@
 		absname = pathbuf;
 
 	volume_is_not_managed = !volmgt_running() ||
-	    (!volmgt_ownspath(absname) && volmgt_symname(bn) == NULL);
+		(!volmgt_ownspath(absname) && volmgt_symname(bn) == NULL);
 
 	free(pathbuf);
 
@@ -403,12 +405,12 @@
 	return (path);
 }
 
-static int	vol_getmntdev(FILE *, struct mnttab *, dev_t,
-			    struct dk_cinfo *);
 
 static int
 get_media_info(char *path, char **mtypep, int *mnump, char **spclp)
 {
+	static int	vol_getmntdev(FILE *, struct mnttab *, dev_t,
+			    struct dk_cinfo *);
 	FILE		*fp = NULL;
 	int		fd = -1;
 	char		*cn = NULL;		/* char spcl pathname */
@@ -463,7 +465,7 @@
 
 		if (!volmgt_running() ||
 		    (!volmgt_ownspath(*spclp) &&
-		    volmgt_symname(*spclp) == NULL)) {
+			volmgt_symname(*spclp) == NULL)) {
 			ret_val = TRUE;		/* success (if limited) */
 			goto dun;
 		}
--- a/usr/src/lib/pam_modules/sample/sample_acct_mgmt.c	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/lib/pam_modules/sample/sample_acct_mgmt.c	Thu Apr 30 20:04:06 2009 -0700
@@ -2,8 +2,9 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * 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.
@@ -19,10 +20,12 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
+
 #include <syslog.h>
 #include <pwd.h>
 #include <unistd.h>
@@ -103,12 +106,11 @@
 	return (error?PAM_SUCCESS:PAM_AUTH_ERR);
 }
 
-static char *getname();
-
 static int
 parse_allow_name(char *who, char *cp)
 {
 	char name[256];
+	static char *getname();
 
 	/* catch "allow=" */
 	if (*cp == '\0')
--- a/usr/src/ucblib/libucb/i386/sys/signal.c	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/ucblib/libucb/i386/sys/signal.c	Thu Apr 30 20:04:06 2009 -0700
@@ -2,8 +2,9 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * 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.
@@ -19,7 +20,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -42,6 +43,8 @@
  *		mask |= sigmask(i)
  */
 
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
+
 #include <sys/types.h>
 #include <ucontext.h>
 #include <signal.h>
@@ -81,10 +84,10 @@
  * and then calls the real handler
  */
 
-static void ucbsigvechandler();
 void
 _sigvechandler(int sig, siginfo_t *sip, ucontext_t *ucp)
 {
+	static void ucbsigvechandler();
 
 	ucbsigvechandler(sig, sip, ucp);
 }
@@ -373,7 +376,7 @@
 	if (nsv.sv_mask != osv.sv_mask || nsv.sv_flags != osv.sv_flags) {
 		mask[s] = nsv.sv_mask = osv.sv_mask;
 		flags[s] = nsv.sv_flags =
-		    osv.sv_flags & ~(SV_RESETHAND|SV_INTERRUPT);
+			osv.sv_flags & ~(SV_RESETHAND|SV_INTERRUPT);
 		if (ucbsigvec(s, &nsv, (struct sigvec *)0) < 0)
 			return (SIG_ERR);
 	}
--- a/usr/src/uts/common/fs/smbclnt/smbfs/smbfs.h	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/uts/common/fs/smbclnt/smbfs/smbfs.h	Thu Apr 30 20:04:06 2009 -0700
@@ -33,13 +33,15 @@
  */
 
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
 #ifndef	_SMBFS_SMBFS_H
 #define	_SMBFS_SMBFS_H
 
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
+
 /*
  * FS-specific VFS structures for smbfs.
  * (per-mount stuff, etc.)
@@ -50,7 +52,6 @@
 
 #include <sys/list.h>
 #include <sys/vfs.h>
-#include <sys/vfs_opreg.h>
 #include <sys/fs/smbfs_mount.h>
 
 
--- a/usr/src/uts/common/io/pcmcia/pcmem.c	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/uts/common/io/pcmcia/pcmem.c	Thu Apr 30 20:04:06 2009 -0700
@@ -19,7 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -160,7 +160,6 @@
 }
 
 
-static void	pcmem_create_pcram_node(dev_info_t *);
 
 /*
  * pcmem_attach()
@@ -170,6 +169,7 @@
 pcmem_attach(dev_info_t *dip, ddi_attach_cmd_t cmd)
 {
 	char		adapter [MODMAXNAMELEN+1];
+	static void	pcmem_create_pcram_node(dev_info_t *);
 
 	/* resume from a checkpoint */
 	if (cmd == DDI_RESUME) {
--- a/usr/src/uts/common/io/ppm/ppm.c	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/uts/common/io/ppm/ppm.c	Thu Apr 30 20:04:06 2009 -0700
@@ -19,7 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -746,9 +746,6 @@
 }
 
 
-static int	ppm_manage_sx(s3a_t *, int);
-static int	ppm_search_list(pm_searchargs_t *);
-
 /*
  * interface between pm framework and ppm driver
  */
@@ -765,6 +762,8 @@
 	ppm_owned_t	*owned;
 	int		mode;
 	int		ret = DDI_SUCCESS;
+	static int	ppm_manage_sx(s3a_t *, int);
+	static int	ppm_search_list(pm_searchargs_t *);
 	int 		*res = (int *)result;
 	s3a_t s3args;
 
--- a/usr/src/uts/common/io/sfe/sfe.c	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/uts/common/io/sfe/sfe.c	Thu Apr 30 20:04:06 2009 -0700
@@ -31,10 +31,6 @@
  * DAMAGE.
  */
 
-/* Avoid undefined symbol for non IA architectures */
-#pragma weak	inb
-#pragma weak	outb
-
 /*
  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
@@ -418,6 +414,10 @@
 	return (sfe_search_pci_dev_subr(ddi_root_node(), vendor_id, device_id));
 }
 
+/* Avoid undefined symbol for non IA architectures */
+#pragma weak	inb
+#pragma weak	outb
+
 static boolean_t
 sfe_get_mac_addr_sis630e(struct gem_dev *dp)
 {
--- a/usr/src/uts/common/nfs/nfs.h	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/uts/common/nfs/nfs.h	Thu Apr 30 20:04:06 2009 -0700
@@ -46,11 +46,11 @@
 #include <sys/tsol/label.h>
 #include <sys/nvpair.h>
 #include <nfs/mount.h>
-#include <sys/vfs_opreg.h>
 #endif
 #include <vm/page.h>
 #include <rpc/rpc_sztypes.h>
 #include <sys/sysmacros.h>
+
 #ifdef	__cplusplus
 extern "C" {
 #endif
--- a/usr/src/uts/common/os/kmem.c	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/uts/common/os/kmem.c	Thu Apr 30 20:04:06 2009 -0700
@@ -2953,11 +2953,10 @@
 		    (task_func_t *)kmem_cache_scan, cp, TQ_NOSLEEP);
 }
 
-static void kmem_update(void *);
-
 static void
 kmem_update_timeout(void *dummy)
 {
+	static void kmem_update(void *);
 
 	(void) timeout(kmem_update, dummy, kmem_reap_interval);
 }
--- a/usr/src/uts/common/os/sunpm.c	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/uts/common/os/sunpm.c	Thu Apr 30 20:04:06 2009 -0700
@@ -591,14 +591,13 @@
 	cv_init(&pm_dep_thread_cv, NULL, CV_DEFAULT, NULL);
 }
 
-static int pm_reset_timestamps(dev_info_t *, void *);
-
 static boolean_t
 pm_cpr_callb(void *arg, int code)
 {
 	_NOTE(ARGUNUSED(arg))
 	static int auto_save;
 	static pm_cpupm_t cpupm_save;
+	static int pm_reset_timestamps(dev_info_t *, void *);
 
 	switch (code) {
 	case CB_CODE_CPR_CHKPT:
@@ -665,8 +664,6 @@
 	return (B_TRUE);
 }
 
-static void pm_dep_thread(void);
-
 /*
  * This needs to be called after the root and platform drivers are loaded
  * and be single-threaded with respect to driver attach/detach
@@ -677,6 +674,7 @@
 	PMD_FUNC(pmf, "pm_init")
 	char **mod;
 	extern pri_t minclsyspri;
+	static void pm_dep_thread(void);
 
 	pm_comps_notlowest = 0;
 	pm_system_idle_threshold = pm_default_idle_threshold;
@@ -849,7 +847,6 @@
 	return (0);
 }
 
-static int pm_start(dev_info_t *dip);
 /*
  * Returns true if device is pm'd (after calling pm_start if need be)
  */
@@ -857,6 +854,7 @@
 e_pm_valid_info(dev_info_t *dip, pm_info_t **infop)
 {
 	pm_info_t *info;
+	static int pm_start(dev_info_t *dip);
 
 	/*
 	 * Check if the device is power managed if not.
@@ -1173,9 +1171,6 @@
 	return (DEVI(dip)->devi_pm_noinvolpm != DEVI(dip)->devi_pm_volpmd);
 }
 
-static int	cur_threshold(dev_info_t *, int);
-static int	pm_next_lower_power(pm_component_t *, int);
-
 /*
  * This function performs the actual scanning of the device.
  * It attempts to power off the indicated device's components if they have
@@ -1198,6 +1193,8 @@
 	pm_component_t	 *cp;
 	dev_info_t	*pdip = ddi_get_parent(dip);
 	int		circ;
+	static int	cur_threshold(dev_info_t *, int);
+	static int	pm_next_lower_power(pm_component_t *, int);
 	clock_t		min_scan = pm_default_min_scan;
 
 	/*
@@ -2457,8 +2454,6 @@
 	cp->pmc_cur_pwr = pm_level_to_index(dip, cp, level);
 }
 
-static int pm_phc_impl(dev_info_t *, int, int, int);
-
 /*
  * This is the default method of setting the power of a device if no ppm
  * driver has claimed it.
@@ -2472,6 +2467,7 @@
 	struct pm_component *cp = PM_CP(dip, comp);
 	int retval;
 	pm_info_t *info = PM_GET_PM_INFO(dip);
+	static int pm_phc_impl(dev_info_t *, int, int, int);
 
 	PMD(PMD_KIDSUP, ("%s: %s@%s(%s#%d), comp=%d, level=%d\n", pmf,
 	    PM_DEVICE(dip), comp, level))
@@ -2926,8 +2922,6 @@
 	return (pm_pscc_direct || pm_pscc_interest);
 }
 
-static int pm_phc_impl(dev_info_t *, int, int, int);
-
 /*
  * A driver is reporting that the power of one of its device's components
  * has changed.  Update the power state accordingly.
@@ -2940,6 +2934,7 @@
 	dev_info_t *pdip = ddi_get_parent(dip);
 	struct pm_component *cp;
 	int blocked, circ, pcirc, old_level;
+	static int pm_phc_impl(dev_info_t *, int, int, int);
 
 	if (level < 0) {
 		PMD(PMD_FAIL, ("%s: %s@%s(%s#%d): bad level=%d\n", pmf,
@@ -3760,8 +3755,6 @@
 	return (1);
 }
 
-static void bring_pmdep_up(dev_info_t *, int);
-
 static void
 bring_wekeeps_up(char *keeper)
 {
@@ -3771,6 +3764,7 @@
 	pm_info_t *wku_info;
 	char *kept_path;
 	dev_info_t *kept;
+	static void bring_pmdep_up(dev_info_t *, int);
 
 	if (panicstr) {
 		return;
@@ -5565,8 +5559,6 @@
 	return (pm_interest[clone]);
 }
 
-static void pm_enqueue_pscc(pscc_t *, pscc_t **);
-
 /*
  * Process with clone has just done PM_DIRECT_PM on dip, or has asked to
  * watch all state transitions (dip == NULL).  Set up data
@@ -5577,6 +5569,7 @@
 {
 	pscc_t	*p;
 	psce_t	*psce;
+	static void pm_enqueue_pscc(pscc_t *, pscc_t **);
 
 	/*
 	 * We definitely need a control struct, then we have to search to see
@@ -5788,13 +5781,13 @@
 	return (NULL);
 }
 
-static psce_t *pm_psc_find_clone(int, pscc_t **, krwlock_t *);
 /*
  * Find an entry for a particular clone in the direct list.
  */
 psce_t *
 pm_psc_clone_to_direct(int clone)
 {
+	static psce_t *pm_psc_find_clone(int, pscc_t **, krwlock_t *);
 	return (pm_psc_find_clone(clone, &pm_pscc_direct,
 	    &pm_pscc_direct_rwlock));
 }
@@ -5805,6 +5798,7 @@
 psce_t *
 pm_psc_clone_to_interest(int clone)
 {
+	static psce_t *pm_psc_find_clone(int, pscc_t **, krwlock_t *);
 	return (pm_psc_find_clone(clone, &pm_pscc_interest,
 	    &pm_pscc_interest_rwlock));
 }
@@ -7866,8 +7860,6 @@
 	ddi_trigger_softintr(pm_soft_id);
 }
 
-static major_t i_path_to_major(char *, char *);
-
 major_t
 pm_path_to_major(char *path)
 {
@@ -7875,6 +7867,7 @@
 	char *np, *ap, *bp;
 	major_t ret;
 	size_t len;
+	static major_t i_path_to_major(char *, char *);
 
 	PMD(PMD_NOINVOL, ("%s: %s\n", pmf, path))
 
@@ -8095,8 +8088,6 @@
 	return (maj);
 }
 
-static void i_pm_driver_removed(major_t major);
-
 /*
  * When user calls rem_drv, we need to forget no-involuntary-power-cycles state
  * An entry in the list means that the device is detached, so we need to
@@ -8106,6 +8097,7 @@
 void
 pm_driver_removed(major_t major)
 {
+	static void i_pm_driver_removed(major_t major);
 
 	/*
 	 * Serialize removal of drivers. This is to keep ancestors of
@@ -8117,10 +8109,6 @@
 	mutex_exit(&pm_remdrv_lock);
 }
 
-static void adjust_ancestors(char *, int);
-static int pm_is_noinvol_ancestor(pm_noinvol_t *);
-static void pm_noinvol_process_ancestors(char *);
-
 /*
  * This routine is called recursively by pm_noinvol_process_ancestors()
  */
@@ -8128,6 +8116,9 @@
 i_pm_driver_removed(major_t major)
 {
 	PMD_FUNC(pmf, "driver_removed")
+	static void adjust_ancestors(char *, int);
+	static int pm_is_noinvol_ancestor(pm_noinvol_t *);
+	static void pm_noinvol_process_ancestors(char *);
 	pm_noinvol_t *ip, *pp = NULL;
 	int wasvolpmd;
 	ASSERT(major != DDI_MAJOR_T_NONE);
--- a/usr/src/uts/common/rpc/rpcmod.c	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/uts/common/rpc/rpcmod.c	Thu Apr 30 20:04:06 2009 -0700
@@ -562,7 +562,6 @@
 	return ((*((struct temp_slot *)q->q_ptr)->ops->xo_close)(q, flag, crp));
 }
 
-static void rpcmod_release(queue_t *, mblk_t *);
 /*
  * rpcmodopen -	open routine gets called when the module gets pushed
  *		onto the stream.
@@ -574,6 +573,7 @@
 	struct rpcm *rmp;
 
 	extern void (*rpc_rele)(queue_t *, mblk_t *);
+	static void rpcmod_release(queue_t *, mblk_t *);
 
 	TRACE_0(TR_FAC_KRPC, TR_RPCMODOPEN_START, "rpcmodopen_start:");
 
--- a/usr/src/uts/common/sys/exec.h	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/uts/common/sys/exec.h	Thu Apr 30 20:04:06 2009 -0700
@@ -20,7 +20,7 @@
  */
 
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -68,6 +68,9 @@
 #define	LOADABLE_EXEC(e)	((e)->exec_lock)
 #define	LOADED_EXEC(e)		((e)->exec_func)
 
+extern int nexectype;		/* number of elements in execsw */
+extern struct execsw execsw[];
+extern kmutex_t execsw_lock;
 
 /*
  * User argument structure for passing exec information around between the
@@ -180,10 +183,6 @@
 	krwlock_t	*exec_lock;
 };
 
-extern int nexectype;		/* number of elements in execsw */
-extern struct execsw execsw[];
-extern kmutex_t execsw_lock;
-
 extern short elfmagic;
 extern short intpmagic;
 extern short javamagic;
--- a/usr/src/uts/common/sys/fs/autofs.h	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/uts/common/sys/fs/autofs.h	Thu Apr 30 20:04:06 2009 -0700
@@ -19,13 +19,15 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
 #ifndef	_SYS_FS_AUTOFS_H
 #define	_SYS_FS_AUTOFS_H
 
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
+
 #include <rpc/clnt.h>
 #include <gssapi/gssapi.h>
 #include <sys/vfs.h>
@@ -41,10 +43,6 @@
 #include <sys/door.h>
 #include <rpcsvc/autofs_prot.h>
 
-#ifdef _KERNEL
-#include <sys/vfs_opreg.h>
-#endif
-
 #ifdef	__cplusplus
 extern "C" {
 #endif
--- a/usr/src/uts/common/sys/fs/dv_node.h	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/uts/common/sys/fs/dv_node.h	Thu Apr 30 20:04:06 2009 -0700
@@ -19,13 +19,15 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
 #ifndef _SYS_DV_NODE_H
 #define	_SYS_DV_NODE_H
 
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
+
 /*
  * dv_nodes are the file-system specific part of the
  * vnodes for the device filesystem.
@@ -44,17 +46,12 @@
 #include <sys/devpolicy.h>
 #include <sys/avl.h>
 
-#ifdef _KERNEL
-#include <sys/vfs_opreg.h>
-#endif
-
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 #ifdef _KERNEL
 
-
 /*
  * Here's the focal point of this filesystem
  */
--- a/usr/src/uts/common/sys/fs/fifonode.h	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/uts/common/sys/fs/fifonode.h	Thu Apr 30 20:04:06 2009 -0700
@@ -19,7 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -30,9 +30,7 @@
 #ifndef	_SYS_FS_FIFONODE_H
 #define	_SYS_FS_FIFONODE_H
 
-#if defined(_KERNEL)
-#include <sys/vfs_opreg.h>
-#endif
+#pragma ident	"%Z%%M%	%I%	%E% SMI"	/* SVr4.0 1.15	*/
 
 #ifdef	__cplusplus
 extern "C" {
--- a/usr/src/uts/common/sys/fs/hsfs_impl.h	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/uts/common/sys/fs/hsfs_impl.h	Thu Apr 30 20:04:06 2009 -0700
@@ -22,14 +22,14 @@
  * High Sierra filesystem internal routine definitions.
  */
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
 #ifndef	_SYS_FS_HSFS_IMPL_H
 #define	_SYS_FS_HSFS_IMPL_H
 
-#include <sys/vfs_opreg.h>
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
 
 #ifdef	__cplusplus
 extern "C" {
--- a/usr/src/uts/common/sys/fs/lofs_info.h	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/uts/common/sys/fs/lofs_info.h	Thu Apr 30 20:04:06 2009 -0700
@@ -19,7 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -30,9 +30,7 @@
 #ifndef _SYS_FS_LOFS_INFO_H
 #define	_SYS_FS_LOFS_INFO_H
 
-#ifdef _KERNEL
-#include <sys/vfs_opreg.h>
-#endif
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
 
 #ifdef	__cplusplus
 extern "C" {
--- a/usr/src/uts/common/sys/fs/namenode.h	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/uts/common/sys/fs/namenode.h	Thu Apr 30 20:04:06 2009 -0700
@@ -2,8 +2,9 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * 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.
@@ -22,16 +23,17 @@
 /*	  All Rights Reserved  	*/
 
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
 #ifndef	_SYS_FS_NAMENODE_H
 #define	_SYS_FS_NAMENODE_H
 
+#pragma ident	"%Z%%M%	%I%	%E% SMI"	/* SVr4.0 1.4	*/
+
 #if defined(_KERNEL)
 #include <sys/vnode.h>
-#include <sys/vfs_opreg.h>
 #endif
 
 #ifdef	__cplusplus
--- a/usr/src/uts/common/sys/fs/pc_node.h	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/uts/common/sys/fs/pc_node.h	Thu Apr 30 20:04:06 2009 -0700
@@ -19,13 +19,15 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
 #ifndef	_SYS_FS_PC_NODE_H
 #define	_SYS_FS_PC_NODE_H
 
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
+
 #ifdef	__cplusplus
 extern "C" {
 #endif
@@ -34,10 +36,6 @@
 #include <sys/buf.h>
 #include <sys/vnode.h>
 
-#ifdef _KERNEL
-#include <sys/vfs_opreg.h>
-#endif
-
 /*
  * This overlays the fid structure (see vfs.h)
  *
@@ -105,12 +103,8 @@
  */
 extern struct vnodeops *pcfs_fvnodeops;
 extern struct vnodeops *pcfs_dvnodeops;
-
-#ifdef _KERNEL
 extern const struct fs_operation_def pcfs_fvnodeops_template[];
 extern const struct fs_operation_def pcfs_dvnodeops_template[];
-#endif
-
 extern struct pchead pcfhead[];
 extern struct pchead pcdhead[];
 
--- a/usr/src/uts/common/sys/fs/tmpnode.h	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/uts/common/sys/fs/tmpnode.h	Thu Apr 30 20:04:06 2009 -0700
@@ -2,8 +2,9 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * 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.
@@ -19,17 +20,18 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
 #ifndef _SYS_FS_TMPNODE_H
 #define	_SYS_FS_TMPNODE_H
 
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
+
 #include <sys/t_lock.h>
 #include <vm/seg.h>
 #include <vm/seg_vn.h>
-#include <sys/vfs_opreg.h>
 
 #ifdef	__cplusplus
 extern "C" {
--- a/usr/src/uts/common/sys/fs/ufs_inode.h	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/uts/common/sys/fs/ufs_inode.h	Thu Apr 30 20:04:06 2009 -0700
@@ -19,7 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -57,10 +57,6 @@
 #include <sys/fs/ufs_panic.h>
 #include <sys/dnlc.h>
 
-#ifdef _KERNEL
-#include <sys/vfs_opreg.h>
-#endif
-
 #ifdef	__cplusplus
 extern "C" {
 #endif
--- a/usr/src/uts/common/sys/mode.h	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/uts/common/sys/mode.h	Thu Apr 30 20:04:06 2009 -0700
@@ -2,8 +2,9 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * 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.
@@ -19,8 +20,8 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
+ * Copyright (c) 1997-1998 by Sun Microsystems, Inc.
+ * All rights reserved.
  */
 
 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
@@ -30,14 +31,18 @@
 #ifndef _SYS_MODE_H
 #define	_SYS_MODE_H
 
-#include <sys/stat.h>
-#include <sys/vnode.h>
+#pragma ident	"%Z%%M%	%I%	%E% SMI"	/* SVr4.0 1.2	*/
 
 #ifdef	__cplusplus
 extern "C" {
 #endif
 
 /*
+ * REQUIRES sys/stat.h
+ * REQUIRES sys/vnode.h
+ */
+
+/*
  * Conversion between vnode types/modes and encoded type/mode as
  * seen by stat(2) and mknod(2).
  */
--- a/usr/src/uts/common/sys/socketvar.h	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/uts/common/sys/socketvar.h	Thu Apr 30 20:04:06 2009 -0700
@@ -55,10 +55,6 @@
 #include <sys/ksocket.h>
 #include <sys/kstat.h>
 
-#ifdef _KERNEL
-#include <sys/vfs_opreg.h>
-#endif
-
 #ifdef	__cplusplus
 extern "C" {
 #endif
--- a/usr/src/uts/common/syscall/lwp_sobj.c	Thu Apr 30 17:08:54 2009 -0700
+++ b/usr/src/uts/common/syscall/lwp_sobj.c	Thu Apr 30 20:04:06 2009 -0700
@@ -1122,7 +1122,6 @@
 	}
 }
 
-static int iswanted();
 int
 lwp_mutex_timedlock(lwp_mutex_t *lp, timespec_t *tsp)
 {
@@ -1141,6 +1140,7 @@
 	volatile uint8_t type = 0;
 	lwpchan_t lwpchan;
 	sleepq_head_t *sqh;
+	static int iswanted();
 	uint16_t flag;
 	int imm_timeout = 0;