diff options
| author | jmcp <James.McPherson@Sun.COM> | 2009-04-30 20:04:06 -0700 |
|---|---|---|
| committer | jmcp <James.McPherson@Sun.COM> | 2009-04-30 20:04:06 -0700 |
| commit | 71a535e3b24d87fb6be3793380f86bd09f2768ac (patch) | |
| tree | e602b2114284c42cf64645658f2b18e50d34f5a6 /usr/src/lib | |
| parent | 9f51456788105f8fa3e4ebf290b4628eb757e65a (diff) | |
| download | illumos-joyent-71a535e3b24d87fb6be3793380f86bd09f2768ac.tar.gz | |
backout 6795209/6392640: breaks sparc build
Diffstat (limited to 'usr/src/lib')
| -rw-r--r-- | usr/src/lib/libbsm/auditxml | 3 | ||||
| -rw-r--r-- | usr/src/lib/libbsm/common/adt_xlate.h | 2 | ||||
| -rw-r--r-- | usr/src/lib/libc/port/stdio/getpass.c | 7 | ||||
| -rw-r--r-- | usr/src/lib/libcurses/screen/tgetch.c | 34 | ||||
| -rw-r--r-- | usr/src/lib/libnisdb/db_headers.h | 18 | ||||
| -rw-r--r-- | usr/src/lib/libnisdb/db_index_c.x | 11 | ||||
| -rw-r--r-- | usr/src/lib/libnisdb/db_mindex_c.x | 11 | ||||
| -rw-r--r-- | usr/src/lib/libnsl/dial/callers.c | 45 | ||||
| -rw-r--r-- | usr/src/lib/libnsl/dial/conn.c | 32 | ||||
| -rw-r--r-- | usr/src/lib/libnsl/rpc/svc_vc.c | 7 | ||||
| -rw-r--r-- | usr/src/lib/libresolv/res_gethost.c | 10 | ||||
| -rw-r--r-- | usr/src/lib/libvolmgt/common/volmgt_on_private.c | 22 | ||||
| -rw-r--r-- | usr/src/lib/pam_modules/sample/sample_acct_mgmt.c | 12 |
13 files changed, 112 insertions, 102 deletions
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') |
