summaryrefslogtreecommitdiff
path: root/usr
diff options
context:
space:
mode:
authorjmcp <James.McPherson@Sun.COM>2009-04-30 20:04:06 -0700
committerjmcp <James.McPherson@Sun.COM>2009-04-30 20:04:06 -0700
commit71a535e3b24d87fb6be3793380f86bd09f2768ac (patch)
treee602b2114284c42cf64645658f2b18e50d34f5a6 /usr
parent9f51456788105f8fa3e4ebf290b4628eb757e65a (diff)
downloadillumos-joyent-71a535e3b24d87fb6be3793380f86bd09f2768ac.tar.gz
backout 6795209/6392640: breaks sparc build
Diffstat (limited to 'usr')
-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/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
67 files changed, 415 insertions, 407 deletions
diff --git a/usr/src/cmd/audio/utilities/Makefile b/usr/src/cmd/audio/utilities/Makefile
index bc50c948af..2b6097c0e6 100644
--- a/usr/src/cmd/audio/utilities/Makefile
+++ b/usr/src/cmd/audio/utilities/Makefile
@@ -19,9 +19,11 @@
# CDDL HEADER END
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
# Makefile for C++ Audio Library (libAudio.a)
include ../../Makefile.cmd
@@ -36,7 +38,7 @@ CFLAGS += $(CCVERBOSE)
LINTFLAGS += -m -v -u
-AR= /usr/ccs/bin/ar
+AR= /usr/ccs/bin/ar cq
RANLIB= /usr/ccs/bin/ranlib
RM= /usr/bin/rm -f
@@ -86,7 +88,7 @@ install all: $(libaudio)
$(libaudio): $(COBJS) $(CCOBJS)
$(RM) -f $@
- $(AR) cq $@ $(COBJS) $(CCOBJS)
+ $(AR) $@ $(COBJS) $(CCOBJS)
test ! -f $(RANLIB) || $(RANLIB) $@
clean:
diff --git a/usr/src/cmd/bnu/grades.c b/usr/src/cmd/bnu/grades.c
index 9a7fbee731..203a8d9a70 100644
--- a/usr/src/cmd/bnu/grades.c
+++ b/usr/src/cmd/bnu/grades.c
@@ -2,8 +2,9 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -22,10 +23,12 @@
/* All Rights Reserved */
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
+ * Copyright (c) 2000 by Sun Microsystems, Inc.
+ * All rights reserved.
*/
+#ident "%Z%%M% %I% %E% SMI" /* from SVR4 bnu:grades.c 1.7 */
+
#include "uucp.h"
#include <grp.h>
@@ -311,8 +314,6 @@ 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.
@@ -335,6 +336,7 @@ long *nlimit;
#define ONE_K (1024)
#define ONE_MEG ((1024)*(1024))
+ static void lcase();
char rest[SMBUF];
char msg[BUFSIZ], *p;
@@ -551,6 +553,7 @@ 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 76a0aa3ba4..ac3f721447 100644
--- a/usr/src/cmd/bnu/uucico.c
+++ b/usr/src/cmd/bnu/uucico.c
@@ -2,8 +2,9 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,7 +20,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -27,6 +28,8 @@
/* All Rights Reserved */
+#pragma ident "%Z%%M% %I% %E% SMI"
+
/*
* uucp file transfer program:
@@ -76,8 +79,6 @@ static void checkrmt(); /* See if we want to talk to remote. */
extern char *Mytype;
-static char *pskip();
-
int
main(argc, argv, envp)
int argc;
@@ -86,6 +87,7 @@ 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 4a23f398b4..2c57d7e61b 100644
--- a/usr/src/cmd/bnu/uucp.c
+++ b/usr/src/cmd/bnu/uucp.c
@@ -2,8 +2,9 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,13 +20,15 @@
* CDDL HEADER END
*/
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
+#pragma ident "%Z%%M% %I% %E% SMI"
+
#include "uucp.h"
/*
@@ -469,7 +472,6 @@ int code;
exit(code);
}
-static FILE *syscfile();
/*
* generate copy files for s1!f1 -> s2!f2
* Note: only one remote machine, other situations
@@ -483,6 +485,7 @@ 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 e2d8994044..28f1c6ff22 100644
--- a/usr/src/cmd/bnu/uux.c
+++ b/usr/src/cmd/bnu/uux.c
@@ -2,8 +2,9 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,7 +20,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -27,6 +28,8 @@
/* All Rights Reserved */
+#pragma ident "%Z%%M% %I% %E% SMI"
+
#include "uucp.h"
#define SHORTBUF 64
@@ -58,7 +61,6 @@ static int _Statop;
char Sgrade[NAMESIZE];
void cleanup();
static void usage();
-static void onintr();
/*
* uux
@@ -71,6 +73,7 @@ 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 cb84d4d3a7..3b13807dbb 100644
--- a/usr/src/cmd/dfs.cmds/general/general.c
+++ b/usr/src/cmd/dfs.cmds/general/general.c
@@ -2,8 +2,9 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -23,10 +24,12 @@
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+#pragma ident "%Z%%M% %I% %E% SMI"
+
/*
* generic interface to dfs commands.
*
@@ -54,7 +57,6 @@
/* cmd name, -o, opts, (char *)0 terminator */
static char *getfs();
-static int invalid();
void perror();
int
@@ -62,6 +64,7 @@ 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 517e585960..a9e89d37bc 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 c93af3782e..23aa72feac 100644
--- a/usr/src/cmd/fmli/menu/mcurrent.c
+++ b/usr/src/cmd/fmli/menu/mcurrent.c
@@ -2,8 +2,9 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,13 +20,15 @@
* CDDL HEADER END
*/
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
+#pragma ident "%Z%%M% %I% %E% SMI"
+
#include <stdio.h>
#include <curses.h>
#include "wish.h"
@@ -89,8 +92,6 @@ menu_noncurrent()
return SUCCESS;
}
-static void menu_show();
-
void
menu_index(m, newindex, hcols)
register struct menu *m;
@@ -109,6 +110,7 @@ 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 1a248412b5..7492899cd3 100644
--- a/usr/src/cmd/fmli/menu/stmenu.c
+++ b/usr/src/cmd/fmli/menu/stmenu.c
@@ -2,8 +2,9 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,13 +21,15 @@
*/
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
+#pragma ident "%Z%%M% %I% %E% SMI"
+
#include <stdio.h>
#include <ctype.h>
#include "wish.h"
@@ -526,9 +529,6 @@ _menu_cleanup()
curstring = NULL;
}
-static void strtolower();
-static int nocase_strncmp();
-
static int
menu_match(m, s, n, t)
register struct menu *m;
@@ -540,6 +540,8 @@ 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 bb951f44ae..b4aee060c8 100644
--- a/usr/src/cmd/fmli/oh/if_form.c
+++ b/usr/src/cmd/fmli/oh/if_form.c
@@ -2,8 +2,9 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +21,7 @@
*/
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -28,6 +29,8 @@
/* All Rights Reserved */
+#pragma ident "%Z%%M% %I% %E% SMI"
+
#include <ctype.h>
#include <stdio.h>
#include <string.h>
@@ -977,8 +980,6 @@ char *str;
return(FAIL);
}
-static int chk_page();
-
/*
* CHK_FORM returns the actual number of the FIRST field that
* is invalid ....
@@ -988,6 +989,7 @@ 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 b98f48db5d..cfaf5ff5f1 100644
--- a/usr/src/cmd/fmli/oh/if_init.c
+++ b/usr/src/cmd/fmli/oh/if_init.c
@@ -2,8 +2,9 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,13 +21,15 @@
*/
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
+#pragma ident "%Z%%M% %I% %E% SMI"
+
#include <stdio.h>
#include <curses.h>
#include <string.h>
@@ -224,9 +227,6 @@ 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,6 +236,8 @@ 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 1b265bec20..bf644aba0e 100644
--- a/usr/src/cmd/fmli/oh/scram.c
+++ b/usr/src/cmd/fmli/oh/scram.c
@@ -2,8 +2,9 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +21,7 @@
*/
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -28,6 +29,8 @@
/* All Rights Reserved */
+#pragma ident "%Z%%M% %I% %E% SMI"
+
#include <curses.h>
#define _SYS_TERMIO_H /* sys/termio.h is included by curses.h */
#include <fcntl.h>
@@ -66,7 +69,6 @@ static int 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
@@ -75,6 +77,7 @@ int
scram(file)
register char *file;
{
+ static void regetkey();
strcpy(Keyprompt, "Please enter scramble key: ");
strcpy(Srcfile, file);
@@ -121,6 +124,7 @@ token t;
{
struct ott_entry *entry, *path_to_ott();
struct stat buf;
+ static void regetkey();
if (t == TOK_CANCEL)
return (SUCCESS);
@@ -339,7 +343,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)
@@ -367,7 +371,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 8e0f9cfe84..52f6c7226b 100644
--- a/usr/src/cmd/fmli/oh/slk.c
+++ b/usr/src/cmd/fmli/oh/slk.c
@@ -2,8 +2,9 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,13 +20,15 @@
* CDDL HEADER END
*/
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
+#pragma ident "%Z%%M% %I% %E% SMI"
+
/* microsecond delay timer not available before SVR4.0 abs k18 */
#ifdef PRE_SVR4_COMPILE
#define DO_NOT_DELAY
@@ -501,8 +504,6 @@ 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
*/
@@ -512,6 +513,7 @@ 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 906320f629..2999a61c11 100644
--- a/usr/src/cmd/fmli/qued/multiline.c
+++ b/usr/src/cmd/fmli/qued/multiline.c
@@ -2,8 +2,9 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -18,11 +19,6 @@
*
* CDDL HEADER END
*/
-/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
@@ -31,6 +27,7 @@
* Copyright (c) 1985 AT&T
* All Rights Reserved
*/
+#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.11 */
#include <stdio.h>
#include <ctype.h>
@@ -42,7 +39,6 @@
static token _fixed();
static token _virtual();
-static int emptyrow();
#define SCROLLSIZE ((Cfld->rows - 2 <= 0) ? 1 : Cfld->rows - 2)
#define HALFSIZE (int)(Cfld->rows / 2)
@@ -62,6 +58,7 @@ 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 b22195bafa..aa01d7da17 100644
--- a/usr/src/cmd/ldapcachemgr/cachemgr.c
+++ b/usr/src/cmd/ldapcachemgr/cachemgr.c
@@ -270,8 +270,6 @@ server_destroy(void *arg)
(void) mutex_unlock(&create_lock);
}
-static void client_killserver();
-
int
main(int argc, char ** argv)
{
@@ -284,6 +282,7 @@ 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 d46fc5a3f3..01dcf5b317 100644
--- a/usr/src/cmd/mailx/hdr/glob.h
+++ b/usr/src/cmd/mailx/hdr/glob.h
@@ -2,8 +2,9 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -21,9 +22,10 @@
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
+
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
+ * Copyright (c) 1998 by Sun Microsystems, Inc.
+ * All rights reserved.
*/
/*
@@ -36,8 +38,7 @@
* contributors.
*/
-#ifndef _HDR_GLOB_H
-#define _HDR_GLOB_H
+#pragma ident "%Z%%M% %I% %E% SMI"
/*
* mailx -- a modified version of a University of California at Berkeley
@@ -68,6 +69,7 @@ extern 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[]; /* ???? */
@@ -80,7 +82,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 /var/mail locking */
+extern char *lockname; /* named used for locking in /var/mail */
extern char *maildir; /* directory for mail files */
extern char mailname[]; /* Name of /var/mail system mailbox */
extern off_t mailsize; /* Size of system mailbox */
@@ -110,7 +112,7 @@ extern int 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 */
@@ -141,5 +143,3 @@ 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 637e810019..c050888392 100644
--- a/usr/src/cmd/mdb/common/libstand/ctime.c
+++ b/usr/src/cmd/mdb/common/libstand/ctime.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -9,6 +9,8 @@
* specifies the terms and conditions for redistribution.
*/
+#pragma ident "%Z%%M% %I% %E% SMI"
+
/*
* This localtime is a modified version of offtime from libc, which does not
* bother to figure out the time zone from the kernel, from environment
@@ -147,8 +149,6 @@ 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,6 +159,7 @@ __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 4182cdc818..b3c662b5ff 100644
--- a/usr/src/cmd/mdb/common/mdb/mdb_lex.l
+++ b/usr/src/cmd/mdb/common/mdb/mdb_lex.l
@@ -5,8 +5,9 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -21,10 +22,12 @@
*
* CDDL HEADER END
*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+#pragma ident "%Z%%M% %I% %E% SMI"
+
#include <sys/types.h>
#include <sys/isa_defs.h>
@@ -54,7 +57,7 @@
* to shut the linker up.
*/
#ifdef _KMDB
-FILE __iob[_NFILE];
+static FILE __iob[_NFILE];
#endif
/*
diff --git a/usr/src/cmd/pcmciad/pcmciad.c b/usr/src/cmd/pcmciad/pcmciad.c
index 1489eb5d5d..d99ca96101 100644
--- a/usr/src/cmd/pcmciad/pcmciad.c
+++ b/usr/src/cmd/pcmciad/pcmciad.c
@@ -19,10 +19,12 @@
* CDDL HEADER END
*/
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+#pragma ident "%Z%%M% %I% %E% SMI"
+
/*
* PCMCIA User Daemon
* This is a newer daemon than the original version.
@@ -1302,7 +1304,6 @@ 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 *);
@@ -1314,6 +1315,7 @@ char *media_findname(char *);
static void
meminit()
{
+ static void makepdir();
#ifndef lint
mutex_lock(&meminit_lock);
@@ -1577,7 +1579,6 @@ 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
*
@@ -1588,6 +1589,7 @@ static void start_unmount(char *, char *);
static void
unmount_media(long socket, char *device_type)
{
+ static void start_unmount(char *, char *);
static FILE *fp = NULL;
struct mnttab mnt;
const char *nvp;
@@ -1642,9 +1644,6 @@ out:
(void) fclose(fp);
}
-static int req_vold_umount(char *);
-static int do_umount(char *);
-
/*
* start_unmount - Start to unmount mounting directory
*
@@ -1654,6 +1653,8 @@ static int do_umount(char *);
static void
start_unmount(char *mnt_special, char *mnt_mountp)
{
+ static int req_vold_umount(char *);
+ static int do_umount(char *);
int err = 0;
/*
@@ -1882,15 +1883,14 @@ 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 22f54c6886..5a1767420c 100644
--- a/usr/src/cmd/pg/pg.c
+++ b/usr/src/cmd/pg/pg.c
@@ -20,13 +20,15 @@
*/
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
+#pragma ident "%Z%%M% %I% %E% SMI"
+
#include <signal.h>
#include <setjmp.h>
#include <sys/types.h>
@@ -857,6 +859,7 @@ 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 b949bb680e..d8ea6896d5 100644
--- a/usr/src/cmd/rpcgen/rpc_main.c
+++ b/usr/src/cmd/rpcgen/rpc_main.c
@@ -546,19 +546,6 @@ 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 */
@@ -610,6 +597,13 @@ 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 432a4000ad..0b909fba14 100644
--- a/usr/src/cmd/saf/extern.h
+++ b/usr/src/cmd/saf/extern.h
@@ -2,8 +2,9 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -22,14 +23,14 @@
/* All Rights Reserved */
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _EXTERN_H
#define _EXTERN_H
-#include "structs.h"
+#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
@@ -68,7 +69,7 @@ extern struct sactab *read_entry();
extern struct sactab *findpm();
extern char *trim();
-extern char *pstate(uchar_t);
+extern char *pstate(unchar);
extern char *nexttok();
extern char **mkargv();
extern char *make_tempname();
diff --git a/usr/src/cmd/saf/structs.h b/usr/src/cmd/saf/structs.h
index 420ab18243..c06c267bd0 100644
--- a/usr/src/cmd/saf/structs.h
+++ b/usr/src/cmd/saf/structs.h
@@ -2,8 +2,9 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -18,20 +19,17 @@
*
* CDDL HEADER END
*/
-/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
-#ifndef _STRUCTS_H
-#define _STRUCTS_H
+#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.5*/
+
+
+/*
+ * REQUIRES: sac.h misc.h
+ */
-#include <sac.h>
-#include "misc.h"
/*
* error messages
@@ -79,19 +77,17 @@ struct sactab {
* defn's for sc_sstate, sc_pstate, and sc_lstate
*/
-#define NOTRUNNING 0 /* PM not running */
-#define STARTING 1 /* PM starting, must be same as PM_STARTING */
-#define ENABLED 2 /* PM enabled, must be same as PM_ENABLED */
-#define DISABLED 3 /* PM disabled, must be same as PM_DISABLED */
-#define STOPPING 4 /* PM stopping, must be same as PM_STOPPING */
-#define FAILED 5 /* PM has failed */
-#define UNKNOWN 6 /* in recovery, state unknown */
+# define NOTRUNNING 0 /* PM not running */
+# define STARTING 1 /* PM is starting, must be same as PM_STARTING */
+# define ENABLED 2 /* PM is enabled, must be same as PM_ENABLED */
+# define DISABLED 3 /* PM is disabled, must be same as PM_DISABLED */
+# define STOPPING 4 /* PM is stopping, must be same as PM_STOPPING */
+# define FAILED 5 /* PM has failed */
+# define UNKNOWN 6 /* in recovery, state unknown */
/*
* defn's for sc_flags
*/
-#define D_FLAG 0x1
-#define X_FLAG 0x2
-
-#endif /* _STRUCTS_H */
+# define D_FLAG 0x1
+# define X_FLAG 0x2
diff --git a/usr/src/cmd/sgs/nm/common/nm.c b/usr/src/cmd/sgs/nm/common/nm.c
index 943356e6d4..c3f7197e06 100644
--- a/usr/src/cmd/sgs/nm/common/nm.c
+++ b/usr/src/cmd/sgs/nm/common/nm.c
@@ -646,14 +646,6 @@ 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,
@@ -678,7 +670,15 @@ 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 cae1a6de9a..2e4e60b0cd 100644
--- a/usr/src/cmd/sgs/size/common/process.c
+++ b/usr/src/cmd/sgs/size/common/process.c
@@ -2,8 +2,9 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -18,16 +19,13 @@
*
* CDDL HEADER END
*/
-/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
/* Copyright (c) 1988 AT&T */
/* Copyright (c) 1989 AT&T */
/* All Rights Reserved */
+#pragma ident "%Z%%M% %I% %E% SMI"
+
/* UNIX HEADER */
#include <stdio.h>
@@ -62,7 +60,6 @@ static const char *format[3] = {
"%lld + %lld + %lld = %lld\n"
};
-static void process_phdr(Elf *elf, GElf_Half num);
void
process(Elf * elf)
@@ -95,6 +92,7 @@ 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 0d2f82d20e..329251c056 100644
--- a/usr/src/cmd/tar/tar.c
+++ b/usr/src/cmd/tar/tar.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -34,6 +34,8 @@
* under license from the Regents of the University of California.
*/
+#pragma ident "%Z%%M% %I% %E% SMI"
+
#include <unistd.h>
#include <sys/types.h>
#include <sys/param.h>
@@ -4709,8 +4711,6 @@ 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,6 +4718,7 @@ 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 c285b434eb..cffc044641 100644
--- a/usr/src/cmd/ttymon/tmextern.h
+++ b/usr/src/cmd/ttymon/tmextern.h
@@ -26,10 +26,9 @@
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
-#ifndef _TMEXTERN_H
-#define _TMEXTERN_H
-#include "tmstruct.h"
+#ifndef __TMEXTERN_H
+#define __TMEXTERN_H
#ifdef __cplusplus
extern "C" {
@@ -175,4 +174,4 @@ 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 38aea1063e..1598de05a1 100644
--- a/usr/src/cmd/ttymon/tmstruct.h
+++ b/usr/src/cmd/ttymon/tmstruct.h
@@ -2,8 +2,9 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -18,17 +19,11 @@
*
* CDDL HEADER END
*/
-/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
-#ifndef _TMSTRUCT_H
-#define _TMSTRUCT_H
+#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.4 */
/*
* /etc/ttydefs structure
@@ -81,34 +76,32 @@ 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 b0555612d3..367776ccd2 100644
--- a/usr/src/cmd/ttymon/ttymon.c
+++ b/usr/src/cmd/ttymon/ttymon.c
@@ -265,8 +265,6 @@ initialize()
Initialized = TRUE;
}
-static void free_defs();
-
/*
* open_all - open devices in pmtab if the entry is
* - valid, fd = 0, and pid = 0
@@ -276,6 +274,7 @@ 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 825996d0c4..2e229d1c79 100644
--- a/usr/src/cmd/vi/port/ex_voper.c
+++ b/usr/src/cmd/vi/port/ex_voper.c
@@ -2,8 +2,9 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,7 +20,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -31,6 +32,8 @@
* Copyright (c) 1981 Regents of the University of California
*/
+#pragma ident "%Z%%M% %I% %E% SMI"
+
#include "ex.h"
#include "ex_tty.h"
#include "ex_vis.h"
@@ -53,8 +56,6 @@
unsigned char vscandir[2] = { '/', 0 };
-static int get_addr();
-
/*
* Decode an operator/operand type command.
* Eventually we switch to an operator subroutine in ex_vops.c.
@@ -83,6 +84,7 @@ 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;
@@ -226,8 +228,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
@@ -743,7 +745,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 044e1ce2e5..9bda1ec597 100644
--- a/usr/src/cmd/vi/port/exrecover.c
+++ b/usr/src/cmd/vi/port/exrecover.c
@@ -2,8 +2,9 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,7 +20,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -29,6 +30,8 @@
/* Copyright (c) 1981 Regents of the University of California */
+#pragma ident "%Z%%M% %I% %E% SMI"
+
#include <stdio.h> /* BUFSIZ: stdio = 1024, VMUNIX = 1024 */
#ifndef TRACE
#undef NULL
@@ -829,8 +832,6 @@ rsyserror(void)
static int intrupt;
-static void catch();
-
unsigned char *
mypass(prompt)
unsigned char *prompt;
@@ -841,6 +842,7 @@ 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 4756ca7971..ae371678cd 100644
--- a/usr/src/cmd/ypcmd/ypupdated/rpc.ypupdated.c
+++ b/usr/src/cmd/ypcmd/ypupdated/rpc.ypupdated.c
@@ -19,10 +19,12 @@
* CDDL HEADER END
*/
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+#pragma ident "%Z%%M% %I% %E% SMI"
+
/*
* NIS update service
*/
@@ -56,7 +58,6 @@ void ypupdate_prog();
void detachfromtty();
static int addr2netname(char *, SVCXPRT *);
-static int issock();
int insecure;
extern SVCXPRT *svctcp_create(int, uint_t, uint_t);
@@ -68,6 +69,7 @@ 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 163e3d8ad4..b54436e38e 100644
--- a/usr/src/lib/libbsm/auditxml
+++ b/usr/src/lib/libbsm/auditxml
@@ -20,7 +20,7 @@
# CDDL HEADER END
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
@@ -556,6 +556,7 @@ extern void 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 16babd311c..c260dc3158 100644
--- a/usr/src/lib/libbsm/common/adt_xlate.h
+++ b/usr/src/lib/libbsm/common/adt_xlate.h
@@ -319,8 +319,6 @@ 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 c94a57fdd5..f59d9134c6 100644
--- a/usr/src/lib/libc/port/stdio/getpass.c
+++ b/usr/src/lib/libc/port/stdio/getpass.c
@@ -20,13 +20,15 @@
*/
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1988 AT&T */
/* All Rights Reserved */
+#pragma ident "%Z%%M% %I% %E% SMI"
+
#pragma weak _getpass = getpass
#pragma weak _getpassphrase = getpassphrase
@@ -64,8 +66,6 @@ getpassphrase(const char *prompt)
return ((char *)__getpass(prompt, MAXPASSWD));
}
- static void catch(int);
-
static char *
__getpass(const char *prompt, int size)
{
@@ -76,6 +76,7 @@ __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 20f6995a6b..c0f8ca0bd4 100644
--- a/usr/src/lib/libcurses/screen/tgetch.c
+++ b/usr/src/lib/libcurses/screen/tgetch.c
@@ -2,8 +2,9 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,7 +20,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -36,6 +37,8 @@
* contributors.
*/
+#pragma ident "%Z%%M% %I% %E% SMI"
+
/*LINTLIBRARY*/
#include "curses_inc.h"
@@ -111,7 +114,7 @@ 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 */
@@ -173,9 +176,6 @@ _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);
- char flag = cur_term->funckeystarter[*inp];
+ char *chars_onQ = &(cur_term->_chars_on_queue),
+ flag = cur_term->funckeystarter[*inp];
int first, collapse = 1;
@@ -221,7 +221,7 @@ _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,6 +266,7 @@ _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;
@@ -338,6 +339,7 @@ _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);
}
@@ -544,15 +546,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 0707b0c8f9..9f53e96863 100644
--- a/usr/src/lib/libnisdb/db_headers.h
+++ b/usr/src/lib/libnisdb/db_headers.h
@@ -2,8 +2,9 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -21,10 +22,12 @@
/*
* db_headers.h
*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+#pragma ident "%Z%%M% %I% %E% SMI"
+
#ifndef _DB_HEADERS_H
#define _DB_HEADERS_H
@@ -33,16 +36,7 @@
#include <stdlib.h>
#include <setjmp.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
extern int verbose;
-
-#ifdef __cplusplus
-}
-#endif
-
extern jmp_buf dbenv;
#define FATAL(msg, fcode) \
diff --git a/usr/src/lib/libnisdb/db_index_c.x b/usr/src/lib/libnisdb/db_index_c.x
index c8aeae69c9..45d019c70a 100644
--- a/usr/src/lib/libnisdb/db_index_c.x
+++ b/usr/src/lib/libnisdb/db_index_c.x
@@ -2,8 +2,9 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -21,10 +22,12 @@
/*
* db_index_c.x
*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+%#pragma ident "%Z%%M% %I% %E% SMI"
+
#if RPC_HDR
%#ifndef _DB_INDEX_H
%#define _DB_INDEX_H
@@ -98,7 +101,7 @@ typedef struct db_index * db_index_p;
% void init( db_key_desc * );
%
%/* Moves an index from an xdr index */
-% db_status move_xdr_db_index(db_index *orig);
+% db_status db_index::move_xdr_db_index(db_index *orig);
%
%/* Dumps this index to named file. */
% int dump( char *);
diff --git a/usr/src/lib/libnisdb/db_mindex_c.x b/usr/src/lib/libnisdb/db_mindex_c.x
index 2b7c7d2242..9d98563dc8 100644
--- a/usr/src/lib/libnisdb/db_mindex_c.x
+++ b/usr/src/lib/libnisdb/db_mindex_c.x
@@ -2,8 +2,9 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -21,10 +22,12 @@
/*
* db_mindex_c.x
*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+%#pragma ident "%Z%%M% %I% %E% SMI"
+
#if RPC_HDR
%#ifndef _DB_MINDEX_H
%#define _DB_MINDEX_H
@@ -263,7 +266,7 @@ 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 reset_next( db_next_index_desc *orig );
+% db_status db_mindex::reset_next( db_next_index_desc *orig );
%
%/* Return all entries within table. Returns the answer by
% setting the pointer 'rp' to point to the list of answers.
diff --git a/usr/src/lib/libnsl/dial/callers.c b/usr/src/lib/libnsl/dial/callers.c
index d39e870a3c..8d4cea8dd0 100644
--- a/usr/src/lib/libnsl/dial/callers.c
+++ b/usr/src/lib/libnsl/dial/callers.c
@@ -23,10 +23,12 @@
/* All Rights Reserved */
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+#pragma ident "%Z%%M% %I% %E% SMI"
+
#include "mt.h"
#include "uucp.h"
@@ -162,9 +164,6 @@ 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
*
@@ -179,9 +178,12 @@ 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;
@@ -228,7 +230,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]);
}
@@ -274,7 +276,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;
}
@@ -391,11 +393,6 @@ 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)
@@ -412,6 +409,10 @@ 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) {
@@ -428,11 +429,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);
@@ -459,7 +460,6 @@ 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,11 +475,12 @@ 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]);
@@ -559,11 +560,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");
@@ -577,7 +578,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 63bec3fa47..13dbadfc5f 100644
--- a/usr/src/lib/libnsl/dial/conn.c
+++ b/usr/src/lib/libnsl/dial/conn.c
@@ -2,8 +2,9 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -23,10 +24,12 @@
/* All Rights Reserved */
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+#pragma ident "%Z%%M% %I% %E% SMI"
+
#include "mt.h"
#include "uucp.h"
static char _ProtoSys[40]; /* protocol string from Systems file entry */
@@ -77,12 +80,12 @@ 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;
@@ -93,7 +96,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 */
}
@@ -118,8 +121,6 @@ conn(char *system)
return (FAIL);
}
-static void devreset(void);
-
/*
* getto - connect to remote machine
*
@@ -136,12 +137,13 @@ 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();
@@ -191,7 +193,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);
@@ -215,7 +217,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);
@@ -312,7 +314,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;
@@ -553,8 +555,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);
}
@@ -674,7 +676,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,
@@ -874,7 +876,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 86ad4e8948..dced5a210c 100644
--- a/usr/src/lib/libnsl/rpc/svc_vc.c
+++ b/usr/src/lib/libnsl/rpc/svc_vc.c
@@ -20,7 +20,7 @@
*/
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -32,6 +32,8 @@
* California.
*/
+#pragma ident "%Z%%M% %I% %E% SMI"
+
/*
* Server side for Connection Oriented RPC.
*
@@ -662,8 +664,6 @@ 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,6 +679,7 @@ 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 bc25771d6d..f05fddd988 100644
--- a/usr/src/lib/libresolv/res_gethost.c
+++ b/usr/src/lib/libresolv/res_gethost.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -16,6 +16,8 @@
*
*/
+#pragma ident "%Z%%M% %I% %E% SMI"
+
#include <sys/param.h>
#include <sys/socket.h>
#include <netinet/in.h>
@@ -222,8 +224,6 @@ getanswer(answer, anslen, iquery)
}
}
-static struct hostent *_gethtbyname();
-
struct hostent *
res_gethostbyname(name)
char *name;
@@ -232,6 +232,7 @@ res_gethostbyname(name)
register char *cp;
int n;
struct hostent *hp, *gethostdomain();
+ static struct hostent *_gethtbyname();
/*
* disallow names consisting only of digits/dots, unless
@@ -262,8 +263,6 @@ res_gethostbyname(name)
return (getanswer(&buf, n, 0));
}
-static struct hostent *_gethtbyaddr();
-
static struct hostent *
_getrhbyaddr(addr, len, type)
char *addr;
@@ -273,6 +272,7 @@ _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 96ab59a0ff..0535d07325 100644
--- a/usr/src/lib/libvolmgt/common/volmgt_on_private.c
+++ b/usr/src/lib/libvolmgt/common/volmgt_on_private.c
@@ -19,10 +19,12 @@
* CDDL HEADER END
*/
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+#pragma ident "%Z%%M% %I% %E% SMI"
+
/*
* routines in this module are meant to be called by other libvolmgt
* routines only
@@ -54,8 +56,6 @@
#define NULL_PATH "/dev/null"
-static int vol_getmntdev(FILE *, struct mnttab *, dev_t,
- struct dk_cinfo *);
/*
* This is an ON Consolidation Private interface.
@@ -72,6 +72,8 @@ static int vol_getmntdev(FILE *, struct mnttab *, dev_t,
int
_dev_mounted(char *path)
{
+ static int vol_getmntdev(FILE *, struct mnttab *, dev_t,
+ struct dk_cinfo *);
int fd = -1;
struct dk_cinfo info;
static FILE *fp = NULL; /* mnttab file pointer */
@@ -121,9 +123,6 @@ 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.
*
@@ -134,6 +133,9 @@ static int get_media_info(char *, char **, int *, char **);
int
_dev_unmount(char *path)
{
+ static int call_unmount_prog(int, int, char *, int, char *,
+ char *);
+ static int get_media_info(char *, char **, int *, char **);
char *bn = NULL; /* block name */
char *mtype = NULL; /* media type */
char *spcl = NULL; /* special dev. path */
@@ -158,7 +160,7 @@ _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);
@@ -403,12 +405,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 */
@@ -463,7 +465,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 ff09e9d797..96aa5472a2 100644
--- a/usr/src/lib/pam_modules/sample/sample_acct_mgmt.c
+++ b/usr/src/lib/pam_modules/sample/sample_acct_mgmt.c
@@ -2,8 +2,9 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,10 +20,12 @@
* CDDL HEADER END
*/
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+#pragma ident "%Z%%M% %I% %E% SMI"
+
#include <syslog.h>
#include <pwd.h>
#include <unistd.h>
@@ -103,12 +106,11 @@ 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/ucblib/libucb/i386/sys/signal.c b/usr/src/ucblib/libucb/i386/sys/signal.c
index 0e9001704b..2afb74cd34 100644
--- a/usr/src/ucblib/libucb/i386/sys/signal.c
+++ b/usr/src/ucblib/libucb/i386/sys/signal.c
@@ -2,8 +2,9 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,7 +20,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -42,6 +43,8 @@
* mask |= sigmask(i)
*/
+#pragma ident "%Z%%M% %I% %E% SMI"
+
#include <sys/types.h>
#include <ucontext.h>
#include <signal.h>
@@ -81,10 +84,10 @@ 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);
}
@@ -373,7 +376,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 4770ee6e84..0a2e78c103 100644
--- a/usr/src/uts/common/fs/smbclnt/smbfs/smbfs.h
+++ b/usr/src/uts/common/fs/smbclnt/smbfs/smbfs.h
@@ -33,13 +33,15 @@
*/
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SMBFS_SMBFS_H
#define _SMBFS_SMBFS_H
+#pragma ident "%Z%%M% %I% %E% SMI"
+
/*
* FS-specific VFS structures for smbfs.
* (per-mount stuff, etc.)
@@ -50,7 +52,6 @@
#include <sys/list.h>
#include <sys/vfs.h>
-#include <sys/vfs_opreg.h>
#include <sys/fs/smbfs_mount.h>
diff --git a/usr/src/uts/common/io/pcmcia/pcmem.c b/usr/src/uts/common/io/pcmcia/pcmem.c
index 7b74ceafb9..3777c3b675 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 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -160,7 +160,6 @@ _fini(void)
}
-static void pcmem_create_pcram_node(dev_info_t *);
/*
* pcmem_attach()
@@ -170,6 +169,7 @@ 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 323ff493d8..3bc65bd05d 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 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -746,9 +746,6 @@ 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
*/
@@ -765,6 +762,8 @@ 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 5ed5295bb3..2e0bf4ccc1 100644
--- a/usr/src/uts/common/io/sfe/sfe.c
+++ b/usr/src/uts/common/io/sfe/sfe.c
@@ -31,10 +31,6 @@
* DAMAGE.
*/
-/* Avoid undefined symbol for non IA architectures */
-#pragma weak inb
-#pragma weak outb
-
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
@@ -418,6 +414,10 @@ 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 49e81901c1..79aae060f9 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 291477f6e1..53a2eee37d 100644
--- a/usr/src/uts/common/os/kmem.c
+++ b/usr/src/uts/common/os/kmem.c
@@ -2953,11 +2953,10 @@ 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 7570cd29e6..84c0b9fbb6 100644
--- a/usr/src/uts/common/os/sunpm.c
+++ b/usr/src/uts/common/os/sunpm.c
@@ -591,14 +591,13 @@ 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:
@@ -665,8 +664,6 @@ 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
@@ -677,6 +674,7 @@ 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;
@@ -849,7 +847,6 @@ 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)
*/
@@ -857,6 +854,7 @@ 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.
@@ -1173,9 +1171,6 @@ 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
@@ -1198,6 +1193,8 @@ 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;
/*
@@ -2457,8 +2454,6 @@ 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.
@@ -2472,6 +2467,7 @@ 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))
@@ -2926,8 +2922,6 @@ 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.
@@ -2940,6 +2934,7 @@ 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,
@@ -3760,8 +3755,6 @@ 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)
{
@@ -3771,6 +3764,7 @@ 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;
@@ -5565,8 +5559,6 @@ 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
@@ -5577,6 +5569,7 @@ 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
@@ -5788,13 +5781,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));
}
@@ -5805,6 +5798,7 @@ 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));
}
@@ -7866,8 +7860,6 @@ 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)
{
@@ -7875,6 +7867,7 @@ 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))
@@ -8095,8 +8088,6 @@ 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
@@ -8106,6 +8097,7 @@ static void i_pm_driver_removed(major_t major);
void
pm_driver_removed(major_t major)
{
+ static void i_pm_driver_removed(major_t major);
/*
* Serialize removal of drivers. This is to keep ancestors of
@@ -8117,10 +8109,6 @@ 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()
*/
@@ -8128,6 +8116,9 @@ 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 97b9c2a805..e3576c99d4 100644
--- a/usr/src/uts/common/rpc/rpcmod.c
+++ b/usr/src/uts/common/rpc/rpcmod.c
@@ -562,7 +562,6 @@ 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.
@@ -574,6 +573,7 @@ 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 d9bcf11e55..119f1f2b47 100644
--- a/usr/src/uts/common/sys/exec.h
+++ b/usr/src/uts/common/sys/exec.h
@@ -20,7 +20,7 @@
*/
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -68,6 +68,9 @@ 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
@@ -180,10 +183,6 @@ 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 9418d3fd51..dc18e9fd40 100644
--- a/usr/src/uts/common/sys/fs/autofs.h
+++ b/usr/src/uts/common/sys/fs/autofs.h
@@ -19,13 +19,15 @@
* CDDL HEADER END
*/
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_FS_AUTOFS_H
#define _SYS_FS_AUTOFS_H
+#pragma ident "%Z%%M% %I% %E% SMI"
+
#include <rpc/clnt.h>
#include <gssapi/gssapi.h>
#include <sys/vfs.h>
@@ -41,10 +43,6 @@
#include <sys/door.h>
#include <rpcsvc/autofs_prot.h>
-#ifdef _KERNEL
-#include <sys/vfs_opreg.h>
-#endif
-
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/usr/src/uts/common/sys/fs/dv_node.h b/usr/src/uts/common/sys/fs/dv_node.h
index da6d18f368..c3c1daa4d5 100644
--- a/usr/src/uts/common/sys/fs/dv_node.h
+++ b/usr/src/uts/common/sys/fs/dv_node.h
@@ -19,13 +19,15 @@
* CDDL HEADER END
*/
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_DV_NODE_H
#define _SYS_DV_NODE_H
+#pragma ident "%Z%%M% %I% %E% SMI"
+
/*
* dv_nodes are the file-system specific part of the
* vnodes for the device filesystem.
@@ -44,17 +46,12 @@
#include <sys/devpolicy.h>
#include <sys/avl.h>
-#ifdef _KERNEL
-#include <sys/vfs_opreg.h>
-#endif
-
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _KERNEL
-
/*
* Here's the focal point of this filesystem
*/
diff --git a/usr/src/uts/common/sys/fs/fifonode.h b/usr/src/uts/common/sys/fs/fifonode.h
index a85408b5d4..5ef83b4778 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 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -30,9 +30,7 @@
#ifndef _SYS_FS_FIFONODE_H
#define _SYS_FS_FIFONODE_H
-#if defined(_KERNEL)
-#include <sys/vfs_opreg.h>
-#endif
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.15 */
#ifdef __cplusplus
extern "C" {
diff --git a/usr/src/uts/common/sys/fs/hsfs_impl.h b/usr/src/uts/common/sys/fs/hsfs_impl.h
index 82fd044db2..19258a78ce 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 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_FS_HSFS_IMPL_H
#define _SYS_FS_HSFS_IMPL_H
-#include <sys/vfs_opreg.h>
+#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
diff --git a/usr/src/uts/common/sys/fs/lofs_info.h b/usr/src/uts/common/sys/fs/lofs_info.h
index f06e13774e..33a1c2c9eb 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 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -30,9 +30,7 @@
#ifndef _SYS_FS_LOFS_INFO_H
#define _SYS_FS_LOFS_INFO_H
-#ifdef _KERNEL
-#include <sys/vfs_opreg.h>
-#endif
+#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
diff --git a/usr/src/uts/common/sys/fs/namenode.h b/usr/src/uts/common/sys/fs/namenode.h
index 3ee6a3226c..d3dfddc4fe 100644
--- a/usr/src/uts/common/sys/fs/namenode.h
+++ b/usr/src/uts/common/sys/fs/namenode.h
@@ -2,8 +2,9 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -22,16 +23,17 @@
/* All Rights Reserved */
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_FS_NAMENODE_H
#define _SYS_FS_NAMENODE_H
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.4 */
+
#if defined(_KERNEL)
#include <sys/vnode.h>
-#include <sys/vfs_opreg.h>
#endif
#ifdef __cplusplus
diff --git a/usr/src/uts/common/sys/fs/pc_node.h b/usr/src/uts/common/sys/fs/pc_node.h
index 5dd8439c18..1e8921c6c1 100644
--- a/usr/src/uts/common/sys/fs/pc_node.h
+++ b/usr/src/uts/common/sys/fs/pc_node.h
@@ -19,13 +19,15 @@
* CDDL HEADER END
*/
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_FS_PC_NODE_H
#define _SYS_FS_PC_NODE_H
+#pragma ident "%Z%%M% %I% %E% SMI"
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -34,10 +36,6 @@ 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)
*
@@ -105,12 +103,8 @@ 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 42e67f8501..084b8e181b 100644
--- a/usr/src/uts/common/sys/fs/tmpnode.h
+++ b/usr/src/uts/common/sys/fs/tmpnode.h
@@ -2,8 +2,9 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,17 +20,18 @@
* CDDL HEADER END
*/
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_FS_TMPNODE_H
#define _SYS_FS_TMPNODE_H
+#pragma ident "%Z%%M% %I% %E% SMI"
+
#include <sys/t_lock.h>
#include <vm/seg.h>
#include <vm/seg_vn.h>
-#include <sys/vfs_opreg.h>
#ifdef __cplusplus
extern "C" {
diff --git a/usr/src/uts/common/sys/fs/ufs_inode.h b/usr/src/uts/common/sys/fs/ufs_inode.h
index ae92f3c53d..05c2d4e508 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 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -57,10 +57,6 @@
#include <sys/fs/ufs_panic.h>
#include <sys/dnlc.h>
-#ifdef _KERNEL
-#include <sys/vfs_opreg.h>
-#endif
-
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/usr/src/uts/common/sys/mode.h b/usr/src/uts/common/sys/mode.h
index 41e822f623..1913b2a573 100644
--- a/usr/src/uts/common/sys/mode.h
+++ b/usr/src/uts/common/sys/mode.h
@@ -2,8 +2,9 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,8 +20,8 @@
* CDDL HEADER END
*/
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
+ * Copyright (c) 1997-1998 by Sun Microsystems, Inc.
+ * All rights reserved.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
@@ -30,14 +31,18 @@
#ifndef _SYS_MODE_H
#define _SYS_MODE_H
-#include <sys/stat.h>
-#include <sys/vnode.h>
+#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
#ifdef __cplusplus
extern "C" {
#endif
/*
+ * REQUIRES sys/stat.h
+ * REQUIRES sys/vnode.h
+ */
+
+/*
* Conversion between vnode types/modes and encoded type/mode as
* seen by stat(2) and mknod(2).
*/
diff --git a/usr/src/uts/common/sys/socketvar.h b/usr/src/uts/common/sys/socketvar.h
index a43fae95aa..bb5fca2732 100644
--- a/usr/src/uts/common/sys/socketvar.h
+++ b/usr/src/uts/common/sys/socketvar.h
@@ -55,10 +55,6 @@
#include <sys/ksocket.h>
#include <sys/kstat.h>
-#ifdef _KERNEL
-#include <sys/vfs_opreg.h>
-#endif
-
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/usr/src/uts/common/syscall/lwp_sobj.c b/usr/src/uts/common/syscall/lwp_sobj.c
index 459b757aef..8b8137d935 100644
--- a/usr/src/uts/common/syscall/lwp_sobj.c
+++ b/usr/src/uts/common/syscall/lwp_sobj.c
@@ -1122,7 +1122,6 @@ upimutex_cleanup()
}
}
-static int iswanted();
int
lwp_mutex_timedlock(lwp_mutex_t *lp, timespec_t *tsp)
{
@@ -1141,6 +1140,7 @@ 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;