summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr/src/cmd/audio/utilities/Makefile8
-rw-r--r--usr/src/cmd/bnu/grades.c15
-rw-r--r--usr/src/cmd/bnu/uucico.c12
-rw-r--r--usr/src/cmd/bnu/uucp.c11
-rw-r--r--usr/src/cmd/bnu/uux.c11
-rw-r--r--usr/src/cmd/dfs.cmds/general/general.c11
-rw-r--r--usr/src/cmd/fm/fmd/common/fmd_mdb.c2
-rw-r--r--usr/src/cmd/fmli/menu/mcurrent.c12
-rw-r--r--usr/src/cmd/fmli/menu/stmenu.c14
-rw-r--r--usr/src/cmd/fmli/oh/if_form.c12
-rw-r--r--usr/src/cmd/fmli/oh/if_init.c14
-rw-r--r--usr/src/cmd/fmli/oh/scram.c16
-rw-r--r--usr/src/cmd/fmli/oh/slk.c12
-rw-r--r--usr/src/cmd/fmli/qued/multiline.c13
-rw-r--r--usr/src/cmd/ldapcachemgr/cachemgr.c3
-rw-r--r--usr/src/cmd/mailx/hdr/glob.h20
-rw-r--r--usr/src/cmd/mdb/common/libstand/ctime.c7
-rw-r--r--usr/src/cmd/mdb/common/mdb/mdb_lex.l11
-rw-r--r--usr/src/cmd/pcmciad/pcmciad.c18
-rw-r--r--usr/src/cmd/pg/pg.c5
-rw-r--r--usr/src/cmd/rpcgen/rpc_main.c20
-rw-r--r--usr/src/cmd/saf/extern.h11
-rw-r--r--usr/src/cmd/saf/structs.h40
-rw-r--r--usr/src/cmd/sgs/nm/common/nm.c16
-rw-r--r--usr/src/cmd/sgs/size/common/process.c14
-rw-r--r--usr/src/cmd/tar/tar.c7
-rw-r--r--usr/src/cmd/ttymon/tmextern.h7
-rw-r--r--usr/src/cmd/ttymon/tmstruct.h39
-rw-r--r--usr/src/cmd/ttymon/ttymon.c3
-rw-r--r--usr/src/cmd/vi/port/ex_voper.c18
-rw-r--r--usr/src/cmd/vi/port/exrecover.c12
-rw-r--r--usr/src/cmd/ypcmd/ypupdated/rpc.ypupdated.c6
-rw-r--r--usr/src/lib/libbsm/auditxml3
-rw-r--r--usr/src/lib/libbsm/common/adt_xlate.h2
-rw-r--r--usr/src/lib/libc/port/stdio/getpass.c7
-rw-r--r--usr/src/lib/libcurses/screen/tgetch.c34
-rw-r--r--usr/src/lib/libnisdb/db_headers.h18
-rw-r--r--usr/src/lib/libnisdb/db_index_c.x11
-rw-r--r--usr/src/lib/libnisdb/db_mindex_c.x11
-rw-r--r--usr/src/lib/libnsl/dial/callers.c45
-rw-r--r--usr/src/lib/libnsl/dial/conn.c32
-rw-r--r--usr/src/lib/libnsl/rpc/svc_vc.c7
-rw-r--r--usr/src/lib/libresolv/res_gethost.c10
-rw-r--r--usr/src/lib/libvolmgt/common/volmgt_on_private.c22
-rw-r--r--usr/src/lib/pam_modules/sample/sample_acct_mgmt.c12
-rw-r--r--usr/src/stand/lib/fs/nfs/lookup.c52
-rw-r--r--usr/src/stand/lib/fs/nfs/pathname.c28
-rw-r--r--usr/src/stand/lib/fs/nfs/st_pathname.h (renamed from usr/src/stand/lib/fs/nfs/pathname.h)49
-rw-r--r--usr/src/ucblib/libucb/i386/sys/signal.c13
-rw-r--r--usr/src/uts/common/fs/smbclnt/smbfs/smbfs.h5
-rw-r--r--usr/src/uts/common/io/pcmcia/pcmem.c4
-rw-r--r--usr/src/uts/common/io/ppm/ppm.c7
-rw-r--r--usr/src/uts/common/io/sfe/sfe.c8
-rw-r--r--usr/src/uts/common/nfs/nfs.h2
-rw-r--r--usr/src/uts/common/os/kmem.c3
-rw-r--r--usr/src/uts/common/os/sunpm.c41
-rw-r--r--usr/src/uts/common/rpc/rpcmod.c2
-rw-r--r--usr/src/uts/common/sys/exec.h9
-rw-r--r--usr/src/uts/common/sys/fs/autofs.h8
-rw-r--r--usr/src/uts/common/sys/fs/dv_node.h9
-rw-r--r--usr/src/uts/common/sys/fs/fifonode.h6
-rw-r--r--usr/src/uts/common/sys/fs/hsfs_impl.h4
-rw-r--r--usr/src/uts/common/sys/fs/lofs_info.h6
-rw-r--r--usr/src/uts/common/sys/fs/namenode.h10
-rw-r--r--usr/src/uts/common/sys/fs/pc_node.h12
-rw-r--r--usr/src/uts/common/sys/fs/tmpnode.h10
-rw-r--r--usr/src/uts/common/sys/fs/ufs_inode.h6
-rw-r--r--usr/src/uts/common/sys/mode.h17
-rw-r--r--usr/src/uts/common/sys/socketvar.h4
-rw-r--r--usr/src/uts/common/syscall/lwp_sobj.c2
70 files changed, 466 insertions, 485 deletions
diff --git a/usr/src/cmd/audio/utilities/Makefile b/usr/src/cmd/audio/utilities/Makefile
index 2b6097c0e6..bc50c948af 100644
--- a/usr/src/cmd/audio/utilities/Makefile
+++ b/usr/src/cmd/audio/utilities/Makefile
@@ -19,11 +19,9 @@
# CDDL HEADER END
#
#
-# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2009 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
@@ -38,7 +36,7 @@ CFLAGS += $(CCVERBOSE)
LINTFLAGS += -m -v -u
-AR= /usr/ccs/bin/ar cq
+AR= /usr/ccs/bin/ar
RANLIB= /usr/ccs/bin/ranlib
RM= /usr/bin/rm -f
@@ -88,7 +86,7 @@ install all: $(libaudio)
$(libaudio): $(COBJS) $(CCOBJS)
$(RM) -f $@
- $(AR) $@ $(COBJS) $(CCOBJS)
+ $(AR) cq $@ $(COBJS) $(CCOBJS)
test ! -f $(RANLIB) || $(RANLIB) $@
clean:
diff --git a/usr/src/cmd/bnu/grades.c b/usr/src/cmd/bnu/grades.c
index 203a8d9a70..9a7fbee731 100644
--- a/usr/src/cmd/bnu/grades.c
+++ b/usr/src/cmd/bnu/grades.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.
@@ -23,12 +22,10 @@
/* All Rights Reserved */
/*
- * Copyright (c) 2000 by Sun Microsystems, Inc.
- * All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
*/
-#ident "%Z%%M% %I% %E% SMI" /* from SVR4 bnu:grades.c 1.7 */
-
#include "uucp.h"
#include <grp.h>
@@ -314,6 +311,8 @@ struct cs_struct *scfile;
return(SUCCESS);
}
+static void lcase();
+
/*
* jsize - determines whether if a job is small enough to
* be placed in the appropiate queue.
@@ -336,7 +335,6 @@ long *nlimit;
#define ONE_K (1024)
#define ONE_MEG ((1024)*(1024))
- static void lcase();
char rest[SMBUF];
char msg[BUFSIZ], *p;
@@ -553,7 +551,6 @@ int na;
#define G_GRP "group"
#define G_NGRP "non-group"
- static void lcase();
char actn[SMBUF];
char ufld[SMBUF];
char msg[BUFSIZ];
diff --git a/usr/src/cmd/bnu/uucico.c b/usr/src/cmd/bnu/uucico.c
index ac3f721447..76a0aa3ba4 100644
--- a/usr/src/cmd/bnu/uucico.c
+++ b/usr/src/cmd/bnu/uucico.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 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -28,8 +27,6 @@
/* All Rights Reserved */
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* uucp file transfer program:
@@ -79,6 +76,8 @@ static void checkrmt(); /* See if we want to talk to remote. */
extern char *Mytype;
+static char *pskip();
+
int
main(argc, argv, envp)
int argc;
@@ -87,7 +86,6 @@ char **envp;
{
extern void intrEXIT(), onintr(), timeout();
- static char *pskip();
extern void setservice();
#ifndef ATTSVR3
void setTZ();
diff --git a/usr/src/cmd/bnu/uucp.c b/usr/src/cmd/bnu/uucp.c
index 2c57d7e61b..4a23f398b4 100644
--- a/usr/src/cmd/bnu/uucp.c
+++ b/usr/src/cmd/bnu/uucp.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,15 +19,13 @@
* CDDL HEADER END
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * 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 */
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include "uucp.h"
/*
@@ -472,6 +469,7 @@ int code;
exit(code);
}
+static FILE *syscfile();
/*
* generate copy files for s1!f1 -> s2!f2
* Note: only one remote machine, other situations
@@ -485,7 +483,6 @@ copy(s1, f1, s2, f2)
char *s1, *f1, *s2, *f2;
{
FILE *cfp;
- static FILE *syscfile();
struct stat stbuf, stbuf1;
int type, statret;
char dfile[NAMESIZE];
diff --git a/usr/src/cmd/bnu/uux.c b/usr/src/cmd/bnu/uux.c
index 28f1c6ff22..e2d8994044 100644
--- a/usr/src/cmd/bnu/uux.c
+++ b/usr/src/cmd/bnu/uux.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 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -28,8 +27,6 @@
/* All Rights Reserved */
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include "uucp.h"
#define SHORTBUF 64
@@ -61,6 +58,7 @@ static int _Statop;
char Sgrade[NAMESIZE];
void cleanup();
static void usage();
+static void onintr();
/*
* uux
@@ -73,7 +71,6 @@ char *envp[];
{
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 */
diff --git a/usr/src/cmd/dfs.cmds/general/general.c b/usr/src/cmd/dfs.cmds/general/general.c
index 3b13807dbb..cb84d4d3a7 100644
--- a/usr/src/cmd/dfs.cmds/general/general.c
+++ b/usr/src/cmd/dfs.cmds/general/general.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.
@@ -24,12 +23,10 @@
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* generic interface to dfs commands.
*
@@ -57,6 +54,7 @@
/* cmd name, -o, opts, (char *)0 terminator */
static char *getfs();
+static int invalid();
void perror();
int
@@ -64,7 +62,6 @@ main(argc, argv)
int argc;
char **argv;
{
- static int invalid();
extern char *optarg;
extern int optind;
FILE *dfp; /* fp for dfs list */
diff --git a/usr/src/cmd/fm/fmd/common/fmd_mdb.c b/usr/src/cmd/fm/fmd/common/fmd_mdb.c
index a9e89d37bc..517e585960 100644
--- a/usr/src/cmd/fm/fmd/common/fmd_mdb.c
+++ b/usr/src/cmd/fm/fmd/common/fmd_mdb.c
@@ -1167,11 +1167,11 @@ fcf_hdr(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
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);
diff --git a/usr/src/cmd/fmli/menu/mcurrent.c b/usr/src/cmd/fmli/menu/mcurrent.c
index 23aa72feac..c93af3782e 100644
--- a/usr/src/cmd/fmli/menu/mcurrent.c
+++ b/usr/src/cmd/fmli/menu/mcurrent.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,15 +19,13 @@
* CDDL HEADER END
*/
/*
- * Copyright 1997 Sun Microsystems, Inc. All rights reserved.
+ * 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 */
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <stdio.h>
#include <curses.h>
#include "wish.h"
@@ -92,6 +89,8 @@ menu_noncurrent()
return SUCCESS;
}
+static void menu_show();
+
void
menu_index(m, newindex, hcols)
register struct menu *m;
@@ -110,7 +109,6 @@ int hcols;
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);
diff --git a/usr/src/cmd/fmli/menu/stmenu.c b/usr/src/cmd/fmli/menu/stmenu.c
index 7492899cd3..1a248412b5 100644
--- a/usr/src/cmd/fmli/menu/stmenu.c
+++ b/usr/src/cmd/fmli/menu/stmenu.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,15 +20,13 @@
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * 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 */
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <stdio.h>
#include <ctype.h>
#include "wish.h"
@@ -529,6 +526,9 @@ _menu_cleanup()
curstring = NULL;
}
+static void strtolower();
+static int nocase_strncmp();
+
static int
menu_match(m, s, n, t)
register struct menu *m;
@@ -540,8 +540,6 @@ token t;
register int start;
register int count;
register char *p;
- static void strtolower();
- static int nocase_strncmp();
char badmatch[PATHSIZ];
start = m->index;
diff --git a/usr/src/cmd/fmli/oh/if_form.c b/usr/src/cmd/fmli/oh/if_form.c
index b4aee060c8..bb951f44ae 100644
--- a/usr/src/cmd/fmli/oh/if_form.c
+++ b/usr/src/cmd/fmli/oh/if_form.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 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -29,8 +28,6 @@
/* All Rights Reserved */
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <ctype.h>
#include <stdio.h>
#include <string.h>
@@ -980,6 +977,8 @@ char *str;
return(FAIL);
}
+static int chk_page();
+
/*
* CHK_FORM returns the actual number of the FIRST field that
* is invalid ....
@@ -989,7 +988,6 @@ chk_form()
{
register int n, page, fldnum;
int savefield, savepage, retval;
- static int chk_page();
/*
* Save current form page/field
diff --git a/usr/src/cmd/fmli/oh/if_init.c b/usr/src/cmd/fmli/oh/if_init.c
index cfaf5ff5f1..b98f48db5d 100644
--- a/usr/src/cmd/fmli/oh/if_init.c
+++ b/usr/src/cmd/fmli/oh/if_init.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,15 +20,13 @@
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 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>
@@ -227,6 +224,9 @@ char *strnsave();
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,8 +236,6 @@ char *initfile;
{
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;
diff --git a/usr/src/cmd/fmli/oh/scram.c b/usr/src/cmd/fmli/oh/scram.c
index bf644aba0e..1b265bec20 100644
--- a/usr/src/cmd/fmli/oh/scram.c
+++ b/usr/src/cmd/fmli/oh/scram.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 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -29,8 +28,6 @@
/* 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>
@@ -69,6 +66,7 @@ static int pack();
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
@@ -77,7 +75,6 @@ int
scram(file)
register char *file;
{
- static void regetkey();
strcpy(Keyprompt, "Please enter scramble key: ");
strcpy(Srcfile, file);
@@ -124,7 +121,6 @@ token t;
{
struct ott_entry *entry, *path_to_ott();
struct stat buf;
- static void regetkey();
if (t == TOK_CANCEL)
return (SUCCESS);
@@ -343,7 +339,7 @@ struct ott_entry *entry;
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)
@@ -371,7 +367,7 @@ mkencrypart()
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;
diff --git a/usr/src/cmd/fmli/oh/slk.c b/usr/src/cmd/fmli/oh/slk.c
index 52f6c7226b..8e0f9cfe84 100644
--- a/usr/src/cmd/fmli/oh/slk.c
+++ b/usr/src/cmd/fmli/oh/slk.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,15 +19,13 @@
* CDDL HEADER END
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * 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 */
-#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
@@ -504,6 +501,8 @@ setup_slk_array()
#define REDEFINED(x) ((x).label && (*((x).label) != '\0' || (x).tok < 0))
+static void showslks();
+
/*
* SETSLKS will make "slks" the currently displayed SLKS
*/
@@ -513,7 +512,6 @@ struct slk slks[];
int flag;
{
register int i, more_slks;
- static void showslks();
#ifdef _DEBUG
_debug(stderr, "in setslk!\n");
diff --git a/usr/src/cmd/fmli/qued/multiline.c b/usr/src/cmd/fmli/qued/multiline.c
index 2999a61c11..906320f629 100644
--- a/usr/src/cmd/fmli/qued/multiline.c
+++ b/usr/src/cmd/fmli/qued/multiline.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.
@@ -19,6 +18,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 */
@@ -27,7 +31,6 @@
* Copyright (c) 1985 AT&T
* All Rights Reserved
*/
-#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.11 */
#include <stdio.h>
#include <ctype.h>
@@ -39,6 +42,7 @@
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)
@@ -58,7 +62,6 @@ token tok;
{
register token rettok;
register int col;
- static int emptyrow();
rettok = TOK_NOP;
switch (tok) {
diff --git a/usr/src/cmd/ldapcachemgr/cachemgr.c b/usr/src/cmd/ldapcachemgr/cachemgr.c
index 5d57b36dcc..3abb73734a 100644
--- a/usr/src/cmd/ldapcachemgr/cachemgr.c
+++ b/usr/src/cmd/ldapcachemgr/cachemgr.c
@@ -270,6 +270,8 @@ server_destroy(void *arg)
(void) mutex_unlock(&create_lock);
}
+static void client_killserver();
+
int
main(int argc, char ** argv)
{
@@ -282,7 +284,6 @@ main(int argc, char ** argv)
struct stat buf;
sigset_t myset;
struct sigaction sighupaction;
- static void client_killserver();
int debug_level = 0;
/* setup for localization */
diff --git a/usr/src/cmd/mailx/hdr/glob.h b/usr/src/cmd/mailx/hdr/glob.h
index 01dcf5b317..d46fc5a3f3 100644
--- a/usr/src/cmd/mailx/hdr/glob.h
+++ b/usr/src/cmd/mailx/hdr/glob.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.
@@ -22,10 +21,9 @@
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
-
/*
- * Copyright (c) 1998 by Sun Microsystems, Inc.
- * All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
*/
/*
@@ -38,7 +36,8 @@
* contributors.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
+#ifndef _HDR_GLOB_H
+#define _HDR_GLOB_H
/*
* mailx -- a modified version of a University of California at Berkeley
@@ -69,7 +68,6 @@ extern char *editfile; /* Name of file being edited */
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[]; /* ???? */
@@ -82,7 +80,7 @@ extern FILE *itf; /* Input temp file buffer */
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 locking in /var/mail */
+extern char *lockname; /* named used for /var/mail locking */
extern char *maildir; /* directory for mail files */
extern char mailname[]; /* Name of /var/mail system mailbox */
extern off_t mailsize; /* Size of system mailbox */
@@ -112,7 +110,7 @@ extern int rcvmode; /* True if receiving mail */
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 */
@@ -143,3 +141,5 @@ extern int receipt_flg; /* Flag for return receipt */
*/
extern char *optarg;
extern int optind;
+
+#endif /* _HDR_GLOB_H */
diff --git a/usr/src/cmd/mdb/common/libstand/ctime.c b/usr/src/cmd/mdb/common/libstand/ctime.c
index c050888392..637e810019 100644
--- a/usr/src/cmd/mdb/common/libstand/ctime.c
+++ b/usr/src/cmd/mdb/common/libstand/ctime.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -9,8 +9,6 @@
* 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
@@ -149,6 +147,8 @@ localtime(const time_t *clock)
#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,7 +159,6 @@ __posix_asctime_r(const struct tm *t, char *cbuf)
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;
diff --git a/usr/src/cmd/mdb/common/mdb/mdb_lex.l b/usr/src/cmd/mdb/common/mdb/mdb_lex.l
index b3c662b5ff..4182cdc818 100644
--- a/usr/src/cmd/mdb/common/mdb/mdb_lex.l
+++ b/usr/src/cmd/mdb/common/mdb/mdb_lex.l
@@ -5,9 +5,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,12 +21,10 @@
*
* CDDL HEADER END
*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 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>
@@ -57,7 +54,7 @@
* to shut the linker up.
*/
#ifdef _KMDB
-static FILE __iob[_NFILE];
+FILE __iob[_NFILE];
#endif
/*
diff --git a/usr/src/cmd/pcmciad/pcmciad.c b/usr/src/cmd/pcmciad/pcmciad.c
index d99ca96101..1489eb5d5d 100644
--- a/usr/src/cmd/pcmciad/pcmciad.c
+++ b/usr/src/cmd/pcmciad/pcmciad.c
@@ -19,12 +19,10 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 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.
@@ -1304,6 +1302,7 @@ setup_autopush(char *driver)
static void unmount_media(long, char *);
static void signal_vold(long, char *);
+static void makepdir();
int volmgt_running();
char *media_findname(char *);
@@ -1315,7 +1314,6 @@ char *media_findname(char *);
static void
meminit()
{
- static void makepdir();
#ifndef lint
mutex_lock(&meminit_lock);
@@ -1579,6 +1577,7 @@ get_devrdsk(long socket, char *path, char *device_type)
return (found ? namebuf : NULL);
}
+static void start_unmount(char *, char *);
/*
* unmount_media - Unmount PCMCIA media file system
*
@@ -1589,7 +1588,6 @@ get_devrdsk(long socket, char *path, char *device_type)
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;
@@ -1644,6 +1642,9 @@ out:
(void) fclose(fp);
}
+static int req_vold_umount(char *);
+static int do_umount(char *);
+
/*
* start_unmount - Start to unmount mounting directory
*
@@ -1653,8 +1654,6 @@ out:
static void
start_unmount(char *mnt_special, char *mnt_mountp)
{
- static int req_vold_umount(char *);
- static int do_umount(char *);
int err = 0;
/*
@@ -1883,14 +1882,15 @@ dun:
}
+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;
diff --git a/usr/src/cmd/pg/pg.c b/usr/src/cmd/pg/pg.c
index 5a1767420c..22f54c6886 100644
--- a/usr/src/cmd/pg/pg.c
+++ b/usr/src/cmd/pg/pg.c
@@ -20,15 +20,13 @@
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * 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 */
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <signal.h>
#include <setjmp.h>
#include <sys/types.h>
@@ -859,7 +857,6 @@ ttyin()
int state = 0;
int width, length;
char multic[MB_LEN_MAX];
- static int readch();
int len;
(void) fixterm();
diff --git a/usr/src/cmd/rpcgen/rpc_main.c b/usr/src/cmd/rpcgen/rpc_main.c
index d8ea6896d5..b949bb680e 100644
--- a/usr/src/cmd/rpcgen/rpc_main.c
+++ b/usr/src/cmd/rpcgen/rpc_main.c
@@ -546,6 +546,19 @@ h_output(char *infile, char *define, int extend, char *outfile)
/* 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 */
@@ -597,13 +610,6 @@ h_output(char *infile, char *define, int extend, char *outfile)
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) {
diff --git a/usr/src/cmd/saf/extern.h b/usr/src/cmd/saf/extern.h
index 0b909fba14..432a4000ad 100644
--- a/usr/src/cmd/saf/extern.h
+++ b/usr/src/cmd/saf/extern.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.
@@ -23,14 +22,14 @@
/* All Rights Reserved */
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _EXTERN_H
#define _EXTERN_H
-#pragma ident "%Z%%M% %I% %E% SMI"
+#include "structs.h"
#ifdef __cplusplus
extern "C" {
@@ -69,7 +68,7 @@ extern struct sactab *read_entry();
extern struct sactab *findpm();
extern char *trim();
-extern char *pstate(unchar);
+extern char *pstate(uchar_t);
extern char *nexttok();
extern char **mkargv();
extern char *make_tempname();
diff --git a/usr/src/cmd/saf/structs.h b/usr/src/cmd/saf/structs.h
index c06c267bd0..420ab18243 100644
--- a/usr/src/cmd/saf/structs.h
+++ b/usr/src/cmd/saf/structs.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.
@@ -19,17 +18,20 @@
*
* 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 */
-#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.5*/
-
-
-/*
- * REQUIRES: sac.h misc.h
- */
+#ifndef _STRUCTS_H
+#define _STRUCTS_H
+#include <sac.h>
+#include "misc.h"
/*
* error messages
@@ -77,17 +79,19 @@ struct sactab {
* defn's for sc_sstate, sc_pstate, and sc_lstate
*/
-# 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 */
+#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 */
/*
* defn's for sc_flags
*/
-# define D_FLAG 0x1
-# define X_FLAG 0x2
+#define D_FLAG 0x1
+#define X_FLAG 0x2
+
+#endif /* _STRUCTS_H */
diff --git a/usr/src/cmd/sgs/nm/common/nm.c b/usr/src/cmd/sgs/nm/common/nm.c
index c3f7197e06..943356e6d4 100644
--- a/usr/src/cmd/sgs/nm/common/nm.c
+++ b/usr/src/cmd/sgs/nm/common/nm.c
@@ -646,6 +646,14 @@ print_ar_files(int fd, Elf * elf_file, char *filename)
} /* 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,
@@ -670,15 +678,7 @@ print_symtab(Elf *elf_file, unsigned int shstrndx,
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.
diff --git a/usr/src/cmd/sgs/size/common/process.c b/usr/src/cmd/sgs/size/common/process.c
index 2e4e60b0cd..cae1a6de9a 100644
--- a/usr/src/cmd/sgs/size/common/process.c
+++ b/usr/src/cmd/sgs/size/common/process.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.
@@ -19,13 +18,16 @@
*
* 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>
@@ -60,6 +62,7 @@ static const char *format[3] = {
"%lld + %lld + %lld = %lld\n"
};
+static void process_phdr(Elf *elf, GElf_Half num);
void
process(Elf * elf)
@@ -92,7 +95,6 @@ process(Elf * elf)
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-
diff --git a/usr/src/cmd/tar/tar.c b/usr/src/cmd/tar/tar.c
index 329251c056..0d2f82d20e 100644
--- a/usr/src/cmd/tar/tar.c
+++ b/usr/src/cmd/tar/tar.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -34,8 +34,6 @@
* 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>
@@ -4711,6 +4709,8 @@ response(void)
/* Has file been modified since being put into archive? If so, return > 0. */
+static off_t lookup(char *);
+
static int
checkupdate(char *arg)
{
@@ -4718,7 +4718,6 @@ checkupdate(char *arg)
time_t mtime;
long nsecs;
off_t seekp;
- static off_t lookup(char *);
rewind(tfile);
if ((seekp = lookup(arg)) < 0)
diff --git a/usr/src/cmd/ttymon/tmextern.h b/usr/src/cmd/ttymon/tmextern.h
index cffc044641..c285b434eb 100644
--- a/usr/src/cmd/ttymon/tmextern.h
+++ b/usr/src/cmd/ttymon/tmextern.h
@@ -26,9 +26,10 @@
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
+#ifndef _TMEXTERN_H
+#define _TMEXTERN_H
-#ifndef __TMEXTERN_H
-#define __TMEXTERN_H
+#include "tmstruct.h"
#ifdef __cplusplus
extern "C" {
@@ -174,4 +175,4 @@ extern "C" {
}
#endif
-#endif /* __TMEXTERN_H */
+#endif /* _TMEXTERN_H */
diff --git a/usr/src/cmd/ttymon/tmstruct.h b/usr/src/cmd/ttymon/tmstruct.h
index 1598de05a1..38aea1063e 100644
--- a/usr/src/cmd/ttymon/tmstruct.h
+++ b/usr/src/cmd/ttymon/tmstruct.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.
@@ -19,11 +18,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 */
-#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.4 */
+#ifndef _TMSTRUCT_H
+#define _TMSTRUCT_H
/*
* /etc/ttydefs structure
@@ -76,32 +81,34 @@ struct pmtab {
* 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 */
diff --git a/usr/src/cmd/ttymon/ttymon.c b/usr/src/cmd/ttymon/ttymon.c
index 367776ccd2..b0555612d3 100644
--- a/usr/src/cmd/ttymon/ttymon.c
+++ b/usr/src/cmd/ttymon/ttymon.c
@@ -265,6 +265,8 @@ initialize()
Initialized = TRUE;
}
+static void free_defs();
+
/*
* open_all - open devices in pmtab if the entry is
* - valid, fd = 0, and pid = 0
@@ -274,7 +276,6 @@ open_all()
{
struct pmtab *tp;
int check_modtime;
- static void free_defs();
sigset_t cset;
sigset_t tset;
diff --git a/usr/src/cmd/vi/port/ex_voper.c b/usr/src/cmd/vi/port/ex_voper.c
index 2e229d1c79..825996d0c4 100644
--- a/usr/src/cmd/vi/port/ex_voper.c
+++ b/usr/src/cmd/vi/port/ex_voper.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 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -32,8 +31,6 @@
* 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"
@@ -56,6 +53,8 @@
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.
@@ -84,7 +83,6 @@ operate(int c, int cnt)
int mouse_x;
int mouse_y;
int oline;
- static int get_addr();
/* #endif PTR_ADDRESSES */
moveop = vmove, deleteop = (int (*)())vdelete;
@@ -228,8 +226,8 @@ nocount:
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
@@ -745,7 +743,7 @@ errlab:
vmoving = 0;
wcursor = d == '`' ? ncols[c - 'a'] : 0;
if (opf == vmove && (wdot != dot ||
- (d == '`' && wcursor != cursor)))
+ (d == '`' && wcursor != cursor)))
markDOT();
if (wcursor) {
vsave();
diff --git a/usr/src/cmd/vi/port/exrecover.c b/usr/src/cmd/vi/port/exrecover.c
index 9bda1ec597..044e1ce2e5 100644
--- a/usr/src/cmd/vi/port/exrecover.c
+++ b/usr/src/cmd/vi/port/exrecover.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 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -30,8 +29,6 @@
/* 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
@@ -832,6 +829,8 @@ rsyserror(void)
static int intrupt;
+static void catch();
+
unsigned char *
mypass(prompt)
unsigned char *prompt;
@@ -842,7 +841,6 @@ unsigned char *prompt;
int c;
static unsigned char pbuf[9];
void (*sig)();
- static void catch();
setbuf(stdin, (char*)NULL);
sig = signal(SIGINT, catch);
diff --git a/usr/src/cmd/ypcmd/ypupdated/rpc.ypupdated.c b/usr/src/cmd/ypcmd/ypupdated/rpc.ypupdated.c
index ae371678cd..4756ca7971 100644
--- a/usr/src/cmd/ypcmd/ypupdated/rpc.ypupdated.c
+++ b/usr/src/cmd/ypcmd/ypupdated/rpc.ypupdated.c
@@ -19,12 +19,10 @@
* CDDL HEADER END
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* NIS update service
*/
@@ -58,6 +56,7 @@ void ypupdate_prog();
void detachfromtty();
static int addr2netname(char *, SVCXPRT *);
+static int issock();
int insecure;
extern SVCXPRT *svctcp_create(int, uint_t, uint_t);
@@ -69,7 +68,6 @@ main(argc, argv)
char *argv[];
{
char *cmd;
- static int issock();
int connmaxrec = RPC_MAXDATASIZE;
struct stat filestat;
diff --git a/usr/src/lib/libbsm/auditxml b/usr/src/lib/libbsm/auditxml
index b54436e38e..163e3d8ad4 100644
--- a/usr/src/lib/libbsm/auditxml
+++ b/usr/src/lib/libbsm/auditxml
@@ -20,7 +20,7 @@
# CDDL HEADER END
#
#
-# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
@@ -556,7 +556,6 @@ extern void adt_load_table(const adt_session_data_t *, adt_translation_t **,
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
diff --git a/usr/src/lib/libbsm/common/adt_xlate.h b/usr/src/lib/libbsm/common/adt_xlate.h
index c260dc3158..16babd311c 100644
--- a/usr/src/lib/libbsm/common/adt_xlate.h
+++ b/usr/src/lib/libbsm/common/adt_xlate.h
@@ -319,6 +319,8 @@ struct msg_text {
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 *);
diff --git a/usr/src/lib/libc/port/stdio/getpass.c b/usr/src/lib/libc/port/stdio/getpass.c
index f59d9134c6..c94a57fdd5 100644
--- a/usr/src/lib/libc/port/stdio/getpass.c
+++ b/usr/src/lib/libc/port/stdio/getpass.c
@@ -20,15 +20,13 @@
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 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
@@ -66,6 +64,8 @@ getpassphrase(const char *prompt)
return ((char *)__getpass(prompt, MAXPASSWD));
}
+ static void catch(int);
+
static char *
__getpass(const char *prompt, int size)
{
@@ -76,7 +76,6 @@ __getpass(const char *prompt, int size)
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)
diff --git a/usr/src/lib/libcurses/screen/tgetch.c b/usr/src/lib/libcurses/screen/tgetch.c
index c0f8ca0bd4..20f6995a6b 100644
--- a/usr/src/lib/libcurses/screen/tgetch.c
+++ b/usr/src/lib/libcurses/screen/tgetch.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 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -37,8 +36,6 @@
* contributors.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*LINTLIBRARY*/
#include "curses_inc.h"
@@ -114,7 +111,7 @@ tgetch(int interpret)
/* 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 */
@@ -176,6 +173,9 @@ _readchar()
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 @@ _getkey(int blockpeek, chtype *inp)
int key, num_keys = cur_term->_ksz;
int i;
chtype *inputQ = cur_term->_input_queue;
- char *chars_onQ = &(cur_term->_chars_on_queue),
- flag = cur_term->funckeystarter[*inp];
+ char *chars_onQ = &(cur_term->_chars_on_queue);
+ char flag = cur_term->funckeystarter[*inp];
int first, collapse = 1;
@@ -221,7 +221,7 @@ _getkey(int blockpeek, chtype *inp)
if (*chars_onQ == i) {
(*chars_onQ)++;
inputQ[i] = (blockpeek) ?
- _pk() : _fpk();
+ _pk() : _fpk();
switch ((int)inputQ[i]) {
case -2:
/*
@@ -266,7 +266,6 @@ _getkey(int blockpeek, chtype *inp)
if (kp[key]->_keyval == KEY_MOUSE) {
MOUSE_STATUS old_mouse;
int rc;
- static int get_xterm_mouse(int, int *);
old_mouse = Mouse_status;
@@ -339,7 +338,6 @@ _getkey(int blockpeek, chtype *inp)
(MOUSE_Y_POS == LINES) &&
(SP->slk != (SLK_MAP *) NULL) &&
(SP->_map_mbe_to_key != 0)) {
- static void _map_button(chtype *);
_map_button(inp);
}
@@ -546,15 +544,15 @@ _fpk(void)
/* 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 */
/*
diff --git a/usr/src/lib/libnisdb/db_headers.h b/usr/src/lib/libnisdb/db_headers.h
index 9f53e96863..0707b0c8f9 100644
--- a/usr/src/lib/libnisdb/db_headers.h
+++ b/usr/src/lib/libnisdb/db_headers.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.
@@ -22,12 +21,10 @@
/*
* db_headers.h
*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 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
@@ -36,7 +33,16 @@
#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) \
diff --git a/usr/src/lib/libnisdb/db_index_c.x b/usr/src/lib/libnisdb/db_index_c.x
index 45d019c70a..c8aeae69c9 100644
--- a/usr/src/lib/libnisdb/db_index_c.x
+++ b/usr/src/lib/libnisdb/db_index_c.x
@@ -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,12 +21,10 @@
/*
* db_index_c.x
*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 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
@@ -101,7 +98,7 @@ typedef struct db_index * db_index_p;
% void init( db_key_desc * );
%
%/* Moves an index from an xdr index */
-% db_status db_index::move_xdr_db_index(db_index *orig);
+% db_status move_xdr_db_index(db_index *orig);
%
%/* Dumps this index to named file. */
% int dump( char *);
diff --git a/usr/src/lib/libnisdb/db_mindex_c.x b/usr/src/lib/libnisdb/db_mindex_c.x
index 9d98563dc8..2b7c7d2242 100644
--- a/usr/src/lib/libnisdb/db_mindex_c.x
+++ b/usr/src/lib/libnisdb/db_mindex_c.x
@@ -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,12 +21,10 @@
/*
* db_mindex_c.x
*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 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
@@ -266,7 +263,7 @@ typedef struct xdr_nis_object_s xdr_nis_object_t;
%
% /* 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 db_mindex::reset_next( db_next_index_desc *orig );
+% db_status 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.
diff --git a/usr/src/lib/libnsl/dial/callers.c b/usr/src/lib/libnsl/dial/callers.c
index 8d4cea8dd0..d39e870a3c 100644
--- a/usr/src/lib/libnsl/dial/callers.c
+++ b/usr/src/lib/libnsl/dial/callers.c
@@ -23,12 +23,10 @@
/* All Rights Reserved */
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 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"
@@ -164,6 +162,9 @@ repphone(char *arg, char *phone, char *trstr)
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
*
@@ -178,12 +179,9 @@ processdev(char *flds[], char *dev[])
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;
@@ -230,7 +228,7 @@ processdev(char *flds[], char *dev[])
*/
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]);
}
@@ -276,7 +274,7 @@ processdev(char *flds[], char *dev[])
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;
}
@@ -393,6 +391,11 @@ translate(char *ttab, char *str)
}
#define MAXLINE 512
+
+static void dialreset(void);
+#ifndef SMALL
+static char *currdial(void);
+#endif
/*
* Get the information about the dialer.
* gdial(type, arps, narps)
@@ -409,10 +412,6 @@ gdial(char *type, char *arps[], int narps)
{
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) {
@@ -429,11 +428,11 @@ gdial(char *type, char *arps[], int narps)
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);
@@ -460,6 +459,7 @@ static void tfaillog(int fd, const char *s);
#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,12 +475,11 @@ tlicall(char *flds[], char *dev[])
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]);
@@ -560,11 +559,11 @@ tlicall(char *flds[], char *dev[])
*/
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");
@@ -578,7 +577,7 @@ tlicall(char *flds[], char *dev[])
}
} 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;
diff --git a/usr/src/lib/libnsl/dial/conn.c b/usr/src/lib/libnsl/dial/conn.c
index 13dbadfc5f..63bec3fa47 100644
--- a/usr/src/lib/libnsl/dial/conn.c
+++ b/usr/src/lib/libnsl/dial/conn.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.
@@ -24,12 +23,10 @@
/* All Rights Reserved */
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 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 */
@@ -80,12 +77,12 @@ static char *Mytype = CNULL; /* to force selection of specific device type */
* 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;
@@ -96,7 +93,7 @@ conn(char *system)
continue;
if (EQUALS(Progname, "uucico")) {
if (chat(nf - F_LOGIN, flds + F_LOGIN, fn, "", "") ==
- SUCCESS) {
+ SUCCESS) {
sysreset();
return (fn); /* successful return */
}
@@ -121,6 +118,8 @@ conn(char *system)
return (FAIL);
}
+static void devreset(void);
+
/*
* getto - connect to remote machine
*
@@ -137,13 +136,12 @@ getto(char *flds[])
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();
@@ -193,7 +191,7 @@ classmatch(char *flds[], char *dev[])
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);
@@ -217,7 +215,7 @@ rddev(char *type, char *dev[], char *buf, int devcount)
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);
@@ -314,7 +312,7 @@ finds(char *sysnam, char *flds[], int fldcount)
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;
@@ -555,8 +553,8 @@ wait_for_hangup(int dcf)
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);
}
@@ -676,7 +674,7 @@ sendthem(char *str, int fn, char *phstr1, char *phstr2)
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,
@@ -876,7 +874,7 @@ ifdate(char *s)
s++;
if ((sscanf(s, "%d-%d", &t__low, &t__high) < 2) ||
- (t__low == t__high))
+ (t__low == t__high))
return (1);
/* 0000 crossover? */
diff --git a/usr/src/lib/libnsl/rpc/svc_vc.c b/usr/src/lib/libnsl/rpc/svc_vc.c
index dced5a210c..86ad4e8948 100644
--- a/usr/src/lib/libnsl/rpc/svc_vc.c
+++ b/usr/src/lib/libnsl/rpc/svc_vc.c
@@ -20,7 +20,7 @@
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -32,8 +32,6 @@
* California.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* Server side for Connection Oriented RPC.
*
@@ -664,6 +662,8 @@ svc_fd_xprtcopy(SVCXPRT *parent)
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,7 +679,6 @@ rendezvous_request(SVCXPRT *xprt, struct rpc_msg *msg)
struct cf_rendezvous *r;
char *tpname = NULL;
char devbuf[256];
- static void do_accept();
/* LINTED pointer alignment */
r = (struct cf_rendezvous *)xprt->xp_p1;
diff --git a/usr/src/lib/libresolv/res_gethost.c b/usr/src/lib/libresolv/res_gethost.c
index f05fddd988..bc25771d6d 100644
--- a/usr/src/lib/libresolv/res_gethost.c
+++ b/usr/src/lib/libresolv/res_gethost.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -16,8 +16,6 @@
*
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/param.h>
#include <sys/socket.h>
#include <netinet/in.h>
@@ -224,6 +222,8 @@ getanswer(answer, anslen, iquery)
}
}
+static struct hostent *_gethtbyname();
+
struct hostent *
res_gethostbyname(name)
char *name;
@@ -232,7 +232,6 @@ res_gethostbyname(name)
register char *cp;
int n;
struct hostent *hp, *gethostdomain();
- static struct hostent *_gethtbyname();
/*
* disallow names consisting only of digits/dots, unless
@@ -263,6 +262,8 @@ res_gethostbyname(name)
return (getanswer(&buf, n, 0));
}
+static struct hostent *_gethtbyaddr();
+
static struct hostent *
_getrhbyaddr(addr, len, type)
char *addr;
@@ -272,7 +273,6 @@ _getrhbyaddr(addr, len, type)
querybuf buf;
register struct hostent *hp;
char qbuf[MAXDNAME];
- static struct hostent *_gethtbyaddr();
if (type != AF_INET)
return ((struct hostent *) NULL);
diff --git a/usr/src/lib/libvolmgt/common/volmgt_on_private.c b/usr/src/lib/libvolmgt/common/volmgt_on_private.c
index 0535d07325..96ab59a0ff 100644
--- a/usr/src/lib/libvolmgt/common/volmgt_on_private.c
+++ b/usr/src/lib/libvolmgt/common/volmgt_on_private.c
@@ -19,12 +19,10 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 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
@@ -56,6 +54,8 @@
#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,8 +72,6 @@
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 */
@@ -123,6 +121,9 @@ dun:
}
+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.
*
@@ -133,9 +134,6 @@ dun:
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 */
@@ -160,7 +158,7 @@ _dev_unmount(char *path)
absname = pathbuf;
volume_is_not_managed = !volmgt_running() ||
- (!volmgt_ownspath(absname) && volmgt_symname(bn) == NULL);
+ (!volmgt_ownspath(absname) && volmgt_symname(bn) == NULL);
free(pathbuf);
@@ -405,12 +403,12 @@ vol_basename(char *path)
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 */
@@ -465,7 +463,7 @@ get_media_info(char *path, char **mtypep, int *mnump, char **spclp)
if (!volmgt_running() ||
(!volmgt_ownspath(*spclp) &&
- volmgt_symname(*spclp) == NULL)) {
+ volmgt_symname(*spclp) == NULL)) {
ret_val = TRUE; /* success (if limited) */
goto dun;
}
diff --git a/usr/src/lib/pam_modules/sample/sample_acct_mgmt.c b/usr/src/lib/pam_modules/sample/sample_acct_mgmt.c
index 96aa5472a2..ff09e9d797 100644
--- a/usr/src/lib/pam_modules/sample/sample_acct_mgmt.c
+++ b/usr/src/lib/pam_modules/sample/sample_acct_mgmt.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,12 +19,10 @@
* CDDL HEADER END
*/
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 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>
@@ -106,11 +103,12 @@ pam_sm_acct_mgmt(
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')
diff --git a/usr/src/stand/lib/fs/nfs/lookup.c b/usr/src/stand/lib/fs/nfs/lookup.c
index 443b822d4e..a7f226f460 100644
--- a/usr/src/stand/lib/fs/nfs/lookup.c
+++ b/usr/src/stand/lib/fs/nfs/lookup.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.
@@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -32,8 +32,6 @@
* under license from the Regents of the University of California.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* This file contains the file lookup code for NFS.
*/
@@ -47,7 +45,7 @@
#include <sys/t_lock.h>
#include "clnt.h"
#include <rpcsvc/mount.h>
-#include <pathname.h>
+#include <st_pathname.h>
#include <sys/errno.h>
#include <sys/promif.h>
#include "nfs_inet.h"
@@ -72,7 +70,7 @@ static int next_inum = 1; /* Next dummy i-node number */
* return the file handle of said file.
*/
-static int lookuppn(struct pathname *pnp, struct nfs_file *cfile,
+static int stlookuppn(struct st_pathname *pnp, struct nfs_file *cfile,
bool_t needroothandle);
/*
@@ -82,22 +80,23 @@ static int lookuppn(struct pathname *pnp, struct nfs_file *cfile,
int
lookup(char *pathname, struct nfs_file *cur_file, bool_t needroothandle)
{
- struct pathname pnp;
+ struct st_pathname pnp;
int error;
static char lkup_path[NFS_MAXPATHLEN]; /* pn_alloc doesn't */
pnp.pn_buf = &lkup_path[0];
bzero(pnp.pn_buf, NFS_MAXPATHLEN);
- error = pn_get(pathname, &pnp);
+ error = stpn_get(pathname, &pnp);
if (error)
return (error);
- error = lookuppn(&pnp, cur_file, needroothandle);
+ error = stlookuppn(&pnp, cur_file, needroothandle);
return (error);
}
static int
-lookuppn(struct pathname *pnp, struct nfs_file *cfile, bool_t needroothandle)
+stlookuppn(struct st_pathname *pnp, struct nfs_file *cfile,
+bool_t needroothandle)
{
char component[NFS_MAXNAMLEN+1]; /* buffer for component */
int nlink = 0;
@@ -116,11 +115,11 @@ begin:
* continuing from the current directory.
*/
component[0] = '\0';
- if (pn_peekchar(pnp) == '/') {
+ if (stpn_peekchar(pnp) == '/') {
if (!needroothandle)
*cfile = roothandle;
dino = root_inum;
- pn_skipslash(pnp);
+ stpn_skipslash(pnp);
}
next:
@@ -134,7 +133,7 @@ next:
/*
* Process the next component of the pathname.
*/
- error = pn_stripcomponent(pnp, component);
+ error = stpn_stripcomponent(pnp, component);
if (error)
goto bad;
@@ -172,8 +171,7 @@ next:
dprintf("lookup: component %s pathleft %s\n", component, pnp->pn_path);
#endif
if ((cino == 0) ||
- ((cdp = (struct nfs_file *)get_icache(mac_get_dev(), cino)) ==
- 0)) {
+ ((cdp = (struct nfs_file *)get_icache(mac_get_dev(), cino)) == 0)) {
struct nfs_file *lkp;
/*
@@ -193,7 +191,7 @@ next:
break;
default:
printf("lookup: NFS Version %d not supported\n",
- cfile->version);
+ cfile->version);
lkp = NULL;
break;
}
@@ -258,7 +256,7 @@ next:
* front of the remaining pathname.
*/
if (cfile_is_lnk(cdp)) {
- struct pathname linkpath;
+ struct st_pathname linkpath;
static char path_tmp[NFS_MAXPATHLEN]; /* used for symlinks */
char *pathp;
@@ -281,7 +279,7 @@ next:
break;
default:
printf("getsymlink: NFS Version %d not supported\n",
- cdp->version);
+ cdp->version);
error = ENOTSUP;
break;
}
@@ -289,11 +287,11 @@ next:
if (error)
goto bad;
- pn_get(pathp, &linkpath);
+ stpn_get(pathp, &linkpath);
- if (pn_pathleft(&linkpath) == 0)
- (void) pn_set(&linkpath, ".");
- error = pn_combine(pnp, &linkpath); /* linkpath before pn */
+ if (stpn_pathleft(&linkpath) == 0)
+ (void) stpn_set(&linkpath, ".");
+ error = stpn_combine(pnp, &linkpath); /* linkpath before pn */
if (error)
goto bad;
goto begin;
@@ -311,14 +309,14 @@ skip:
* If no more components, return last directory (if wanted) and
* last component (if wanted).
*/
- if (pn_pathleft(pnp) == 0) {
- (void) pn_set(pnp, component);
+ if (stpn_pathleft(pnp) == 0) {
+ (void) stpn_set(pnp, component);
return (0);
}
/*
* skip over slashes from end of last component
*/
- pn_skipslash(pnp);
+ stpn_skipslash(pnp);
goto next;
bad:
/*
diff --git a/usr/src/stand/lib/fs/nfs/pathname.c b/usr/src/stand/lib/fs/nfs/pathname.c
index e00a5bb942..83c49a1394 100644
--- a/usr/src/stand/lib/fs/nfs/pathname.c
+++ b/usr/src/stand/lib/fs/nfs/pathname.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.
@@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -32,12 +32,10 @@
* under license from the Regents of the University of California.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/types.h>
#include <sys/param.h>
#include <sys/errno.h>
-#include <pathname.h>
+#include <st_pathname.h>
#include <sys/promif.h>
#include <sys/salib.h>
#include <sys/bootdebug.h>
@@ -65,7 +63,7 @@
* NOTE: if buf is NULL, failure occurs.
*/
int
-pn_alloc(struct pathname *pnp)
+stpn_alloc(struct st_pathname *pnp)
{
if (pnp->pn_buf == NULL)
return (-1);
@@ -78,9 +76,9 @@ pn_alloc(struct pathname *pnp)
* Pull a pathname from user user or kernel space
*/
int
-pn_get(char *str, struct pathname *pnp)
+stpn_get(char *str, struct st_pathname *pnp)
{
- if (pn_alloc(pnp) != 0)
+ if (stpn_alloc(pnp) != 0)
return (-1);
bcopy(str, pnp->pn_path, strlen(str));
pnp->pn_pathlen = strlen(str); /* don't count null byte */
@@ -91,7 +89,7 @@ pn_get(char *str, struct pathname *pnp)
* Set pathname to argument string.
*/
int
-pn_set(struct pathname *pnp, char *path)
+stpn_set(struct st_pathname *pnp, char *path)
{
pnp->pn_path = pnp->pn_buf;
pnp->pn_pathlen = strlen(pnp->pn_path); /* don't count null byte */
@@ -107,7 +105,7 @@ pn_set(struct pathname *pnp, char *path)
* for symbolic link processing.
*/
int
-pn_combine(struct pathname *pnp, struct pathname *sympnp)
+stpn_combine(struct st_pathname *pnp, struct st_pathname *sympnp)
{
if (pnp->pn_pathlen + sympnp->pn_pathlen >= MAXPATHLEN)
@@ -129,7 +127,7 @@ pn_combine(struct pathname *pnp, struct pathname *sympnp)
* i.e., don't strip it out of pnp.
*/
int
-pn_getcomponent(struct pathname *pnp, char *component, int flags)
+stpn_getcomponent(struct st_pathname *pnp, char *component, int flags)
{
char *cp;
int l;
@@ -156,7 +154,7 @@ pn_getcomponent(struct pathname *pnp, char *component, int flags)
* skip over consecutive slashes in the pathname
*/
void
-pn_skipslash(struct pathname *pnp)
+stpn_skipslash(struct st_pathname *pnp)
{
while ((pnp->pn_pathlen != 0) && (*pnp->pn_path == '/')) {
pnp->pn_path++;
@@ -170,7 +168,7 @@ pn_skipslash(struct pathname *pnp)
*/
/*ARGSUSED*/
void
-pn_free(struct pathname *pnp)
+stpn_free(struct st_pathname *pnp)
{
/* nop */
dprintf("pn_free(): you shouldn't be calling pn_free()!\n");
diff --git a/usr/src/stand/lib/fs/nfs/pathname.h b/usr/src/stand/lib/fs/nfs/st_pathname.h
index 35692cc748..dd4874c4c7 100644
--- a/usr/src/stand/lib/fs/nfs/pathname.h
+++ b/usr/src/stand/lib/fs/nfs/st_pathname.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.
@@ -19,15 +18,14 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
-#ifndef _PATHNAME_H
-#define _PATHNAME_H
-
-#pragma ident "%Z%%M% %I% %E% SMI" /* from SunOS4.1 2.12 */
+#ifndef _ST_PATHNAME_H
+#define _ST_PATHNAME_H
#ifdef __cplusplus
extern "C" {
@@ -42,7 +40,7 @@ extern "C" {
* is also assembled in this structure.
*/
-struct pathname {
+struct st_pathname {
char *pn_buf; /* underlying storage */
char *pn_path; /* remaining pathname */
uint_t pn_pathlen; /* remaining length */
@@ -50,30 +48,25 @@ struct pathname {
#define PN_STRIP 0x00 /* Strip next component off pn */
#define PN_PEEK 0x01 /* Only peek at next pn component */
-#define pn_peekcomponent(PNP, COMP) pn_getcomponent(PNP, COMP, PN_PEEK)
-#define pn_stripcomponent(PNP, COMP) pn_getcomponent(PNP, COMP, PN_STRIP)
+#define stpn_peekcomponent(PNP, COMP) stpn_getcomponent(PNP, COMP, PN_PEEK)
+#define stpn_stripcomponent(PNP, COMP) stpn_getcomponent(PNP, COMP, PN_STRIP)
-#define pn_peekchar(PNP) (((PNP)->pn_pathlen != 0) ? \
+#define stpn_peekchar(PNP) (((PNP)->pn_pathlen != 0) ? \
*((PNP)->pn_path) : (char)0)
-#define pn_pathleft(PNP) ((PNP)->pn_pathlen)
-#define pn_getpath(PNP) ((PNP)->pn_path)
-#define pn_copy(PNP1, PNP2) (pn_set(PNP2, pn_getpath(PNP1)))
+#define stpn_pathleft(PNP) ((PNP)->pn_pathlen)
+#define stpn_getpath(PNP) ((PNP)->pn_path)
+#define stpn_copy(PNP1, PNP2) (stpn_set(PNP2, stpn_getpath(PNP1)))
-extern int pn_alloc(); /* allocat buffer for pathname */
-extern int pn_get(); /* allocate buf and copy path into it */
-#ifdef notneeded
-extern int pn_getchar(); /* get next pathname char */
-#endif
-extern int pn_set(); /* set pathname to string */
-extern int pn_combine(); /* combine to pathnames (for symlink) */
-extern int pn_getcomponent(); /* get next component of pathname */
-extern void pn_skipslash(); /* skip over slashes */
-extern void pn_free(); /* free pathname buffer */
-extern int pn_append(); /* Append string to pathname */
-extern int pn_getlast(); /* Get last component of pathname */
+extern int stpn_alloc(); /* allocate buffer for pathname */
+extern int stpn_get(); /* allocate buf and copy path into it */
+extern int stpn_set(); /* set pathname to string */
+extern int stpn_combine(); /* combine to pathnames (for symlink) */
+extern int stpn_getcomponent(); /* get next component of pathname */
+extern void stpn_skipslash(); /* skip over slashes */
+extern void stpn_free(); /* free pathname buffer */
#ifdef __cplusplus
}
#endif
-#endif /* _PATHNAME_H */
+#endif /* _ST_PATHNAME_H */
diff --git a/usr/src/ucblib/libucb/i386/sys/signal.c b/usr/src/ucblib/libucb/i386/sys/signal.c
index 2afb74cd34..0e9001704b 100644
--- a/usr/src/ucblib/libucb/i386/sys/signal.c
+++ b/usr/src/ucblib/libucb/i386/sys/signal.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 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -43,8 +42,6 @@
* mask |= sigmask(i)
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/types.h>
#include <ucontext.h>
#include <signal.h>
@@ -84,10 +81,10 @@ int ucbsiginterrupt(int, int);
* 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);
}
@@ -376,7 +373,7 @@ ucbsignal(int s, void (*a)()))()
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);
}
diff --git a/usr/src/uts/common/fs/smbclnt/smbfs/smbfs.h b/usr/src/uts/common/fs/smbclnt/smbfs/smbfs.h
index 0a2e78c103..4770ee6e84 100644
--- a/usr/src/uts/common/fs/smbclnt/smbfs/smbfs.h
+++ b/usr/src/uts/common/fs/smbclnt/smbfs/smbfs.h
@@ -33,15 +33,13 @@
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 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.)
@@ -52,6 +50,7 @@
#include <sys/list.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/fs/smbfs_mount.h>
diff --git a/usr/src/uts/common/io/pcmcia/pcmem.c b/usr/src/uts/common/io/pcmcia/pcmem.c
index 3777c3b675..7b74ceafb9 100644
--- a/usr/src/uts/common/io/pcmcia/pcmem.c
+++ b/usr/src/uts/common/io/pcmcia/pcmem.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -160,6 +160,7 @@ _fini(void)
}
+static void pcmem_create_pcram_node(dev_info_t *);
/*
* pcmem_attach()
@@ -169,7 +170,6 @@ static int
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) {
diff --git a/usr/src/uts/common/io/ppm/ppm.c b/usr/src/uts/common/io/ppm/ppm.c
index 3bc65bd05d..323ff493d8 100644
--- a/usr/src/uts/common/io/ppm/ppm.c
+++ b/usr/src/uts/common/io/ppm/ppm.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -746,6 +746,9 @@ err_bydom:
}
+static int ppm_manage_sx(s3a_t *, int);
+static int ppm_search_list(pm_searchargs_t *);
+
/*
* interface between pm framework and ppm driver
*/
@@ -762,8 +765,6 @@ ppm_ctlops(dev_info_t *dip, dev_info_t *rdip,
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;
diff --git a/usr/src/uts/common/io/sfe/sfe.c b/usr/src/uts/common/io/sfe/sfe.c
index 2e0bf4ccc1..5ed5295bb3 100644
--- a/usr/src/uts/common/io/sfe/sfe.c
+++ b/usr/src/uts/common/io/sfe/sfe.c
@@ -31,6 +31,10 @@
* 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.
@@ -414,10 +418,6 @@ sfe_search_pci_dev(int vendor_id, int device_id)
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)
{
diff --git a/usr/src/uts/common/nfs/nfs.h b/usr/src/uts/common/nfs/nfs.h
index 79aae060f9..49e81901c1 100644
--- a/usr/src/uts/common/nfs/nfs.h
+++ b/usr/src/uts/common/nfs/nfs.h
@@ -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
diff --git a/usr/src/uts/common/os/kmem.c b/usr/src/uts/common/os/kmem.c
index 53a2eee37d..291477f6e1 100644
--- a/usr/src/uts/common/os/kmem.c
+++ b/usr/src/uts/common/os/kmem.c
@@ -2953,10 +2953,11 @@ kmem_cache_update(kmem_cache_t *cp)
(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);
}
diff --git a/usr/src/uts/common/os/sunpm.c b/usr/src/uts/common/os/sunpm.c
index 84c0b9fbb6..7570cd29e6 100644
--- a/usr/src/uts/common/os/sunpm.c
+++ b/usr/src/uts/common/os/sunpm.c
@@ -591,13 +591,14 @@ pm_init_locks(void)
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:
@@ -664,6 +665,8 @@ pm_halt_callb(void *arg, int code)
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
@@ -674,7 +677,6 @@ pm_init(void)
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;
@@ -847,6 +849,7 @@ e_pm_valid_power(dev_info_t *dip, int cmpt, int level)
return (0);
}
+static int pm_start(dev_info_t *dip);
/*
* Returns true if device is pm'd (after calling pm_start if need be)
*/
@@ -854,7 +857,6 @@ int
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.
@@ -1171,6 +1173,9 @@ pm_noinvol(dev_info_t *dip)
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
@@ -1193,8 +1198,6 @@ pm_scan_dev(dev_info_t *dip)
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;
/*
@@ -2454,6 +2457,8 @@ e_pm_set_cur_pwr(dev_info_t *dip, pm_component_t *cp, int level)
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.
@@ -2467,7 +2472,6 @@ pm_power(dev_info_t *dip, int comp, int level)
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))
@@ -2922,6 +2926,8 @@ pm_watchers()
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.
@@ -2934,7 +2940,6 @@ pm_power_has_changed(dev_info_t *dip, int comp, int level)
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,
@@ -3755,6 +3760,8 @@ pm_all_at_normal(dev_info_t *dip)
return (1);
}
+static void bring_pmdep_up(dev_info_t *, int);
+
static void
bring_wekeeps_up(char *keeper)
{
@@ -3764,7 +3771,6 @@ bring_wekeeps_up(char *keeper)
pm_info_t *wku_info;
char *kept_path;
dev_info_t *kept;
- static void bring_pmdep_up(dev_info_t *, int);
if (panicstr) {
return;
@@ -5559,6 +5565,8 @@ pm_interest_registered(int clone)
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
@@ -5569,7 +5577,6 @@ pm_register_watcher(int clone, dev_info_t *dip)
{
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
@@ -5781,13 +5788,13 @@ pm_psc_find_clone(int clone, pscc_t **list, krwlock_t *lock)
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));
}
@@ -5798,7 +5805,6 @@ pm_psc_clone_to_direct(int clone)
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));
}
@@ -7860,6 +7866,8 @@ pm_cfb_trigger(void)
ddi_trigger_softintr(pm_soft_id);
}
+static major_t i_path_to_major(char *, char *);
+
major_t
pm_path_to_major(char *path)
{
@@ -7867,7 +7875,6 @@ pm_path_to_major(char *path)
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))
@@ -8088,6 +8095,8 @@ i_path_to_major(char *path, char *leaf_name)
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
@@ -8097,7 +8106,6 @@ i_path_to_major(char *path, char *leaf_name)
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
@@ -8109,6 +8117,10 @@ pm_driver_removed(major_t major)
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()
*/
@@ -8116,9 +8128,6 @@ static void
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);
diff --git a/usr/src/uts/common/rpc/rpcmod.c b/usr/src/uts/common/rpc/rpcmod.c
index e3576c99d4..97b9c2a805 100644
--- a/usr/src/uts/common/rpc/rpcmod.c
+++ b/usr/src/uts/common/rpc/rpcmod.c
@@ -562,6 +562,7 @@ rmm_close(queue_t *q, int flag, cred_t *crp)
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.
@@ -573,7 +574,6 @@ rpcmodopen(queue_t *q, dev_t *devp, int flag, int sflag, cred_t *crp)
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:");
diff --git a/usr/src/uts/common/sys/exec.h b/usr/src/uts/common/sys/exec.h
index 119f1f2b47..d9bcf11e55 100644
--- a/usr/src/uts/common/sys/exec.h
+++ b/usr/src/uts/common/sys/exec.h
@@ -20,7 +20,7 @@
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -68,9 +68,6 @@ typedef struct execenv {
#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
@@ -183,6 +180,10 @@ struct execsw {
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;
diff --git a/usr/src/uts/common/sys/fs/autofs.h b/usr/src/uts/common/sys/fs/autofs.h
index dc18e9fd40..9418d3fd51 100644
--- a/usr/src/uts/common/sys/fs/autofs.h
+++ b/usr/src/uts/common/sys/fs/autofs.h
@@ -19,15 +19,13 @@
* CDDL HEADER END
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 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>
@@ -43,6 +41,10 @@
#include <sys/door.h>
#include <rpcsvc/autofs_prot.h>
+#ifdef _KERNEL
+#include <sys/vfs_opreg.h>
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/usr/src/uts/common/sys/fs/dv_node.h b/usr/src/uts/common/sys/fs/dv_node.h
index c3c1daa4d5..da6d18f368 100644
--- a/usr/src/uts/common/sys/fs/dv_node.h
+++ b/usr/src/uts/common/sys/fs/dv_node.h
@@ -19,15 +19,13 @@
* CDDL HEADER END
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 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.
@@ -46,12 +44,17 @@
#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
*/
diff --git a/usr/src/uts/common/sys/fs/fifonode.h b/usr/src/uts/common/sys/fs/fifonode.h
index 5ef83b4778..a85408b5d4 100644
--- a/usr/src/uts/common/sys/fs/fifonode.h
+++ b/usr/src/uts/common/sys/fs/fifonode.h
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -30,7 +30,9 @@
#ifndef _SYS_FS_FIFONODE_H
#define _SYS_FS_FIFONODE_H
-#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.15 */
+#if defined(_KERNEL)
+#include <sys/vfs_opreg.h>
+#endif
#ifdef __cplusplus
extern "C" {
diff --git a/usr/src/uts/common/sys/fs/hsfs_impl.h b/usr/src/uts/common/sys/fs/hsfs_impl.h
index 19258a78ce..82fd044db2 100644
--- a/usr/src/uts/common/sys/fs/hsfs_impl.h
+++ b/usr/src/uts/common/sys/fs/hsfs_impl.h
@@ -22,14 +22,14 @@
* High Sierra filesystem internal routine definitions.
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_FS_HSFS_IMPL_H
#define _SYS_FS_HSFS_IMPL_H
-#pragma ident "%Z%%M% %I% %E% SMI"
+#include <sys/vfs_opreg.h>
#ifdef __cplusplus
extern "C" {
diff --git a/usr/src/uts/common/sys/fs/lofs_info.h b/usr/src/uts/common/sys/fs/lofs_info.h
index 33a1c2c9eb..f06e13774e 100644
--- a/usr/src/uts/common/sys/fs/lofs_info.h
+++ b/usr/src/uts/common/sys/fs/lofs_info.h
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -30,7 +30,9 @@
#ifndef _SYS_FS_LOFS_INFO_H
#define _SYS_FS_LOFS_INFO_H
-#pragma ident "%Z%%M% %I% %E% SMI"
+#ifdef _KERNEL
+#include <sys/vfs_opreg.h>
+#endif
#ifdef __cplusplus
extern "C" {
diff --git a/usr/src/uts/common/sys/fs/namenode.h b/usr/src/uts/common/sys/fs/namenode.h
index d3dfddc4fe..3ee6a3226c 100644
--- a/usr/src/uts/common/sys/fs/namenode.h
+++ b/usr/src/uts/common/sys/fs/namenode.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.
@@ -23,17 +22,16 @@
/* All Rights Reserved */
/*
- * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 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
diff --git a/usr/src/uts/common/sys/fs/pc_node.h b/usr/src/uts/common/sys/fs/pc_node.h
index 1e8921c6c1..5dd8439c18 100644
--- a/usr/src/uts/common/sys/fs/pc_node.h
+++ b/usr/src/uts/common/sys/fs/pc_node.h
@@ -19,15 +19,13 @@
* CDDL HEADER END
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 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
@@ -36,6 +34,10 @@ extern "C" {
#include <sys/buf.h>
#include <sys/vnode.h>
+#ifdef _KERNEL
+#include <sys/vfs_opreg.h>
+#endif
+
/*
* This overlays the fid structure (see vfs.h)
*
@@ -103,8 +105,12 @@ struct pchead {
*/
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[];
diff --git a/usr/src/uts/common/sys/fs/tmpnode.h b/usr/src/uts/common/sys/fs/tmpnode.h
index 084b8e181b..42e67f8501 100644
--- a/usr/src/uts/common/sys/fs/tmpnode.h
+++ b/usr/src/uts/common/sys/fs/tmpnode.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,18 +19,17 @@
* CDDL HEADER END
*/
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 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" {
diff --git a/usr/src/uts/common/sys/fs/ufs_inode.h b/usr/src/uts/common/sys/fs/ufs_inode.h
index 05c2d4e508..ae92f3c53d 100644
--- a/usr/src/uts/common/sys/fs/ufs_inode.h
+++ b/usr/src/uts/common/sys/fs/ufs_inode.h
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -57,6 +57,10 @@
#include <sys/fs/ufs_panic.h>
#include <sys/dnlc.h>
+#ifdef _KERNEL
+#include <sys/vfs_opreg.h>
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/usr/src/uts/common/sys/mode.h b/usr/src/uts/common/sys/mode.h
index 1913b2a573..41e822f623 100644
--- a/usr/src/uts/common/sys/mode.h
+++ b/usr/src/uts/common/sys/mode.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,8 +19,8 @@
* CDDL HEADER END
*/
/*
- * Copyright (c) 1997-1998 by Sun Microsystems, Inc.
- * All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
@@ -31,18 +30,14 @@
#ifndef _SYS_MODE_H
#define _SYS_MODE_H
-#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+#include <sys/stat.h>
+#include <sys/vnode.h>
#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).
*/
diff --git a/usr/src/uts/common/sys/socketvar.h b/usr/src/uts/common/sys/socketvar.h
index bb5fca2732..a43fae95aa 100644
--- a/usr/src/uts/common/sys/socketvar.h
+++ b/usr/src/uts/common/sys/socketvar.h
@@ -55,6 +55,10 @@
#include <sys/ksocket.h>
#include <sys/kstat.h>
+#ifdef _KERNEL
+#include <sys/vfs_opreg.h>
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/usr/src/uts/common/syscall/lwp_sobj.c b/usr/src/uts/common/syscall/lwp_sobj.c
index 8b8137d935..459b757aef 100644
--- a/usr/src/uts/common/syscall/lwp_sobj.c
+++ b/usr/src/uts/common/syscall/lwp_sobj.c
@@ -1122,6 +1122,7 @@ upimutex_cleanup()
}
}
+static int iswanted();
int
lwp_mutex_timedlock(lwp_mutex_t *lp, timespec_t *tsp)
{
@@ -1140,7 +1141,6 @@ lwp_mutex_timedlock(lwp_mutex_t *lp, timespec_t *tsp)
volatile uint8_t type = 0;
lwpchan_t lwpchan;
sleepq_head_t *sqh;
- static int iswanted();
uint16_t flag;
int imm_timeout = 0;